논문 리뷰/face

[논문 리뷰] Facial Retargeting with Automatic Range of Motion Alignment

curious_cat 2023. 6. 12. 23:52
728x90
728x90

개요

논문 링크: https://www.scss.tcd.ie/Rachel.McDonnell/papers/a154blancoiribera.pdf

간단하게 요약하자면 얼굴에 marker을 찍고 트래킹했을 때 marker의 움직임을 어떻게 캐릭터의 blendshape으로 변환할 수 있는지 새로운 방법을 제안한 논문. 특히 range of motion이 고려되었다는 점이 주목할만하다.

용어

  • Facial motion capture: actor의 얼굴 움직임을 정확하게 측정하는 것을 뜻한다
  • Facial animation retargeting: actor의 얼굴 움직임을 다른 캐릭터의 얼굴로 정확하게 transfer하는 것을 뜻한다. 이때 얼굴 움직임의 semantic meaning은 잘 보존되어야 한다 (예를 들어서 actor이 눈을 감으면 캐릭터도 눈을 감아야 한다)
  • Parallel parametrization: actor (또는 캐릭터)의 blendshape과 (다른) 캐릭터의 blendshape들이 1대1로 대응되도록 blendshape들이 정의되어 있으면 actor (또는 캐릭터)와 (다른) 캐릭터가 서로 parallel parametrized되어있다고 한다.  참고로 actor가 캐릭터를 animate할 때 보통 actor와 캐릭터에 대해서 의미가 같은 blendshape을 미리 정의해 두고 actor의 모션을 blendshape로 변환(decompose)한 후 캐릭터에 transfer한다. 하지만 실제로 blendshape의 의미가 정확히 같은 facial rigs들은 흔하지 않다. 또한 캐릭터의 얼굴은 보통 과장된 얼굴을 (눈이 크다던가) 갖고 있기 때문에 사람 얼굴에서 캐릭터 얼굴로 blendshape transfer하는 것이 쉽지 않다.

논문 핵심 내용

  • 이 논문에서는 자동으로 캐릭터의 blendshape에 대응되는 actor specific blendshape을 만들어주는 알고리즘을 제안한다. 그리고 이 actor specific blendshape을 사용해서 actor의 다양한 표정을 blendshape으로 decompose한 후 캐릭터에 입히는 방법도 제안한다.
  • Range of motion을 잘 고려하도록 짜여있다 (예를 들어 캐릭터의 눈이 actor에 비해서 크면 눈을 감을 때 눈꺼풀의 range of motion이 더 커야 하는데 이런 것들이 잘 고려되어 있다는 뜻)
  • 이 논문에서 제시하는 알고리즘은 actor의 다양한 표정이 학습 데이터로 필요하다
  • 밑에 그림 참고: actor neutral, actor training sequence와 character blendshape을 기반으로 (복잡한 과정을 통해서) actor와 캐릭터의 parallel parametrization을 구하고, 이 parallel parametrization 기반으로 actor이 캐릭터를 animate한다.

방법

Notation

  • \( v_k = (v^1_k,...,v^N_k)^T\):  캐릭터 얼굴의 vertex
    • N = vertex 수
    • k=0: neutral 표정
    • k=1,...,K: K개의 blendshape에 해당하는 vertex
  • \( \delta v_k = v_k - v_0\): delta blendshape (blendshape에 대한 자세한 내용은 Lewis의 "Practice and Theory of Blendshape Facial Models" 참고)
  • \( w=(w_1,...,w_K)^T\): blendshape weight
  • 표정 w를 취한 캐릭터 얼굴은 다음과 같이 얻을 수 있다:

  • \( a_f = (a^1_f,...,a^M_f)^T\): actor의 performance (얼굴 모션)을 인코딩해주는 marker의 위치. 
    • M = marker의 수
    • f: 얼굴 모션 캡처 비디오의 frame index
    • 각 component는 3차원 위치-> a_f는 3M dimensional vector
    • \( \delta a_f = a_f - a_0\), f=0일 때는 neutral 표정
  • \( s_k = (s_k^1,...,s_k^M)^T \): actor 얼굴에 있는 M개의 marker와 대응되는 캐릭터 얼굴의 vertex들의 위치
    • \( v_k\) 에서 marker와 대응되는 vertex들을 sampling해서 얻는다 (이 논문에서는 사람이 직접 대응되는 vertex를 구하는 듯)
    • actor의 얼굴에 있는 marker이 상대적으로 많지 않기 때문에 sparse representation of blendshape이라고 부름
    • \( \delta v_k\)와 비슷하게 \( \delta s_k = s_k - s_0\)라고 정의

목표

  1. actor의 personalized blendshape \(p_k = (p^1_k,...,p^M_k)^T \) 구하기. 각 \( p_k\)는 \( s_k\)와 대응된다
  2. personalized blendshape을 구했을 때 새로운 비디오 frame f마다 actor의 움직임에 대응되는 캐릭터의 blendshape weight \( w_f\)를 구하기. 기본적으로 밑에 있는 Eq 2 를 최소화하지만 regularization이 필요하다 (나중에 설명; Eq 16 참고)

personalized blendshape p 구하는 방법

  • F개의 actor 표정 frame들을 학습에 사용한다. 이때 blendshape에 대응되는 표정들이 포함되어야 하고, actor의 range of motion을 잘 커버해줘야 한다 (예를 들어 최대한 입을 벌리는 표정이 있어야 range of motion이 잘 캡처된다). 
  • 이러한 데이터를 기반으로 다음과 같은 loss 를 최소화한다 (정의는 밑에 참고), alpha = 0.01, beta = 0.1 사용

Facial motion similarity

  • 우선 actor의 표정을 캡처한 frame f와 캐릭터의 sparse blendshape s와의 similarity를 Eq 5처럼 정의하자.  actor의 marker의 움직임과 character의 sparse blendshape의 모션이 얼마나 비슷한지 dot product로 나타낸다 (cosine similarity). 완전 동일한 motion이면 1, 반대로 움직이면 -1이 된다. 정확히는 actor expression과 sparse blendshape의 correlation이다 (Pearson Correlation Coefficient, mean = neutral expression):

  • correlation coefficient 자체로 의미가 있지만, 후처리를 하면 더 유용한 값을 얻을 수 있다. 우선 trust value 를 Eq 6처럼 정의할 수 있는데, 동기는 다음과 같다. (i) 눈썹을 올리는 것 같이 특징이 명확한 blendshape은 frame에서 blendshape과 매칭하는 것이 쉽다 (입과 관련된 blendshape은 비슷비슷하게 생긴 것들이 많다. 예를 들어 ARKit blendshape같은 경우 mouth pucker, mouth funnel 이 비슷하다 https://developer.apple.com/documentation/arkit/arfaceanchor/blendshapelocation.  반면 눈썹을 올리는 blendshape와 겹치는 blendshape은 별로 없다)  (ii) range of motion이 큰 blendshape은 frame에서 blendshape과 매칭하는 것이 쉽다 (예를 들어 jaw open같은 벌리는 큰 모션은 알기 쉽지만, mouth dimple같은 미묘한 움직임은 어렵다). Trust value를 계산하기 위해서 우선 sparse blendshape들을 displacement 크기 \( || \delta s_k ||\)를 사용해서 큰 값에서 작은 값 순으로 re-ordering을 해준다. \( c^+_{k,l} =max(0,c_{k,l})\)로 정의하고 trust value는 다음과 같이 정의한다 (frame의 표정과 blendshape을 대응시키는 것이 얼마나 믿을 수 있는지 수치화한 값)

  • High correlation은 증폭해 주고 low correlation은 다음과 같이 낮춰준다 (r = 15)

  • facial motion similarity는 trust value를 사용해서 \( c^+_{k,f}\)와 \( b(c^+_{k,f})\) 사이를 interpolation해준다

Key expression extraction

  • 학습을 위해 녹화한 actor의 비디오에서 핵심 expression만 뽑아서 사용한다.
  • 식 8을 기반으로 각 frame이 K개의 blendshape들과 얼마나 비슷한지 수치화해서 peak expression들을 추출한다 
  • 우선 다음과 같이 각 frame이 특정 blendshape과 잘 매칭이 되는지 식 8을 사용해서 구한다

  • Fig 7에서 구한 similarity를 gaussian filter을 사용해서 스무딩 하고 모든 blnedshape에 대해서 더한 후 local peak들을 구한다 (Fig 8)

  • 이렇게 추출한 frame들을 학습 데이터로 사용하고, 식 (4)를 최소화해서 personalized blendshape \( \delta p_k\)를 구한다

식 (4)의 Loss functions

  • E_match: sparse blendshape s_k에 대응되는 actor의 personalized blendshape p_k는 frame에서 marker 움직임이 얼마나 blendshape과 비슷한지 weight를 줘서 (위에서 정의한 similarity) Eq 10처럼 정의한다. blendshape의 locality를 고려해 주기 위해서 mask vector u를 도입한다. 예를 들어 왼쪽 눈을 감는 blendshape이 양쪽 눈을 감는 frame과 correlation이 높을 수 있지만 서로 비슷한 움직임을 보이도록 하면 왼쪽 눈을 감는 blendshape의 의미가 보존되지 않는다. 그래서 오른쪽 눈의 motion은 무시하도록 해줘야 하는데, 이것을 위해서 u를 도입한다. 각 blendshape k마다 \( u_k\)의 component는 \( || \delta s^m_k|| / \max_{1 \le m \le M} || \delta s^m_k ||\)로 정의한다. E_match는 Eq 10 참고. 기본적으로 personalized blendshape을 기반으로 actor 의 표정을 reconstruction하되, 각 blendshape에서 움직여야하는 vertex만 사용해서 reconstruction하도록 제한을 둔다 (u의 역할).

  • E_mesh:  캐릭터의 blendshape과 비슷하게 constraint를 주기 위해서 캐릭터 blendshape을 actor 의 neutral expression marker 위치에 transfer해서 \( \delta g_k^m\)을 얻는다 ( "Spacetime Expression Cloning for Blendshapes"에서 제안한 RBF deformation을 사용했다고 하는데, deformation transfer같은 다른 방법을 사용해도 괜찮다). E_mesh는 다음과 같이 정의된다 (\( \Delta\)는 cotangent weight를 사용하는 스탠더드 한 laplace operator)

  • E_CEG (cross expression constraint):  식 12처럼 graph laplacian을 정의하고 E_CEG는 식 13으로 정의한다. 동기는 sparse blendshape 사이의 correlation을 personalized blendshape도 유지하도록 하는 것이다.

  • 참고로 식 10에서 peak expression의 marker 위치를 blendshape 으로 decompose해주기 때문에 range of motion이 잘 처리된다. Example based facial rigging에서는 blendshape weight도 동시에 찾기 때문에 이러한 range of motion의 ambiguity가 있다 (blendshape weight를 작게 잡고 delta blendshape을 더 크게 잡는 것과, blendshape weight를 더 크게 잡고 delta blendshape를 더 작게 잡는 것의 ambiguity가 어느 정도 존재하기 때문).

Personalized blendshape 기반 Retargeting

  • personalized blendshape을 구한 후 이제 actor이 여러 가지 표정을 지으면 이 표정들을 blendshape으로 decomposition해서 캐릭터에 입히는 방식으로 캐릭터를 컨트롤할 수 있다
  • 기본적으로 Eq (2)의 E_fit을 최소화하지만 E_prior, E_sparse로 regularize한다 (밑에 정의)

  • E_prior: 캐릭터의 얼굴이 neutral 표정에 비해서 너무 많이 bending하는 것을 막기 위한 regularization이다 ( \( \Delta\)는 cotangent weight laplacian)

  • E_sparse=\( \frac{1}{K} ||w||_1\) , L1 regularization
  • \( \mu=0.3, \nu = 0.6 \) 사용했다고 한다

결과

예시 일부

  • RBF는 "Spacetime Expression Cloning for Blendshapes"에서 제안한 방법
  • EBFR는 "Example-based facial rigging"에서 제안한 방법
  • 이것을 보면 월등하게 성능이 좋아 보이지만 개인적으로 생각하기에는 example based facial rigging과 비교는 공평하지 않은 것 같다 (triangle mesh에 특화된 기법이라서 sparse marker로 잘 구해질지 의문)
728x90
728x90