Skip to content

Latest commit

 

History

History
39 lines (25 loc) · 1014 Bytes

File metadata and controls

39 lines (25 loc) · 1014 Bytes

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>