YAML Metadata Warning:empty or missing yaml metadata in repo card

Check out the documentation for more information.

CycleGAN for Image-to-Image Translation πŸ΄πŸ¦„πŸ¦“

Paired vs Unpaired

This project implements a Cycle-Consistent Generative Adversarial Network (CycleGAN) for unpaired image-to-image translation tasks. Based on the original CycleGAN paper, this implementation learns to translate images between two domains without paired training examples.

Project Overview

Cycle Gans Architecture

The implementation includes:

  • Custom dataset loader for unpaired image datasets
  • Generator with residual blocks using instance normalization
  • PatchGAN discriminator architecture
  • Cycle-consistency loss for domain translation
  • Adversarial loss with both MSE and BCE implementations
  • Training pipeline with visualization of results

Key Features ✨

  • Flexible Architecture: Supports different normalization layers and activation functions
  • Comprehensive Loss Functions: Implements cycle-consistency loss and adversarial loss
  • Visualization Tools: Includes functions to visualize training progress and generated images
  • Efficient Training: Batch processing and GPU acceleration support
  • Model Checkpointing: Automatic saving of model states during training

Installation βš™οΈ

  1. Clone repository:
git clone https://github.com/Ansarill/cycle_gans.git
cd cycle_gans
  1. Create virtual env (Python 3.10.12):
python3.10 -m venv my_env
source my_env/bin/activate
  1. Install dependencies:
pip install -r requirements.txt

Usage πŸš€

  1. Prepare your dataset in the following structure (or follow notebook to download one of datasets) and change variables in the notebook accordingly:
datasets/
└── img2img/
    └── your_dataset/
        β”œβ”€β”€ trainA/
        β”œβ”€β”€ trainB/
        β”œβ”€β”€ testA/
        └── testB/
  1. Configure the training parameters in the Jupyter notebook

  2. Run the training

License πŸ“„

This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details.


Inspired by The Great Impressionist Painter Vincent van Gogh
Powered by Pure PyTorch and Enthusiasm

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Paper for sunzet/vangogh2photo_cycle_gans