{"id":20578971,"url":"https://github.com/sangyun884/HR-VITON","last_synced_at":"2025-05-09T21:34:27.983Z","repository":{"id":41170636,"uuid":"507220350","full_name":"sangyun884/HR-VITON","owner":"sangyun884","description":"Official PyTorch implementation for the paper High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions (ECCV 2022).","archived":false,"fork":false,"pushed_at":"2024-12-31T02:19:18.000Z","size":16412,"stargazers_count":850,"open_issues_count":59,"forks_count":177,"subscribers_count":16,"default_branch":"main","last_synced_at":"2024-12-31T03:25:06.662Z","etag":null,"topics":["image-generation","image-synthesis","virtual-try-on","virtual-tryon","virtual-tryon-ecommerce"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sangyun884.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-06-25T05:16:18.000Z","updated_at":"2024-12-31T02:19:22.000Z","dependencies_parsed_at":"2023-12-05T07:36:21.956Z","dependency_job_id":null,"html_url":"https://github.com/sangyun884/HR-VITON","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangyun884%2FHR-VITON","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangyun884%2FHR-VITON/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangyun884%2FHR-VITON/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sangyun884%2FHR-VITON/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sangyun884","download_url":"https://codeload.github.com/sangyun884/HR-VITON/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253328825,"owners_count":21891534,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["image-generation","image-synthesis","virtual-try-on","virtual-tryon","virtual-tryon-ecommerce"],"created_at":"2024-11-16T06:15:09.256Z","updated_at":"2025-05-09T21:34:27.960Z","avatar_url":"https://github.com/sangyun884.png","language":"Python","funding_links":[],"categories":["Tools \u0026 Frameworks"],"sub_categories":["Clothing(Visual Try on)"],"readme":"# HR-VITON \u0026mdash; Official PyTorch Implementation\n\u003c!-- This repository contains a PyTorch implementation for our paper \"High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions\". --\u003e\n\n**\\*\\*\\*\\*\\* New follow-up research by our team is available at https://github.com/rlawjdghek/PromptDresser \\*\\*\\*\\*\\***\u003cbr\u003e\u003cbr\u003e\n\n## Our Team's Researches\n\n(1) PromptDresser (https://github.com/rlawjdghek/PromptDresser) - Arxiv 24.12 \u003cbr\u003e\n(2) StableVITON (https://github.com/rlawjdghek/StableVITON) - CVPR 2024 \u003cbr\u003e\n(3) VITON-HD (https://github.com/shadow2496/VITON-HD) - CVPR 2021 \u003cbr\u003e\n\n![Teaser image](./figures/fig.jpg)\n\n\u003e **High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions**\u003cbr\u003e\n\u003e [Sangyun Lee](https://github.com/sangyun884)\\*\u003csup\u003e1\u003c/sup\u003e, [Gyojung Gu](https://github.com/koo616)\\*\u003csup\u003e2,3\u003c/sup\u003e, [Sunghyun Park](https://psh01087.github.io)\u003csup\u003e2\u003c/sup\u003e, [Seunghwan Choi](https://github.com/shadow2496)\u003csup\u003e2\u003c/sup\u003e, [Jaegul Choo](https://sites.google.com/site/jaegulchoo)\u003csup\u003e2\u003c/sup\u003e\u003cbr\u003e\n\u003e \u003csup\u003e1\u003c/sup\u003eSoongsil University, \u003csup\u003e2\u003c/sup\u003eKAIST, \u003csup\u003e3\u003c/sup\u003eNestyle\u003cbr\u003e\n\u003e In ECCV 2022 (* indicates equal contribution)\n\n\u003e Paper: https://arxiv.org/abs/2206.14180\u003cbr\u003e\n\u003e Project page: https://koo616.github.io/HR-VITON\n\n\u003e **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.*\n\n## Installation\n\nClone this repository:\n\n```\ngit clone https://github.com/sangyun884/HR-VITON.git\ncd ./HR-VITON/\n```\n\nInstall PyTorch and other dependencies:\n\n```\nconda create -n {env_name} python=3.8\nconda activate {env_name}\nconda install pytorch torchvision torchaudio cudatoolkit=11.1 -c pytorch-lts -c nvidia\npip install opencv-python torchgeometry Pillow tqdm tensorboardX scikit-image scipy\n```\n\n## Dataset\nWe 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).\n\nTo download the dataset, please check the following link https://github.com/shadow2496/VITON-HD.\n\nWe assume that you have downloaded it into `./data`.\n\n## Inference\n\nHere are the download links for each model checkpoint:\n\n- Try-on condition generator: [link](https://drive.google.com/file/d/1XJTCdRBOPVgVTmqzhVGFAgMm2NLkw5uQ/view?usp=sharing)\n- Try-on condition generator (discriminator): [link](https://drive.google.com/file/d/1T4V3cyRlY5sHVK7Quh_EJY5dovb5FxGX/view?usp=share_link)\n- Try-on image generator: [link](https://drive.google.com/file/d/1T5_YDUhYSSKPC_nZMk2NeC-XXUFoYeNy/view?usp=share_link)\n- 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`.\n\n```python\npython3 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}\n```\n\n## Train try-on condition generator\n\n```python\npython3 train_condition.py --cuda {True} --gpu_ids {gpu_ids} --Ddownx2 --Ddropout --lasttvonly --interflowloss --occlusion\n```\n\n## Train try-on image generator\n\n```python\npython3 train_generator.py --cuda {True} --name test -b 4 -j 8 --gpu_ids {gpu_ids} --fp16 --tocg_checkpoint {condition generator ckpt path} --occlusion\n```\nThis stage takes approximately 4 days with two RTX 3090 GPUs. Tested environment: PyTorch 1.8.2+cu111.\n\nTo use \"--fp16\" option, you should install apex library.\n\n## License\n\nAll 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.\n\n## Citation\n\nIf you find this work useful for your research, please cite our paper:\n\n```\n@article{lee2022hrviton,\n  title={High-Resolution Virtual Try-On with Misalignment and Occlusion-Handled Conditions},\n  author={Lee, Sangyun and Gu, Gyojung and Park, Sunghyun and Choi, Seunghwan and Choo, Jaegul},\n  journal={arXiv preprint arXiv:2206.14180},\n  year={2022}\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangyun884%2FHR-VITON","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsangyun884%2FHR-VITON","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsangyun884%2FHR-VITON/lists"}