kalman.py,
assignment.py, nms.py, stereo_match.py) in your browser.
The classic building blocks of a tracking pipeline, each hand-written and tested against a reference, then run live here: a Kalman filter, the Hungarian assignment algorithm, non-max suppression and block-matching stereo.
kalman.py. More measurement noise → trust the model more; more process noise → trust the data more.assignment.py finds the
assignment with the minimum total cost, highlighted. Compare it to greedy "cheapest pair first".nms.py keeps the highest-scoring
box and suppresses its duplicates. Slide the IoU threshold; kept vs
suppressed.stereo_match.py slides a window along the row of the other image to
find the shift that matches best: the disparity (→ depth). The closer square shows a larger shift.Crank process noise and the estimate snaps to the data but jitters; drop it and it's silky but lags fast or accelerating paths. A constant-velocity model can never have both.
Process vs measurement noiseEdit the matrix until "cheapest pair first" boxes itself in: grabbing one bargain can force two expensive leftovers. The Hungarian algorithm minimises the total, not each step.
Why greedy losesLow IoU threshold and it over-merges (one box for two objects); high and duplicates survive. The sweet spot keeps exactly one box per real object.
What IoU measuresLarge blocks match reliably but smear edges and fine detail; small blocks are sharp but noisy. The disparity map's crispness rides on that block-size trade-off.
The block-size trade-off