Why Object Tracking Matters
When counting visitor flow in a shopping mall, the camera catches every person, but without tracking you won't know how many unique visitors passed through the area. This is the classic Object Tracking problem: maintaining object identity throughout its movement across frames. Our team of AI engineers has been solving such tasks since 2018. We have launched over 20 tracking projects for retail, logistics, and sports, and are ready to build a turnkey solution for your case. Choosing the wrong algorithm can cost up to 30% of counting accuracy, so the right approach is critical.
Which Tracking Algorithm to Choose?
Tracking is the task of following a specific object across a sequence of frames while preserving identity. If detection answers "what and where in the frame," tracking adds "is this the same object as in previous frames?" Applications: counting people crossing a line, trajectory analysis in stores, control in autonomous driving systems, sports analytics.
SORT (Simple Online and Realtime Tracking) — a basic algorithm: Kalman filter for position prediction + IoU matching for association. Fast, but loses objects under occlusion.
DeepSORT — SORT + ReID (Re-Identification): deep appearance features for association by visual appearance, not just spatial position. Handles occlusions better.
Why ByteTrack Is the Best Choice for Production
ByteTrack is the current state-of-the-art for general tasks. It uses all detections (including low-confidence ones) for association. We deployed it in 15 projects and found: it achieves HOTA 77.3 on MOT17 benchmark with low latency. Integration code is straightforward:
from ultralytics import YOLO
model = YOLO('yolov8l.pt')
# Tracking built into Ultralytics
results = model.track(
source='video.mp4',
tracker='bytetrack.yaml',
persist=True, # keep track-IDs across frames
conf=0.3,
iou=0.5
)
for result in results:
boxes = result.boxes
for box in boxes:
track_id = box.id.item() # unique object ID
x1, y1, x2, y2 = box.xyxy[0]
BoT-SORT — ByteTrack + camera motion compensation + ReID. Best results on MOT17 benchmark: HOTA 77.8.
StrongSORT — even more aggressive ReID integration, better for tasks with prolonged occlusions.
ReID Models: How Not to Lose an Object Under Occlusion
A ReID model extracts an appearance embedding of the object. When tracking is lost, the system searches by similarity in embeddings:
import torchreid
# Load ReID model
model = torchreid.models.build_model(
name='osnet_x1_0',
num_classes=751, # Market-1501
pretrained=True
)
def extract_appearance_features(crop: np.ndarray) -> np.ndarray:
tensor = preprocess_crop(crop)
with torch.no_grad():
features = model(tensor)
return features.cpu().numpy()
ReID metrics: mAP and Rank-1 on Market-1501 / DukeMTMC. OSNet-x1.0: Rank-1 94.8%, mAP 84.9% on Market-1501.
Trajectory Analysis and Metrics
After tracking, we build analytics from trajectories:
class TrajectoryAnalyzer:
def __init__(self):
self.tracks = {} # track_id -> list of (frame, x, y)
def update(self, track_id, frame_num, cx, cy):
if track_id not in self.tracks:
self.tracks[track_id] = []
self.tracks[track_id].append((frame_num, cx, cy))
def count_line_crossings(self, line: tuple, direction='both') -> int:
"""Count crossings of a virtual line"""
count = 0
for track in self.tracks.values():
if self._crosses_line(track, line, direction):
count += 1
return count
Key tracking quality metrics:
- HOTA (Higher Order Tracking Accuracy) — primary metric, balances Detection and Association accuracy
- MOTA (Multiple Object Tracking Accuracy) — accounts for FP, FN, ID switches
- IDF1 — ID F1 score: how well IDs are preserved over time
- ID Switches — number of identity changes for the same object
| Algorithm | HOTA MOT17 | MOTA | ID Switches |
|---|---|---|---|
| SORT | 55.1 | 63.3 | 4852 |
| DeepSORT | 61.2 | 71.4 | 1821 |
| ByteTrack | 77.3 | 80.3 | 2196 |
| BoT-SORT | 77.8 | 80.5 | 1871 |
Project Workflow
- Discovery — analyze the task, video dataset, accuracy and speed requirements.
- Model Selection — test ByteTrack, DeepSORT, BoT-SORT on your data.
- Optimization — quantization (INT8), graph pruning, tuning hyperparams for p99 latency < 30 ms on Jetson.
- Deployment — containerization, integration with video stream (RTSP, HLS), deployment on GPU/CPU.
- Analytics — personal dashboard with heatmaps, counters, tracks.
Timelines and Scope
| System Scale | Timeline |
|---|---|
| Single-class tracking, 1–4 cameras | 2–3 weeks |
| Multi-class, trajectory analysis | 4–6 weeks |
| Long-term ReID tracking (re-enter) | 6–10 weeks |
Cost is calculated individually based on number of cameras, object types, and required accuracy. Contact us — we will assess the complexity free of charge.
What's Included in the Result
- Trained and optimized tracking model (ByteTrack or BoT-SORT).
- Docker image with REST API for integration.
- Interactive analytics dashboard.
- Technical documentation (architecture description, metrics, launch instructions).
- 12-month support.
Experience and Guarantees
Our team consists of certified ML engineers with years of experience in video analytics systems. We have delivered 25+ projects for retail, logistics, and security. We guarantee correct tracking operation within agreed metrics (HOTA ≥ 70). Get in touch to discuss your project and receive a proposal. Request a consultation to get a custom solution for your task.







