Skip to the lesson
FixTheRobot Explore Robotics / Perception / P7 Multi-Object Tracking and Temporal Perception / P7-T5

Perception · Theory · P7

P7-T5 — Track Initiation, Persistence and Deletion

When does a detection become an object, and when does an object stop being one?

  • Lesson 5 of 6
  • Module 7: Multi-Object Tracking and Temporal Perception
  • Theory
  • About 10 minutes to read

A tracker has to decide three things the detector never does: when a detection is believable enough to become a track, when a track should survive a frame in which nothing was detected, and when it should be allowed to die. These decisions look like bookkeeping, but they set the balance between two failures that a planner feels very differently: reporting objects that are not there, and losing objects that are. This lesson gives the lifecycle, the arithmetic of M-of-N confirmation, and a way of choosing how long to wait, and prepares for Lab P7-L4, where you write the tracker and choose the waiting time from data.

Learning objectives

After this lesson, you should be able to:

  • Describe the lifecycle states of a track and the events that move a track between them.
  • Compute the probability that M-of-N confirmation accepts a false alarm and a true object.
  • Explain coasting and choose a maximum age from occlusion durations and costs.
  • Describe the failure on each side: ghost tracks and broken identities.

The idea: earn trust, spend patience

A new detection is a claim: “there is something here”. One claim from a noisy detector is weak evidence, because false alarms exist. A second detection near the first in the next frame is stronger, a third stronger still. A new track therefore starts as a tentative track and is promoted to confirmed only after enough supporting detections. Only confirmed tracks are reported to the consumers.

Track lifecycleA state diagram. A detection with no track creates a tentative track. If it gets enough hits it becomes confirmed and is reported. A confirmed track that misses a detection becomes coasting and keeps predicting; a hit returns it to confirmed; too many misses delete it. A tentative track that misses deletes at once.Tentativenot reportedConfirmedreportedCoastingpredicting onlyDeleted min_hits misshit age > max_age tentative track that misses: deleted at once new detection starts here The reported set is the confirmed (and, if you choose, briefly coasting) tracks.
The lifecycle of a track. Confirmation protects against false alarms; coasting and the maximum age protect against missed detections and occlusion.

Initiation

A track is born from every detection that no existing track claims. It is tentative: it has a position but no trustworthy velocity, and nothing downstream sees it. The usual confirmation rule is M of N: the track is confirmed if it receives at least M detections in its first N frames. A false alarm seldom repeats at a place consistent with a motion, so it dies. A real object keeps being detected, so it is promoted. The lab uses the simplest version, a count of hits.

Persistence: coasting

When a confirmed track gets no detection, the object may have been missed once, or may be hidden behind something. The tracker keeps the track and keeps predicting its position with the motion model; the track coasts, and its age, the number of frames since the last detection, grows. If a detection arrives inside the (widening) gate, the track resumes with the identity it had: the identity survived the gap.

Deletion

A track is deleted when its age exceeds the maximum age, or earlier if it leaves the sensor’s field of view or the predicted position is where the object would have been seen. A tentative track is deleted at its first miss. The maximum age is a bet on how long an object can stay hidden: too short, and an object that comes out from behind a pole gets a new identity; too long, and tracks of departed objects linger, drift, and can be picked up by someone else.

The two failures

Two failures pull the settings in opposite directions. Ghost tracks are tracks that follow nothing, typically false alarms that were confirmed or tracks that outlived their object. They make a planner brake for nothing. Broken identities are tracks that ended and were replaced by a new one while the object continued; the planner loses the velocity history and may treat an old object as a new surprise. No setting removes both.

The mathematics: confirmation, misses and waiting

M of N confirmation. After the first detection, count the hits among the next n frames. If a frame produces a supporting detection with probability ρ, independently, the number of hits is binomial and the probability of at least m is

binomial tail
P(at least m of n)=∑(k=m…n) C(n, k) ρk(1−ρ)(n−k)P(\text{at least}\,m\,\text{of}\,n)=\sum _{(k=m\ldots n)}\,C(n,\,k)\,\rho ^{k}(1-\rho )^{(n-k)}
ρ
the per-frame probability of a supporting detection: for a real object, its detection probability pd (say 0.9); for a false alarm, the small chance that another false alarm falls inside the gate (say 0.05).
n, m
the number of following frames considered and the number of hits required among them.
C(n, k)
the number of ways of choosing which k of the n frames hold the hits.

The same formula gives both rates: the true-confirmation probability with ρ = pd and the false-confirmation probability with ρ equal to the repeat probability of false alarms. A good rule has a high first and a low second.

Consecutive misses. A visible object that is detected with probability pd per frame is missed m times in a row with probability (1 − pd)m. For an occluded object the number of missed frames is the occlusion duration, which is set by geometry:

frames spent behind an occluder
hidden frames≈wv⋅Δt\text{hidden frames}\approx \frac{w}{v\cdot \Delta t}
w
the extent of the occluder along the object’s path.
v, Δt
the object’s speed and the time between frames.

Choosing the maximum age by cost. Let the logged data contain occlusion gaps of various lengths and a number E of objects that left for good. Setting the maximum age to a costs Csw for each gap longer than a (the identity breaks) and Cg per frame per departure (a ghost lives on for a frames):

cost of a maximum age
cost⁡(a)=Csw⋅#{gaps>a}+Cg⋅a⋅E\operatorname{cost}(a)=C_{\text{sw}}\cdot \#\{\text{gaps}>a\}+C_{g}\cdot a\cdot E

The cost is not monotone and not convex: evaluate all candidates and take the minimum, as in Lab P7-L4, stage 3.

Worked examples: confirmation, waiting, occlusion

Confirmation. Require 2 supporting detections in the 3 frames after the first (a 3-of-4 rule including the first detection). For a real object with pd = 0.9:

true object confirmed
P=3×0.92×0.1+0.93=0.243+0.729=0.972P=3\times 0.9^{2}\times 0.1+0.9^{3}=0.243+0.729=0.972

For a false alarm, where the chance of another false alarm in the gate each frame is ρ = 0.05:

false alarm confirmed
P=3×0.052×0.95+0.053=0.007125+0.000125=0.00725P=3\times 0.05^{2}\times 0.95+0.05^{3}=0.007125+0.000125=0.00725

A real object is confirmed 97.2% of the time, within at most four frames, and a false alarm only 0.7% of the time, about one in 140. The price is a delay: the object is not reported for the first two or three frames of its life, which at 10 Hz is up to 0.3 s. With a stricter rule the ghost rate falls and the delay rises.

Waiting for a miss. A track is deleted when its age exceeds max_age, so a track with max_age = a survives a consecutive misses and is deleted on the (a + 1)th. With pd = 0.9 and an object that stays visible, max_age = 0 deletes it by mistake at the first miss, with probability 0.1 per frame; max_age = 1 needs two misses in a row, 0.12 = 0.01; max_age = 3 needs four, 0.14 = 0.0001 per frame, about once in 10,000 frames if the misses were independent (they are not, so allow more).

Occlusion. A pole 20 units wide hides an object moving at 4 units per frame for 20 / 4 = 5 frames. A maximum age of 5 only just covers it, and a velocity estimate that is off by 10% moves the predicted position 2 units off over 5 frames, which the gate absorbs. A maximum age of at least 6 or 7 gives margin. For a slower object at 2 units per frame, the gap is 10 frames.

The cost trade-off. Suppose 40 logged gaps: 32 of 2 to 7 frames and 8 of 9 to 24 frames, and 24 departures. With Csw = 10 and Cg = 1, each extra frame of maximum age costs 24. Covering a gap length that occurs twice saves 20 and costs 24, so it is not worth it; one that occurs three times saves 30 and is worth it. The best setting therefore covers the common short gaps and gives up the rare long ones, which is not the same as the longest gap seen.

Engineering implications and limitations

Make unconfirmed tracks invisible. Downstream code should see only confirmed tracks, and should see their status (updated this frame, or coasting) and their age, so that it can decide how much to rely on them.

Report the coasting state. A track that has not been seen for 4 frames is a prediction, not an observation. A planner may wish to keep avoiding it, but should know it has not been seen.

Use geometry to speed deletion and to avoid it. A track whose predicted position is in a region where the sensor would certainly see it, and was not detected, should be deleted sooner than one predicted behind a known occluder. Delete at the edge of the field of view.

Tune per class. Pedestrians stop and start and reappear; vehicles on a road do so less. Different classes deserve different max_age and confirmation rules.

Adapt to the speed of the robot. A fast-moving robot sees objects for a shorter time and cannot wait for long confirmation; use fewer hits near the robot’s path and more elsewhere.

Do not make confirmation depend on one weak detection. Several detections in a row from a poor detector are still weak evidence if they are correlated (a reflection or a poster is detected every frame). Add other cues: size consistency, plausible motion, class stability, another sensor (Module 8).

Log births and deaths. The number of births and deaths per minute, the age at death and the share of confirmed tracks that die young are cheap health indicators of the whole perception system.

Common misconceptions

“A track should be deleted as soon as it is not detected.”

A missed detection or an occlusion is common; deleting at the first miss breaks identities. Let confirmed tracks coast for a number of frames set by the data.

“Confirmation only costs a little delay.”

It also delays the first report of a real object, which matters for a fast approaching obstacle. The number of hits trades false alarms against reaction time.

“A larger maximum age is always safer.”

It keeps tracks of departed objects alive, which makes ghosts and lets old tracks capture new objects. Choose it by cost from observed gaps.

“Repeated detections prove an object is real.”

A static reflection or poster is detected in every frame. Persistence is evidence of a stable pattern, not of a physical object.

Engineering takeaways

  1. A track is born tentative, confirmed after enough hits, coasts through misses and is deleted after max_age frames without a detection.
  2. M-of-N confirmation: with 2 of 3 following frames, a real object (pd = 0.9) is confirmed 97.2% of the time, a false alarm (ρ = 0.05) only 0.7%.
  3. Hidden frames ≈ w/(vΔt): a 20-unit occluder and 4 units per frame hide an object for 5 frames.
  4. max_age trades broken identities (too short) against ghost tracks (too long): choose it by cost from logged gap lengths, evaluating every candidate.
  5. Report track status and age to the consumers; a coasting track is a prediction.

References and further reading

Textbooks and a published tracker for lifecycle designs. The probabilities and gap statistics in the examples are constructed for teaching.

  • Bar-Shalom, Y., Li, X.-R. and Kirubarajan, T. (2001). Estimation with Applications to Tracking and Navigation. Wiley: track initiation, M-of-N logic and track deletion.
  • Blackman, S. and Popoli, R. (1999). Design and Analysis of Modern Tracking Systems. Artech House: track management.
  • Bewley, A., Ge, Z., Ott, L., Ramos, F. and Upcroft, B. (2016). Simple Online and Realtime Tracking. ICIP: a lifecycle with a maximum age and a minimum number of hits.

Knowledge check

Three conceptual questions. Write an answer, then reveal the explanation. Your answers stay in your browser.

Question 1

A rule needs at least 2 hits in the 2 frames after the first (ρ = detection probability each frame). What are the confirmation probabilities for a real object with ρ = 0.9 and for a false alarm with ρ = 0.1?

Explanation

Both frames must hit: ρ². Real: 0.81. False alarm: 0.01. The rule confirms 81% of real objects and 1% of false alarms.

Question 2

A conveyor hides parts behind a 30-unit shield; parts move at 5 units per frame. What is the smallest max_age that keeps identity through the shield, and why add a margin?

Explanation

30 / 5 = 6 frames. Use at least 7 or 8 frames: speed varies, the object may be missed in the frame before or after the shield, and the detector may need a frame to reacquire it.

Question 3

A tracker has many tracks that live only 1 or 2 frames after confirmation. Which setting do you look at first and what trade-off do you accept by changing it?

Explanation

Look at the confirmation rule (min_hits or the M-of-N logic): short-lived confirmed tracks are false alarms that passed. Raising it reduces them but delays the first report of real objects and may reject fast-passing real ones.

What’s next

Next: when the world gets in the way: occlusion, identity switches and missed detections, and how a tracker is judged.

Practice this lesson

Recover from Temporary Occlusion

Keep an identity through a gap with prediction and a lifecycle policy.

Next lesson

P7-T6 — Occlusion, Identity Switches and Missed Detections

Diagnose and reduce the main tracking failures.

Nothing below is required to finish this lesson.