This project demonstrates how to use a custom-trained YOLOv8 model for detecting potholes and integrate it with the Segment Anything Model (SAM) for precise, zero-shot segmentation of potholes. It also computes and displays the area of each pothole segment in real-time video footage captured from a car dashcam.
- Custom training of YOLOv8 for pothole detection.
- Real-time pothole detection on dashcam video.
- Integration of YOLOv8 with Meta's Segment Anything Model (SAM) for segmentation.
- Real-time area calculation and annotation of pothole areas.
- Python 3.8+
- YOLOv8 (Ultralytics)
- Segment Anything Model (SAM) from Meta AI
-
Install Dependencies
pip install ultralytics segment_anything opencv-python matplotlib numpy
-
YOLO and SAM Model Preparation
- Place your custom YOLO model (
best.pt) and SAM model checkpoint (sam_b.pt) in the project folder.
- Place your custom YOLO model (
-
Running the Application
- Execute the provided Jupyter Notebook (
yolo-sam.ipynb) or Python script to perform inference on video.
- Execute the provided Jupyter Notebook (
This project is for educational purposes.
- Your Name: Dr T.K.Senthil Kumar