fyviezhao / M3D-VTON

Official code for ICCV2021 paper "M3D-VTON: A Monocular-to-3D Virtual Try-on Network"
166 stars 38 forks source link

Error when run on Custom data #6

Open huytuong010101 opened 2 years ago

huytuong010101 commented 2 years ago

Thank you for perfect repository I am following the readme to run on custom dataset but i get this error (man_person.png is my input image) when I run MTM model

FileNotFoundError: [Errno 2] No such file or directory: 'mpv3d_example/depth/man_person_depth.npy'

Can you help me fix this error?

hasibzunair commented 2 years ago

Having the same issue. Followed all the steps for running on custom data.

fyviezhao commented 2 years ago

Sorry for the delay. Please check the latest code that has fixed this issue.

sidk99 commented 2 years ago

This seems to have fixed the issue for running the first module, the second and third modules still need a depth map. Isn't the MTM module supposed to produce the initial depth map? (Inference on MTM with the --add_depth flag only generates one depth map corresponding to front, but to generate point cloud both front and back seem to be required)

When running the DRM inference command image

fyviezhao commented 2 years ago

@sidk99 I've double-checked the latest inference code and it runs well under its original setting. Yes, the MTM module produces the initial depth map required by the other two modules, therefore you do not need worry about it during inference. For training, however, a (pseudo) ground truth depth is required and in our paper it is generated by the PIFuHD model.

The reported error looks a bit strange. As you can see here in the data loader, for DRM it will load the .npy depth file instead of a .png image, is there any particular reason you need to save and load the depth as a png file?

Nevertheless, you can use a png image to represent depth though I would not recommend since it will drop floating-point accuracy, and I suppose you have modified the data loader to do that. Then you should also modify this line in the test.py to save the initial_depth as a png file, thereafter you can load it for DRM without problems.