Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ak2k30/cyclegan-pytorch-implementation
This project is implementation of CycleGAN paper.
https://github.com/ak2k30/cyclegan-pytorch-implementation
gan machine-learning python pytroch train
Last synced: 3 days ago
JSON representation
This project is implementation of CycleGAN paper.
- Host: GitHub
- URL: https://github.com/ak2k30/cyclegan-pytorch-implementation
- Owner: AK2k30
- Created: 2024-07-19T09:51:55.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-07-28T19:00:01.000Z (4 months ago)
- Last Synced: 2024-07-28T20:21:44.965Z (4 months ago)
- Topics: gan, machine-learning, python, pytroch, train
- Language: Python
- Homepage:
- Size: 3.79 MB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# CycleGAN
A clean, simple and readable implementation of CycleGAN in PyTorch. I've tried to replicate the original paper as closely as possible, so if you read the paper the implementation should be pretty much identical. The results from this implementation I would say is on par with the paper, I'll include some examples results below.## Results
The model was trained on Zebra<->Horses dataset.|1st column: Input / 2nd column: Generated / 3rd row: Re-converted|
|:---:|
|![](results-image/horse_results.png)|
|![](results-image/zebra_results.png)|### Horses and Zebras Dataset
The dataset can be downloaded from Kaggle: [link](https://www.kaggle.com/suyashdamle/cyclegan).### Download pretrained weights
Pretrained weights [download](https://github.com/aladdinpersson/Machine-Learning-Collection/releases/download/1.0/CycleGAN_weights.zip).Extract the zip file and put the pth.tar files in the directory with all the python files. Make sure you put LOAD_MODEL=True in the config.py file.
### Training
Edit the config.py file to match the setup you want to use. Then run train.py## CycleGAN paper
### Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks by Jun-Yan Zhu, Taesung Park, Phillip Isola, Alexei A. Efros#### Abstract
Image-to-image translation is a class of vision and graphics problems where the goal is to learn the mapping between an input image and an output image using a training set of aligned image pairs. However, for many tasks, paired training data will not be available. We present an approach for learning to translate an image from a source domain X to a target domain Y in the absence of paired examples. Our goal is to learn a mapping G:X→Y such that the distribution of images from G(X) is indistinguishable from the distribution Y using an adversarial loss. Because this mapping is highly under-constrained, we couple it with an inverse mapping F:Y→X and introduce a cycle consistency loss to push F(G(X))≈X (and vice versa). Qualitative results are presented on several tasks where paired training data does not exist, including collection style transfer, object transfiguration, season transfer, photo enhancement, etc. Quantitative comparisons against several prior methods demonstrate the superiority of our approach.
```
@misc{zhu2020unpaired,
title={Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks},
author={Jun-Yan Zhu and Taesung Park and Phillip Isola and Alexei A. Efros},
year={2020},
eprint={1703.10593},
archivePrefix={arXiv},
primaryClass={cs.CV}
}
```## Support
#### If you like this project, show your support & love!
[![buy me a coffee](https://res.cloudinary.com/customzone-app/image/upload/c_pad,w_200/v1712840190/bmc-button_wl78gx.png)](https://www.buymeacoffee.com/akashsunile)