Super Kawaii Cute Cat Kaoani DeepMotion: Animate 3D (1) - Face Tracking 관련조사

연구/DeepMotion

DeepMotion: Animate 3D (1) - Face Tracking 관련조사

치킨고양이짱아 2023. 5. 31. 16:27
728x90
728x90

full-body motion + facial motion이 모두 포함되어있는 데이터가 필요해서, 비디오로부터 이 데이터들을 뽑아낼 수 있는 방법이 있는지 조사해보다가 DeepMotion에서 관련기술을 지원하고 있다는 사실을 알게 되었다.

나도 처음 접하는 거라 잘 모르지만 공부하면서 글을 작성해볼 계획이다. (이번 글에서는 face tracking 관련조사한 내용을 정리하고 다음 글에서는 full body motion tracking 관련 조사내용을 다룰 것이다.)

그럼 고!

Animate 3D face tracking

비디오 파일를 넣어주면 face feature를 뽑아낼 수 있는 기술이다.

face tracking은 다음과 같은 설정을 통해 할 수 있다 --> 빨간 네모 쳐져있는 부분 옵션을 켜주면 된다.

* 어떤 비디오가 필요할까?

full-body 비디오(head-to-toe), half-body 비디오(head-to-waist), head-shot 비디오(full face) -> 모두 가능하다!

얼굴이 더 크고 clear하게 나올 수록 결과가 더 정확하다고 한다.

full-body 비디오를 넣어줄 경우 너무 멀기 때문에 eye tracking은 이루어지지 않는다. 하지만 facial expression이나 mouth movement, head position같은 경우 잘 캡쳐된다.

half-body 비디오 또는 head-shot 비디오를 넣어줄 경우 eye/iris(홍채) tracking이 잘 이루어진다. 다만 위에서 언급했듯이 얼굴이 더 크게 나올수록 결과가 더 정확하기 때문에 head-shot 비디오를 넣어줬을 때의 결과가 더 퀄리티가 좋다고 한다. 

* face tracking의 결과는 어떤 형식일까? (Face Tracking Techinical Specifications)

face tracking output은 52 ARKit Blendshape standard의 subset을 사용한다고 한다. 여기에는 총 39Blendshapes이 포함되어있으며, 하나의 head와 두개의 eyeball joint에 대한 Rotations를 포함한다.

(참고: subset이 아니라 full standard를 사용할 수도 있었지만, animation retargeting이나 custom character에서 제대로 동작하도록 하기 위해 subset을 사용하였다고 한다.)

여기서 사용하는 39개의 blendshapes는 다음과 같다.

"mouthLeft", "mouthRight", "mouthSmileLeft", "mouthSmileRight", "mouthDimpleLeft", "mouthDimpleRight", "mouthStretchLeft", "mouthStretchRight", "mouthFrownLeft", "mouthFrownRight", "mouthPressLeft", "mouthPressRight", "mouthPucker", "mouthFunnel", "mouthUpperUpLeft", "mouthUpperUpRight", "mouthLowerDownLeft", "mouthLowerDownRight", "mouthShrugUpper", "mouthShrugLower", "mouthRollUpper", "mouthRollLower"
"cheekPuff", "cheekSquintLeft", "cheekSquintRight"
"jawOpen", "jawLeft", "jawRight", "jawForward"
"browInnerUp", "browOuterUpLeft", "browOuterUpRight", "browDownLeft", "browDownRight"
"noseSneerLeft", "noseSneerRight"
"mouthClose"
"eyeBlinkLeft", "eyeBlinkRight

 

근데 나의 경우 52 ARKit Blendshape standard를 처음 들어봐서...이게 뭔지 또 조사해보았다.

 

* 52 ARKit Blendshape standard

일단, 52 ARKit Blendshape standard에 대한 가장 정확한 내용은 아래의 링크에서 확인할 수 있다.

https://developer.apple.com/documentation/arkit/arfaceanchor/blendshapelocation?ref=blog.deepmotion.com 

 

ARFaceAnchor.BlendShapeLocation | Apple Developer Documentation

Identifiers for specific facial features, for use with coefficients describing the relative movements of those features.

developer.apple.com

ARFAceAnchor에서 제공하는 blendShapes dictionary는 특정 facial feature들에 관해 facial expression을 설명한다. dictionary의 각 key(각 feature)들은 0.0~1.0 범위의 floating point number를 가지는데 0.0neutral(중립상태)를 의미하고 1.0maximum movement를 의미한다.

ARKit는 굉장히 많은 blend shape coefficients를 제공하는데, 이걸 다 사용할 필요는 없고 필요에 따라 원하는 coefficients만 사용하면 된다. 예를 들어 비교적 간단한 특징만 필요한 cartoon characeter의 경우 -->  jawOpen, eyeBlinkLeft, eyeBlinkRight coefficients만 사용한다. 반면, professional 3D artist의 경우 디테일한 character model을 만들어야하기 때문에 더 많은 coefficients를 사용하여 사실적인 animation을 만들어낸다.

(참고: blend shape naming에서 사용되는 right, left는 face에 relative하다! 즉, eyeBlingRight coefficient의 경우 얼굴의 오른쪽 eye에 관련된 coefficient를 의미하며, eyeBlinkLeft coefficient의 경우 얼굴의 왼쪽 eye에 관련된 coefficient를 의미한다.)

 

* 직접 해본 후기

생각보다 잘된다! 퀄리티가 좋은 영상도 아니고 중간에 손이 얼굴을 가리는 장면도 있는데 꽤 괜찮게 결과가 나오는 것 같다. default character에 대해 animation을 생성하고 나면, bvh, fbx, glb의 형태로 download가 가능하다.

  • bvh로 다운받으면 skeleton에 대한 pose 값들만 표현되기 때문에 표정관련 data는 얻을 수 없다.
  • fbx로 다운받으면 표정관련 데이터까지 얻을 수 있다.
  • (glb는 뭔지 잘 몰라서 안해봤다..ㅎㅎ)

꽤 유용하게 사용할 수 있을 것 같다. 참고로 무료 요금제에서는 20 sec clip만 넣을 수 있다.

 

누군가에게 도움이 되길!

728x90
728x90