fyviezhao / M3D-VTON

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

Error when train the model #10

Open hanchaoyuan opened 2 years ago

hanchaoyuan commented 2 years ago

During training, this error occurs!Do you know how to solve? 154000356-60f0c911-7e81-41ad-9716-766b80650ac5 After I declared the variable I got another error 154394009-75ce6375-6c4a-41fa-b2f4-b94e7e2016cf

captain-pool commented 2 years ago

Facing the same problem. For the first one, I set imfd_initial to '' and trained the MTM model. Next when I try to train the DRM model, it fails since input['person_fdepth'] is not a torch tensor, instead it's a list which looks like ['', '', '']. How can I fix this? CC: @fyviezhao

captain-pool commented 2 years ago

This is most likely happening because, the data loader is setting imfd to '' in case of DRM or TFM training and returning it.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/data/aligned_MPV3dDataset.py#L184-L187

This data dictionary is being sent to DRM model's set_input() function, where it is being loaded as a torch tensor and being used to compute gradients.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/models/DRM_model.py#L142-L152

hanchaoyuan commented 2 years ago

This is most likely happening because, the data loader is setting imfd to '' in case of DRM or TFM training and returning it.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/data/aligned_MPV3dDataset.py#L184-L187

This data dictionary is being sent to DRM model's set_input() function, where it is being loaded as a torch tensor and being used to compute gradients.

https://github.com/fyviezhao/M3D-VTON/blob/3c9d16c11dd66a6118baa4408eb4f42c168ef4fe/models/DRM_model.py#L142-L152 I think so, but I have not found a suitable solution, do you have a good solution?

jasmine-97 commented 2 years ago

I face the same problem, so could you tell me how you solve the problem in MTM model?

fyviezhao commented 2 years ago

Sorry for the late reply. Please check the latest code for training, which should now work well.