要求
git clone https://github.com/yisol/IDM-VTON.git
cd IDM-VTON
conda env create -f environment.yaml
conda activate idm
数据准备
VITON-HD
您可以从 VITON-HD 下载 VITON - HD 数据集。
下载 VITON-HD 数据集后,将 vitonhd_test_tagged.json 移动到测试文件夹中。
数据集目录的结构应如下所示。
train
|-- ...
test
|-- image
|-- image-densepose
|-- agnostic-mask
|-- cloth
|-- vitonhd_test_tagged.json
着装要求
您可以从DressCode下载 DressCode 数据集。
我们在这里提供预先计算的密集姿势图像和服装标题。
我们使用detectorron2来获取密集姿态图像,请参阅此处了解更多详细信息。
下载 DressCode 数据集后,放置图像密集目录和标题文本文件,如下所示。
DressCode
|-- dresses
|-- images
|-- image-densepose
|-- dc_caption.txt
|-- ...
|-- lower_body
|-- images
|-- image-densepose
|-- dc_caption.txt
|-- ...
|-- upper_body
|-- images
|-- image-densepose
|-- dc_caption.txt
|-- ...
推理
VITON-HD
使用带参数的 python 文件进行推理,
accelerate launch inference.py \
--width 768 --height 1024 --num_inference_steps 30 \
--output_dir "result" \
--unpaired \
--data_dir "DATA_DIR" \
--seed 42 \
--test_batch_size 2 \
--guidance_scale 2.0