PyTorch implementations of CycleGAN and pix2pix for paired and unpaired image-to-image translation. The repository supports training new models, testing existing ones, and applying pre-trained checkpoints to new datasets.
Project overview
Provides both paired (pix2pix) and unpaired (CycleGAN) image-to-image translation within a single PyTorch repository, reporting comparable or better results than original Torch implementations.
Project type
Image & Vision · Infrastructure
Use cases
Image Processing
Deployment
Refer to project documentation
License
License pending
Best for
Researchers, developers, and educators working on image-to-image translation tasks who need CycleGAN or pix2pix architectures.
Users who need templates for implementing custom models and datasets for new image translation applications.
Key capabilities
Train and test unpaired image-to-image translation models using CycleGAN.
Train and test paired image-to-image translation models using pix2pix.
Download and apply pre-trained CycleGAN and pix2pix models to generate results on new datasets.
Supports Distributed Data Parallel (DDP) for single-machine multiple-GPU training.
Provides templates for implementing custom models and datasets for new applications.
Train and test pix2pix-based colorization models.
Limitations and risks
The batch norm setting (--norm batch) is not compatible with Distributed Data Parallel (DDP) multi-GPU training.
The implementations may not reproduce the exact same results as reported in the original Torch implementation papers.
Getting started
Setup requires command-line knowledge and Python environment configuration. Users clone the repository, install dependencies (e.g., using conda), download a dataset (e.g., via bash scripts), and execute training or testing commands (e.g., python train.py).
Alternatives and comparisons
A neural network structure for controlling text-to-image diffusion models by adding extra spatial conditions, unlike the GAN-based image translation approach.
GitHub project description: Image-to-Image Translation in PyTorch
README: We provide PyTorch implementations for both unpaired and paired image-to-image translation.
README: This PyTorch implementation produces results comparable to or better than our original Torch software.
README: - To log training progress and test images to W&B dashboard, set the `--use_wandb` flag with training script - Train a model: ```bash #!./scripts/train_cyclegan.sh python train.py…
README: - To log training progress and test images to W&B dashboard, set the `--use_wandb` flag with training script - Train a model: ```bash #!./scripts/train_pix2pix.sh python train.py…