Coder Social home page Coder Social logo

sahilg06 / bicyclegan Goto Github PK

View Code? Open in Web Editor NEW
10.0 1.0 0.0 36.38 MB

PyTorch Implementation for Paper "Toward Multimodal Image-to-Image Translation"

Python 18.18% Jupyter Notebook 81.69% Shell 0.13%
bicyclegan gans blog pytorch denoising-images edges-to-shoes perceptual-loss

bicyclegan's Introduction

BicycleGAN

This project includes a well written blog on BicycleGAN and also its implementation in pytorch. It also includes the results that I got after experimenting the model on two different datasets Edges to Shoes and CIFAR10

Abstract

Many image-to-image translation problems are ambiguous, as a single input image may correspond to multiple possible outputs. In this work, we aim to model a distribution of possible outputs in a conditional generative modeling setting. The ambiguity of the mapping is distilled in a low-dimensional latent vector, which can be randomly sampled at test time. A generator learns to map the given input, combined with this latent code, to the output. We explicitly encourage the connection between output and the latent code to be invertible. This helps prevent a many-to-one mapping from the latent code to the output during training, also known as the problem of mode collapse, and produces more diverse results. We explore several variants of this approach by employing different training objectives, network architectures, and methods of injecting the latent code. Our proposed method encourages bijective consistency between the latent encoding and output modes. We present a systematic comparison of our method and other variants on both perceptual realism and diversity.

Structure

.BicycleGAN
├── BicycleGAN 
│   ├── Denoising_CIFAR10.PY      
│   ├── Results
│   │   ├── CIFAR10
│   │   └── Edges2Shoes
│   ├── bicyclegan.py
│   ├── datasets.py
│   ├── lpips.ipynb
│   └── models.py
├── Blog.ipynb
├── README.md
├── data
│   └── download_pix2pix_dataset.sh
├── img
└── requirements.txt

Installation

$ git clone https://github.com/sahilg06/BicycleGAN.git
$ cd BicycleGAN/
$ sudo pip3 install -r requirements.txt

Run Example For edges → images task

$ cd data/
$ bash download_pix2pix_dataset.sh edges2shoes
$ cd ../BicycleGAN/
$ python3 bicyclegan.py

Run Example For denoising task

$ cd BicycleGAN/
$ python3 Denoising_CIFAR10.PY

Sample Results

For edges → images task

139600

For denoising task

Ist column contains original images of CIFAR10. I noised them and passed them as an input to the network. It produced interesting results with variations.

316800

Analyse the results using Learned Perceptual Image Patch Similarity (LPIPS) metric here

References

@misc{zhu2018multimodal,
      title={Toward Multimodal Image-to-Image Translation}, 
      author={Jun-Yan Zhu and Richard Zhang and Deepak Pathak and Trevor Darrell and Alexei A. Efros and Oliver Wang and Eli Shechtman},
      year={2018},
      eprint={1711.11586},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

https://github.com/eriklindernoren/PyTorch-GAN

bicyclegan's People

Contributors

sahilg06 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.