GP-VTON: Towards General Purpose Virtual Try-on via Collaborative Local-Flow Global-Parsing Learning
GP-VTON aims to transfer an in-shop garment onto a specific person.
We provide the fine-grained parsing result of the model images and in-shop garment images from two existing high-resolution (1024 x 768) virtual try-on benchmarks, namely, VITON-HD and DressCode.
We provide two version of the parsing results. One is with the original resolution (1024 x 768). Another is with the resolution of 512 x 384, on which our experiment are conducted.
VITON-HD
Resolution | Google Cloud | Baidu Yun |
---|---|---|
1024 x 768 | Available soon | Available soon |
512 x 384 | Download | Download |
DressCode
Resolution | Google Cloud | Baidu Yun |
---|---|---|
1024 x 768 | Download | Download |
512 x 384 | Download | Download |
Install required packages:
pip3 install -r requirements.txt
We conduct experiments on the publicly available VITON-HD and DressCode datasets. For convenience, we provide all of the conditions used in our experiments in the following links.
Resolution | Google Cloud | Baidu Yun |
---|---|---|
VITON-HD(512 x 384) | Download | Download |
DressCode(512 x 384) | Download (coming soon) | Download (coming soon) |
VITON-HD
Please download the pre-trained model from Google Link or Baidu Yun Link, and put the downloaded directory under root directory of this project.
To test the first stage (i.e., the LFGP warping module), run the following command:
python3 -m torch.distributed.launch --nproc_per_node=8 --master_port=4739 test_warping.py \
--name test_partflow_vitonhd_unpaired_1109 \
--PBAFN_warp_checkpoint 'checkpoints/gp-vton_partflow_vitonhd_usepreservemask_lrarms_1027/PBAFN_warp_epoch_121.pth' \
--resize_or_crop None --verbose --tf_log \
--batchSize 2 --num_gpus 8 --label_nc 14 --launcher pytorch \
--dataroot /home/tiger/datazy/CVPR2023/Datasets/VITONHD \
--image_pairs_txt test_pairs_unpaired_1018.txt
To test the second stage (i.e., the try-on generator), run the following command:
python3 -m torch.distributed.launch --nproc_per_node=8 --master_port=4736 test_tryon.py \
--name test_gpvtongen_vitonhd_unpaired_1109 \
--resize_or_crop None --verbose --tf_log --batchSize 12 --num_gpus 8 --label_nc 14 --launcher pytorch \
--PBAFN_gen_checkpoint 'checkpoints/gp-vton_gen_vitonhd_wskin_wgan_lrarms_1029/PBAFN_gen_epoch_201.pth' \
--dataroot /home/tiger/datazy/CVPR2023/Datasets/VITONHD \
--image_pairs_txt test_pairs_unpaired_1018.txt \
--warproot /home/tiger/datazy/CVPR2023/GP-VTON-partflow_final_kaiwu/sample/test_partflow_vitonhd_unpaired_1109
Note that, in the above two commands, parameter --dataroot
refers to the root directory of VITON-HD dataset, parameter --image_pairs_txt
refers to the test list, which is put under the root directory of VITON-HD dataset, parameter --warproot
in the second command refers to the directory of the warped results generated by the first command. Both of the generated results from the two commands are saved under the directory ./sample/exp_name
, in which exp_name
is defined by the parameter --name
in each command.
- Release the ground truth of the garment parsing and human parsing for two public benchmarks (VITON-HD and DressesCode) used in the paper
- Release the the pretrained model and the inference script for VITON-HD dataset.
- Release the the pretrained model and the inference script for DressCode dataset.
- Release the training script.
If you find our code or paper helps, please consider citing:
@inproceedings{xie2023gpvton,
title = {GP-VTON: Towards General Purpose Virtual Try-on via Collaborative Local-Flow Global-Parsing Learning},
author = {Zhenyu, Xie and Zaiyu, Huang and Xin, Dong and Fuwei, Zhao and Haoye, Dong and Xijin, Zhang and Feida, Zhu and Xiaodan, Liang},
booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {June},
year = {2023},
}
Thanks to PF-AFN, our code is based on it.
The use of this code is RESTRICTED to non-commercial research and educational purposes.