Official code for CVPR 2021 paper 'Parser-Free Virtual Try-on via Distilling Appearance Flows'
[Paper] [Supplementary Material]
anaconda3
pytorch 1.1.0
torchvision 0.3.0
cuda 9.0
cupy 6.0.0
opencv-python 4.5.1
1 GTX1080 GPU
python 3.6
conda create -n tryon python=3.6
conda activate tryon
conda install pytorch=1.1.0 torchvision=0.3.0 cudatoolkit=9.0 -c pytorch
pip install cupy==6.0.0
pip install opencv-python
git clone https://github.com/geyuying/PF-AFN.git
cd PF-AFN
- First, you need to download the checkpoints from google drive and put the folder "PFAFN" under the folder "checkpoints". The folder "checkpoints/PFAFN" shold contain "warp_model_final.pth" and "gen_model_final.pth".
- The "dataset" folder contains the demo images for test, where the "test_img" folder contains the person images, the "test_clothes" folder contains the clothes images, and the "test_edge" folder contains edges extracted from the clothes images with the built-in function in python (We saved the extracted edges from the clothes images for convenience). 'demo.txt' records the test pairs.
- During test, a person image, a clothes image and its extracted edge are fed into the network to generate the try-on image. No human parsing results or human pose estimation results are needed for test.
- To test with the saved model, run in anaconda with the command
python test.py --name demo --resize_or_crop None --batchSize 1 --gpu_ids 0
and the results will be saved in the folder "results". - To reproduce our results from the saved model, your test environment should be the same as our test environment, especifically for the version of cupy.
- VITON contains a training set of 14,221 image pairs and a test set of 2,032 image pairs, each of which has a front-view woman photo and a top clothing image with the resolution 256 x 192. Our saved model is trained on the VITON training set and tested on the VITON test set.
- To test our saved model on the complete VITON test set, you can download VITON_test.
The use of this code is RESTRICTED to non-commercial research and educational purposes.
@article{ge2021parser,
title={Parser-Free Virtual Try-on via Distilling Appearance Flows},
author={Ge, Yuying and Song, Yibing and Zhang, Ruimao and Ge, Chongjian and Liu, Wei and Luo, Ping},
journal={arXiv preprint arXiv:2103.04559},
year={2021}
}