patrikhuber / eos

A lightweight 3D Morphable Face Model library in modern C++
Apache License 2.0
1.92k stars 598 forks source link

Use eos with different landmarks for head pose estimation #128

Closed ardeal closed 7 years ago

ardeal commented 7 years ago

Hi Patrikhuber,

The model in your repository needs 68 landmarks for head pose estimation. For my application, I only need to estimate the rough angle of yaw, pitch and roll. My questions are: 1) can I use your code to train my own model with much less landmarks? if yes, can you roughly tell me how?

2) in order to speed up the estimation of head pose, what functionality(functionalities) should be disabled in your code?

Many thanks for your reply!

patrikhuber commented 7 years ago

Hi,

You can use any number of landmarks you'd like, the minimum number is 4 or 5 though. If you use landmarks different from the IBUG scheme, you just have to make sure the mapping from 2D name to 3D index matches, see the mappings file in share/. You can also find some GitHub issues that discuss similar questions.

You can disable the contour fitting, then it will run in under 1 millisecond. You can also just use the pose fitting function with the mean face and don't do any shape fitting, then it'll be around 200 microseconds. You'll find everything you need by reading the documentation and source code of fit-model (or even fit-model-simple which doesn't use contour fitting).

Additionally I think you have some misconception about the 3D face fitting in general, as there is nothing to train. I recommend you read the literature (you can start with our VISAPP paper).