Endpoint Error Optical Flow
The pixel distance between predicted and true motion vectors, averaged into one flow accuracy number.
Why Does This Exist?
Flow predicts one motion arrow per pixel. Judging arrows needs one distance that matches eyes: how far is the tip off. Endpoint error takes Euclidean distance between predicted and true vectors, then averages, giving flow one headline.
This page gives the formula, one recomputed arrow and misread traps. Robust variants live with outlier rates beside EPE.
Think of It Like This
Two darts on the same board
Truth sticks a dart, prediction sticks another. Endpoint error is the ruler between the two tips.
Average that ruler over every throw and you grade the whole game.
How It Actually Works
Per pixel, in pixels. Mean EPE averages over valid pixels. Small-camera-motion scenes score low easily, large motions dominate means, so reports add outlier shares above thresholds like 3 pixels.
Worked arrow example
Take truth and prediction . Gaps are and . Squared sum is . EPE is pixels. One diagonal miss costs more than its axis parts suggest.
Code
Per-vector gap plus a tiny mean.
import numpy as np
def epe(p: np.ndarray, t: np.ndarray) -> float: return round(float(np.sqrt(((p - t) ** 2).sum())), 3)
print(epe(np.array([3.0, 4.0]), np.array([5.0, 0.0])))# -> 4.472Gaps minus 2 and 4 give about 4.472 pixels.
Watch Out For
Reading mean EPE without outlier share
A few huge sky or occlusion gaps can rule the mean while most pixels sit tight. The symptom is a bad headline on a mostly good field. Fix it by reporting outlier rate beside the mean.
The Quick Version
- EPE is Euclidean gap between predicted and true flow vectors in pixels.
- Toy versus gives .
- Mean EPE averages over valid pixels, lower is better.
- Use it as the flow headline with outlier rates beside it.
- Large motions dominate, so slice by speed.