PASTA-GAN++ with AWS
- [Training] download dataset --> UPT dataset : Google_drive
- [Required] download pastagan-plusplus pretrained_model --> Google_drive
- [Required] download openpose pretrained_model --> Google_drive
- [Required] download graphonomy pretrained_model --> Google_drive
setup.sh
<-- Automatic setup script
- download & setup dataset
- download & setup model(checkpoint)
git clone https://github.com/hama-jsoh/pasta-gan-plusplus.git && cd pasta-gan-plusplus && bash setup.sh
USER_ID=$UID docker-compose -f docker/docker-compose.yaml up -d
- Step 2-1: Enter container
docker exec -it pastagan_plusplus_dev bash
python3 -W ignore inference.py
cd test_results/full && ls
bash test.sh 3
options
- 1 : upper
- 2 : pants
- 3 : full
cd test_results/full && ls
# inference.py
...
if __name__ == "__main__":
# 1. openpose(preprocessing)
openpose = PreProcessor(
UriInput("keypoints", "./test_samples/image"),
FileOutput("json", "./test_samples/keypoints")
)
openpose.start()
# 2. graphonomy(preprocessing)
graphonomy = PreProcessor(
UriInput("parsing", "./test_samples/image"),
FileOutput("img", "./test_samples/parsing")
)
graphonomy.start()
# 3. write_txt(permutation)
with open("./test_samples/test_pairs.txt", "w") as f:
filelist = os.listdir("./test_samples/image")
cloth, human = filelist
f.write(f"{cloth} {human}")
# 4. synthesis_result
generate_images(
dataroot='test_samples',
testtxt='test_pairs.txt',
outdir='test_results/full',
testpart='full'
)