YOLOv8 with StrongSORT combines YOLOv8 object detection with an appearance-aware multi-object tracker that can maintain identities across video frames. YOLOv8 detects objects and provides bounding boxes, classes, and confidence scores, while StrongSORT associates those detections over time using motion information and deep appearance features. StrongSORT was developed as an improved version of DeepSORT, with changes to detection handling, feature embedding, and trajectory association.
Introduction to YOLOv8 with StrongSORT
Object detection processes individual frames and determines which objects are present. Multi-object tracking goes further by determining whether an object detected in the current frame is the same object that appeared in earlier frames.
YOLOv8 can handle the detection stage, while StrongSORT can be integrated as a separate tracking component. The resulting tracking-by-detection pipeline can maintain persistent IDs for people, vehicles, or custom objects across a video.
It is important to note that StrongSORT is not currently one of the built-in tracker configurations documented by Ultralytics. Current Ultralytics tracking supports trackers including BoT-SORT, ByteTrack, OC-SORT, Deep OC-SORT, FastTracker, and TrackTrack. StrongSORT therefore generally requires an external implementation or custom integration with YOLOv8.
What Is StrongSORT in YOLOv8?
StrongSORT is a multi-object tracking algorithm that improves on the DeepSORT tracking framework.
The StrongSORT research revisited DeepSORT and strengthened several parts of the tracking pipeline, including detection quality, appearance embeddings, and data association. The researchers also proposed additional components called AFLink and GSI for connecting fragmented trajectories and recovering missing detections.
When used with YOLOv8, YOLOv8 remains the object detector and StrongSORT operates on its detection outputs.
Role of YOLOv8 in Object Detection
YOLOv8 processes each video frame and identifies objects.
For each detection, useful information may include:
Bounding box
Class ID
Class name
Confidence score
For example:
Person → 0.93
Car → 0.88
Person → 0.84
These detections become the input observations used by the tracker.
StrongSORT does not replace YOLOv8’s detection function. Instead, it adds temporal identity information to the detections.
Role of StrongSORT in Multi-Object Tracking
StrongSORT attempts to maintain a stable identity for each object over time.
For example:
Frame 1:
Person → ID 6
Frame 2:
Person → ID 6
Frame 3:
Person → ID 6
The tracker compares new detections with existing tracks and determines which detections most likely belong to previously observed objects.
StrongSORT uses both motion and appearance information, giving it additional cues for resolving ambiguous associations.
How YOLOv8 and StrongSORT Work Together
The general workflow is:
Video Frame
↓
YOLOv8
↓
Object Detections
↓
StrongSORT
↓
Track Association
↓
Persistent Object IDs
This process repeats for every video frame.
Detecting Objects with YOLOv8
YOLOv8 first performs normal detection:
from ultralytics import YOLO
model = YOLO("yolov8n.pt")
results = model(frame)
Useful outputs can include:
boxes = results[0].boxes.xyxy
confidences = results[0].boxes.conf
classes = results[0].boxes.cls
These values can then be converted into the input format expected by the StrongSORT implementation being used.
Passing Detection Results to StrongSORT
StrongSORT typically needs detection information such as:
Bounding box
Detection confidence
Class
Frame or image crop
The tracker can then calculate motion and appearance information for each detection.
The exact API is not universal because StrongSORT is not part of the standard Ultralytics tracker interface. Different external implementations may expect slightly different input formats.
The official StrongSORT repository provides the reference implementation associated with the research paper.
Assigning and Maintaining Tracking IDs
When StrongSORT receives new detections, it tries to match them against existing trajectories.
If a good match is found:
Existing Track 14
+
New Detection
↓
ID 14 continues
If no suitable track exists, a new identity can be created.
This makes it possible to count unique objects and analyze movement instead of counting the same detection again in every frame.
How StrongSORT Tracks Objects
StrongSORT combines motion-based tracking with deep appearance information.
Motion Prediction with Kalman Filtering
Like DeepSORT, StrongSORT uses motion modeling to estimate where an object is likely to appear in upcoming frames.
A Kalman-filter-based tracking process can use previous object positions and motion to predict the next likely state.
For example, if a vehicle has consistently moved toward the right side of the frame, the tracker expects its next detection to appear near that predicted trajectory.
Motion prediction is particularly useful when detections fluctuate slightly between frames.
Appearance Feature Extraction
Position alone may not be enough to distinguish objects.
Two people can walk close together, cross paths, or temporarily overlap.
StrongSORT uses appearance embeddings that encode visual characteristics of detected objects.
Conceptually:
Detected Person
↓
ReID / Appearance Network
↓
Feature Vector
These embeddings can then be compared with appearance information stored for existing tracks.
The StrongSORT paper specifically identifies improved feature embedding as one of the areas used to strengthen DeepSORT.
Object Re-Identification Across Frames
Re-Identification, commonly called ReID, attempts to determine whether two detections represent the same object based partly on their appearance.
For example:
Previous ID 9
Appearance → Similar
Motion → Consistent
New Detection
Appearance → Similar
Position → Expected Area
Result → Continue ID 9
This can help maintain identity when objects temporarily disappear behind other objects.
Appearance-based tracking can still fail when multiple objects look nearly identical, the image is blurry, or the object undergoes a major appearance change.
How to Set Up YOLOv8 with StrongSORT
Because StrongSORT is not currently a native tracker="strongsort.yaml" option in Ultralytics, setup normally combines the Ultralytics package with an external StrongSORT implementation.
Install the Required Libraries
Start with YOLOv8:
pip install ultralytics
You will also typically need packages such as:
pip install opencv-python
For StrongSORT itself, use a compatible external implementation.
A PyPI package named strongsort exists, and the official research repository is also available separately. Because external APIs can change independently of Ultralytics, installation and constructor arguments should be checked against the specific StrongSORT implementation selected for the project.
Load the YOLOv8 Model
A pretrained model can be loaded with:
from ultralytics import YOLO
model = YOLO("yolov8n.pt")
A custom detector can also be used:
model = YOLO("best.pt")
YOLOv8 only needs to provide reliable detection results that can be passed to the tracker.
Configure the StrongSORT Tracker
StrongSORT configuration commonly involves settings related to:
ReID model
Matching distance
Track age
Track confirmation
Embedding device
Confidence threshold
The exact parameter names vary between implementations.
For this reason, configuration should be based on the StrongSORT package or repository actually being used rather than copying a BoT-SORT or DeepSORT YAML configuration.
Run YOLOv8 with StrongSORT on Video
A YOLOv8 + StrongSORT system normally reads frames sequentially.
Process Video Frames
A simplified workflow is:
import cv2
from ultralytics import YOLO
model = YOLO("yolov8n.pt")
cap = cv2.VideoCapture("video.mp4")
while cap.isOpened():
success, frame = cap.read()
if not success:
break
results = model(frame, verbose=False)
boxes = results[0].boxes.xyxy
scores = results[0].boxes.conf
classes = results[0].boxes.cls
# Convert detections to the format
# expected by your StrongSORT implementation.
cap.release()
The StrongSORT update step is then added after the YOLO detections are converted.
Track Multiple Objects in Real Time
StrongSORT is designed for multi-object tracking.
A frame could contain:
Person → ID 2
Person → ID 5
Person → ID 8
Car → ID 14
Car → ID 17
Each track is processed separately while remaining part of the same video sequence.
StrongSORT was evaluated as a multi-object tracking framework on benchmarks including MOT17, MOT20, DanceTrack, and KITTI.
Display Bounding Boxes and Tracking IDs
After retrieving the tracked objects, OpenCV can be used to draw them:
cv2.rectangle(
frame,
(x1, y1),
(x2, y2),
(0, 255, 0),
2
)
cv2.putText(
frame,
f"ID {track_id}",
(x1, y1 - 10),
cv2.FONT_HERSHEY_SIMPLEX,
0.6,
(0, 255, 0),
2
)
The final video can therefore display both the detected class and tracking identity.
YOLOv8 StrongSORT Configuration
Tracker settings influence identity stability, speed, and track persistence.
Detection Confidence Settings
YOLOv8 detections below a selected confidence threshold can be removed before they reach StrongSORT.
A very low threshold may send many false detections to the tracker.
A very high threshold may remove useful detections during:
- occlusion,
- motion blur,
- poor lighting,
- small-object detection.
The best threshold depends on the quality of the detector and the target scene.
Tracking and Matching Thresholds
StrongSORT uses matching criteria to determine whether a detection belongs to an existing track.
These settings usually balance:
Motion similarity
Appearance similarity
Association distance
Track age
Stricter matching can reduce incorrect associations but may cause tracks to break.
Looser matching can preserve more tracks but increase ID switches.
Re-Identification Settings
ReID is one of the major reasons to choose an appearance-aware tracker such as StrongSORT.
Settings can determine which embedding network is used and how appearance similarity influences association.
Better ReID features may improve tracking in crowded or occluded scenes, but extracting deep appearance vectors adds computation.
This creates a tradeoff between tracking accuracy and real-time speed.
Benefits of Using YOLOv8 with StrongSORT
StrongSORT is designed to improve several weaknesses associated with older DeepSORT-style tracking.
Improved Tracking Accuracy
StrongSORT was developed by revisiting and improving DeepSORT’s detector, embedding, and association components. The StrongSORT research reported strong results across major MOT benchmarks, particularly when combined with its additional AFLink and GSI modules.
In practical YOLOv8 use, performance still depends heavily on detector accuracy and the quality of the ReID model.
Better ID Consistency
Appearance embeddings help the tracker distinguish objects that may follow similar trajectories.
This can reduce cases where:
Person A → ID 4
Person B → ID 7
suddenly becomes:
Person A → ID 7
Person B → ID 4
StrongSORT’s improvements to appearance embedding and association were specifically designed to strengthen identity tracking compared with the original DeepSORT baseline.
Reliable Tracking During Occlusion
When an object disappears briefly behind another object, motion information may predict its approximate location while appearance features help identify it when it becomes visible again.
StrongSORT++ additionally introduced GSI to address missing detections and AFLink to reconnect fragmented trajectories in offline refinement scenarios.
Not every real-time implementation enables these additional modules, so their availability depends on the chosen StrongSORT package.
YOLOv8 with StrongSORT vs Other Trackers
StrongSORT should be compared with other tracking options before choosing it for a project.
StrongSORT vs DeepSORT
StrongSORT is directly based on DeepSORT.
DeepSORT combines motion prediction with deep appearance matching.
StrongSORT improves this baseline through changes in:
- detection handling,
- appearance embedding,
- trajectory association.
The StrongSORT paper describes the method as a substantial upgrade of the original DeepSORT framework.
StrongSORT is therefore generally the more advanced of the two, although it can also introduce greater implementation and computational complexity.
StrongSORT vs ByteTrack
ByteTrack uses a different association philosophy.
Instead of relying primarily on deep ReID embeddings, ByteTrack is known for associating lower-confidence detection boxes rather than discarding all of them.
StrongSORT places greater emphasis on appearance-based identity information.
In current Ultralytics releases, ByteTrack is directly supported through the built-in tracking API, while StrongSORT is not listed as a built-in tracker.
ByteTrack may therefore be easier to deploy with YOLOv8 when appearance-based ReID is not essential.
StrongSORT vs BoT-SORT
BoT-SORT combines motion and appearance information with camera-motion compensation and an improved Kalman state representation.
StrongSORT instead evolved from DeepSORT and focuses heavily on strengthening appearance embedding and association.
For current Ultralytics projects, BoT-SORT has a major integration advantage because it is available directly through the standard tracking system, while StrongSORT requires external integration.
The better tracker depends on the video, object appearance, camera motion, hardware, and identity-consistency requirements.
Common YOLOv8 StrongSORT Problems
Even a strong tracker cannot guarantee perfect identities in every scene.
ID Switching Between Objects
ID switching can occur when:
- objects look similar,
- trajectories cross,
- detections overlap,
- ReID features are weak,
- frames are blurred.
Improving the detector and appearance model can help.
Matching thresholds may also need adjustment.
Lost Tracks During Occlusion
If an object disappears for too long, its active track can expire.
When the object reappears, it may be assigned a new ID.
Possible improvements include:
- increasing allowed track age,
- improving ReID quality,
- improving detector recall,
- using longer trajectory-linking methods where appropriate.
Duplicate Tracking IDs
A single physical object may receive several IDs across a long video if its track repeatedly disappears.
For example:
Person:
ID 5 → lost
ID 12 → lost
ID 21
This can lead to incorrect unique-person counts.
Better detections, more tolerant track persistence, and stronger association can reduce fragmentation.
Slow Real-Time Performance
A StrongSORT pipeline includes more than YOLO inference:
YOLO Detection
+
ReID Feature Extraction
+
Motion Prediction
+
Data Association
+
Visualization
Appearance extraction can add significant runtime overhead. More recent research has specifically investigated selective ReID feature extraction to reduce this cost in trackers including StrongSORT.
Possible optimizations include:
- smaller YOLOv8 model,
- smaller input resolution,
- GPU inference,
- lighter ReID network,
- tracking only required classes,
- reducing visualization overhead.
Applications of YOLOv8 with StrongSORT
The combination is useful wherever unique objects need to be followed over time.
Person and Crowd Tracking
People can be assigned persistent identities:
Person → ID 3
Person → ID 11
Person → ID 19
Applications include:
- crowd movement,
- people counting,
- trajectory analysis,
- entrance monitoring,
- sports footage.
Appearance-based ReID can be useful when people repeatedly cross paths.
Vehicle Tracking
YOLOv8 can detect:
car
truck
bus
motorcycle
while StrongSORT maintains identities across the video.
This can support:
- vehicle counting,
- traffic flow analysis,
- trajectory monitoring,
- parking analysis.
A custom YOLOv8 model can also track specialized vehicle categories.
Surveillance and Traffic Monitoring
Persistent IDs allow a video system to analyze movement instead of treating each frame independently.
For example:
Vehicle ID 24
Frame 100 → Entry
Frame 350 → Intersection
Frame 610 → Exit
This creates useful temporal information for traffic and surveillance analytics.
FAQs About YOLOv8 with StrongSORT
Can YOLOv8 be used with StrongSORT?
Yes. YOLOv8 can act as the detector and its bounding boxes, classes, and confidence scores can be passed into a StrongSORT implementation.
However, StrongSORT is not currently listed among the trackers available directly through the standard Ultralytics tracker configuration, so custom or third-party integration is normally required.
How does StrongSORT work with YOLOv8?
YOLOv8 performs object detection on each frame.
StrongSORT receives those detections and associates them across frames using motion prediction and deep appearance information.
The tracker then maintains a unique ID for each active trajectory. StrongSORT itself was developed as an enhanced DeepSORT-style tracking-by-detection method.
Is StrongSORT better than DeepSORT?
StrongSORT was specifically developed as an improvement over DeepSORT and introduced updates to detection, embeddings, and association. Its published benchmark results showed substantial improvements over the baseline studied by its authors.
For a specific real-world project, however, performance still needs to be measured on the target video.
What is the difference between StrongSORT and BoT-SORT?
StrongSORT evolves from DeepSORT and focuses on improved appearance embeddings and association.
BoT-SORT combines motion and appearance cues with camera-motion compensation and a modified Kalman state representation.
BoT-SORT is also available directly through the current Ultralytics tracking interface, while StrongSORT generally requires separate integration.
Can StrongSORT track multiple objects at once?
Yes. StrongSORT is designed for multi-object tracking and can maintain many trajectories simultaneously. Its research evaluations include established multi-object tracking benchmarks such as MOT17 and MOT20.
Can I use a custom YOLOv8 model with StrongSORT?
Yes. The detector can be a custom-trained YOLOv8 model.
As long as it generates usable bounding boxes, confidence values, and class information, those detections can be passed to the tracking system.
This means custom objects such as industrial components, specific vehicles, animals, or products can also be tracked.
Is YOLOv8 with StrongSORT suitable for real-time tracking?
It can be, but performance depends heavily on hardware, detector size, image resolution, ReID network, and number of tracked objects.
StrongSORT uses appearance feature extraction, which adds processing compared with purely motion-based trackers. Research on optimized StrongSORT variants has specifically targeted this ReID overhead to improve runtime.
For strict real-time requirements, benchmark StrongSORT against lighter alternatives such as ByteTrack and the built-in Ultralytics tracking options.
Conclusion
YOLOv8 with StrongSORT creates an appearance-aware tracking-by-detection pipeline in which YOLOv8 identifies objects and StrongSORT maintains their identities over time.
The complete workflow can be summarized as:
Video
↓
YOLOv8 Detection
↓
Boxes + Classes + Confidence
↓
StrongSORT
↓
Motion Prediction + Appearance Features
↓
Object Association
↓
Persistent Tracking IDs
StrongSORT was designed as a significant improvement over DeepSORT, strengthening detection handling, feature embeddings, and trajectory association. StrongSORT++ additionally introduced AFLink and GSI to address trajectory fragmentation and missing detections.
The main tradeoff is integration and computational complexity. Unlike BoT-SORT and ByteTrack, StrongSORT is not currently a native tracker option in the standard Ultralytics tracking interface, so it normally requires an external implementation.
For applications where identity consistency and appearance-aware tracking are important, YOLOv8 with StrongSORT can be a useful combination for people tracking, crowd analysis, vehicle monitoring, surveillance, and other multi-object video analytics tasks.
I’m Jane Austen, a skilled content writer with the ability to simplify any complex topic. I focus on delivering valuable tips and strategies throughout my articles.