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
346 stars 120 forks source link

Unknown Error #29

Closed JahangirButt-BU closed 3 years ago

JahangirButt-BU commented 3 years ago

got this error with the line: python train.py --name GMM --stage GMM --workers 4 --save_count 5000 --shuffle image image

and got this with: python train.py --name TOM --stage TOM --workers 4 --save_count 5000 --shuffle image

can you guide me, on how to solve these error downloaded the data, model and did according to the read me

image

image

minar09 commented 3 years ago

Seems like CUDA version problem in your machine, you can try upgrading maybe.

JahangirButt-BU commented 3 years ago

WHT is a Cuda?

JahangirButt-BU commented 3 years ago

and is NVidia GPU a must or do I compulsory need NVidia or is any other GPU fine? can I run this without a GPU?

minar09 commented 3 years ago

Yes, you can run with CPU only. If you want to run in GPUs, mention the gpu ids in the run arguments of train.py/test.py Any GPU should be okay as long as NVIDIA driver is available for that GPU I guess. I could be wrong. Please try to find out online in details.

JahangirButt-BU commented 3 years ago

image image image

cuda error is resolved by download pytorch again, now i have only CPU and this error showing

minar09 commented 3 years ago

You can modify the code to run without GPU. For example as shown below, make use_cuda=False image

JahangirButt-BU commented 3 years ago

oh thankyou so much, greatly appreciated. ill close this issue when successfully run. now facing issue number #6

JahangirButt-BU commented 3 years ago

image image

did as u said, did cuda=False in all locations ( inside network file) still getting this

JahangirButt-BU commented 3 years ago

resolved the above according to issue #21 but still facing this image image

JahangirButt-BU commented 3 years ago

image

is this how, its suppose to work?

minar09 commented 3 years ago

@JahangirButt-BU , yes its training now. If you have downloaded the pre-trained model, you can do testing directly as well. Good luck.

JahangirButt-BU commented 3 years ago

thankyou for all the help, training and testing going good.

but now I want to put a specific cloth onto a specific person, i understand these points:

  1. image (image of a person, crop/resize to 192 x 256 (width x height) pixels)
  2. image-parse (you can generate with LIP_JPPNet or CIHP_PGN pretrained networks from the person image. If you use LIP_JPPNet/LIP_SSL, then you need to run dataset_neck_skin_connection.py and body_binary_masking.py after generating the segmentation files. For CIHP_PGN segmentation, see this comment)
  3. cloth (in-shop cloth image, crop/resize to 192 x 256 (width x height) pixels)
  4. cloth-mask (binary mask of cloth image, you can generate it with simple pillow/opencv function)
  5. pose (pose keypoints of the person, generate with openpose COCO-18 model )

but where do I put my specified image and cloth image or should some change be made in code?

minar09 commented 3 years ago

Please check the VITON dataset, test folder for custom images. You can arrange following exactly as their folders. Also, you need to make a test_pairs.txt file for your custom images. Follow the VITON dataset format to keep same arrangements, otherwise you can modify the code.

JahangirButt-BU commented 3 years ago

image

Any Clue on how to fix this error. I generated image-parse and image-parse-new using LIP_JPPNet then running ' dataset_neck_skin_correction.py ' i get this

minar09 commented 3 years ago

You are probably adding RGB segmentation files, instead of using the grayscale files e.g. [0,20]. Please check the viton dataset segmentation format.

JahangirButt-BU commented 3 years ago

image image image image

yes i arranged it according to the viton dataset segmentation format

JahangirButt-BU commented 3 years ago

can you also provide the code for generating cloth mask i am unable to find the right code/function to generate the desiired mask of cloths

minar09 commented 3 years ago

can you also provide the code for generating cloth mask i am unable to find the right code/function to generate the desiired mask of cloths

Just use the opencv binary thresholding function or something as you see fit for your images.

JahangirButt-BU commented 3 years ago

thankyou, any clue on the other issue? ![Uploading image.png…]()