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
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.