Skip to content

Param-Sahu/Indian_Traffic_Sign_Recognition

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of Contents


Project Overview

Traffic Sign Recognition (TSR) vison model for Advanced Driver Assitance System (ADAS) using YOLO-based object detection, trained on a custom Indian traffic sign dataset aligned with Indian Road Congress (IRC:67-2022) standards. The model performs real-time detection and classification with improved robustness under Indian road conditions using temporal filtering and practical data augmentation.

Detailed methodology, experiments, and analysis are documented in the full report.

See Indian Traffic Sign Recognition Full Project Report here 👇:

View Report

Watch Demo video

Watch the Demo


Problem Statement

Existing TSR research primarily uses German Traffic Sign Recognition Benchmark (GTSRB), which does not represent Indian road conditions, sign designs, and environmental noise. This creates a gap in real-world deployment. The objective is to develop a TSR model aligned with IRC:67-2022 traffic sign standards using a custom dataset and evaluate multiple YOLO models for accuracy and speed.


Key Contributions

  • Custom Indian Traffic Sign Dataset: Developed a dataset aligned with IRC:67-2022, containing real-world Indian traffic scenarios with challenging negative samples to reduce false positives.
  • YOLO-based Model Adaptation: Fine-tuned multiple YOLO models (YOLOv8, YOLOv11, YOLO26) on the custom dataset to enable accurate traffic sign detection under Indian road conditions.
  • Temporal Filtering for Stability: Implemented frame-level temporal filtering to suppress inconsistent detections and improve prediction stability in real-time video streams.

Approach

  • Dataset Creation: Built a custom Indian Traffic Sign dataset aligned with IRC:67-2022 using manually captured images and curated samples. Included ~1700 images with realistic negative samples (vehicles, billboards, circular objects) to simulate real-world confusion.

  • Data Preprocessing & Augmentation: Applied practical augmentations such as brightness variation, blur, and noise to improve robustness while maintaining class balance and avoiding unrealistic transformations such as large rotations (90°), grayscale, hue shifts .

  • Model Training & Experimentation: Fine-tuned multiple YOLO-based object detection models (YOLOv8, YOLOv11, YOLO26) using transfer learning. Conducted comparative experiments to evaluate detection accuracy and inference speed across models.

  • Post-processing Optimization: Implemented temporal filtering across video frames to reduce false positives and stabilize predictions in real-time scenarios.

  • Evaluation: Assessed model performance using standard metrics including mAP, Precision, and Recall, focusing on both detection accuracy and real-time applicability.


Dataset Preparation

To ensure strict alignment with IRC:67-2022 Code of Practice for Road Signs issued by the Indian Roads Congress, a custom traffic sign dataset was constructed focusing on five representative and distinct sign categories: STOP, No Parking, Parking, No Entry, and Slippery Road.

The dataset was created using Roboflow, a web-based computer vision platform that supports dataset creation, annotation, preprocessing, augmentation, and export in multiple deep learning formats.

Image Sources

  • Roboflow public datasets (filtered to include only IRC-compliant traffic signs),
  • Google Images (manually verified for standard compliance),
  • Manually captured photographs using a mobile camera at Rajwada, Bhawarkua, and Collector Office areas in Indore, Madhya Pradesh.

Class Distribution

Class Name Annotations
no_entry 137
no_parking 156
parking 142
slippery_road 144
stop 142
Total 721

Dataset Composition (Before Augmentation)

  • Total Images: 999
    • Annotated Images (Traffic Signs): 693 (~70%)
    • Null Images (Background / No Signs): 306 (~30%)
  • Inclusion of null images helps reduce false positives in real-world scenarios

Preprocessing

  • Auto-Orient: Removes dependency on EXIF metadata
  • Resize: 640×640 (letterbox with black padding to maintain aspect ratio and ensures consistent resolution during training and inference)

Data Augmentation

  • Augmentation Factor: 2x per training image
  • Image Transformations Applied:
    • Rotation: −10° to +10°
    • Brightness: −20% to +20%
    • Blur: up to 0.2 px
    • Noise: up to 0.22% of pixels

Final Dataset (After Augmentation & Split)

Split Images
Train 1406
Validation 198
Test 98
Total Images 1702

Dataset Folder Structure

dataset/
  ├── train/
  │   ├── images/
  │   └── labels/
  ├── valid/
  │   ├── images/
  │   └── labels/
  ├── test/
  │   ├── images/
  │   └── labels/
  └── data.yaml

data.yaml

names:
  0: no_entry
  1: no_parking
  2: parking
  3: slippery_road
  4: stop              
nc: 5
roboflow:
  license: CC BY 4.0
  project: indian-traffic-sign-recognition
  url: https://universe.roboflow.com/traffic-sign-recognition-o9l0s/indian-traffic-sign-recognition/dataset/2
  version: 2
  workspace: traffic-sign-recognition-o9l0s
test: /test/images
train: /train/images
val: /valid/images

YOLO Bounding Box Image Annotation Format

YOLO format: (class_id, x_center, y_center, width, height) normalized (0,1)

Dataset Access

Roboflow Dataset (Created by Param Sahu):

https://universe.roboflow.com/traffic-sign-recognition-o9l0s/indian-traffic-sign-recognition/dataset/2

Download Dataset (Roboflow API)

from roboflow import Roboflow
rf = Roboflow(api_key="WRQAJqqqnrJsGHiYBley")
project = rf.workspace("traffic-sign-recognition-o9l0s").project("indian-traffic-sign-recognition")
version = project.version(2)
dataset = version.download("yolo26")

Methodology

Workflow

The workflow includes dataset preparation, YOLO-based model fine-tuning, inference on images/video frames and temporal filtering to stabilize predictions across video frames.

Workflow

Model Training

!yolo task=detect mode=train model=yolo26n.pt data={dataset.location}/data.yaml epochs=100 imgsz=640 patience=20 save=True save_period=10 project=runs/train name=tsr_model 

Hyperparameters

The above command has used inside Google Colab for model training on the downloaded Roboflow Dataset. Refer notebooks

  • model=yolo26n.pt → pretrained YOLO model used for fine-tuning
  • data=.../data.yaml → dataset configuration file
  • epochs=100 → total training iterations
  • imgsz=640 → input image size
  • patience=20 → early stopping if no improvement
  • save_period=10 → checkpoint saved every 10 epochs
  • project/name → output directory for training runs

Model Testing


Results

Performance Evaluation of TSR Fine-tuned Models

Model Images Instances Precision (P) Recall (R) mAP@IoU0.5 mAP@IoU0.5:0.95
YOLOv8 198 147 0.973 0.987 0.992 0.919
YOLOv11 198 147 0.981 0.989 0.994 0.932
YOLOv26 198 147 0.975 0.975 0.992 0.928

Size and Speed Comparison of TSR Fine-tuned Models

TSR Model Preprocess Time Inference Time Loss Time Postprocess Time Total Time (approx.) Model Size
YOLOv8 0.2 ms 4.8 ms 0.0 ms 5.8 ms 10.8 ms 18.2 MB
YOLOv11 0.3 ms 5.8 ms 0.0 ms 5.7 ms 11.8 ms 21.4 MB
YOLO26 0.3 ms 4.7 ms 0.0 ms 0.7 ms 5.7 ms 5.14 MB

TSR_YOLO26n Fine-tuned model Class-wise Results

Class Images Instances Precision (P) Recall (R) mAP@IoU0.5 mAP@IoU0.5:0.95
all 198 147 0.975 0.975 0.992 0.928
no_entry 27 27 0.983 1.000 0.995 0.995
no_parking 30 30 1.000 0.998 0.995 0.948
parking 28 30 0.965 1.000 0.994 0.738
slippery_road 29 29 0.962 1.000 0.986 0.986
stop 29 31 0.964 0.876 0.988 0.974

Detailed Results

Additional evaluation outputs (confusion matrix, validation predictions, etc.) are available in the results/ directory.

Included:

  • Confusion Matrix
  • Validation Batch Predictions
  • Model Output Visualizations

TSR_YOLO26n Model Inference Output

Inference results generated using the fine-tuned tsr_yolo26n.pt model. (GIF Preview)

TSR Output

Full video available here: Download MP4

Discussion on Results

The experimental results demonstrate that all models achieved high detection accuracy with strong precision, recall, and mAP scores. Among them, TSR_YOLOv11s achieved the highest overall detection performance with mAP@IOU0.5 of 0.994, while TSR_YOLO26n provided competitive accuracy with mAP@IOU0.5 of 0.992 and significantly faster post-processing speed (only 0.7 ms) due to its NMS-free architecture.

The TSR_YOLOv8s fine-tuned model has a size of 18.2 MB, while TSR_YOLOv11s is slightly larger at 21.4 MB, indicating a higher number of parameters and computational complexity. In contrast, the TSR_YOLO26n fine-tuned model is significantly smaller, with a size of only 5.14 MB. Despite its smaller size, TSR_YOLO26n maintains competitive detection performance while offering faster inference and reduced memory requirements. This compact model size makes TSR_YOLO26n particularly suitable for edge devices and real-time deployment, where storage capacity and computational resources are limited.


Limitations

  • Small Dataset Size: Total dataset size is limited to 1702 images, which restricts diversity and reduces generalization to unseen scenarios.

  • Overfitting Risk: Achieved >99% mAP across models indicates potential overfitting due to limited data and similarity between training and validation samples.

  • Limited Class Coverage: Only 5 traffic sign classes are included, which does not represent the full range of IRC:67-2022 traffic signs.

  • Performance in Crowded Scenes: Manual testing shows false positives and false negatives in complex environments (e.g., crowded roads, multiple objects, visual clutter).

  • Evaluation Constraints: Limited test set (98 images) reduces confidence in performance metrics and real-world reliability.


Future Work

  • Expand Dataset: Increase dataset size with more diverse images covering different lighting, weather, and road conditions.

  • Add More Classes: Extend dataset to include a larger set of traffic signs aligned with IRC:67-2022 standards.

  • Improve Generalization: Incorporate more real-world data and advanced augmentation techniques to reduce overfitting.

  • Enhance Model Robustness: Optimize detection performance in crowded and complex scenes with better training strategies or model architectures.

  • Real-Time Deployment: Integrate the model into a complete ADAS pipeline with live video input and edge-device optimization.

  • Quantitative Temporal Evaluation: Evaluate temporal filtering impact using metrics (e.g., stability score, false detection reduction across frames).


Documentation

External Resources

About

Traffic Sign Recognition (TSR) vison model for Advanced Driver Assitance System (ADAS) using YOLO-based object detection, trained on a custom Indian traffic sign dataset aligned with Indian Road Congress (IRC:67-2022) standards.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors