Skip to content

shafu0x/opical-flow-estimation-with-RAFT

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RAFT

Cool way to calculate optical flow for two images very easily.

Seems to be very good: Optical Flow Estimation Benchmark

Example Example

Paper: RAFT: Recurrent All Pairs Field Transforms for Optical Flow

OG Repo: princeton-vl/RAFT

Requirements

pip3 install -r requirements.txt

How to use

We will use RAFT to create optical flow numpy arrays from two images and save them in a directory. First you will need to download the models. Just run:

sh download_models.sh

After the download you can run the model on your images like this:

run.py --images_dir=<YOUR DIRECTORY> --output_dir=<OUTPUT DIRECTORY>

Visualize

You can visualize the .npy optical flow files with vis.py:

vis.py ---npy_dir==<YOUR DIRECTORY> --output_dir=<OUTPUT DIRECTORY>

About

Optical Flow Estimation using RAFT with PyTorch.

Topics

Resources

Stars

Watchers

Forks

Languages

  • Python 82.2%
  • Cuda 15.5%
  • C++ 2.1%
  • Shell 0.2%