Giter VIP home page Giter VIP logo

vineeths96 / video-interpolation-using-deep-optical-flow Goto Github PK

View Code? Open in Web Editor NEW
9.0 1.0 3.0 14.04 MB

In this repository, we deal with the task of video frame interpolation with estimated optical flow. To estimate the optical flow we use pre-trained FlowNet2 deep learning model and experiment by fine-tuning it. We explore the interpolation performance on Spheres dataset and Corridor dataset.

License: MIT License

Dockerfile 0.61% Python 74.79% Shell 1.18% C++ 3.89% Cuda 19.54%
frame-interpolation optical-flow flownet flownet2 video deep-learning pytorch

video-interpolation-using-deep-optical-flow's Introduction

Language Contributors Forks Stargazers Issues MIT License LinkedIn


Video Interpolation using Deep Optical Flow

Intermediate frame interpolation using optical flow with FlowNet2
Explore the repository»

View Problem Statement View Report

tags : frame interpolation, optical flow, flownet2, digital video, deep learning, pytorch

About The Project

This project deals with the task of video frame interpolation with estimated optical flow. In particular, we estimate the forward optical flow (flow from Frame N to Frame N + 2) and the backward flow (flow from Frame N + 2 to Frame N) and use both of them to estimate the intermediate Frame N. To estimate the optical flow we use pre-trained FlowNet2 deep learning model and experiment by fine-tuning it. We explore the interpolation performance on Spheres dataset and Corridor dataset. We observe that the quality of interpolated frames is comparable to original with both the datasets. A detailed description of interpolation algorithms, loss functions, analysis of the results are available in the Report.

Note: flownet folder contains code modified from NVIDIA FlowNet2 Repository and FlowNet2 PyTorch Wrapper. Download the pre-trained models and put it in ./flownet2/pretrained_models folder.

Built With

This project was built with

  • python v3.7
  • pytorch v1.0.0
  • The environment used for developing this project is available at environment.yml.

Getting Started

Clone the repository into a local machine using

git clone https://github.com/vineeths96/Video-Interpolation-using-Deep-Optical-Flow

Prerequisites

Create a new conda environment and install all the libraries by running the following command

conda env create -f environment.yml

The dataset used in this project is already available in this repository. To test on other datasets, download them and put them in the input/ folder.

Instructions to run

We explore with pre-trained FlowNet2 model from NVIDIA and experiment by fine-tuning it.

Pre-trained FlowNet2 model

To interpolate the frame with the pretrained FlowNet2 model, run the following command. This will interpolate the intermediate frames and store it in this folder.

python pretrained_interpolation.py
FlowNet2 with fine-tuning

To interpolate the frame with the pretrained FlowNet2 model, run the following command. Set the parameters for fine-tuning in the parameters file. This will interpolate the intermediate frames and store it in this folder.

python finetuned_interpolation.py

Results

Note that the GIFs below might not be in sync depending on the network quality. Clone the repository to your local machine and open them locally to see them in sync.

A detailed description of algorithms and analysis of the results are available in the Report.

The plots below shows the estimated optical flow for the datasets with the pre-trained model and the fine-tuned model. We can see that there are no significant change in the estimated optical flow between the two methods.

Corridor Dataset Pre-Trained Optical Flow Fine-Tuned Optical Flow
Corridor CorridorPT CorridorFT
Sphere Dataset Pre-Trained Optical Flow Fine-Tuned Optical Flow
Sphere SpherePT SphereFT

The plots below shows the interpolated frames for the datasets with the pre-trained model and the fine-tuned model. We can see that there is no significant change in quality of interpolated frames between the two methods.

Corridor Dataset Ground Truth Pre-Trained Interpolated Frame Fine-Tuned Interpolated Frame
Corridor CorridorPT CorridorFT
Sphere Dataset Ground Truth Pre-Trained Interpolated Frame Fine-Tuned Interpolated Frame
Sphere SpherePT SphereFT

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Vineeth S - [email protected]

Project Link: https://github.com/vineeths96/Video-Interpolation-using-Deep-Optical-Flow

Acknowledgements

video-interpolation-using-deep-optical-flow's People

Contributors

vineeths96 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 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.