In this repository you will find a cycle consistency GAN prepared to perform object transfiguration between different fruits. This PyTorch implementation is based on the CycleGAN original paper from Jun-Yan Zhu, Taesung Park et al. The main differences with the original paper are:
- the usage of a different generator network (we use a residual network based on the good results from Leidig et al.). The latest implementation of the original authors also considers residual networks and U-nets.
- the usage of odd weighted filters for the PatchGAN.
The dataset used for this repository is the Kaggle Fruits 360 presented by Muresan and Oltean. The images from this dataset are placed randomly over the textures in the textures folder with random scaling.
- PyTorch 0.3.0 or superior.
- Python2 or Python3
- If using an NVIDIA GPU: CUDA
- Installation of CUDA
wget developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo dpkg -i cuda-repo-ubuntu1604_9.1.85-1_amd64.deb
sudo apt-key adv --fetch-keys http://developer.download.nvidia.com/compute/cuda/repos/ubuntu1604/x86_64/7fa2af80.pub
sudo apt-get update
sudo apt-get install cuda
- Installation of Pytorch 0.4 for Python 3.6
sudo -H pip3 install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp36m-linux_x86_64.whl
sudo -H pip3 install torchvision
- Installation of Pytorch 0.4 for Python 3.5
sudo -H pip3 install http://download.pytorch.org/whl/cu91/torch-0.4.0-cp36-cp35m-linux_x86_64.whl
sudo -H pip3 install torchvision