一键换装神器爆火,IDM-VTON :奥特曼秒变猛男!

2024-05-12 11:13:00
admin
原创
108

直接我们介绍过一键视频换脸技术,今天我们就来说下一键换装,这是目前效果最好的一个开源项目,完全免费!

在线体验:【 链接直达

开源项目:【 GitHub

网盘下载:【 点击下载

 

 

安装环境要求:

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

或者,您可以简单地使用脚本文件运行。

sh inference. sh

着装要求

 

对于 DressCode 数据集,通过类别参数输入要生成图像的类别,

accelerate launch inference_dc. 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
--category "upper_body"

或者,您可以简单地使用脚本文件运行。

sh inference. sh

 


发表评论
评论通过审核后显示。
文章分类
联系我们
联系人: 羊毛君
Email: soft850207@gmail.com
网址: ai.weoknow.com