patrikhuber / eos

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

[Question] Candide #227

Closed gigadeplex closed 5 years ago

gigadeplex commented 5 years ago

I know this library is for 3DMM but could it also be used for the candide model?

patrikhuber commented 5 years ago

I think this should be possible quite easily. The Candide model presumably has a mean, and variations of some sort (a basis matrix, or offsets). It's probably just a few lines of Python scripting.

gigadeplex commented 5 years ago

Hi, thanks for answering! I'm trying to do it in cpp not python but:

patrikhuber commented 5 years ago

You'll just need to dive into it and see what's going on. The first things I'd do is the usual basic checks on the model, like draw a few samples from it and check whether the scaling and everything is okay, and for example the orthonormal/rescaled basis are correct.

BenJaminKen commented 5 years ago

@eviansplash Does face reconstruction take 0.3 seconds on Android?Just face reconstruction ,not contain faical landmark? default

gigadeplex commented 5 years ago

Hi, sorry for the late reply, I don't usually check my emails: @patrikhuber I did get it to work after some tweaking, thanks! @BenJaminKen The time written down below is the complete JNI call, including the drawing. Also I used the least amount of iterations; The more iterations you go through will significantly increase the time, however, doing so has its advantages as well. Edit: @BenJaminKen to clarify, that includes: parsing the landmarks file into a LandmarkCollection, face reconstruction, taking the rendering points and feeding it into a java obj from jni, then finally drawing it. So not just face reconstruction.

patrikhuber commented 5 years ago

@eviansplash Cool, glad you got it working!

By the way, 300ms sounds like quite a lot - if the fitting is only run for 1-5 iterations or so, it should be more like 1-10ms. So it would be interesting to run a profiler in your case to see why it takes so long, maybe it's your code that generates the Java obj.