nwojke / deep_sort

Simple Online Realtime Tracking with a Deep Association Metric
GNU General Public License v3.0
5.16k stars 1.45k forks source link

The result file may contain tracks with time_since_update == 1 #325

Open k1101jh opened 4 months ago

k1101jh commented 4 months ago

In deep_sort_app.py line 195, result contains confirmed track with time_since_update <= 1

# Store results.
for track in tracker.tracks:
    if not track.is_confirmed() or track.time_since_update > 1:
        continue
    bbox = track.to_tlwh()
    results.append([
        frame_idx, track.track_id, bbox[0], bbox[1], bbox[2], bbox[3]])

When predict() is called, 1 is added to track.time_since_update, and when update() is called and matched with detection, track.time_since_update is initialized to 0. So, If a track was updated and lost in next frame, track.time_since_update is 1. The result file will contain this track.

I compared this part with ByteTrack, but ByteTrack only contains confirmed matched tracks. Is this an error?