yfeng95 / face3d

Python tools for 3D face: 3DMM, Mesh processing(transform, camera, light, render), 3D face representations.
2.65k stars 611 forks source link

bad_ind problem #44

Closed YuTingLiu closed 5 years ago

YuTingLiu commented 5 years ago

line at 67 in generate.m: bad_ind = [10032, 10155, 10280]; and line at 89: tm_inner = tm_inner(:, setdiff(all_ind, bad_ind)); which all_ind is: 1matlabarray([[ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107]])` so, the setdiff not work here. my Model_tri_mouth.mat file is 681kb. Does anyone has got this problem?

YuTingLiu commented 5 years ago

Can someone tell me where to download Model_tri_mouth.mat, I found this file in FaceProfilingRelease_v1.1.zip. Data from this files have different shape accroding to https://github.com/YadiraF/face3d/blob/master/examples/8_generate_posmap_300WLP.py. where load.py have shape information, as below: model: (nver = 53215, ntri = 105840). nver: number of vertices. ntri: number of triangles. 'shapeMU': [3*nver, 1] 'shapePC': [3*nver, 199] 'shapeEV': [199, 1] 'expMU': [3*nver, 1] 'expPC': [3*nver, 29] 'expEV': [29, 1] 'texMU': [3*nver, 1] 'texPC': [3*nver, 199] 'texEV': [199, 1] 'tri': [ntri, 3] (start from 1, should sub 1 in python and c++) 'tri_mouth': [114, 3] (start from 1, as a supplement to mouth triangles) 'kpt_ind': [68,] (start from 1) and this is my output: shapeMU 159645,1: (159645, 1) shapePC 159645,199: (159645, 199) shapeEV 199,1: (199, 1) expMU 159645,1: (159645, 1) expPC 159645,29: (159645, 29) expEV 29,1: (29, 1) texMU 159645,1: (159645, 1) texPC 159645,199: (159645, 199) texEV 199,1: (199, 1) tri 105840,3: (105840, 3) tri_mouth 114,3: (3, 107) kpt_ind 68,: (1, 68)