bharat-b7 / MultiGarmentNetwork

Repo for "Multi-Garment Net: Learning to Dress 3D People from Images, ICCV'19"
282 stars 65 forks source link

Can it work for rescaled SMPL? #38

Closed PRAKHAR-bit closed 4 years ago

PRAKHAR-bit commented 4 years ago

@bharat-b7 @neonb88 First of all thanks for the brilliant work Sorry to disturb again but I have a doubt. All of it works fine. As far as I can infer you posed the garments according tot the " body1" and rotated them at the same rate to produce the try on.

Now , the thing is how did you repose them? I know dress_smply.py is their for it. But, it does not work if the input obj is re-scaled.

For instance in your example, if I try to pose a cloth from the digital wardrobe of Multi Garment Net, the clothe breaks into small small pieces like points in the 3d space.

What i Guess is happening, for each garment and any arbitrary SMPL POSE the Multi Garment Net knows which vertices to keep in the SMPL body by maintaining an "keep_vertices" list so that after removing all the vertices not in the list so , the resultant obj looks like a garment of that category.

It knows which vertices to remove for an SMPL of any arbitrary pose

You can also observe for a given garment category all the clothes are of exactly same shape only the textures are different.

But if we rescale the SMPL model after loading into three.js editor , the code fails to do so and it removes random pieces of the SMPL body.

So , when I tried to pose the clothes according to your "body1", the cloth disintegrated. It mean you have either rescaled the SMPL or used a direct obj file (from any other 3d model creator).

Question- > Can you tell me how to repose the clothes on a scaled obj file without disintegrating the cloth.?

Again ,thanks for all the help

bharat-b7 commented 4 years ago

Hi, scaling should not break the garment since the mesh topology does not depend on the size. Most likely reason for breaking the garment after using "keep_vertices" could be that you are changing the vertex ordering while loading the mesh. Can you check if the mesh vertex ordering is same in your implementation and regular python mpi-mesh library?

PRAKHAR-bit commented 4 years ago

@bharat-b7 I have used the MPI-MESH library only. So the mesh vertex ordering should be same. Still if you can tell how to check that it would be very helpful. Also, does try on works only on SMPL models or any 3d obj model.

PRAKHAR-bit commented 4 years ago

@bharat-b7 sorry for bothering again, but SMPL texture maps obtained from Dense Pose should work on the SMPL . after all they generate a texture map like the multi_tex.jpg right sir?

bharat-b7 commented 4 years ago

@bharat-b7 I have used the MPI-MESH library only. So the mesh vertex ordering should be same. Still if you can tell how to check that it would be very helpful. Also, does try on works only on SMPL models or any 3d obj model.

Just print print the vertices and see that the output is same. Eg: if you load a mesh with trimesh, the vertex order would be different than what you get when you load from mpi-mesh library.

bharat-b7 commented 4 years ago

@bharat-b7 sorry for bothering again, but SMPL texture maps obtained from Dense Pose should work on the SMPL . after all they generate a texture map like the multi_tex.jpg right sir?

multi_text.jpg uses the same texture map layout as SMPL and hence you can load the textures but this will not ensure that garments get the correct texture, eg: texture from the bottom of the shirt could end up on the pants or vice-versa. Correct way to map texture is to load the texture on a SMPL model registered (same pose and shape) to the target garment and copy texture based on the nearest point.

PRAKHAR-bit commented 4 years ago

@bharat-b7 Thanks for the reply sir. Actually what i wanted to do to use densepose on 2d images to generate texture maps for naked SMPL. After that naked texture comes on my SMPL model I can easily dress it as dress_smpl.py. Hope it would not create an issue.

Also sir, as a contribution, I managed to run on remote server and on windows. If you would like me to add the instructions to this repo , I would be honored to do so. Regards

bharat-b7 commented 4 years ago

Thanks for porting the project to windows. It would be great if you'd create a PR

neonb88 commented 4 years ago

@bharat-b7 @neonb88 First of all thanks for the brilliant work Again ,thanks for all the help

@PRAKHAR-bit Just to clarify, this repo is completely Bharat's (with contributions from his peers at MPI). I do not attend graduate school with him. I hope I can provide a bit of help on the issues, but I'm still trying to understand/debug all this work myself :smile:

Good luck!