Coder Social home page Coder Social logo

databill86 / uaggan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from yhlleo/uaggan

0.0 0.0 0.0 6.07 MB

A Pytorch implementation of "Unsupervised Attention-Guided Image-to-Image Translation"

License: Other

Python 95.82% TeX 0.95% Shell 2.24% MATLAB 0.99%

uaggan's Introduction

uaggan

A Pytorch implementation of "Unsupervised Attention-Guided Image-to-Image Translation", NIPS 2018, [Paper] | [TF code]


Installation

For Conda users, we provide a installation script ./scripts/conda_deps.sh. Alternatively, you can create a new Conda environment using this command:

conda env create -f environment.yml

Prepare Dataset:

  • Download a CycleGAN dataset (e.g. horse2zebra, apple2orange):
bash ./datasets/download_cyclegan_dataset.sh horse2zebra
  • Use your own dataset: put images from each domain at folder_a and folder_b respectively.

Usage

  • Training
sh ./scripts/train_uaggan.sh <gpu_id>

or

nohup sh -u ./scripts/train_uaggan.sh <gpu_id> > uag.log &
  • Test
sh ./scripts/test_uaggan.sh <gpu_id>

Mapping results

  • horse2zebra (without early stopping, threshold=0.1)
Real A Attention Mask Fake B Real B Attention Mask Fake A

[More Results >>>]

  • horse2zebra (with early stopping, threshold=0.1)

//TODO

  • apple2orange

//TODO

Faster version

Combining the attention module and domain translation module into one generator, inspired by GANimation. (Results are not good.)

  • Training
sh ./scripts/train_faster_uaggan.sh <gpu_id>
  • Testing
sh ./scripts/test_faster_uaggan.sh <gpu_id>
Real A Attention Mask Fake B Real B Attention Mask Fake A

Acknowledgment

This code is based on the pytorch-CycleGAN-and-pix2pix. Thanks to the contributors of this project.

uaggan's People

Contributors

yhlleo 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.