/ladi-vton-pipeline

Pipeline for processing custom images with ladi-vton

Primary LanguageShell

ladi-vton-pipeline

The main purpose of the repository is to prepare preprocessing repositories you need to run LaDI-VTON with custom input.

The pipeline is tested on Ubuntu 20.04 and 22.04 with cuda capable GPU. Important to note that some of the repositories used in this project won't work anywhere except linux. Also I'm not sure how all of it's going to work withouth GPU support. Theoretically it can.

Installation

Get the repository

mkdir repositories
cd ~/repositories
git clone https://github.com/umanema/ladi-vton-pipeline.git

Installation process is split into two steps

cd ./auto-vton/installation
#first you install all dependencies
bash install_dependencies.sh
#in case you are running lambdalabs instance you need to run another installation script
#bash install_dependencies_lambda.sh
#install repositories
bash install_repositories.sh

Project structure

Every repository which is needed for processing the data is linked as a submodule. CIHP_PGN, detectron2 are forks of original repos with some changes done accordingly to this post

Installation script assumes that the root repository is cloned to /home/username/repositories

If you want it to put it to a different location you might need to change installation scripts a little bit or do installation manually.

Running the auto-vton script

Put the photo of a model into ./auto-vton/input/person Put the photo of a cloth into ./auto-vton/input/cloth

Then run

cd ./auto-vton
bash auto-vton.sh

If everything runs smoothly you should find the resulted picture in ./auto-vton/result

Troubleshooting

Openpose models bug

Occasionally openpose models could not be downloaded from original source as described here. In that case openpose will not build or you will get zero keypoints on the resulted picture in .ladi-vton/data/hd-viton/test/openpose_img/person/person_rendered.png and .ladi-vton/data/hd-viton/test/openpose_json/person_keypoints.json. For that reason there is a script that should download all the models from GDrive.

cd ./auto-vton/installation/openpose
bash install_openpose_models.sh
#after that you need to rebuild the openpose
bash rebuild_openpose.sh