Super Kawaii Cute Cat Kaoani 논문분석: Real-time Controllable Motion Transition for Characters(1)

연구/논문 리뷰

논문분석: Real-time Controllable Motion Transition for Characters(1)

치킨고양이짱아 2022. 7. 21. 16:02
728x90
728x90

 

 

이 논문에서 소개하는 방법은 2가지의 components를 가지고 있다. 

1) a natural motion manifold model: low level의 단거리 motion dynamics를 학습

2) sampler for motion generation: learned manifold로부터 target frame과 목표 transition duration을 만족하는 motion 생성

 

 

1) The Motion Manifold

 

 

(n-1)개의 프레임으로 구성된 motion M = {S^1, ...S^n-1}을 생성하기 위해 각 프레임은 다음과 같이 표현된다. 

여기서 p는 joint position, r은 joint rotation, v는 joint velocity를 의미한다. 

L은 Lower body joints, h는 hip joints, U는 upper body joints를 각각 의미한다. 

 

 

Starting frame S^0, target frame S^t, 그리고 transition duration z_dt가 주어졌을 때 joint probability(결합확률) of M은 다음과 같이 표현된다. 

위의 식에서 S^0, S^t, z_dt는 서로 독립적이라고 가정할 것이며 이후에 생략할 것이다. 

 

 

그리고 Markov assumption 아래에서 P(M)은 다음과 같이 표현될 수 있다. 

(Markov assumption: 시간 t에서의 상태는 시간 t-1의 상태의 영향만 받는다는 가정)

P(S^(i+1) | S^i)는 다양한 방법으로 학습될 수 있다.

1) recurrent model 을 사용해서 학습될 수도 있고

2) consecutive frames를 co-embedding해서 학습할 수도 있는데

 

-> 본 논문에서는 conditional variable을 쉽게 도입할 수 있는 2) 방법을 채택했다. 

 

 

우리는 2개의 consecutive frames(a.k.a. the dynamics)를 co-embedding하기 위해 latent variable z를 도입했다. 

그리고 next frame을 좀 더 명확하게 하기 위해 v^(i+1)_h (즉, (i+1)번째 frame의 hip velocity)를 도입했다.

(위의 식에서 S^t라고 표현된 부분은 오타가 아닐까 생각된다...S^i가 와야하는게 아닌가?)

 

 

그리고 또 알아둬야할 부분이 모든 joints는 세 그룹으로 나뉜다는 점이다: 1) upper-body, 2) hip 3) lower-body 

이렇게 나눈 이유는 각 group이 generation에 있어서 서로 다른 중요도를 갖기 때문이다. 

 

* hip 의 경우 new frame을 강하게 indication한다. 

* lower-body joints의 경우 foot sliding의 가능성 때문에 visual quality에 큰 영향을 미친다. 

* upper-body joints의 경우 상대적으로 덜 중요하다. 

그래서 우리는 P(S^(i+1)|S^i)에 있어서 lower-body와 hip의 학습에 focus를 맞추었다. 

 

그래서 나온 식은 다음과 같다. 

(위의 식에서도 c_(h, L) 위에 i가 표기되어있어야하는데 오타인것 같다..)

 

* 위의 식을 보면 P(v^(i+1)_h)는 곱하지 않았다는걸 알 수 있는데

  v^(i+1)_h는 prediction 단계에서부터 주어지기 때문에 prior distribution은 removed될 수 있다. 

 

* r dot은 angular velocity를 의미한다. 

 

* P(z)는 다음을 통해 독립적으로 학습된다. 

 

z~N(0, I) 로 가정하면,

P(z)는 condition이 {c^i_(h, L), v^(i+1)_h} 인 CVAE(Conditional VAE)의 Encoder로 condisdered 될수 있다. 

(왜 conditional variable이 이거지?..)

 

이렇게 P(S^(i+1)|S^i)에서 P(z)에 대한 부분을 Conditional VAE의 Encoder로 간주할 수 있었다. 

그럼 식의 나머지 부분인

 

이 부분은 Conditioanl VAE의 Decoder 부분으로 간주할 수 있다. 

(Decoder의 conditional variable은 c^i_(h, L)과 v^(i+1)_h : 현재 프레임의 hip, lower body 정보 + next frame의 hip velocity)

 

* r^(i+1)_L을 directly 하게 reconstructing하는 대신 r^(i+1)_L = rdot^(i+1)_L + r^i_L 의 식을 통해 간접적으로 reconstructing하는 방식을 사용하였다. 

 

* decoder의 conditional varaible은 (c^i_(h, L)과 v^(i+1)_h)

 human motions에 내재적인 ambiguous transitions을 잘 capture할 수 있도록 디자인 되었다.

 

* decoder에서 목표하는 바는 multi-modal mapping을 통해 discriminative transitions을 학습하는 것이다. 

non-discriminative embedding z가 주어지면 conditional variable c^i_(h, L)과 v^(i+1)_h를 사용하여 decoding을 진행해야하는데 이 과정에서 (different dense control signals를 통합하는 것과 유사한) multi-modal mapping을 해야한다.

 

 이를 위해 decoder 부분에 CMoE(Conditioned Mixture of Experts) model을 채택하였다. 

 

-> 이렇게 되면 CMoE의 각 expert network에서 one phase of motion에 집중하여 학습을 진행하기 때문에 discriminative mapping을 학습할 수 있게 된다. 

 

-> gating network에서는 specific input에 대한 weighting scheme for experts를 학습하고 최종 output은 expert outputs의 weighted sum으로 구해지게 된다. 

 

Loss function

 

CVAE를 train시키기 위해서는 loss function을 최소화시켜야한다. loss function은 다음과 같다. 

4가지의 구성요소로 이루어져있다. 

1) L_foot: foot skating loss

2) L_bone: bone length loss

3) L_rec: reconstruction loss

4) L_kl: KL-divergence loss

 

 

1) L_foot: foot skating loss

v^_end: ground에 대한 contacting foot의 predicted relative velocity

만약 velocity가 0.2cm/s보다 작으면 foot이 ground에 contact되어있다고 보았다.

(이 loss term은 0.2cm/s보다 작을때 쓰는 term인가보다.)

(저자에게 질문해본 결과, 이 term은 hip joint space에 대해 정의된 term이라고 한다.)

 

v_h: 이건 hip velocity인데 next frame에 대한 hip velocity는 주어지니까 hat 표시를 안한것같다. 

 

--> 즉, foot contact이 일어났을 때 hip에 대한 contacting foot의 상대속력이 hip joint의 velocity와 크기는 같고

      부호가 반대라면 foot skating이 일어나지 않는다고 판단함

--> joint angle representation을 통해서 forward kinematics를 쓰더라도 foot skating이 일어나는지 판단할 수 있지만,

      불필요한 정보까지 학습될 수 있기 때문에 위와 같이 loss term을 구성함

 

 

2) L_bone: bone length loss 

p^i_j: predicted position of joint j

n(j): joint j의 neighbor joints

 

--> bone의 길이가 ground truth와 얼마나 차이나는지 비교하여 loss를 줌

 

 

3) L_rec: reconstruction loss

predicted pose와 ground truth 사이의 MSE(mean squared error)

 

 

4) L_kl: KL-divergence loss

latent vector의 분포를 standard Gaussian distribution으로 제한하기 위해 사용됨

 

Network 그림을 통해 manifold의 역할 다시 살펴보기

* motion manifold model의 역할: short level의 motion dynamics를 학습함

* motion manifold에는 CVAE model을 채택하여 사용하고 있음

  

* 즉 P(S_{i+1} | S_i)를 학습해야하는데 이 식을 풀어보면 다음과 같음

   -> 여기서 P(z) 부분이 CVAE의 Encoder, 앞쪽 나머지 부분에 대한 식이 CVAE의 decoder 부분에 해당하는 식이라고 보면 됨

   -> z를 Encoding하는 부분으로 CVAE의 Encoder를 사용하였으며

   -> CVAE의 decoder 부분에선 (현재 frame의 정보, z, 다음 frame의 hip velocity)를 받아 다음 frame의 정보를 만들어낸다. 

* CVAE의 decoder 부분에는 CMoE model을 채택, 이렇게 되면 각 expert network에서 one phase of motion에 집중 가능

 

 

728x90
728x90