Open jinhee-hub opened 1 year ago
Hi @jinhee-hub
those missing objects refer to the 3D model used to fit the face image. Did you download the auxiliary 3D data before running the code? It can be found here (https://drive.google.com/file/d/1ZL66ZWivvNKZ-gcBIDmjbmzpMf_gimOi/view).
Let me know if that works. Best, Claudio
Thank you for reply.
Unfortunately, I got same error again.
I'd like to make my custom 3D data files for my project. could you give me some tips for me?
Hi @jinhee-hub
Sorry that you still get this error. The 3D data provided in the gdrive are actually MATLAB files (.mat), which I opened in python using the hp5py library.
If that does not work for you, perhaps you can try a different library or, if you have MATLAB, open them in MATLAB and then save them as txt files. That should work by simply using the 'ASCII" flag when saving the files in MATLAB as save('variable','filename.txt','ASCII'). It is fine doing so since 3D data is stored as pointclouds (so a list of x,y,z coordinate) and their related triangulation (Tnew.mat). Saving them as txt might solve your issue since then you can read them in python using a text parser.
Please remember that triangulation file stores indices of point to be joined together to form triangles. Since the triangulation has been computed in MATLAB, if you read them in python you should subtract 1 to make the 1-based indexing of matlab to match the 0-based indexing in python.
Let me know if you have any further questions.
@clferrari Hello Thank you for sharing the code. I tried to run your code but sometimes got errors.
or
KeyError: "Unable to open object (object 'idxm' doesn't exist)
Could you give me some comments? Thank you!