Rubikplayer / flame-fitting

Example code for the FLAME 3D head model. The code demonstrates how to sample 3D heads from the model, fit the model to 3D keypoints and 3D scans.
http://flame.is.tue.mpg.de/
719 stars 109 forks source link

using load_model in smpl_webuser.serialization #5

Closed sidis8066 closed 5 years ago

sidis8066 commented 5 years ago

i want to save obj file into pickle.guide me to use from smpl_webuser.serialization import save_model. How can i read model file i am using python2.7 ubuntu16.04

Rubikplayer commented 5 years ago

To read model file, in hello_world.py there is an example to read model and save a result mesh into obj file. https://github.com/Rubikplayer/flame-fitting/blob/f0ff5e10f324b2ab19e315be3b96c71863c176af/hello_world.py#L20

To save obj file into pickle, you can try this function: https://github.com/Rubikplayer/flame-fitting/blob/f0ff5e10f324b2ab19e315be3b96c71863c176af/fitting/util.py#L19