How sharpiless/yolov5-deepsort-inference works
This repository combines YOLOv5 detection with DeepSort tracking to produce annotated video frames and support object counting. The documented workflow is to submit frames through the Detector interface, detect objects, associate detections across frames, and visualize the results. DeepSort’s update implementation confirms its feature-extraction, suppression, and tracker calls; some top-level and counting details are documented but their source was not sampled, so those links are limited accordingly.
Main entry points: AIDetector_pytorch.py Detector API · deep_sort.py DeepSort update · sort/tracker.py Track lifecycle · tracker.py Tracker adapter
Components 20
Application
- Demo entry
demo.py - Detector API
AIDetector_pytorch.py - Tracker adapter
tracker.py - Object counting
AIDetector_pytorch.py - Frame visualization
tracker.py
Detection
- YOLO model
models/yolo.py - Model loading
models/experimental.py - Model layers
models/common.py - Detection postprocess
utils/general.py
Tracking
- Appearance features
deep_sort/deep_sort/deep/feature_extractor.py - DeepSort update
deep_sort/deep_sort/deep_sort.py - Track detections
deep_sort/deep_sort/sort/detection.py - Track suppression
deep_sort/deep_sort/sort/preprocessing.py - Track lifecycle
deep_sort/deep_sort/sort/tracker.py - Track state
deep_sort/deep_sort/sort/track.py - Track association
deep_sort/deep_sort/sort/nn_matching.py - Motion filter
deep_sort/deep_sort/sort/kalman_filter.py
Modeling
- ReID training
deep_sort/deep_sort/deep/train.py - ReID network
deep_sort/deep_sort/deep/model.py
Other components
- Video user
Connections 21
- Video user → Demo entry: starts
- Video user → Detector API: submits frames
- Demo entry → Detector API: runs
- Detector API → YOLO model: infers
- Detector API → Model loading: loads model
- Model loading → YOLO model: constructs
- YOLO model → Model layers: uses layers
- Detector API → Detection postprocess: filters predictions
- Tracker adapter → Detector API: requests detections
- Tracker adapter → DeepSort update: updates tracks
- DeepSort update → Appearance features: extracts features
- DeepSort update → Track detections: creates detections
- DeepSort update → Track suppression: suppresses boxes
- DeepSort update → Track lifecycle: updates
- Track lifecycle → Track association: associates tracks
- Track lifecycle → Motion filter: predicts states
- Track lifecycle → Track state: maintains tracks
- Tracker adapter → Frame visualization: draws tracks
- Detector API → Object counting: supports counting
- ReID training → ReID network: trains
- Appearance features → ReID network: uses network