DeepSORT: Adding Visual Memory to Object Tracking
DeepSORT adds a 'visual memory' to object tracking, using a deep learning model to re-identify objects after they're hidden. It's used in surveillance and autonomous driving to maintain consistent IDs across frames.
Why it exists
Basic object trackers like SORT struggle when objects are occluded or move unpredictably. They rely on motion prediction and bounding box overlap to associate objects between frames. If an object disappears and reappears later, a simple tracker often assigns it a new ID, breaking the track's continuity. DeepSORT was created to solve this identity-switching problem by adding appearance information.
The mental model
Think of DeepSORT as a security guard watching a crowd. The guard uses motion to follow people (like SORT's Kalman filter). But if someone walks behind a pillar and re-emerges, the guard doesn't just rely on where they should be. They also use visual memory of the person's appearance—their coat, their hair—to confirm it's the same individual. DeepSORT's 'deep association metric' is that visual memory, powered by a neural network.
How it works
DeepSORT is a two-stage process. First, like its predecessor SORT, it uses a Kalman filter to predict the future position of existing tracks and matches them with new detections from an object detector. This matching is based on motion and spatial proximity. Second, for any tracks and detections that remain unmatched, DeepSORT calculates an 'appearance descriptor' (a feature vector) using a pre-trained convolutional neural network. It then attempts to match objects based on the similarity of their appearance features. This second check allows it to bridge long occlusions.
When to use it
Use DeepSORT when you need robust, long-term tracking in scenarios with frequent occlusions or complex movements. It is a standard for multi-object tracking (MOT) applications like pedestrian tracking for surveillance, vehicle tracking for traffic analysis, and sports analytics where players frequently cross paths.
When not to use it
Avoid DeepSORT if you need extreme real-time performance on low-power hardware, as the neural network adds computational overhead compared to SORT. If all your tracked objects look nearly identical, the appearance feature may not be discriminative enough to prevent identity switches. Most importantly, it is not a detector; you must pair it with an upstream object detector like YOLO or Faster R-CNN.
One canonical example
A system tracks pedestrians on a busy street. An object detector provides bounding boxes for all people in each video frame. DeepSORT takes these detections and assigns a stable ID to each person. When a person is temporarily hidden by a bus, the simple motion prediction fails. However, when they reappear, DeepSORT's CNN recognizes their appearance and re-associates them with their original track ID instead of creating a new one.
Interview question
DeepSORT significantly improves object tracking robustness, especially during occlusions. What is its key mechanism for maintaining consistent object identities in such scenarios?
- a.By exclusively using a highly optimized Kalman filter to predict object trajectories.
- b.By increasing the sensitivity of the object detector to find partially occluded objects.
- c.By generating and comparing unique appearance descriptors using a deep neural network.Correct
- d.By assigning a new, temporary ID to objects that re-emerge and merging tracks later.
Why? this is the answer
The card states DeepSORT calculates an 'appearance descriptor' using a pre-trained convolutional neural network to match objects based on appearance features, which allows it to 'bridge long occlusions'. Option A is incorrect because while DeepSORT uses a Kalman filter, the card explains that simple motion prediction 'fails' during long occlusions, necessitating the appearance metric.
Just read this? Test yourself on what you have been reading.
Read the original → github.com
- #computer vision
- #object tracking
- #deep learning
- #sort
Put your scrolling time to good use
Learn one idea, try a quiz and save useful cards for revision. Tezvyn makes it easy to learn and stay current in your tech field, a few minutes at a time.
The iPhone app is on the way
We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.
Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.
We are hiring for this. Open roles that interview on computer vision — each one lists the topics its interview covers.
See open roles