← All models · RAFT optical flow

Basics · optical-flow · vision · WASM

Recover a known motion

The plainest way to see what optical flow does: take a photo, shift it by a known number of pixels, and ask RAFT to measure the motion. If it works, the recovered vector should match the shift you applied — for every pixel. Colour shows direction; brightness of colour shows speed.

Run it

direction → colour

Frame 1
Frame 2 (shifted →)
RAFT flow

A pure rightward pan should make the whole flow field one colour (one direction) with a recovered u ≈ your shift and v ≈ 0 — that's the honesty check.