Coder Social home page Coder Social logo

mateuszsadowski / frame-rate-booster Goto Github PK

View Code? Open in Web Editor NEW
5.0 3.0 1.0 6.02 MB

Console application for increasing frame rate of a video sequcence by intermediate frame interpolation based on optical flow

License: MIT License

Python 100.00%

frame-rate-booster's Introduction

Frame Rate Booster

This is a tool for motion-compensated temporal upsampling of frame sequances in the form of videos. Frame interpolation is carried out with the use of optical flow. To obtain the optical flow for two consecutive frames, the Farneback method is used. An in-depth description of the project, methods and results can be found here.

Description

This tool was created in the scope of a project for the Digital Video Technology course at the Technical University of Denmark. This project is focused on the methods and techniques used to increase the frame rate of a video by creating new frames in between two consecutive images in a sequence. It is a relevant problem in many branches of the digital video technology field. For example, it can be used to transmit a sequence over a low bandwidth connection more effectively by first removing some frames from the video and then deconstructing them on the receiving end. It is also used in modern video editing software for slow-motion renders of videos that were shot with insufficient frame rate for that purpose. Yet another example can be old footage restoration.

In this project optical flow was calculated for each pair of consecutive frames. Optical flow is a field of 2D vectors that carry the information of how the pixels move between the frames. It was then used to interpolate the intermediate position of pixels along the motion vectors. The method was evaluated by first downsampling a sequance of images and then upsampling with the proposed method. Then the original and interpolated frames were compared using the Peak Signal-to-Noise Ratio (PSNR) metric. An in-depth description of the project, methods and results can be found here.

Comparison of the original (left) and interpolated (right) frames for the test sequances: Room comparison Hand comparison Guitar comparison

Getting Started

Dependencies

Installing

  • Clone or download this repository

Executing program

  • Set inputVideoName to a path to the video that you want to upsample and outputVideoName to where the upsampled video should be saved
  • Run the program with the command:
python [path-to-repo]/farneback.py

Further work

  • Motion vector post processing based on image segmentation
  • Use the vectors extracted from compression as initial optical flow
  • Blend the forward and backward flow depending on the color difference
  • Ability to interpolate more than one frame per each pair of existing frames

Authors

Mateusz Sadowski [email protected] linkedin.com/in/mateuszsadowski1/

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

Acknowledgments

frame-rate-booster's People

Contributors

mateuszsadowski avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

lucifer99966623

frame-rate-booster's Issues

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.