2nd 3D Face Alignment in the Wild Challenge: Dense Reconstruction from Video Forum

Go back to competition Back to thread list Post in this thread

> Correct errors in evaluate_reconstructions.py

Version 12.6 code correct the -1 index error and delete free vertices, but do not correct corresponding faces which may cause index error in load mesh320. I fix the error by adding the following code in def load_from_obj after line 80.

landmarks = np.array(landmarks)
## add
if len(self.vertices) !=len(uniq):
new_idx = range(0,len(uniq))
idx_map = dict(zip(uniq,new_idx))
new_faces = []
for tri in self.faces:
new_tri = [idx_map[tri[0]], idx_map[tri[1]],idx_map[tri[2]]]
new_faces.append(new_tri)
new_faces = np.array(new_faces)
self.faces = new_faces
##end
self.landmarks_3D = landmarks

Posted by: Jink @ July 25, 2019, 7:24 a.m.

Thanks for pointing this out, it has been added as part of the latest version of the eval program, as well as fixing some other bugs.

Posted by: rohithkp @ July 26, 2019, 2:11 a.m.
Post in this thread