GithubHelp home page GithubHelp logo

artistic-style-transfer-for-videos's Introduction

Artistic Style Transfer for Videos

Artistic Style Transfer for Videos is a Python application that applies the style transfer technique to both images and videos. This technique reimagines your photos or videos in the style of another image, such as a famous artwork, using neural network algorithms.

Unofficial implementation in PyTorch of an "Artistic style transfer for videos" [arXiv].

Features

  • Model-agnostic. Fast EfficientNet-B0 is used as a feature extractor. RAFT is used as an optical flow estimator.
  • High-order statistics of feature grid are used to estimate the style, thus eliminating dependency from content/style image shape.

Limitations

  • Not a real-time application.

TODO

  • Remove hardcoded paths.
  • Add long-term temporal consistency.
  • Implement multi-pass algorithm.
  • Copy audio from the original video.

Installation

Prerequisites

  • Python 3.7+
  • pip
  • Git LFS (optional)

Install

  1. Clone the repository with Git LFS support.
  2. Verify that example files are downloaded with:
    git lfs pull
  3. Install dependencies with:
    python -m pip install -U -r requirements.txt

Video Style Transfer

Apply style transfer to video files, transforming each frame to carry the artistic style of your choice.

Usage

First, prepare your video for style transfer:

python main_video_prepare.py

Next, apply the style transfer to the video:

python main_video.py

Finally, join the processed frames back into a video:

python main_video_join.py

Arguments and filepaths need to be hardcoded in main_video_prepare.py, main_video.py, and main_video_join.py.

Alternatives

License

Licensed under either of

at your option.

Contribution

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

Acknowledgements

This project is inspired by the pioneering work in neural style transfer. Special thanks to the authors of the original research papers and the open-source community for making their code available.

artistic-style-transfer-for-videos's People

Contributors

ivanstepanovftw avatar

Watchers

 avatar

artistic-style-transfer-for-videos's Issues

Strange output with red noise point

styled_38_0
I can get this good output yesterday.
but today when I ran it again, I get this strange output:
styled_39_1

Have you ever encountered this problem before? Or you can give me some suggestions?

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.