Skip to content

A clean and lucid implementation of cycleGAN using PyTorch

License

Notifications You must be signed in to change notification settings

arnab39/cycleGAN-PyTorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CycleGAN using PyTorch

CycleGAN is one of the most interesting works I have read. Although the idea behind cycleGAN looks quite intuitive after you read the paper: Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks, the official PyTorch implementation by junyanz is difficult to understand for beginners (The code is really well written but it's just that it has multiple things implemented together). As I am writing a simpler version of the code for some other work, I thought of making my version of cycleGAN public for those who are looking for an easier implementation of the paper.

All the credit goes to the authors of the paper. This code is inspired by the actual implementation by junyanz which can be found here.

Requirements

  • The code has been written in Python (3.5.2) and PyTorch (0.4.1)

How to run

  • To download datasets (eg. horse2zebra)
$ sh ./download_dataset.sh horse2zebra
  • To run training
$ python main.py --training True
  • To run testing
$ python main.py --testing True
  • Try tweaking the arguments to get best performance according to the dataset.

Results

  • For horse to zebra dataset. ( Real - Generated - Reconstructed)