shafu0x / opical-flow-estimation-with-RAFT

Optical Flow Estimation using RAFT with PyTorch.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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.


Languages

Language:Python 82.3%Language:Cuda 15.5%Language:C++ 2.1%Language:Shell 0.2%