OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Cyclegan

Cyclegan is a Torch implementation of unpaired image-to-image translation that learns to transform images between two visual domains without matched input-output examples. It includes workflows for applying pretrained models and training on domain datasets, with examples such as horse-to-zebra translation and landscape-photo style transfer.

Independent OpenViST project profile, based on linked sources.

Cyclegan — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Download the ae_photos test images with the repository’s dataset script.

  2. Download the style_cezanne pretrained model with its model script; the README names style_cezanne_cpu as the CPU-model option.

  3. Run the documented test.lua command with the ae_photos dataset and style_cezanne_pretrained settings.

  4. 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.
Source-based practical guide

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

  1. Download the horse2zebra dataset with the repository’s dataset script.

  2. Run the documented train.lua command using ./datasets/horse2zebra as DATA_ROOT and horse2zebra_model as the model name.

  3. Run test.lua with DATA_ROOT=./datasets/horse2zebra, name=horse2zebra_model, and phase=test.

  4. 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.
Evidence and transparency

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