Coder Social home page Coder Social logo

chenxingqiang / recycle-gan Goto Github PK

View Code? Open in Web Editor NEW

This project forked from aayushbansal/recycle-gan

0.0 1.0 0.0 68 KB

Unsupervised Video Retargeting (e.g. face to face, flower to flower, clouds and winds, sunrise and sunset)

License: MIT License

Python 99.34% Shell 0.66%

recycle-gan's Introduction

Recycle-GAN :Unsupervised Video Retargeting

This repository provides the code for our work on unsupervised video retargeting.

@inproceedings{Recycle-GAN,
  author    = {Aayush Bansal and
               Shugao Ma and
               Deva Ramanan and
               Yaser Sheikh},
  title     = {Recycle-GAN: Unsupervised Video Retargeting},
  booktitle   = {ECCV},
  year      = {2018},
}

Acknowledgements: This code borrows heavily from the PyTorch implementation of Cycle-GAN and Pix2Pix. A huge thanks to them!

John Oliver to Stephen Colbert

John Oliver to Stephen Colbert

Click above to see video!

Video by CMU Media folks

Video by CMU folks!

Click above to see video!

Introduction

We use this formulation in our ECCV'18 paper on unsupervised video retargeting for various domains where space and time information matters such as face retargeting. Without any manual annotation, our approach could learn retargeting from one domain to another.

Using the Code

The repository contains the code for training a network for retargeting from one domain to another, and use a trained module for this task. Following are the things to consider with this code:

Data pre-processing

For each task, create a new folder in "dataset/" directory. The images from two domains are placed respectively in "trainA/" and "trainB/". Each image file consists of horizontally concatenated images, "{t, t+1, t+2}" frames from the video. The test images are placed in "testA/" and "testB/". Since we do not use temporal information at test time, the test data consists of single image "{t}".

Training

There are two training modules in "scripts/" directory: (1). Recycle-GAN, (2). ReCycle-GAN

Recycle-GAN

We used this module for examples in the paper, specifically face to face, flower to flower, clouds and wind synthesis, sunrise and sunset.

ReCycle-GAN

We found this module useful for tasks such as unpaired image to labels, and labels to image on VIPER dataset, image to normals, and normals to image on NYU-v2 depth dataset.

Prediction Model

There are two prediction model used in this work: (1). simple U-Net, (2). higher-capacity prediction.

unet-128, unet-256

If you want to use this prediction module, please set the flag "--which_model_netP" to "unet_128" and "unet_256" respectively.

prediction

An advanced version of prediction module is a higher capacity module by setting the flag "--which_model_netP" to "prediction".

Observation about training:

We observed that model converges in 20-40 epochs when sufficiently large data is used. For smaller datasets (ones having 1000 images or less), it is suitable to let it train for longer.

Test

At test time, we do inference per image (as mentioned previously). The test code is based on cycle-gan.

Data & Trained Models:

Please contact Aayush Bansal for any specific data or trained models, or for any other information.

recycle-gan's People

Contributors

aayushbansal avatar

Watchers

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