patrikhuber / eos

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

Adding custom 3dmm #346

Closed leg0m4n closed 1 year ago

leg0m4n commented 1 year ago

Thank you so much for your work! Amazing library, has been really helpful with my project.

I was wondering how possible is it to add custom 3dmm? For example, ICT-FaceKit(https://github.com/ICT-VGL/ICT-FaceKit), they have a very detailed model with lots of blendshapes. How would you approach such problem?

Thanks!

patrikhuber commented 1 year ago

Hi @leg0m4n,

Thank you very much for all your kind praise! I'm very glad to hear that my work has been so helpful for you.

Yes, it is quite easy to add a custom 3DMM to eos, especially if it's PCA-based. Have a look at the convert/loader scripts in the eos/share/scripts directory for the BFM2009/2017 and the LYHM. It should be quite easy to write a short Python script that does the same for the ICT-FaceKit model: Load it in Python and then create an eos.morphablemodel.PcaModel and eos.morphablemodel.MorphableModel instance with the right data (mean, eigenvectors, eigenvalues, triangle list, etc.).

I'd be curious to hear how you get along!

leg0m4n commented 1 year ago

Thank you!