Demos / track-lab

Track-before-detect · layers 1 and 2 without a threshold

The target no frame can show

At 3 dB a target is a pixel that is slightly, unreliably brighter than its neighbours. No threshold finds it without drowning in false alarms. But it moves in a straight line and the noise does not: add sixteen frames along its motion and it stands up out of the noise by a factor of four. This page does that in front of you and prices what it costs.

The scene is experiment E3's: the true target moves at – pixels per frame. The velocity sliders set the hypothesis the integrator follows; the search over all hypotheses is what the Python reference does, and it is what the last frame below pays for.

One frame
target at –σ · brightest pixel –σ · above threshold: – pixels
Thresholded at –
detect-then-track sees these dots. Target found: –
Integrated along the hypothesis
target at –σ · brightest pixel –σ
Thresholded at –
at matched false alarms over – hypotheses. Target found: –

–

Why it works, and what it costs

Each pixel holds unit-variance noise plus, where the target is, an amplitude A = 10^(SNR/20). Sum L frames along the target's true motion and divide by √L: the noise is unit variance again, and the target is now √L · A. Sixteen frames buy a factor of four in amplitude, 12 dB. That is the entire mechanism, and it is why the information about a weak target is in time, not in any one frame.

The price has two parts. First, the motion has to be hypothesised: the integrator does not know the velocity, so it tries a grid of V velocities and keeps the best. A search over V maps at the same total false-alarm budget forces the threshold up. The textbook rule of thumb √(2 ln V) overstates that rise: E3 measured it on empty frames, and the measured value, shown under the frames above, is smaller, because the maps share frames and are not independent. Second, a target that accelerates within the window smears across hypotheses and gets less than the full gain, which caps L at the time over which motion is straight.

The honest comparison is therefore at matched false alarms: set both thresholds so that an empty scene produces the same number of detections, then ask which method finds the target. The curves below do that in closed form; the Python experiment E3 measures the same thing on rendered frames and is overlaid when its data is present.

Recall at the chosen false-alarm budget with the hypothesis search penalty included. Lines: the closed form at the thresholds used above, E3's measured ones where it has them. Dots: experiment E3, measured on rendered frames.

Where this sits in a product

Track-before-detect replaces the threshold of layer 2 with the accumulation that layer 6 does anyway, just earlier and on raw data. It is expensive: every hypothesis is a full-frame operation per frame, so it is run on a region of interest, on a coarse velocity grid, or after a cheap first pass nominates candidates. The design decision is not whether to use it but where the boundary sits: a cheap front end that nominates generously, a track-level test that decides sequentially, and no hard threshold in between. That is the architecture the live tracker's SPRT policy already assumes.

track-lab · tracklab.tbd is the reference implementation; frames here are rendered in the browser with the same conventions.