Skip to content

Latest commit

Β 

History

13 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— ADAS System for Indian Roads

Python YOLO OpenCV PyTorch Status


πŸ“– Overview

Road conditions in India present unique challenges for autonomous driving systems due to dense traffic, heterogeneous vehicle types, unpredictable road users, and varying infrastructure.

This project develops an Advanced Driver Assistance System (ADAS) capable of detecting common road objects in Indian traffic using state-of-the-art YOLO object detection models.

The project compares the performance of YOLOv8 and YOLO26 on the DIRS21 (Dataset for Indian Road Scenarios) dataset and evaluates each model using Precision, Recall, Detection Accuracy, mAP@50, and mAP@50-95.

The objective was to determine which model provides better real-time detection performance for Indian road environments while maintaining high inference speed.


✨ Features

  • πŸš— Real-time object detection
  • 🚌 Detects multiple vehicle categories
  • 🏍 Motorcycle detection
  • 🚢 Pedestrian detection
  • πŸš› Truck detection
  • πŸš• Auto-rickshaw detection
  • πŸ“Š Performance comparison between YOLOv8 and YOLO26
  • πŸ“ˆ Precision-Recall analysis
  • πŸ“‰ Training loss visualization
  • πŸ“‹ Confusion Matrix generation
  • 🎯 mAP evaluation
  • ⚑ GPU accelerated training

🧠 Models Used

Model Purpose
YOLOv8n Baseline model
YOLO26n Improved object detector

πŸ—‚ Dataset

Dataset Used

DIRS21 (Dataset for Indian Road Scenarios)

The dataset contains images collected from Indian roads containing diverse traffic conditions including:

  • Cars
  • Buses
  • Trucks
  • Motorcycles
  • Auto Rickshaws
  • Pedestrians

Dataset Split:

Split Percentage
Training 80%
Testing 10%
Validation 10%

Sample Images from DIRS21 Dataset

πŸ“‚ Project Structure

ADAS-System-for-Indian-Roads
β”‚
β”œβ”€β”€ data.yaml
β”œβ”€β”€ dataset_split.py
β”œβ”€β”€ show_accuracy.py
β”œβ”€β”€ requirements.txt
β”‚
β”œβ”€β”€ runs/
β”‚   └── detect/
β”‚       β”œβ”€β”€ train-3/
β”‚       β”œβ”€β”€ train-4/
β”‚       β”œβ”€β”€ train-5/
β”‚       β”œβ”€β”€ train-8/
β”‚       β”œβ”€β”€ train-9/
β”‚       β”œβ”€β”€ yolo26n_20epochs/
β”‚       β”œβ”€β”€ yolo26n_40epochs/
β”‚       β”œβ”€β”€ yolo26n_60epochs/
β”‚       └── yolo26n_80epochs/
β”‚
β”œβ”€β”€ README.md
└── LICENSE

βš™οΈ Technologies Used

  • Python
  • PyTorch
  • Ultralytics YOLO
  • OpenCV
  • NumPy
  • Pandas
  • Matplotlib

πŸ’» Installation

Clone the repository

git clone https://github.com/ArmaanBhide/ADAS-System-for-Indian-Roads.git

Go into the project

cd ADAS-System-for-Indian-Roads

Install dependencies

pip install -r requirements.txt

▢️ Training

Train YOLOv8

yolo detect train model=yolov8n.pt data=data.yaml epochs=60

Train YOLO26

yolo detect train model=yolo26n.pt data=data.yaml epochs=60

πŸ“Š Training Configuration

Parameter Value
Image Size 640 Γ— 640
Optimizer AdamW (Auto Optimizer)
Batch Size 8
Device GPU
Early Stopping Patience = 10
Data Augmentation Mosaic, Scale, Flip, HSV
Dataset Split 80 / 10 / 10

πŸ“ˆ Model Performance

The final trained models were evaluated using multiple object detection metrics.

Performance Comparison

Metric YOLOv8n (60 Epochs) YOLO26n (60 Epochs)
Detection Accuracy 79.40% 80.48%
Precision 81.68% 84.50%
Recall 77.13% 76.47%
mAP@50 85.48% 85.14%
mAP@50-95 48.54% 49.07%

πŸ“Š Training Summary

YOLOv8n

Training Detail Value
Model YOLOv8n
Epochs 60
Dataset DIRS21
Batch Size 8
Optimizer AdamW
Image Size 640 Γ— 640
Early Stopping Enabled (Patience = 10)

Final Results

  • Detection Accuracy : 79.40%
  • Precision : 81.68%
  • Recall : 77.13%
  • mAP@50 : 85.48%
  • mAP@50-95 : 48.54%

YOLO26n

Training Detail Value
Model YOLO26n
Epochs 60
Dataset DIRS21
Batch Size 8
Optimizer AdamW
Image Size 640 Γ— 640
Early Stopping Enabled (Patience = 10)

Final Results

  • Detection Accuracy : 80.48%
  • Precision : 84.50%
  • Recall : 76.47%
  • mAP@50 : 85.14%
  • mAP@50-95 : 49.07%

πŸ“‰ Training Graphs

The repository contains complete training visualizations generated by the Ultralytics framework.

These include:

  • πŸ“ˆ Loss Curves
  • πŸ“ˆ Precision Curve
  • πŸ“ˆ Recall Curve
  • πŸ“ˆ mAP Curve
  • πŸ“ˆ Precision-Recall Curve
  • πŸ“ˆ F1 Score Curve

Files available inside each training run:

results.png
BoxF1_curve.png
BoxPR_curve.png
BoxP_curve.png
BoxR_curve.png

πŸ“‹ Confusion Matrix

The trained models were evaluated using confusion matrices to analyze class-wise prediction performance.

Included in this repository:

confusion_matrix.png

confusion_matrix_normalized.png

These matrices provide insights into:

  • Correct classifications
  • False Positives
  • False Negatives
  • Class confusion

πŸ–Ό Sample Training Outputs

Each successful training run contains:

  • Training batches
  • Validation batches
  • Prediction visualizations
  • Label distributions
  • Class frequency plots

These outputs are preserved for reproducibility and model analysis.


YOLO26n Training Results

Training Metrics

Precision-Recall Curves

Precision Curve

Recall Curve

F1 Score Curve

Confusion Matrix

Normalized Confusion Matrix

πŸ§ͺ Experimental Runs

Multiple experiments were conducted during model development.

YOLO26 Experiments

  • 20 Epochs
  • 40 Epochs
  • 60 Epochs
  • 80 Epochs

These experiments helped analyze convergence behaviour and compare the effect of longer training durations.


πŸ”¬ Key Observations

YOLO26n

βœ… Highest Detection Accuracy

βœ… Highest Precision

βœ… Highest mAP@50-95

YOLOv8n

βœ… Highest Recall

βœ… Slightly higher mAP@50


πŸ“š Comparison with Research Paper

The performance achieved in this project is compared with the reference research paper that utilized the DIRS21 dataset.

Metric Research Paper This Project (YOLO26n)
Detection Accuracy Comparable 80.48%
Precision Comparable 84.50%
Recall Comparable 76.47%
mAP@50 Comparable 85.14%
mAP@50-95 Comparable 49.07%

The obtained results demonstrate that the implemented pipeline successfully reproduces competitive performance on the DIRS21 dataset while validating the effectiveness of YOLO-based object detection for Indian road environments.


πŸš€ Future Improvements

The current implementation demonstrates strong real-time object detection performance; however, several enhancements can further improve the system.

πŸš€ Future Improvements

  • Integrate lane detection
  • Add traffic sign recognition
  • Deploy on NVIDIA Jetson Nano
  • Integrate LiDAR and camera fusion
  • Real-time collision warning system
  • Object tracking using ByteTrack/DeepSORT
  • Speed estimation of surrounding vehicles
  • Night-time detection using thermal cameras

Planned Improvements

  • 🚦 Traffic Sign Detection
  • πŸš₯ Traffic Light Recognition
  • πŸš— Lane Detection
  • πŸ“ Distance Estimation using LiDAR
  • 🌑️ Thermal Camera Integration
  • ⚠️ Collision Warning System
  • 🚢 Pedestrian Intention Prediction
  • 🚘 Vehicle Speed Estimation
  • πŸ“ GPS-based Navigation Assistance
  • πŸŽ₯ Real-time Video Stream Detection
  • πŸ€– Deployment on NVIDIA Jetson Nano
  • ☁️ Edge AI Optimization using TensorRT

πŸ† Project Highlights

βœ” Successfully trained and evaluated YOLOv8n and YOLO26n on the DIRS21 dataset.

βœ” Achieved over 80% Detection Accuracy on Indian road scenarios.

βœ” Compared two state-of-the-art object detection architectures.

βœ” Evaluated performance using:

  • Detection Accuracy
  • Precision
  • Recall
  • mAP@50
  • mAP@50-95
  • Confusion Matrix
  • Precision-Recall Curves
  • F1 Score Curves

βœ” Conducted multiple experimental training runs to analyze convergence across different epoch counts.


🌍 Applications

This project can be integrated into:

  • Advanced Driver Assistance Systems (ADAS)
  • Autonomous Vehicles
  • Smart Transportation Systems
  • Intelligent Traffic Monitoring
  • Road Safety Analytics
  • Fleet Management
  • Driver Assistance Solutions
  • Edge AI Systems

πŸ“– References

Dataset

DIRS21 – Dataset for Indian Road Scenarios

IEEE Dataport


Framework

Ultralytics YOLO

https://github.com/ultralytics/ultralytics


Deep Learning Framework

PyTorch

https://pytorch.org/


Computer Vision Library

OpenCV

https://opencv.org/


🀝 Acknowledgements

Special thanks to:

  • Ultralytics
  • PyTorch
  • OpenCV
  • IEEE Dataport
  • DIRS21 Dataset Authors

for providing the resources and tools that made this project possible.


πŸ“Š Repository Contents

This repository includes:

  • Complete source code
  • Dataset preprocessing script
  • Training configuration
  • Model evaluation scripts
  • Training statistics
  • Performance comparison
  • Training graphs
  • Confusion matrices
  • Precision-Recall curves
  • F1 curves
  • CSV training logs
  • Experimental results

πŸ“œ License

This project is licensed under the MIT License.

See the LICENSE file for more information.


πŸ“ Project Structure

ADAS-System-for-Indian-Roads
β”‚
β”œβ”€β”€ dataset/
β”‚
β”œβ”€β”€ DIRS21/
β”‚
β”œβ”€β”€ runs/
β”‚   └── detect/
β”‚       β”œβ”€β”€ yolo26n_20epochs/
β”‚       β”œβ”€β”€ yolo26n_40epochs/
β”‚       β”œβ”€β”€ yolo26n_60epochs/
β”‚       └── yolo26n_80epochs/
β”‚
β”œβ”€β”€ data.yaml
β”œβ”€β”€ dataset_split.py
β”œβ”€β”€ show_accuracy.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md
└── LICENSE

πŸ‘¨β€πŸ’» Author

Armaan Bhide

Computer Science Engineering (Artificial Intelligence & Machine Learning)

Interested in:

  • Artificial Intelligence
  • Computer Vision
  • Machine Learning
  • Deep Learning
  • Edge AI
  • Autonomous Driving
  • Intelligent Transportation Systems

GitHub:

https://github.com/ArmaanBhide


⭐ If you found this project useful

Please consider giving this repository a ⭐ on GitHub.

It helps support the project and motivates future improvements.


πŸš— Making Indian Roads Smarter with AI πŸš—

About

Advanced Driver Assistance System (ADAS) for Indian Roads using YOLOv8 and YOLO26 for real-time object detection.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages