How userkhalid35/codealpha_object_detection_and_tracking works
This is a PySide6 desktop application for real-time object detection and multi-object tracking. The user selects a video or webcam, adjusts inference thresholds, and receives annotated frames and live telemetry; they can also record output, capture screenshots, and export detection logs. The controller coordinates the UI and worker, while the worker processes frames through YOLO/ByteTrack. The README documents theme support and automatic weight download. Some controller and worker code is excerpted only partially, so unshown details are not inferred.
Main entry points: main_controller.py Main controller · inference_worker.py Inference worker · main_window.py Main window · bytetrack_impl.py YOLO and ByteTrack
Components 16
Application coordination
- Application entry
main.py - Main controller
controllers/main_controller.py - Settings
config/settings.json
Desktop interface
- Main window
ui/main_window.py - Controls and telemetry
ui/widgets.py - Theme styles
ui/theme.py
Video processing
- Inference worker
services/inference_worker.py - YOLO and ByteTrack
tracker/bytetrack_impl.py - Detection data models
models/detection_model.py
Results and export
- Recorded video
- Export and capture helpers
utils/helpers.py - Detection CSV
- Screenshot image
Other components
- User
- Video or webcam
- YOLO weights service
Connections 19
- User → Application entry: launches
main.py - Application entry → Main controller: starts
main.py - Main controller → Settings: loads and saves
controllers/main_controller.py - Main controller → Main window: creates and connects
controllers/main_controller.py - Main window → Controls and telemetry: uses controls
ui/main_window.py - Main window → Theme styles: applies styles
ui/main_window.py - User → Main window: selects source
ui/main_window.py - Main window → Main controller: emits actions
controllers/main_controller.py - Main controller → Inference worker: starts and configures
controllers/main_controller.py - Video or webcam → Inference worker: supplies frames
README.md - Inference worker → YOLO and ByteTrack: updates tracks
services/inference_worker.py - YOLO and ByteTrack → Detection data models: creates tracked objects
tracker/bytetrack_impl.py - Inference worker → Detection data models: creates telemetry and logs
services/inference_worker.py - YOLO and ByteTrack → YOLO weights service: runs inference
README.md - Inference worker → Main window: emits frames and telemetry
controllers/main_controller.py - Inference worker → Recorded video: writes recording
services/inference_worker.py - Main controller → Export and capture helpers: exports and captures
controllers/main_controller.py - Export and capture helpers → Detection CSV: writes detection logs
utils/helpers.py - Export and capture helpers → Screenshot image: saves captured frame
utils/helpers.py