minar09 / cp-vton-plus

Official implementation for "CP-VTON+: Clothing Shape and Texture Preserving Image-Based Virtual Try-On", CVPRW 2020
https://minar09.github.io/cpvtonplus/
MIT License
352 stars 121 forks source link

Training the GMM #60

Open tasinislam21 opened 3 years ago

tasinislam21 commented 3 years ago

I wanted to train the GMM using the code you have provided but the screenshot below is the kind of result that I am getting:

Untitled

It does not warp the cloth at all after hours of training. What do I do?

VVingerfly commented 3 years ago

Hi, @1702609 I'm facing this problem too. Have you solved this problem? Thanks a lot!

traderdata commented 3 years ago

Hello does the training ever finish? PS: I am new to AI, sorry if it's a stupid question.

edsuch21 commented 3 years ago

The current GMM training doesn't work properly because of correction of a mistake described in issue #50 . The authors made a mistake and wrote in paper that they train GMM by generating cloth mask but they were generating wrap cloth. Now code is compatible with paper but now it doesn't work. The solution is to uncomment line 93 in train.py and comment line 94.

roy-sr commented 3 years ago

Please change the line 94 as follows

pcm = inputs['parse_cloth_mask'].cuda() Lwarp = criterionL1(warped_mask, pcm).

I would recommend to change Lwarp = 3* criterionL1(warped_mask, pcm), as before the issue #50 the loss was criterionL1(warped_cloth, im_c) i.e. warped_cloth and im_c are both 3 channels while warped_mask and pcm have single channel. Multiplying it by 3 will put similar weight in the final "loss"