Skip to content

About

AI-powered ADAS pothole detection system using YOLO, Random Forest, Flask and OpenCV.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Latest commit

ย 

History

3 Commits

Folders and files

NameName
Last commit message
Last commit date
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿš— DriveSentury: AI-powered ADAS Pothole Detection System

Python Flask OpenCV YOLOv12 YOLOv8 Scikit--learn NumPy HTML5 CSS3 JavaScript

Real-time AI-powered pothole detection, road severity estimation, and intelligent drive mode recommendation using Computer Vision and Machine Learning.


An AI-powered Advanced Driver Assistance System (ADAS) that detects potholes using a custom-trained YOLO model and recommends intelligent driving modes through a Random Forestโ€“based decision engine.


๐Ÿ“– Overview

DriveSentury is an AI-powered Advanced Driver Assistance System (ADAS) designed to improve road safety by automatically detecting potholes and road anomalies from recorded road videos.

The system combines deep learning-based object detection with machine learning-driven decision making to identify road hazards, estimate their severity, and recommend an appropriate driving mode. All predictions are visualized through an interactive Flask dashboard that provides real-time analytics, hazard alerts, and safety recommendations.

Unlike traditional object detection projects that only locate potholes, DriveSentury extends the detection pipeline by incorporating an intelligent recommendation engine capable of assisting drivers based on current road conditions.


๐ŸŽฅ Demo

A demonstration video showcasing the complete workflow of DriveSentury is available in the repository.

  • Real-time pothole detection
  • Live dashboard analytics
  • Dynamic drive mode recommendation
  • Road severity estimation

Demo Video: docs/demo.mp4

A GIF preview will be added in a future update for quick visualization directly on GitHub.

๐ŸŽฏ Problem Statement

Poor road conditions contribute significantly to vehicle damage and road accidents. Drivers often receive no prior warning about potholes or deteriorating road surfaces, especially under poor visibility or unfamiliar routes.

DriveSentury addresses this problem by providing an intelligent AI-based system capable of:

  • Detecting potholes and road anomalies
  • Estimating road severity
  • Recommending an appropriate driving mode
  • Providing real-time visual feedback through an interactive dashboard

โœจ Features

  • Real-time pothole detection using a custom-trained YOLO model
  • Intelligent drive mode recommendation using a Random Forest classifier
  • Road severity classification
    • Minimal
    • Very Low
    • Low
    • Moderate
    • High
    • Critical
  • Live confidence monitoring for AI predictions
  • Interactive Flask dashboard
  • Road analytics and hazard visualization
  • Dynamic safety recommendations
  • Portable project structure using relative paths
  • Modular architecture for future deployment on embedded systems

๐Ÿ–ผ Dashboard Preview

Monitoring Dashboard


Rough Road Detection


Highway Mode Detection


Critical Hazard Alert


Moderate Hazard Alert

๐Ÿ— System Architecture

                    Road Video
                        โ”‚
                        โ–ผ
               YOLO Object Detection
                        โ”‚
                        โ–ผ
          Pothole Detection & Localization
                        โ”‚
                        โ–ผ
              Feature Extraction Layer
        (Pothole Count, Confidence, History)
                        โ”‚
                        โ–ผ
      Random Forest Drive Mode Recommender
                        โ”‚
                        โ–ผ
          Severity Classification Engine
                        โ”‚
                        โ–ผ
            Flask Web Dashboard (UI)
                        โ”‚
                        โ–ผ
      Driver Alerts & Safety Recommendations

๐Ÿง  Machine Learning Pipeline

The system consists of two independent AI components working together.

1. Computer Vision Module

The first module uses a custom-trained YOLO model to detect potholes from every frame of an input road video.

The detector predicts:

  • Bounding boxes
  • Object confidence
  • Road anomaly class

2. Decision Engine

Detection results are passed to a Random Forest classifier which analyses:

  • Current pothole count
  • Average pothole count
  • Detection confidence
  • Rate of change
  • Historical road conditions
  • Recent hazard patterns

The model predicts an appropriate driving mode together with a road severity level.


๐Ÿš˜ Drive Modes

The system supports six intelligent driving modes.

Drive Mode Description
Smooth Drive Excellent road conditions
Highway Mode Safe high-speed driving
Comfort Mode Minor road imperfections
Caution Mode Moderate hazards detected
Rough Road Mode Significant road damage
Danger! Slow Down Critical road conditions

โš  Severity Levels

Severity Description
Minimal Excellent road condition
Very Low Minor surface imperfections
Low Manageable potholes
Moderate Multiple hazards present
High Significant road damage
Critical Dangerous road conditions

๐Ÿ›  Technology Stack

Category Technology
Programming Language Python
Backend Flask
Computer Vision OpenCV
Object Detection YOLOv12 (Training)
Inference Engine YOLOv8
Machine Learning Random Forest
ML Library Scikit-learn
Visualization Supervision
Frontend HTML, CSS, JavaScript
Numerical Computing NumPy

๐Ÿ“‚ Project Structure

DriveSentury
โ”‚
โ”œโ”€โ”€ app.py
โ”œโ”€โ”€ drivemode.py
โ”œโ”€โ”€ requirements.txt
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ .gitignore
โ”‚
โ”œโ”€โ”€ models
โ”‚   โ”œโ”€โ”€ drivesentury_yolo.pt
โ”‚   โ””โ”€โ”€ drive_mode_model.pkl
โ”‚
โ”œโ”€โ”€ static
โ”‚   โ”œโ”€โ”€ css
โ”‚   โ”œโ”€โ”€ js
โ”‚   โ”œโ”€โ”€ img
โ”‚   โ”œโ”€โ”€ screenshots
โ”‚   โ””โ”€โ”€ sample_video.mp4
โ”‚
โ”œโ”€โ”€ templates
โ”‚
โ””โ”€โ”€ docs

๐Ÿš€ Installation

Clone the repository.

git clone https://github.com/your-username/DriveSentury.git

Navigate into the project.

cd DriveSentury

Install dependencies.

pip install -r requirements.txt

Run the application.

python app.py

Open your browser.

http://127.0.0.1:5000

๐Ÿ“Š Results

DriveSentury successfully integrates computer vision and machine learning into a unified ADAS pipeline capable of:

  • Detecting potholes from recorded road videos using a custom-trained YOLO model.
  • Estimating road severity across six hazard levels.
  • Recommending intelligent driving modes using a Random Forest classifier.
  • Displaying real-time detections, confidence scores, and safety recommendations through an interactive Flask dashboard.
  • Maintaining a modular architecture suitable for future extensions such as edge deployment, live camera support, and multi-sensor integration.

๐Ÿ”ฎ Future Improvements

  • Live webcam support
  • Real-time GPS integration
  • Lane detection
  • Vehicle speed estimation
  • Edge AI deployment
  • Mobile application
  • Cloud dashboard
  • Driver notification system
  • Multi-sensor fusion
  • Depth estimation for pothole severity

๐Ÿ‘จโ€๐Ÿ’ป Authors

Name Role
Chandan S Bhat Developer โ€ข Artificial Intelligence & Data Science Engineer
Syed Zain Developer โ€ข Artificial Intelligence & Data Science Engineer

If you have suggestions, encounter issues, or would like to collaborate, feel free to open an issue or submit a pull request.


๐Ÿ“„ License

This project is intended for educational and research purposes.

Disclaimer

DriveSentury is an independent academic project developed for educational and research purposes.

Any vehicle brands, names, or visual assets that may appear in demonstration screenshots or videos are used solely for illustrating the dashboard interface and do not imply any affiliation with, endorsement by, or ownership from their respective trademark holders.

About

AI-powered ADAS pothole detection system using YOLO, Random Forest, Flask and OpenCV.

Topics

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages