# HR-VITON — Official PyTorch Implementation
<!-- This repository contains a PyTorch implementation for our paper "High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions". -->
![Teaser image](./figures/fig.jpg)
> **High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions**<br>
> [Sangyun Lee](https://github.com/sangyun884)\*<sup>1</sup>, [Gyojung Gu](https://github.com/koo616)\*<sup>2,3</sup>, [Sunghyun Park](https://psh01087.github.io)<sup>2</sup>, [Seunghwan Choi](https://github.com/shadow2496)<sup>2</sup>, [Jaegul Choo](https://sites.google.com/site/jaegulchoo)<sup>2</sup><br>
> <sup>1</sup>Soongsil University, <sup>2</sup>KAIST, <sup>3</sup>Nestyle<br>
> In ECCV 2022 (* indicates equal contribution)
> Paper: https://arxiv.org/abs/2206.14180<br>
> Project page: https://koo616.github.io/HR-VITON
> **Abstract:** *Image-based virtual try-on aims to synthesize an image of a person wearing a given clothing item. To solve the task, the existing methods warp the clothing item to fit the person's body and generate the segmentation map of the person wearing the item before fusing the item with the person. However, when the warping and the segmentation generation stages operate individually without information exchange, the misalignment between the warped clothes and the segmentation map occurs, which leads to the artifacts in the final image. The information disconnection also causes excessive warping near the clothing regions occluded by the body parts, so-called pixel-squeezing artifacts. To settle the issues, we propose a novel try-on condition generator as a unified module of the two stages (i.e., warping and segmentation generation stages). A newly proposed feature fusion block in the condition generator implements the information exchange, and the condition generator does not create any misalignment or pixel-squeezing artifacts. We also introduce discriminator rejection that filters out the incorrect segmentation map predictions and assures the performance of virtual try-on frameworks. Experiments on a high-resolution dataset demonstrate that our model successfully handles the misalignment and occlusion, and significantly outperforms the baselines.*
## Installation
Clone this repository:
```
git clone https://github.com/sangyun884/HR-VITON.git
cd ./HR-VITON/
```
Install PyTorch and other dependencies:
```
conda create -n {env_name} python=3.8
conda activate {env_name}
conda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c nvidia
pip install opencv-python torchgeometry Pillow tqdm tensorboardX scikit-image scipy
```
## Dataset
We train and evaluate our model using the dataset from [VITON-HD: High-Resolution Virtual Try-On via Misalignment-Aware Normalization](https://github.com/shadow2496/VITON-HD).
To download the dataset, please check the following link https://github.com/shadow2496/VITON-HD.
We assume that you have downloaded it into `./data`.
## Inference
Here are the download links for each model checkpoint:
- Try-on condition generator: [link](https://drive.google.com/file/d/1XJTCdRBOPVgVTmqzhVGFAgMm2NLkw5uQ/view?usp=sharing)
- Try-on condition generator (discriminator): [link](https://drive.google.com/file/d/1Gi185XUAI3w4srReTbp3eIzkjFC51ym-/view?usp=sharing)
- Try-on image generator: [link](https://drive.google.com/file/d/1BkSA8UJo-6eOkKcXTFOHK80Esc4vBmVC/view?usp=sharing)
- AlexNet (LPIPS): [link](https://drive.google.com/file/d/1FF3BBSDIA3uavmAiuMH6YFCv09Lt8jUr/view?usp=sharing), we assume that you have downloaded it into `./eval_models/weights/v0.1`.
```python
python3 test_generator.py --occlusion --cuda {True} --test_name {test_name} --tocg_checkpoint {condition generator ckpt} --gpu_ids {gpu_ids} --gen_checkpoint {image generator ckpt} --datasetting unpaired --dataroot {dataset_path} --data_list {pair_list_textfile}
```
## Train try-on condition generator
```python
python3 train_condition.py --cuda {True} --gpu_ids {gpu_ids} --Ddownx2 --Ddropout --lasttvonly --interflowloss --occlusion
```
## Train try-on image generator
```python
python3 train_generator.py --cuda {True} --name test -b 4 -j 8 --gpu_ids {gpu_ids} --fp16 --tocg_checkpoint {condition generator ckpt path} --occlusion
```
This stage takes approximately 4 days with two RTX 3090 GPUs. Tested environment: PyTorch 1.8.2+cu111.
To use "--fp16" option, you should install apex library.
## License
All material is made available under [Creative Commons BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/). You can **use, redistribute, and adapt** the material for **non-commercial purposes**, as long as you give appropriate credit by **citing our paper** and **indicate any changes** that you've made.
## Citation
If you find this work useful for your research, please cite our paper:
```
@article{lee2022hrviton,
title={High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions},
author={Lee, Sangyun and Gu, Gyojung and Park, Sunghyun and Choi, Seunghwan and Choo, Jaegul},
journal={arXiv preprint arXiv:2206.14180},
year={2022}
}
```
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
python+Jupyter实现基于Stable Diffusion的T-shirt图案设计和虚拟换衣技术+源码+项目文档,适合毕业设计、课程设计、项目开发。项目源码已经过严格测试,可以放心参考并在此基础上延申使用~ python+Jupyter实现基于Stable Diffusion的T-shirt图案设计和虚拟换衣技术+源码+项目文档,适合毕业设计、课程设计、项目开发。项目源码已经过严格测试,可以放心参考并在此基础上延申使用~ 项目简介: 基本实现方法: Stable Diffusion结合Dreambooth实现文本指导下的T-shirt图案生成; 利用U2NET模型对人像和衣服掩码进行分割; 借鉴HR_VITON框架实现虚拟换衣。
资源推荐
资源详情
资源评论
收起资源包目录
python+Jupyter实现基于Stable Diffusion的T-shirt图案设计和虚拟换衣技术+源码+项目文档 (143个子文件)
FIDscore.ipynb 8KB
create_label.ipynb 4KB
fig.jpg 1.14MB
leaves-1.jpg 161KB
00017_00.jpg 126KB
rabbit-5.jpg 112KB
00017_00.jpg 112KB
leaves-3.jpg 93KB
leaves512-1.jpg 90KB
14274_00.jpg 87KB
rabbit-4.jpg 83KB
leaves-5.jpg 76KB
14274_00.jpg 76KB
leaves-4.jpg 75KB
rabbit-1.jpg 73KB
rabbit-2.jpg 71KB
test512-9.jpg 69KB
rabbit-3.jpg 69KB
leaves-2.jpg 66KB
rabbit512-5.jpg 58KB
leaves512-3.jpg 51KB
14274_00.jpg 51KB
00017_00.jpg 50KB
nike512-3.jpg 46KB
painting512-2.jpg 41KB
leaves512-5.jpg 38KB
rabbit512-4.jpg 38KB
test512-7.jpg 37KB
test512-4.jpg 36KB
00017_00.jpg 34KB
leaves512-2.jpg 31KB
rabbit512-3.jpg 31KB
rabbit512-1.jpg 30KB
leaves512-4.jpg 30KB
painting512-4.jpg 30KB
rabbit512-2.jpg 30KB
test512-1.jpg 29KB
painting512-5.jpg 29KB
leaves512-6.jpg 28KB
test512-8.jpg 28KB
14274_00.jpg 26KB
painting512-3.jpg 25KB
nike512-1.jpg 24KB
nike512-2.jpg 23KB
painting512-1.jpg 20KB
14274_00.jpg 19KB
leaves-5.jpg 19KB
leaves-4.jpg 19KB
leaves-1.jpg 19KB
leaves-3.jpg 19KB
rabbit-5.jpg 18KB
rabbit-4.jpg 18KB
rabbit-2.jpg 18KB
leaves-2.jpg 18KB
rabbit-3.jpg 18KB
00017_00.jpg 18KB
rabbit-1.jpg 17KB
14274_00_keypoints.json 3KB
00017_00_keypoints.json 3KB
LICENSE 34KB
README.md 5KB
Preprocessing.md 2KB
README.md 552B
detail.pdf 1.61MB
nike5.png 464KB
leaves2.png 451KB
rabbit3.png 441KB
rabbit4.png 436KB
rabbit1.png 426KB
nike4.png 424KB
nike3.png 420KB
leaves1.png 413KB
leaves4.png 405KB
nike2.png 404KB
rabbit2.png 393KB
nike1.png 391KB
leaves5.png 379KB
leaves3.png 372KB
14274_00_rendered.png 10KB
00017_00.png 9KB
14274_00.png 8KB
00017_00_rendered.png 6KB
00017_00.png 6KB
14274_00.png 6KB
alex.pth 6KB
ckpt2diffusers.py 37KB
train_dreambooth.py 30KB
ckpt2diffusers_old.py 27KB
train_condition.py 25KB
train_textual_inversion.py 22KB
networks.py 19KB
diagnose_tensorboard.py 19KB
cp_dataset.py 18KB
network_generator.py 17KB
u2net.py 16KB
batchnorm.py 15KB
test_generator.py 13KB
dist_model.py 12KB
cp_dataset_test.py 12KB
test_condition.py 9KB
共 143 条
- 1
- 2
资源评论
梦回阑珊
- 粉丝: 5234
- 资源: 1685
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- stream简单知识 stream流的获取 、常见的中间操作、结束流操作
- 梦幻西游道人20241126f数据j
- pyautogui按键跟随,auto clicker解放双手
- 使用 YOLO 实时车辆检测来维护空停车位数量 代码可在 google colab 中轻松运行 .zip
- 使用 YOLO 和 FaceNet 进行实时人脸识别.zip
- 使用 Yolo 制作自定义对象检测器(Java 和 Python).zip
- 使用Java编写的坦克大战小游戏.zip学习资料
- 使用 YOLO v4 与 OpenCV、C++ 和 Python 的示例.zip
- 新大师兄影视_3.3.6.apk
- Canvas制作的粒子十秒倒计时特效源码.zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功