Skip to content

The PyTorch code of CycleGAN, Gender-to-Gender Image Translation (2017)

Notifications You must be signed in to change notification settings

bb-in-hoodie/CycleGAN-on-pytorch

Repository files navigation

CycleGAN on Pytorch

Implementation of CycleGAN on Pytorch. The model learns how to convert an image of domain A to an image of domain B and vice versa. On this project, CelebA dataset has been used as the main dataset. The model has learned how to translate a female image to a male image and vice versa.

Prerequites

  • Python 3.6
  • PyTorch 0.2.0 (PyTorch is currently available only on Linux and OSX)
  • The code has been written on Linux (ubuntu 16.04 LTS) system
  • CPU or CUDA-available-GPU

How to

1. Install Python and PyTorch (from the link above or on your own way)

2. Prepare your own dataset, store it in the project folder (it should contain the images of two domains)

3. Change the dataset location part of 'train.py' code like below

...
# The lowest folder should have two sub-folders, each containing images from another domain
image_location = './data/your_dataset/train'
...

4. Run the command below on Terminal

$ python train.py

Results

1) Female to Male

FtoM_01 FtoM_02 FtoM_03 FtoM_04 FtoM_05 FtoM_06 FtoM_07 FtoM_08 FtoM_09 FtoM_10 FtoM_11 FtoM_12 FtoM_13 FtoM_14

2) Male to Female

MtoF_01 MtoF_02 MtoF_03 MtoF_04 MtoF_05 MtoF_06 MtoF_07 MtoF_08 MtoF_09 MtoF_10 MtoF_11 MtoF_12 MtoF_13 MtoF_14

About

The PyTorch code of CycleGAN, Gender-to-Gender Image Translation (2017)

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages