Practical overview
When it fits
Use CycleGAN when you have image collections from two related visual domains but lack matched before-and-after examples, or when you want to try one of the repository’s pretrained translation models.
Who it is for
- Researchers and developers exploring unpaired image-to-image translation.
- Practitioners who want to run the included pretrained style models on images.
- Users building experiments with two image collections that share visual content.
Documented uses
- Translate images from one visual domain to another without paired training examples.
- Apply a pretrained model for a documented style or object transformation.
- Train and test a translation model on two image domains arranged as separate datasets.
Requirements & limits
- The repository implementation uses Torch and Lua; its README points to a separate PyTorch implementation for CycleGAN and pix2pix.
- The documented setup targets Linux or OSX and prefers an NVIDIA GPU with CUDA and CuDNN; CPU execution is described but untested.
- Training data should contain visually related domains; unrelated categories and substantial geometric changes can produce weak results.
- Pretrained models and datasets are obtained through scripts included in the repository.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run a pretrained Cézanne-style model
Generate Cézanne-style results from the documented test photos using the pretrained style model.
Before you start
- Linux or OSX and a Torch installation with its dependencies.
- The repository’s nngraph, class, and display Torch packages.
- The CycleGAN repository and a compatible test setup.
Steps
Download the ae_photos test images with the repository’s dataset script.
Download the style_cezanne pretrained model with its model script; the README names style_cezanne_cpu as the CPU-model option.
Run the documented test.lua command with the ae_photos dataset and style_cezanne_pretrained settings.
Open the generated results page in ./results/style_cezanne_pretrained/latest_test/index.html.
Expected outcome
The test workflow saves generated results and an HTML index page in the named results directory.
Guide limitations
- The README describes Linux or OSX and prefers an NVIDIA GPU with CUDA and CuDNN; CPU mode or CUDA without CuDNN may require minimal modification and is untested.
- The results depend on how well the test images match the model’s training domain.
Train and test a horse-to-zebra model
Train an unpaired translation model on the repository’s horse2zebra dataset and run its documented test stage.
Before you start
- Linux or OSX and Torch with the documented dependencies and packages.
- The CycleGAN repository.
- A dataset organized for the horse2zebra workflow; custom datasets use trainA and trainB folders for the two domains.
Steps
Download the horse2zebra dataset with the repository’s dataset script.
Run the documented train.lua command using ./datasets/horse2zebra as DATA_ROOT and horse2zebra_model as the model name.
Run test.lua with DATA_ROOT=./datasets/horse2zebra, name=horse2zebra_model, and phase=test.
Open the generated test results at ./results/horse2zebra_model/latest_test/index.html.
Expected outcome
The workflow produces a trained model and an HTML page of test results.
Guide limitations
- The README prefers an NVIDIA GPU with CUDA and CuDNN; it documents a CPU-only command but notes CPU mode is untested.
- The method works better when the two image domains share visual content and may struggle with geometric changes or images unlike the training data.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 17 October 2026
- Original website title
- junyanz/CycleGAN · Official homepage title · retained in its source language

