Coder Social home page Coder Social logo

c-vton's Introduction

banner

C-VTON: Context-Driven Image-Based Virtual Try-On Network

[paper pdf]

Abstract

Image-based virtual try-on techniques have shown great promise for enhancing the user-experience and improving customer satisfaction on fashion-oriented e-commerce platforms. However, existing techniques are currently still limited in the quality of the try-on results they are able to produce from input images of diverse characteristics. In this work, we propose a Context-Driven Virtual Try-On Network (C-VTON) that addresses these limitations and convincingly transfers selected clothing items to the target subjects even under challenging pose configurations and in the presence of self-occlusions. At the core of the C-VTON pipeline are: (i) a geometric matching procedure that efficiently aligns the target clothing with the pose of the person in the input images, and (ii) a powerful image generator that utilizes various types of contextual information when synthesizing the final try-on result. C-VTON is evaluated in rigorous experiments on the VITON and MPV datasets and in comparison to state-of-the-art techniques from the literature. Experimental results show that the proposed approach is able to produce photo-realistic and visually convincing results and significantly improves on the existing state-of-the-art.

banner

Requirements

  • Python (3.8.10)
  • opencv-python (4.5.1.48)
  • torch (1.7.1+cu110)
  • torchvision (0.8.2+cu110)
  • lpips (0.1.4)
  • matplotlib (3.3.4)
  • pandas (1.2.0)

The experiments were conducted on one (for image resolutions 256×192) or two (for image resolution 512×368) NVIDIA RTX 3090 GPUs.

Testing

To avoid setting up this repository only to obtain results presented in the paper, please see the generated test results here (for VITON), here (for VITON-HD) and here (for MPV). You can find respective test splits alongside provided preprocessed data here (VITON) and here (MPV).

Running tests yourself requires some setting up to do:

  • Install requirements.
  • For VITON / VITON-HD:
    • Download our preprocessed data and extract them to folder ./data/. Since we are not allowed to share the actual dataset, contact the authors of the original VITON paper, ask them for the full-resolution dataset and download it to appropriate folders.
  • For MPV:
    • Download our preprocessed data and extract them to folder ./data/. Additionally, obtain the version of the MPV dataset in resolution 256×192 and extract it alongside preprocessed data.
  • Download pretrained BPGM model for VITON / VITON-HD or MPV and put it in ./bpgm/checkpoints.
  • Download pretrained C-VTON model for VITON, VITON-HD or MPV and put it in ./checkpoints.
  • Run test scripts:
cd C-VTON
./scripts/test_{dataset}.sh

Make sure you use our test split to obtain the same results.

Training

To train the models from scratch, download all data mentioned in previous section and install requirements. Then, similarly to testing, run appropriate scripts from the scripts folder:

cd C-VTON
./scripts/train_{dataset}.sh

When training using VITON-HD dataset make sure to delete the second line in train.py in order to use all available GPUs.

Citation

If you use code or results from this repository, please cite the following publication:

@InProceedings{Fele_2022_WACV,
    author = {Fele, Benjamin and Lampe, Ajda and Peer, Peter and Struc, Vitomir},
    title = {C-VTON: Context-Driven Image-Based Virtual Try-On Network},
    booktitle = {Proceedings of the IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)},
    month = {January},
    year = {2022}
}

Parts of this repository are based on implementation of You Only Need Adversarial Supervision for Semantic Image Synthesis.

Acknowledgements

Supported in parts by the Slovenian Research Agency ARRS through the Research Programmes P2-0250(B) "Metrology and Biometric System" and P2--0214 (A) “Computer Vision”, the ARRS Project J2-2501(A) "DeepBeauty" and the ARRS junior researcher program.

ARRS Logo

c-vton's People

Contributors

benquick123 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

c-vton's Issues

Run 'Test_mpv.sh' - error: (-215:Assertion failed) !_src.empty() in function 'cv::cvtColor'

Hi, I've been reading about your project for about a week now, and now I want to see it in action!
I cloned the repo, installed the requerments as specified in the 'Testing' section, downloaded all the relevant datasets to the folders as specified in the 'For MPV' sub-section.
now, Im tring to run the 'test_mpv.sh' but unfortunately Im incountering the error that attached to this issue.
I think this error implies that the images can't be found. that is reasonable since Im not specifing any specific images...
I would very much appreciate it if you can give an example of the command needs to be written in the terminal in order to run the 'test_mpv.sh' with specific images from the MPV dataset. I looked a little bit in the config.py and tried to figure which argument is relevant, but without any luck.
thank you very much for the time and attention.
--the error log is attached to the issue--
my_problem.txt

FID evaluation

Hi, thank you for your great work! May I know why the FID score presented on your paper (Table 1) is so much different from the one reported in their original paper? For example, the FID score reported for PF-AFN is 10.09 on VTON dataset while it's reported as 27.23 in your paper.

image_body_parse and image_parse_with_hands

Can you kindly mention the two models that you have used to create the two folders named 'image_body_parse' and 'image_parse_with_hands' to obtain the labels for the images in the preprocessed-viton dataset.
Which models have you used to obtain the labels as shown in these two images:
000001_0
000001_0

INFERENCE

How to run with my person image and my cloth

About VITON-HD

Hi,

Thank you for your great work! I want to clarify what VITON-HD refers to in your project. My understanding is that VITON-HD is a full resolution version of the original VITON, which you get from the authors of the work directly. Is my understanding correct?
My confusion comes from the fact there is a dataset (more like a model?) called VITON-HD. I thought VITON-HD in your project refers to this VITON-HD but it seems not.

I really appreciate your help.

MPV Dataset

I want to know where can I get the real model images and clothes of init MPV data. I discover the link in the internet is not available.

Preprocessing Densepose

Could you provide the version used in the dataset(mpv / viton),
cause the densepose_parse you used seems different to detectron or detectorn2
(sorry for using different input image, but it is clear that they were generated by distinctive method)
未命名
未命名2

Regarding running of the project

Hello sir,i liked your project idea and i want to run it on my pc but i am encountering lot of error while doing to do so.sir can please guide me or mention some steps in order to run the program in my local device.

no person images and clothing images

Hi.
Although I tried to run the test script, the script throws errors in ./dataloader/MPVDataset.py.
There are no person images and clothing images in ./data/mpv/xxxxxx.
For instance, the clothing image does not exist when desired clothing path is ./data/mpv/BJ721D039/BJ721D039-Q11@12=cloth_front.jpg.
Please teach me how to solve this problem.
Thanks.

preprocessing methods

Can you please provide the preprocessing methods of image_body_parse and image_parse_with_hands.

Incomplete dataset.

I appreciate all of your hard work. There are gaps in the dataset you have provided. Would you kindly submit the entire dataset or describe how the inferencing model's dataset is organized?

License

Hey folks,

Thanks for the great work!

Would you mind updating the license file?

Cheers,
Nebojsa

What is the file structure of the data?

@ajdal @benquick123 What is the dataset structure for the viton or mpv datasets? I know they should both go into a folder called data.

But there are many files and subfolders inside of viton or mpv, I believe, so I want replicate the file structure with my own data that I'll use instead of the viton or mpv datasets. Since those are no longer public, I can't figure out how they were structured and it was challenging to parse through the code to figure that part out.

Alternatively, if you're aware of somewhere I can access that data or a subset of it, that would also be appreciated.

Question regarding the license on dependencies

Hello there!

Thank you for this project, I'm looking forward to experimenting a little bit with it.
I have a question regarding the license of the dependencies. Considering that this repo is friendly to commercial use, are all the dependencies free to use for commercial projects as well? I ask specifically about the datasets and similar, which are on Sharepoint links with no license info.

Thank you so much for clarifying!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.