Closed xqyd closed 5 years ago
By "line 182 and line 217", I mean the reshaper.py
Well, after clearing my mind. The value in the original normals.npy is actually of shape (37500,), which means the returned value from compute_normals(...) should be changed accordingly. I tried mean_vertex as the input, and the generated normals.npy can be passed into reshaper.py successfully.
As for the meatball problem. Simply because the training data is too sparse. Once I've increased the number of models into 100, the demo.py can deliver correct result as depicted in the original paper.
Again, great works!
Hi, great works! After playing with the demo. I want to train several SPRING models for a better understanding. I also realized that most of the *.npy files have to be manually added into the obj2npy function which will call several pre-defined functions.
However, for instance, if I have 10 SPRING models in the obj/female folder. Which one should I employ to compute the normals? Say the "vertex" in obj2npy is of shape (len(file_list), V_NUM, 3), but the one required by the compute_normals(vertex, facet) appears to be of shape (V_NUM, 3).
Here's the code for the revised obj2npy:
def obj2npy(label="female"): print(' [**] begin obj2npy about %s... '%label) start = time.time() OBJ_DIR = os.path.join(DATA_DIR, "obj") obj_file_dir = os.path.join(OBJ_DIR, label) file_list = os.listdir(obj_file_dir)
However, the normals.npy generated in this way will cause an error in reshaper.py, line 182 return [x, -self.normals, self.facets - 1] TypeError: bad operand type for unary -: 'map'
If I use your original normals.npy , I can pass this and generate 100 new models with code in line 217. However, even if I am using your normals.npy, and replaced the rest of the *.npy files with my training result, the demo.py will not deliver the correct result.![image](https://user-images.githubusercontent.com/16912042/52283313-33f7e880-299d-11e9-94d7-cef99e5e07bb.png)
As you can see, I am getting a meat ball for setting the female body as weight == 65 kg and height == 166cm.
Any idea how to fix this? Tons of thanks in advance~~~!!!