Teaching GANs to convert paintings to photos, unsupervised
It learns to map one visual domain to another—say, horses to zebras—without ever seeing a matched pair during training.

What it does
This is the original Berkeley implementation of CycleGAN, a generative adversarial network that translates images from one domain to another. You can turn Monet paintings into landscape photos, summer Yosemite scenes into winter, or horses into zebras. The code is written in Lua for the Torch framework and ships with a zoo of pre-trained models.
The interesting bit
The trick is cycle consistency: the network learns to convert a horse to a zebra and back again, so it never needs paired before-and-after images to train. The authors also bundled related methods—pix2pix, BiGAN/ALI, and Apple’s S+U learning—into the same repo.
Key highlights
- Unpaired translation: learns domain-to-domain mappings without aligned training pairs
- Pre-trained models for style transfer (Monet, Van Gogh, Cézanne, Ukiyo-e), object transfiguration (horse↔zebra, apple↔orange), and season transfer
- Includes related techniques: pix2pix, BiGAN/ALI, and S+U learning in one codebase
- Runs on Linux or macOS with NVIDIA GPU and CUDA CuDNN; CPU mode is possible but untested
- Authors now recommend the PyTorch successor for active development and better results
Caveats
- The authors explicitly recommend the newer PyTorch implementation for better results and active development
- It will not work on arbitrary domain pairs: the README warns that cats↔dogs “completely fails” and similar visual content is required
- macOS users need GNU utilities (
gfind,gwc) installed separately
Verdict
Grab this if you need the original ICCV 2017 implementation or want to benchmark against the classic Torch baseline. Skip it if you are starting fresh—the PyTorch rewrite is where the authors are adding improvements.
Frequently asked
- What is junyanz/CycleGAN?
- It learns to map one visual domain to another—say, horses to zebras—without ever seeing a matched pair during training.
- Is CycleGAN open source?
- Yes — junyanz/CycleGAN is an open-source project tracked on heatdrop.
- What language is CycleGAN written in?
- junyanz/CycleGAN is primarily written in Lua.
- How popular is CycleGAN?
- junyanz/CycleGAN has 12.9k stars on GitHub.
- Where can I find CycleGAN?
- junyanz/CycleGAN is on GitHub at https://github.com/junyanz/CycleGAN.