How 5hatim5/yolov5-vehicles-type-detection-and-counting works
Project type and purpose
• This is a full-stack computer-vision application for “Vehicles Type Detection and Counting.”
File structure
• Top-level:
• CONFIG.py – central configuration for source, ROI, thresholds, output paths
• run.py – entry point for the Flask web server
• inference_tracking.py & inference_RIO_Line.py – two CLI scripts implementing the two counting methods
• requirements.txt, weights/ – environment and model artifacts
• app/ (Flask MVC):
• app/views.py & app/templates/index.html – controller and view for the web UI
• app/static/temp – temporary storage for generated images/videos
• app/utils/utils.py – helper functions for the web layer
• deep_sort/ – implementation of the Deep SORT tracker (Kalman filter, assignment, feature extractor, etc.)
• models/ – YOLOv5 model definitions (common, experimental, hub), TF wrapper, YAML configs
• utils/ – utility functions powering YOLO preprocessing, loss, metrics, plotting, data loading, etc.
README for additional insights
• Confirms two inference modes: ROI-line and object tracking
• Emphasizes outputs: annotated video/images + per-class counts in CSV
• Lists configuration parameters in CONFIG.py (ROI area, line offset, NMS thresholds, image size, model weights path, etc.)