taki0112 / UGATIT

Official Tensorflow implementation of U-GAT-IT: Unsupervised Generative Attentional Networks with Adaptive Layer-Instance Normalization for Image-to-Image Translation (ICLR 2020)
MIT License
6.17k stars 1.04k forks source link

How to use? #33

Closed FuckReally closed 5 years ago

FuckReally commented 5 years ago

I'd like to know the detailed steps to use it. I don't know much about python...

thewaifuai commented 5 years ago

@FuckReally its quite involved and takes many days to train on powerful hardware, over the next few weeks people will make much simpler and faster versions. However its a lot faster if you just used a pretrained model. After downloading and unzipping the pretrained model: This works even on normal everyday computers. Once sudo apt-get python3; sudo apt-get python3-pip; pip3 install cv2 numpy tensorflow; git clone https://github.com/taki0112/UGATIT/; cd UGATIT; mkdir dataset; cd dataset; wget http://vllab.ucmerced.edu/hylee/DRIT/datasets/cat2dog; unzip cat2dog; cd ../..; python3 main.py --dataset cat2dog --phase test. it turns cats into dogs and vice versa.

1mpossibleHacker commented 5 years ago

@FuckReally its quite involved and takes many days to train on powerful hardware, over the next few weeks people will make much simpler and faster versions. However its a lot faster if you just used a pretrained model. After downloading and unzipping the pretrained model: This works even on normal everyday computers. Once sudo apt-get python3; sudo apt-get python3-pip; pip3 install cv2 numpy tensorflow; git clone https://github.com/taki0112/UGATIT/; cd UGATIT; mkdir dataset; cd dataset; wget http://vllab.ucmerced.edu/hylee/DRIT/datasets/cat2dog; unzip cat2dog; cd ../..; python3 main.py --dataset cat2dog --phase test. it turns cats into dogs and vice versa.

i used your model but it kust deepfried the photo

thewaifuai commented 5 years ago

@FuckReally its quite involved and takes many days to train on powerful hardware, over the next few weeks people will make much simpler and faster versions. However its a lot faster if you just used a pretrained model. After downloading and unzipping the pretrained model: This works even on normal everyday computers. Once sudo apt-get python3; sudo apt-get python3-pip; pip3 install cv2 numpy tensorflow; git clone https://github.com/taki0112/UGATIT/; cd UGATIT; mkdir dataset; cd dataset; wget http://vllab.ucmerced.edu/hylee/DRIT/datasets/cat2dog; unzip cat2dog; cd ../..; python3 main.py --dataset cat2dog --phase test. it turns cats into dogs and vice versa.

i used your model but it kust deepfried the photo

I forgot to add a meta file I added it just now in version 2 of the model. It is supposed to be in the zip with the others but it was too big to handle right now... I wrote a notebook on Kaggle to show how the pretrained model can be used. It shows how to download the datasets and move the newly added meta file to be with the other checkpoint files. However it does not work on Kaggle, because it generates too many files. My guess is I have to add the UGATIT repo and the cat2dog dataset to the Kaggle dataset for the Kaggle notebook to work properly. But I hope the update and the notebook are useful.

PettterWang commented 5 years ago

https://zhuanlan.zhihu.com/p/76979105