https://github.com/minar09/pix2surf_windows
Windows running repository of the pix2surf code of the paper "Learning to Transfer Texture from Clothing Images to 3D Humans"
https://github.com/minar09/pix2surf_windows
3d 3d-cloth 3d-human 3d-virtual-try-on cloth-modelling cloth-reconstruction clothing pix2surf python3 pytorch smpl texture-transfer try-on virtual virtual-try-on windows
Last synced: about 1 year ago
JSON representation
Windows running repository of the pix2surf code of the paper "Learning to Transfer Texture from Clothing Images to 3D Humans"
- Host: GitHub
- URL: https://github.com/minar09/pix2surf_windows
- Owner: minar09
- License: other
- Created: 2020-06-12T08:26:31.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-12T17:22:24.000Z (about 6 years ago)
- Last Synced: 2025-03-25T06:51:11.908Z (about 1 year ago)
- Topics: 3d, 3d-cloth, 3d-human, 3d-virtual-try-on, cloth-modelling, cloth-reconstruction, clothing, pix2surf, python3, pytorch, smpl, texture-transfer, try-on, virtual, virtual-try-on, windows
- Language: Python
- Homepage: https://github.com/aymenmir1/pix2surf
- Size: 3.48 MB
- Stars: 19
- Watchers: 2
- Forks: 1
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
## Disclaimer
This is a modified version of the original repository [Pix2Surf](https://github.com/aymenmir1/pix2surf), for running the demo and visualization in windows OS. Please refer to the original repository for details.
# Learning to Transfer Texture from Clothing Images to 3D Humans (CVPR 2020)
This repository contains code corresponding to the paper "Learning to Transfer Texture from Clothing Images to 3D Humans"
# Demo
To run the demo you will need blender. This code has been tested with blender 2.79. Please download it from [here](https://download.blender.org/release/Blender2.79/). After installation, please add the blender directory to the environment variables path.
Also, demo tested in python 3.6.9
1) Clone/Download the repo.
2) Install the requirements:
`pip install -r requirements.txt`
3) Download pretrained weights and other assets from [here](https://drive.google.com/uc?id=1ULtdEXRrxH9_CtTrWensIbwybeWKz8Dj), and unzip inside the repository folder.
4) Running the demo is as simple as:
`python demo.py`
The script produces a video in which the front and back views of a T-shirt and a pair of shorts are rendered atop a textured SMPL mesh.
By changing the parameters in the script, different textures and garment classes can be rendered atop SMPL.
Example:
`python demo.py --pose_id 2 --img_id 4 --low_type pants`
We provide five pairs of upper and lower clothing images to run our demo script. Please note that we do not own the copyrights of the clothing images. These are released merely for demonstration and should not be used for any other purpose.
By excuting the script to download data, you automatically consent to the [license agreement](https://smpl.is.tue.mpg.de/bodylicense) of the SMPL body.
# Training
The training data for all neural models was obtained from the following websites:
1) [Zalando](https://en.zalando.de/mens-clothing/)
2) [Jack and Jones](https://www.jackjones.com/de/de/jj/bekleidung/)
3) [Tom-Tailor](https://www.tom-tailor.eu/men-startpage)
We do not own the copyrights to these images. These can be downloaded using a web scraper.
Once this is done, we obtain silhouettes of these clothing images by a mixture of manual and autmatic execution of [grab cut](https://docs.opencv.org/3.4/d8/d83/tutorial_py_grabcut.html) .
Sample masks and texture images are stored in the `./train/data` directory.
The code for obtaining the correspondence and texture maps is in the `./prep_data` directory. All three scripts for silhouette matching, correspondence extraction and texture map extraction can be executed using the command
`python ./prep_data/run.py`
The dependencies for running the three scripts can be found in the `requirements_prep_data.txt` file
Once the data has been obtained, the mapping and segmentation networks can be trained using the scripts provided in the `train` directory using the commands :
`python train_seg.py`
`python train_map.py`
# Citation
If you find the code useful, please consider citing the paper
```
@inproceedings{mir20pix2surf,
title = {Learning to Transfer Texture from Clothing Images to 3D Humans},
author = {Mir, Aymen and Alldieck, Thiemo and Pons-Moll, Gerard},
booktitle = {{IEEE} Conference on Computer Vision and Pattern Recognition (CVPR)},
month = {jun},
organization = {{IEEE}},
year = {2020},
}
```
# License
This code is available for **non-commercial scientific research purposes** as defined in the [LICENSE file](./LICENSE.txt). By downloading and using this code you agree to the terms in the LICENSE.