patrikhuber / eos

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

Full head model Testing #53

Closed samsgates closed 8 years ago

samsgates commented 8 years ago

Hi Patrik, I have created full head model (PCA model) and generated binary file as well (.bin file). i have used 20 different shape models for creating PCA binary file.

when i testing with fit-model command using my custom binary file (d123.bin), output model generated (obj) as same shape (same output) for all different shape picture (its look like mean model - average shape). i didn't see any difference between all output model

All landmark mappings are properly assign in "ibug2did.txt" file.

"./fit-model -m share/d123.bin -i face2.jpg -l face2.pts -p share/ibug2did.txt -o out"

you have any idea how to resolve this issue?

patrikhuber commented 8 years ago

Hi Sam,

Looks like nice work! Can you have a look at the value of the coefficients returned by the shape fitting? That should help.

PS: In the email I got from GitHub, you posted two images of the head model with it, but they don't appear here - is it a kind of GitHub bug or did you remove that post?

samsgates commented 8 years ago

Top : Generated model Bottom: Reference model

test

samsgates commented 8 years ago

Multiply with coefficients values as below

vector fitted_coeffs = fitting::fit_shape_to_landmarks_linear(morphable_model, affine_from_ortho, image_points, vertex_indices); for (int f =0; f < fitted_coeffs.size(); f++){ fitted_coeffs[i] = fitted_coeffs[i] * 60; }

Result : Almost closed but not accurate, but better output than mean model

Thanh-Binh commented 8 years ago

@samsgates : I am interested in how do you build a full head model? by extending the surrey face model? Thanks.

patrikhuber commented 8 years ago

@samsgates Can you instead of this just output the coeffs? However it looks like they're just very low.

What's the value of fitted_coeffs.size()?

One thing you can try is: fit_shape_to_landmarks_linear has a parameter lambda, the regularisation. Have a look at the current value (the default) and then set lower - for example 0.1 or so.

samsgates commented 8 years ago

fitted_coeffs.size() is "20"

i have changed lamda value from "3.0" to "0.1", and there is no difference in output. but any way i achieved almost better quality using Multiply with coefficients

Thanks for your support

CodingGou commented 7 years ago

@samsgates : I am also interested in how do you build a full head model? by extending the surrey face model? can you show a demo to me about what you are process with your own full head model? Thanks very much! By the way ,your email?