Giter VIP home page Giter VIP logo

autocolorization's Introduction

autocolorization

We used pretrained convolutional neural networks (CNNs) to automatically colorize, denoise, and upscale a portion of Godard's Breathless (1960).

We accomplished this by leveraging pretrained models released by the authors of two recent papers:
[1] Gustav Larsson, Michael Maire, and Gregory Shakhnarovich. "Learning Representations for Automatic Colorization," In arXiv, Mar 2016. http://arxiv.org/pdf/1603.06668v1.pdf
[2] Chao Dong, Chen Change Loy, Kaiming He, Xiaoou Tang, "Image Super-Resolution Using Deep Convolutional Networks", In arXiv, Jan 2015. http://arxiv.org/abs/1501.00092

We created a docker container so users can easily colorize, denoise, and upscale their own videos on any machine that has docker installed (although you'll need a good GPU to do this quickly).

autocolorization

Examples & Usage

Colorizing your video:

  1. Break video into individual frames and extract audio
./movie2frames.sh your_video.avi 
  1. Run colorization on frames
python autocolorization.py
  1. Recreate video using the colorized frames
./frames2movie.sh new_frames

Colorizing and upscaling your video:

  1. Break video into individual frames and extract audio
./movie2frames your_video.mp4 frames png
  1. Run colorization on frames
python autocolorization.py
  1. Denoise and upscale the frames
find ./frames -name "*.png" |sort > frames.txt
mkdir new_frames
[lua call]
  1. Recreate video with colorized and upscaled frames
avconv -f image2 -r 24 -i new_frames/%d.png -i audio.mp3 -r 24 -vcodec libx264 -crf 16 video.mp4

Installation & Setup

We provide a separate dockerfiles for CPUs and GPUs. The docker containers are provisioned for colorization and upscaling.

Docker

docker run -it ackimball/autocolorization-gpu /bin/bash

or

docker run -it ackimball/autocolorization-cpu /bin/bash

Dependencies

  • Caffe
  • Torch
  • ffmpeg
  • avconv
  • waifu2x

autocolorization's People

Contributors

ackimball avatar mbartoli avatar

Watchers

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