How christophemura/top---tracking-of-people works
ToP is a C++ vision application for detecting people and tracking them across frames from an image, video, or camera. The principal workflow is to load an ONNX model, acquire frames, run detection and post-processing, pass video detections to ByteTrack for persistent IDs, and display results. The sampled source shows detection boxes being displayed; it does not show track IDs being rendered. ByteTrack’s tracking role is also documented in the README. The converter and image-processing helpers are separate capabilities; relationships are shown only where the excerpts or README support them.
Main entry points: main.cpp Application entry · mylib.h Image helper API · mylib.cpp Contour transform · PersonDetection.onnx Person ONNX model
Components 16
Detection runtime
- Application entry
Detection/code/src/main.cpp - ONNX model load
Detection/code/src/main.cpp - Frame acquisition
Detection/code/src/main.cpp - Letterbox preprocessing
Detection/code/src/main.cpp - YOLO inference
Detection/code/src/main.cpp - Detection postprocess
Detection/code/src/main.cpp - Draw and display
Detection/code/src/main.cpp
Tracking
- ByteTrack tracker
Image helpers
- Contour transform
Detection/code/src/mylib.cpp - Color threshold
Detection/code/src/mylib.cpp - Image helper API
Detection/code/include/mylib.h
Model assets
- Person ONNX model
Detection/code/models/PersonDetection.onnx - Home object ONNX
Detection/code/models/HomeObjectModel.onnx
Other components
- Operator
- Image / video / camera
- OpenCV display
Connections 17
- Operator → Application entry: runs
README.md - Image / video / camera → Frame acquisition: provides frames
README.md - Application entry → ONNX model load: loads model
Detection/code/src/main.cpp - Person ONNX model → ONNX model load: loaded as input
README.md - Application entry → Frame acquisition: opens source
Detection/code/src/main.cpp - Frame acquisition → Letterbox preprocessing: supplies frame
Detection/code/src/main.cpp - Letterbox preprocessing → YOLO inference: prepares input
Detection/code/src/main.cpp - ONNX model load → YOLO inference: provides network
Detection/code/src/main.cpp - YOLO inference → Detection postprocess: returns detections
Detection/code/src/main.cpp - Application entry → ByteTrack tracker: updates tracks
Detection/code/src/main.cpp - Detection postprocess → ByteTrack tracker: passes detections
README.md - Application entry → Draw and display: draws detections
Detection/code/src/main.cpp - Draw and display → OpenCV display: shows frames
Detection/code/src/main.cpp - Application entry → Contour transform: calls transform
Detection/code/src/main.cpp - Application entry → Color threshold: calls transform
Detection/code/src/main.cpp - Image helper API → Contour transform: declares
Detection/code/include/mylib.h - Image helper API → Color threshold: declares
Detection/code/include/mylib.h