FarzadNekouee / YOLOv8_Pothole_Segmentation_Road_Damage_Assessment

Automated pothole detection and road damage assessment using YOLOv8-seg for real-time analysis.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

πŸ›£οΈ Real-Time Pothole Segmentation for Road Damage Assessment with YOLOv8

Pothole Segmentation

πŸ” Overview

This project leverages YOLOv8-seg's cutting-edge segmentation capabilities for real-time road damage assessment, with a particular emphasis on pothole detection. It aims to bolster road maintenance efforts by providing precise, real-time data on road conditions, thereby enhancing public safety and aiding in urban infrastructure management. Combining computer vision with advanced object segmentation, our solution delineates potholes in detail, offering actionable insights for smart city and autonomous vehicle advancements.

🎯 Objectives

Key milestones in this project include:

  • Speed-Oriented YOLOv8n-seg Selection: Adopting YOLOv8n-seg for its quick processing, balancing speed with accuracy, ideal for real-time pothole analysis.
  • Targeted Dataset Preparation: Creating a curated dataset of pothole imagery, augmented to train the model effectively for segmentation tasks.
  • YOLOv8-seg Fine-Tuning: Adapting the pre-trained model via transfer learning to pinpoint and segment potholes with high precision.
  • Comprehensive Model Evaluation: Utilizing various metrics and analyses to validate the model's performance and ensure its dependability.
  • Model Inference Testing: Assessing the model on validation images and a novel test video to confirm its real-world applicability.
  • Real-Time Damage Assessment: Implementing the model on video feeds to continuously monitor and quantify pothole-inflicted road damage.

πŸ“š Dataset Description

🌐 Overview

The Pothole Detection for Road Safety Dataset is purpose-built for training YOLOv8-seg models to identify and segment potholes.

πŸ” Specifications

  • πŸ•³οΈ Class: 'Pothole'
  • πŸ–ΌοΈ Total Images: 780
  • πŸ“ Image Dimensions: 640x640 pixels
  • πŸ“‚ Format: YOLOv8 annotation format

πŸ”„ Pre-processing

Includes auto-orientation and resizing to 640x640 for consistency.

πŸ”’ Dataset Split

  • Training Set: 720 images with augmentations.
  • Validation Set: 60 images.

🎭 Augmentation on Training Set

Comprising flips, cropping, rotation, shearing, brightness, and exposure adjustments.

πŸ“Œ Access

Publicly accessible on Kaggle and Roboflow:

πŸŽ₯ YouTube Demo

Real-Time Pothole Segmentation for Road Damage Assessment with YOLOv8 in Action:

Pothole Segmentation Demo

πŸ“ File Descriptions

  • images/: Contains the cover images for the project and the sample image utilized within the notebook.
  • model/: Includes the best-performing fine-tuned YOLOv8 model in .pt (PyTorch format) used for pothole segmentation.
  • pothole_segmentation_YOLOv8.ipynb: The Jupyter notebook that documents the model development pipeline, from data preparation to model evaluation and inference.
  • road_damage_assessment_app.py: The Python script for deploying the YOLOv8 segmentation model to estimate road damage in real-time.
  • sample_video.mp4: A sample video file used to demonstrate the application's capabilities.
  • real_time_road_damage_assessment_demo.gif: A GIF showcasing the application's real-time road damage assessment.
  • LICENSE: Outlines the terms of use for this project's resources.
  • README.md: The document you are reading that provides an overview and essential details of the project.

πŸš€ Instructions for Local Execution

To experience the full capabilities of the YOLOv8 Traffic Density Estimation project on your local machine, follow these steps:

1️⃣. Initial Setup

  1. Clone the Repository: Start by cloning the project repository to your local system using the command below:
    git clone https://github.com/FarzadNekouee/YOLOv8_Pothole_Segmentation_Road_Damage_Assessment.git
  2. Navigate to the Project Directory: After cloning, change into the project directory with:
    cd YOLOv8_Pothole_Segmentation_Road_Damage_Assessment

2️⃣. Exploring the Model Development Pipeline

Get hands-on with the model development process and see the results of traffic density estimation:

  1. Download the Dataset: Access the dataset from Kaggle. Download and extract it to a known directory on your machine.
  2. Open the Notebook: Launch Jupyter Notebook or JupyterLab and open real-pothole_segmentation_YOLOv8.ipynb to explore the model development pipeline.
  3. Install Dependencies: Ensure all necessary Python libraries are installed for flawless execution.
  4. Update Paths: Update the paths in the notebook for the dataset, sample image, and sample video to their respective locations on your local system.
  5. Run the Notebook: Execute all cells in the notebook to step through the data preprocessing, model training, and evaluation phases.

3️⃣. Watching the Real-Time Performance

Witness the real-time road damage assessment capability of our application:

  1. Install Ultralytics YOLO: Ensure you have the ultralytics package installed by running:
    pip install ultralytics
  2. Run the Analysis Script: Execute the script to start the real-time traffic density estimation:
    python road_damage_assessment_app.py
  3. Real-Time Analysis: The video window will display the live road damage assessment. To exit, simply press 'q' while the video window is active.

This GIF showcases our application running in real-time:

Real-Time Road Damage Assessment GIF

πŸ”— Additional Resources

  • πŸŽ₯ Project Demo: Watch the live demonstration of this project on YouTube.
  • 🌐 Kaggle Notebook: Interested in a Kaggle environment? Explore the notebook here.
  • 🌐 Dataset Source: Available on both Roboflow and Kaggle.
  • 🀝 Connect on LinkedIn: Have questions or looking for collaboration? Let's connect on LinkedIn.

About

Automated pothole detection and road damage assessment using YOLOv8-seg for real-time analysis.

License:MIT License


Languages

Language:Jupyter Notebook 100.0%Language:Python 0.0%