bharat-b7 / MultiGarmentNetwork

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

How to re-target garments including both texture and geometry #6

Closed Eby-123 closed 4 years ago

Eby-123 commented 4 years ago

@bharat-b7 Hi, I've run the file 'dress_SMPL.py' successfully,and the result amazes me very much. But, the body in the results lacks the realistic face.How to re-target garments including both texture and geometry which can make the results more realistic? Any advice would be appreciated.

bharat-b7 commented 4 years ago

Hi, we currently dress SMPL model with the garments. To get better faces you will have to register SMPL model with faces and use that as the underlying body.

Eby-123 commented 4 years ago

Thanks a lot for your reply.Besides, I still have a little confusion.Would you explain the confusion for me?

1 Is the pose of the 3D human model output by MGN the same as that of the human body in the input image?

  1. How to render clothing texture to MGN prediction model?
  2. Are the clothes rendered on the mannequin the same as those on the input image?
bharat-b7 commented 4 years ago
  1. Yes, MGN estimates the pose of human body in the input images.
  2. MGN only estimates garment geometry. For texture you can use something on the lines of https://github.com/thmoa/semantic_human_texture_stitching
  3. MGN infers the SMPL body and the garments corresponding to the input image. In case you are referring to 'dress_SMPL.py', these garments are not predicted by MGN but are part of digital wardrobe we created to train MGN (using multi-mesh registration on scans)
Eby-123 commented 4 years ago

image The figure above shows the human posture of MGN's input image.(Figure 1)

e7952fe83a4aaa37bf46ea89e985fad2 The figure above shows the postures predicted by MGN,(Figure 2)

As you mentioned, figure 1 and Figure 2 should have the same body posture. But now figure 1 and Figure 2 have different body postures. Why?

bharat-b7 commented 4 years ago

MGN predicts garments and body (in T-pose) and SMPL pose parameters. You can use the code 'dress_SMPL.py' to repose the garments according to pose predicted by MGN.

Eby-123 commented 4 years ago

Thank you for your reply. It helps me a lot.

In addition, how to generate Obj files ('pants. Obj ',' shortpants. Obj ',' shirtnocoat. Obj ',' tshirtnocoat. Obj ',' longcoat. Obj ') for five types of clothes?

How to generate obj file of shoes or hair?

Any suggestion will help me a lot, thank you.

yangbiaobiao500 commented 4 years ago

@bharat-b7 Hi, I've run the file 'dress_SMPL.py' successfully,and the result amazes me very much. But, the body in the results lacks the realistic face.How to re-target garments including both texture and geometry which can make the results more realistic? Any advice would be appreciated.

Hello, bother you, I want to know how you installed the mesh when you installed it. The mesh link URL does not support py27. Then when I found the mesh tested on py27, the installation also had problems. This problem bothered me I really need your help, thank you very much

copying mesh/topology/decimation.py -> build/lib.linux-x86_64-3.5/psbody/mesh/topology copying mesh/topology/connectivity.py -> build/lib.linux-x86_64-3.5/psbody/mesh/topology copying mesh/topology/init.py -> build/lib.linux-x86_64-3.5/psbody/mesh/topology copying mesh/topology/linear_mesh_transform.py -> build/lib.linux-x86_64-3.5/psbody/mesh/topology copying mesh/topology/subdivision.py -> build/lib.linux-x86_64-3.5/psbody/mesh/topology creating build/lib.linux-x86_64-3.5/psbody/mesh/geometry copying mesh/geometry/rodrigues.py -> build/lib.linux-x86_64-3.5/psbody/mesh/geometry copying mesh/geometry/triangle_area.py -> build/lib.linux-x86_64-3.5/psbody/mesh/geometry copying mesh/geometry/vert_normals.py -> build/lib.linux-x86_64-3.5/psbody/mesh/geometry copying mesh/geometry/tri_normals.py -> build/lib.linux-x86_64-3.5/psbody/mesh/geometry copying mesh/geometry/init.py -> build/lib.linux-x86_64-3.5/psbody/mesh/geometry copying mesh/geometry/cross_product.py -> build/lib.linux-x86_64-3.5/psbody/mesh/geometry copying mesh/geometry/barycentric_coordinates_of_projection.py -> build/lib.linux-x86_64-3.5/psbody/mesh/geometry creating build/lib.linux-x86_64-3.5/psbody/mesh/serialization copying mesh/serialization/serialization.py -> build/lib.linux-x86_64-3.5/psbody/mesh/serialization copying mesh/serialization/init.py -> build/lib.linux-x86_64-3.5/psbody/mesh/serialization running build_ext [CGAL] deflating cgal from "mesh/thirdparty/CGAL-4.7.tar.gz" to "/home/ybb/study/MGN/mesh-master/build/temp.linux-x86_64-3.5" building 'psbody.mesh.aabb_normals' extension Traceback (most recent call last): File "setup.py", line 266, in additional_kwargs File "/home/ybb/study/MGN/mesh-master/temporary_test/venv/lib/python3.5/site-packages/setuptools/init.py", line 145, in setup return distutils.core.setup(attrs) File "/usr/lib/python3.5/distutils/core.py", line 148, in setup dist.run_commands() File "/usr/lib/python3.5/distutils/dist.py", line 955, in run_commands self.run_command(cmd) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/home/ybb/study/MGN/mesh-master/temporary_test/venv/lib/python3.5/site-packages/wheel/bdist_wheel.py", line 192, in run self.run_command('build') File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "/usr/lib/python3.5/distutils/command/build.py", line 135, in run self.run_command(cmd_name) File "/usr/lib/python3.5/distutils/cmd.py", line 313, in run_command self.distribution.run_command(command) File "/usr/lib/python3.5/distutils/dist.py", line 974, in run_command cmd_obj.run() File "setup.py", line 127, in run return _build_ext.run(self) File "/home/ybb/study/MGN/mesh-master/temporary_test/venv/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 84, in run _build_ext.run(self) File "/usr/lib/python3.5/distutils/command/build_ext.py", line 338, in run self.build_extensions() File "/usr/lib/python3.5/distutils/command/build_ext.py", line 447, in build_extensions self._build_extensions_serial() File "/usr/lib/python3.5/distutils/command/build_ext.py", line 472, in _build_extensions_serial self.build_extension(ext) File "setup.py", line 118, in build_extension return _build_ext.build_extension(self, ext) File "/home/ybb/study/MGN/mesh-master/temporary_test/venv/lib/python3.5/site-packages/setuptools/command/build_ext.py", line 205, in build_extension _build_ext.build_extension(self, ext) File "/usr/lib/python3.5/distutils/command/build_ext.py", line 532, in build_extension depends=ext.depends) File "/usr/lib/python3.5/distutils/ccompiler.py", line 566, in compile depends, extra_postargs) File "/usr/lib/python3.5/distutils/ccompiler.py", line 331, in _setup_compile "'include_dirs' (if supplied) must be a list of strings") TypeError: 'include_dirs' (if supplied) must be a list of strings Makefile:48: recipe for target 'temporary_test/package_creation' failed make: *** [temporary_test/package_creation] Error 1

bharat-b7 commented 4 years ago

It seems mesh library is no longer supported for python 2.7 Raise an issue at https://github.com/MPI-IS/mesh

The code to dress SMPL works with python 3 as well. We have tested MGN with python 2.7 but if you update dependencies such as dirt, cPickle etc., this repo should work with python 3 as well.

neonb88 commented 4 years ago

The code to dress SMPL works with python 3 as well. We have tested MGN with python 2.7 but if you update dependencies such as dirt, cPickle etc., this repo should work with python 3 as well.

Confirmed. I got it working with python3.7.

Frank-Dz commented 4 years ago

@bharat-b7 Hi. Is there any plan to release the train code? Thanks!

Frank-Dz commented 4 years ago

MGN predicts garments and body (in T-pose) and SMPL pose parameters. You can use the code 'dress_SMPL.py' to repose the garments according to pose predicted by MGN.

@bharat-b7 Seems like the repose is just using the displacement map rather than using the pose parameter.

neonb88 commented 4 years ago

@bharat-b7 Hi. Is there any plan to release the train code? Thanks!

@Frank-Dz , As mentioned in another issue comment, look (grep) for def train in network/base_network.py. On my machine, it's line 431. Unfortunately I don't know details of how to use this yet. You can read BLB's paper. Hope that helps! :smile:

dev20111 commented 2 years ago

Hi, we currently dress SMPL model with the garments. To get better faces you will have to register SMPL model with faces and use that as the underlying body.

@bharat-b7 @Eby-123 can you please let me know how to do that.Will it also create hair from input images