Git Product home page Git Product logo

fast-artistic-videos's Introduction

#Fast Artistic Style Transfer for Video
Torch implementation of a faster video stylization approach. See details and demos in project page.
demo
Watch demo videos on YouTube: Demo Video, Comparison With Other Methods

How to Install

#install torch
cd consistencyChecker
make
cd ..
bash download_models.sh

Example for Running

Below is an example to stylize video example.mp4 (Result resolution 640:480)

  • Put your video example.mp4 under this folder.
  • bash fast_stylize.sh *example.mp4* *models/starry_night.t7*
  • bash opt_flow.sh *example_01/frame_%06d.ppm* *example/flow_640:480*
  • bash make_video.sh *example.mp4*

*___* are parts you should change accordingly.
Please refer to this project if you want to train your own style model.

Deepmatching and deepflow is super slow. Run them parallely on CPU cluster or run their GPU versions.
You just need optical flow to keep temporal consistency, not necessary deepflow. But we only tested with deepflow.

  • To run parallely on k machines:
    • bash opt_flow.sh *example_01/frame_%06d.ppm* *example/flow_640:480* 1 k
    • bash opt_flow.sh *example_01/frame_%06d.ppm* *example/flow_640:480* 2 k
    • bash opt_flow.sh *example_01/frame_%06d.ppm* *example/flow_640:480* 3 k
    • ...
    • bash opt_flow.sh *example_01/frame_%06d.ppm* *example/flow_640:480* k-1 k
    • bash opt_flow.sh *example_01/frame_%06d.ppm* *example/flow_640:480* k k

Why Faster

Use the real-time algorithm for stylization of each frame. So L-BFGS is only used for temporal consistency purpose. L-BFGS takes temporal loss, perceptual loss and relation loss into account and in addition, pixel loss to avoid contrast loss.

Reference

Implementation is based on the following projects:

Their license can be found in their project repository.

License

GNU GPL 3.0 for personal or research use. COMMERCIAL USE PROHIBITED.

fast-artistic-videos's People

Contributors

zeruniverse avatar

Watchers

James Cloos 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.