IJCV (2025): TryOn-Adapter
This repository is the official implementation of TryOn-Adapter
TryOn-Adapter: Efficient Fine-Grained Clothing Identity Adaptation for High-Fidelity Virtual Try-On
Jiazheng Xing, Chao Xu, Yijie Qian, Yang Liu, Guang Dai, Baigui Sun, Yong Liu, Jingdong Wang
TODO List
-
Release Texture Highlighting Map and Segmentation Map -
Release Data Preparation Code -
Release Inference Code -
Release Model Weights
Getting Started
Installation
- Clone the repository
git clone https://github.com/jiazheng-xing/TryOn-Adapter.git
cd TryOn-Adapter
- Install Python dependencies
conda env create -f environment.yaml
conda activate tryon-adapter
Data Preparation
VITON-HD
The VITON-HD dataset serves as a benchmark. Download VITON-HD dataset.
In addition to above content, some other preprocessed conditions are in use in TryOn-Adapter. The preprocessed data could be downloaded, respectively. The detail information and code see data_preparation/README.md.
Generate Warped Cloth and Warped Mask based on the GP-VTON.
Once everything is set up, the folders should be organized like this:
βββ VITON-HD
| βββ test_pairs.txt
| βββ train_pairs.txt
β βββ [train | test]
| | βββ image
β β β βββ [000006_00.jpg | 000008_00.jpg | ...]
β β βββ cloth
β β β βββ [000006_00.jpg | 000008_00.jpg | ...]
β β βββ cloth-mask
β β β βββ [000006_00.jpg | 000008_00.jpg | ...]
β β βββ image-parse-v3
β β β βββ [000006_00.png | 000008_00.png | ...]
β β βββ openpose_img
β β β βββ [000006_00_rendered.png | 000008_00_rendered.png | ...]
β β βββ openpose_json
β β β βββ [000006_00_keypoints.json | 000008_00_keypoints.json | ...]
β β βββ train_paired/test_(un)paired
β β β βββ mask [000006_00.png | 000008_00.png | ...]
β β β βββ seg_preds [000006_00.png | 000008_00.png | ...]
β β β βββ warped [000006_00.png | 000008_00.png | ...]
DressCode
The DressCode dataset serves as a benchmark. Download the DressCode dataset.
In addition to above content, some other preprocessed conditions are in use in TryOn-Adapter. The detail information and code see data_preparation/README.md.
Generate Warped Cloth and Warped Mask based on the GP-VTON.
Once everything is set up, the folders should be organized like this:
βββ DressCode
| βββ test_pairs_paired.txt
| βββ test_pairs_unpaired.txt
| βββ train_pairs.txt
| βββ train_pairs.txt
β βββ [test_paird | test_unpaird | train_paird]
β β βββ [dresses | lower_body | upper_body]
β β β β βββ mask [013563_1.png| 013564_1.png | ...]
β β β β βββ seg_preds [013563_1.png| 013564_1.png | ...]
β β β β βββ warped [013563_1.png| 013564_1.png | ...]
β βββ [dresses | lower_body | upper_body]
| | βββ test_pairs_paired.txt
| | βββ test_pairs_unpaired.txt
| | βββ train_pairs.txt
β β βββ images
β β β βββ [013563_0.jpg | 013563_1.jpg | 013564_0.jpg | 013564_1.jpg | ...]
β β βββ masks
β β β βββ [013563_1.png| 013564_1.png | ...]
β β βββ keypoints
β β β βββ [013563_2.json | 013564_2.json | ...]
β β βββ label_maps
β β β βββ [013563_4.png | 013564_4.png | ...]
β β βββ skeletons
β β β βββ [013563_5.jpg | 013564_5.jpg | ...]
β β βββ dense
β β β βββ [013563_5.png | 013563_5_uv.npz | 013564_5.png | 013564_5_uv.npz | ...]
Inference
Please download the pretrained model from HuggingFace. To perform inference on the Dress Code or VITON-HD dataset, use the following command:
python test_viton.py/test_dresscode.py --plms --gpu_id 0 \
--ddim_steps 100 \
--outdir <path> \
--config [configs/viton.yaml | configs/dresscode.yaml] \
--dataroot <path> \
--ckpt <path> \
--ckpt_elbm_path <path> \
--use_T_repaint [True | False] \
--n_samples 1 \
--seed 23 \
--scale 1 \
--H 512 \
--W 512 \
--unpaired
--ddim_steps <int> sampling steps
--outdir <str> output direction path
--config <str> config path of viton-hd/dresscode
--ckpt <str> diffusion model checkpoint path
--ckpt_elbm_path <str> elbm module checkpoint dirction path
--use_T_repaint <bool> whether to use T-Repaint technique
--n_samples <int> numbers of samples per inference
--unpaired whether to use the unpaired setting
or just simply run:
bash test_viton.sh
bash test_dresscode.sh
Acknowledgements
Our code is heavily borrowed from Paint-by-Example. We also thank GP-VTON, our warping garments are generated from it.
Citation
@article{xing2025tryon,
title={TryOn-Adapter: Efficient Fine-Grained Clothing Identity Adaptation for High-Fidelity Virtual Try-On},
author={Xing, Jiazheng and Xu, Chao and Qian, Yijie and Liu, Yang and Dai, Guang and Sun, Baigui and Liu, Yong and Wang, Jingdong},
journal={International Journal of Computer Vision},
pages={1--22},
year={2025},
publisher={Springer}
}
- Downloads last month
- 0