Need help with Deep-Virtual-Try-on-with-Clothes-Transform?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

b01902041
148 Stars 41 Forks 13 Commits 8 Opened issues

Description

An image-based virtual try-on system with deep learning.

Services available

!
?

Need anything else?

Contributors list

# 273,993
Python
emotion...
emotion...
2 commits

Deep Virtual Try-on with Clothes Transform

Source code for paper "Deep Virtual Try-on with Clothes Transform"

Overall Architecture

Dependencies

Install dependencies using pip.

shell
pip install -r requirements.txt

Step1: CAGAN

code and data

  • Training:
    CAGAN.py
    python CAGAN.py
    
  • Testing:
    Testing_with_fixed_data.py
    python Testing_with_fixed_data.py
    
  • Data:
    MVC_image_pairs_resize_new.zip

parameters in code

Training: CAGAN.py

  • Data should be put in

"./MVC_image_pairs_resize_new/1/*.jpg"
(for person images)

"./MVC_image_pairs_resize_new/5/*.jpg"
(for clothes images)

470: data = "data folder name"

471: train_A = "person images folder name"

473: filenames_1 = "person images folder name"

474: filenames_5 = "clothes images folder name"

617, 618: set "save model path"

Testing: Testingwithfixed_data.py

  • Data should be put in

"./MVC_image_pairs_resize_new/1/*.jpg"
(for person images)

"./MVC_image_pairs_resize_new/5_test/*.jpg"
(for clothes images)

215: set "model path"

220: data = "data folder name"

221: train_A = "person images folder name"

222: filenames_5 = "clothes images folder name"

224: outrootdir = "output folder name"

225: origin_dir = "save input person images"

226: target_dir = "save target clothes images"

227: output_dir = "save output images"

228: mask_dir = "save output masks"

230: testing_number = "how much data you want to test"

Step2: Segmentation

code

https://github.com/Engineering-Course/LIP_SSL

  • Modify mask:

    modify_mask.m
  • Save the masks file to png file:

    show.m
  • Combine all the masks:

    combine_with_CAGANmask.m

Step3: Transform

code and data

  • Training:

    unet.py
    data.py
    python unet.py
    
  • Testing:

    Testing_unet.py
    python Testing_unet.py
    
  • Data:

    transform_data.zip
    transform_test_data.zip

parameters in code

Training: unet.py

336: model_dir = "save model path"

337: result_dir = "save results path"

223: set "loss type"

data.py

15: set "data path"

Testing: Testing_unet.py

16: testdatapath = "data path"

17: testimgfolder = "target clothes image folder name"

18: testmaskfolder = "mask folder name"

19: model_name = "model name"

20: result_dir = "save results path"

Step4: Combination

code

Combine_image.m

Results

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.