How balaragavesh/dynamic-traffic-control works
Project Type and Purpose
• This is a computer vision–based, full-stack traffic control application.
• It integrates deep learning detection (via YOLOv5 models), real-time analytics, and a custom dynamic signal adjustment algorithm to prioritize ambulances.
Main Architectural Components and Their Subdivisions
a. Data and Configuration Layer:
• The data folder holds dataset YAML files (e.g., ImageNet, VOC, coco variants), augmentation/hyperparameter (hyps) configurations, and useful scripts for downloading or manipulating datasets.
• This layer is responsible for input configuration to both train and inference pipelines.
b. Models and Detection Module:
• The models directory contains various YOLOv5 (and segmentation) model configurations and implementations.
• Files like detect.py, train.py, export.py, and specific model YAML files (yolov5s.yaml to yolov5x.yaml) define the core deep learning components.
• This module handles object detection (vehicles, ambulances) and segmentation, feeding into the decision module.
c. Inference and Post-Processing Pipelines:
• The classify and segment folders house scripts and notebooks that relate to running predictions, validations, and tutorials.
• These components are crucial when testing or tuning model behavior (e.g., prediction accuracy in a live traffic scenario).
d. Traffic Control Decision Engine:
• The custom dynamic signal control algorithm is implemented in files such as dynamic_signal_switching.py.
• This component takes in the outputs (detection results) of the YOLO module and applies logic to adjust the traffic light durations prioritizing ambulances.
e. Utility and Integration Modules:
• The utils directory contains support modules for logging (with integrations to ClearML, comet, wandb), augmentations, data loading, and common operations across the project.
• Additionally, the presence of a flask_rest_api under utils implies that a web service interface might be used to expose APIs for sending commands or accessing model outputs.
• Dockerfiles and other deployment configuration files (under utils/docker and utils/google_app_engine) indicate containerized deployment options.