Coder Social home page Coder Social logo

jjandnn / cp-vton Goto Github PK

View Code? Open in Web Editor NEW

This project forked from sergeywong/cp-vton

0.0 0.0 0.0 807 KB

Reimplemented code for "Toward Characteristic-Preserving Image-based Virtual Try-On Network"

License: MIT License

Python 92.21% MATLAB 7.79%

cp-vton's Introduction

Toward Characteristic-Preserving Image-based Virtual Try-On Network

Reimplemented code for eccv2018 paper 'Toward Characteristic-Preserving Image-based Virtual Try-On Network'.

The results may have some differences with those of the original code.

This code is tested with pytorch=0.4.0

Data preprocessing

We convert the original data VITON into different directories for easily use.

Run the matlab code convert_data.m under the original data root VITON/data, and get the new format.

We use the json format for pose info as generated by OpenPose.

Move these directories into our own dataroot data.

You can get the processed data at GoogleDrive or by running:

python data_download.py

Geometric Matching Module

training

We just use L1 loss for criterion in this code.

TV norm constraints for the offsets will make GMM more robust.

An example training command is

python train.py --name gmm_train_new --stage GMM --workers 4 --save_count 5000 --shuffle

You can see the results in tensorboard, as show below.

Example of GMM train. The center image is the warped cloth.

eval

Choose the different source data for eval with the option --datamode.

An example training command is

python test.py --name gmm_traintest_new --stage GMM --workers 4 --datamode test --data_list test_pairs.txt --checkpoint checkpoints/gmm_train_new/gmm_final.pth

You can see the results in tensorboard, as show below.

Example of GMM test. The center image is the warped cloth.

Try-On Module

training

Before the trainning, you should generate warp-mask & warp-cloth, using the test process of GMM with --datamode train. Then move these files or make soft links under the directory data/train. An example training command is

python train.py --name tom_train_new --stage TOM --workers 4 --save_count 5000 --shuffle 

You can see the results in tensorboard, as show below.

Example of TOM train. The center image in the last row is the synthesized image.

eavl

An example training command is

python test.py --name tom_test_new --stage TOM --workers 4 --datamode test --data_list test_pairs.txt --checkpoint checkpoints/tom_train_new/tom_final.pth

You can see the results in tensorboard, as show below.

Example of TOM test. The center image in the last row is the synthesized image.

Citation

If this code helps your research, please cite our paper:

@inproceedings{wang2018toward,
	title={Toward Characteristic-Preserving Image-based Virtual Try-On Network},
	author={Wang, Bochao and Zheng, Huabin and Liang, Xiaodan and Chen, Yimin and Lin, Liang},
	booktitle={Proceedings of the European Conference on Computer Vision (ECCV)},
	pages={589--604},
	year={2018}
}

cp-vton's People

Contributors

sergeywong avatar

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.