# pytorch-CycleGAN-and-pix2pix

> Image-to-Image Translation in PyTorch

- Type: agent or tool
- Field: Image & Design
- Repository: https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix
- GitHub stars: 25261
- Licence: NOASSERTION
- Language: Python
- Last push: 2025-08-06
- Page: https://imutechz.in/agents/pytorch-cyclegan-and-pix2pix

## What it is
This repository provides PyTorch implementations of CycleGAN and pix2pix for image-to-image translation. CycleGAN handles unpaired translation between domains (e.g., horse to zebra), while pix2pix works with paired data (e.g., edges to photos). The codebase supports Python 3.11 and PyTorch 2.4+, includes distributed data parallel training, and offers templates for custom models and datasets.

## Features
- CycleGAN for unpaired image-to-image translation
- pix2pix for paired image-to-image translation
- DDP support for multi-GPU training
- Templates for custom models and datasets
- Training tips and FAQ documentation
- Colab notebooks for quick experimentation

## Best for
- Unpaired domain translation research
- Paired image translation tasks
- Multi-GPU training workflows
- Custom model development

## Pros
- Updated for modern PyTorch and Python versions
- Produces results comparable to original Torch implementations
- Includes comprehensive documentation and examples
- Supports both paired and unpaired translation

## Cons
- Requires PyTorch 2.4+ for current version
- Older PyTorch versions need separate branch
- GPU required for practical training

## Usage
```
torchrun --nproc_per_node=4 train.py ...
```

Tags: image-to-image-translation, cyclegan, pix2pix, pytorch, gan, unpaired-translation, paired-translation, computer-vision
