face3d icon indicating copy to clipboard operation
face3d copied to clipboard

KeyError: 'vertices'

Open sunkyya opened this issue 7 years ago • 1 comments

$ python ./4_light.py Traceback (most recent call last): File "./4_light.py", line 24, in vertices = C['vertices'] KeyError: 'vertices'

I used another repositry '3DMM'(https://github.com/waps101/3DMM_edges) to generate a .mat file,but when i loaded it by face3d, the error appeared,what shoud i do?

sunkyya avatar Jan 04 '19 06:01 sunkyya

It is just as the error says, your mat object i.e C doesn't have any key called 'vertices'. For instance the default example1.mat has several keys by the names of vertices, colors, full_triangles, triangles. vertices for instance is an array of shape (53215, 3).

You just need to change your mat file to the required format. You can use something like Matlab, Octave or python (with scipy module) to do that.

gsssrao avatar Jan 19 '19 02:01 gsssrao