patrikhuber / eos

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

where is the model file sfm_3448.bin for using fit-model-ceres.cpp #362

Closed ranjith502 closed 5 months ago

ranjith502 commented 1 year ago

thanks for the contributions

iam running fit-model-ceres code for creating of 4d face , while running the fit-model-ceres code in the model arguments ("../share/sfm_3448.bin "). but i did not seen sfm_3448.bin file in the share folder. where i need to download that .i though that there is a spelling error so i used sfm_shape_3448.bin. i got below error. where can i download the 4d file

chiplogic@chiplogic-Lenovo-Legion-5-15IMH05:~/3d_face_construction/eos/build/examplsfm_shape_3448.bines$ ./fit-model-ceres --model /home/chiplogic/3d_face_construction/eos/share/sfm_shape_3448.bin --blendshapes /home/chiplogic/3d_face_construction/eos/share/expression_blendshapes_3448.bin --image /home/chiplogic/3d_face_construction/eos/examples/data/image_0010.png --landmarks /home/chiplogic/3d_face_construction/eos/examples/data/image_0010.pts --mapping /home/chiplogic/3d_face_construction/eos/share/ibug_to_sfm.txt --model-contour /home/chiplogic/3d_face_construction/eos/share/sfm_model_contours.json iter cost cost_change |gradient| |step| tr_ratio tr_radius ls_iter iter_time total_time 0 9.050677e+07 0.00e+00 2.58e+06 0.00e+00 0.00e+00 1.00e+04 0 1.79e-01 1.79e-01 1 4.706739e+06 8.58e+07 4.51e+05 0.00e+00 9.51e-01 3.00e+04 1 3.42e-01 5.20e-01 2 1.926316e+05 4.51e+06 2.43e+04 3.63e+01 9.96e-01 9.00e+04 1 3.46e-01 8.66e-01 3 1.765202e+05 1.61e+04 1.49e+01 1.28e+00 1.00e+00 2.70e+05 1 3.41e-01 1.21e+00 Ceres Solver Report: Iterations: 4, Initial cost: 9.050677e+07, Final cost: 1.765202e+05, Termination: CONVERGENCE Error: The MorphableModel used does not contain a colour (albedo) model. ImageCost requires a model that co ntains a colour PCA model. You may want to use the full Surrey Face Model, a different morphable model, or

advance thanks for all the help and contributions

patrikhuber commented 5 months ago

Hi @ranjith502,

Apologies for the late reply, I must have missed the GitHub notification. The Readme contains information and a link to the full model (https://github.com/patrikhuber/eos?tab=readme-ov-file#the-surrey-face-model) from Uni Surrey or alternatively the 4DFM. There are also two big notes & comments in the fit-model-ceres.cpp code here https://github.com/patrikhuber/eos/blob/8196a74659ac0987259bbd54d2960e19bed28e49/examples/fit-model-ceres.cpp#L78-L84 and here https://github.com/patrikhuber/eos/blob/8196a74659ac0987259bbd54d2960e19bed28e49/examples/fit-model-ceres.cpp#L367-L373, exactly at the place where the error you got is printed.