Method and apparatus for learning dependency of feature data
A neural network device for learning dependency of feature data includes: a memory in which at least one program is stored; and a processor that performs a calculation by executing the at least one program, in which the processor is configured to acquire graph information including a data node for a human body; extract feature data corresponding to a plurality of joints constituting the human body from the graph information; acquire a self-attention output corresponding to the feature data based on a self-attention mechanism; and generate result data for a motion of the human body based on the self-attention output, and the self-attention output includes position information acquired based on positional encoding of the feature data and structural information acquired based on geodesic encoding of the feature data.
1 . A neural network device for learning dependence of feature data, comprising:
a memory in which at least one program is stored; and
a processor that performs a calculation by executing the at least one program,
wherein the processor is configured to:
acquire graph information including a data node for a human body;
extract feature data corresponding to a plurality of joints constituting the human body from the graph information;
acquire a self-attention output corresponding to the feature data based on a self-attention mechanism, wherein, to acquire the self-attention output, the processor is further configured to:
identify a plurality of point positions corresponding to the plurality of joints from the feature data;
perform the positional encoding based on the plurality of point positions, wherein the positional encoding is performed according to Equation 2 below:
PE ( p i )= P ( p i /10000 2q/d ) (Equation 2),
where p i denotes any one of the plurality of point positions, q denotes a dimension, and d denotes a total embedding dimension value;
identify geodesic positions corresponding to the plurality of joints from the feature data; and
perform the geodesic encoding based on the geodesic position; and
generate result data for a motion of the human body based on the self-attention output, and
the self-attention output includes position information acquired based on positional encoding of the feature data and structural information acquired based on geodesic encoding of the feature data.
2 . The neural network device of claim 1 , wherein, to identify the geodesic positions corresponding to the plurality of joints from the feature data, the processor is further configured to:
identify geodesic distances to the plurality of point positions;
generate the plurality of groups based on the geodesic distances; and
determine group positions corresponding to the plurality of groups.
3 . The neural network device of claim 2 , wherein, to identify the geodesic distances to the plurality of point positions, the processor is further configured to: identify a predetermined one of the plurality of point positions as a reference position, and identify geodesic distances between the plurality of point positions and the reference position.
4 . The neural network device of claim 3 , wherein the plurality of groups include point positions having the same geodesic distance among the plurality of point positions.
5 . The neural network device of claim 3 , wherein the geodesic encoding is performed according to Equation 3 below:
GE
(
p
i
)
=
𝒫
(
g
i
/
10000
2
q
/
d
)
,
g
i
=
𝒢
(
p
i
,
p
r
)
,
(
Equation
3
)
where p r denotes the reference position, q denotes a dimension, and d denotes a total embedding dimension value.
6 . A method of operating a neural network device for learning dependence of feature data, comprising:
acquiring graph information including a data node for a human body;
extracting feature data corresponding to a plurality of joints constituting the human body from the graph information;
acquiring a self-attention output corresponding to the feature data based on a self-attention mechanism, wherein the acquiring of the self-attention output includes:
identifying a plurality of point positions corresponding to the plurality of joints from the feature data;
performing the positional encoding based on the plurality of point positions, wherein the positional encoding is performed according to Equation 2 below:
PE ( p i )= P ( p i /10000 2q/d ) (Equation 2),
where p i denotes any one of the plurality of point positions, q denotes a dimension, and d denotes a total embedding dimension value;
identifying geodesic positions corresponding to the plurality of joints from the feature data; and
performing the geodesic encoding based on the geodesic position; and
generating result data for a motion of the human body based on the self-attention output,
wherein the self-attention output includes position information acquired based on positional encoding of the feature data and structural information acquired based on geodesic encoding of the feature data.
7 . The method of claim 6 , wherein the identifying of the geodesic positions corresponding to the plurality of joints from the feature data includes:
identifying geodesic distances to the plurality of point positions;
generating the plurality of groups based on the geodesic distances; and
determining group positions corresponding to the plurality of groups.
8 . The method of claim 7 , wherein the identifying of the geodesic distances to the plurality of point positions includes:
identifying a predetermined one of the plurality of point positions as a reference position; and
identifying geodesic distances between the plurality of point positions and the reference position.
9 . The method of claim 8 , wherein the plurality of groups include point positions having the same geodesic distance among the plurality of point positions.
10 . The method of claim 8 , wherein the geodesic encoding is performed according to Equation 3 below:
GE
(
p
i
)
=
𝒫
(
g
i
/
10000
2
q
/
d
)
,
g
i
=
𝒢
(
p
i
,
p
r
)
,
(
Equation
3
)
where p r denotes the reference position, q denotes a dimension, and d denotes a total embedding dimension value.