Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 2.13 KB

README.md

File metadata and controls

63 lines (47 loc) · 2.13 KB

3

Image Segmentation & Pothole Detection

Google Colab File Link (A Single Click Solution)

The google colab file link for yolov8 segmentation and tracking is provided below, you can check the implementation in Google Colab, and its a single click implementation ,you just need to select the Run Time as GPU, and click on Run All.

Google Colab File

Tech stack

Python

Object Segmentation and Tracking (ID + Trails) using YOLOv8 on Custom Data

Clone the repository

!git clone https://github.com/mounishvatti/pothole_detection_yolov8.git

Goto the cloned folder

cd pothole_detection_yolov8

Install the Dependencies

!pip install ultralytics
!pip install roboflow
!pip install fastapi kaleido python_multipart uvicorn

Importing YOLO and a roboflow workspace for Image Segmentation

from roboflow import Roboflow
rf = Roboflow(api_key="{the api key}")
project = rf.workspace("{name of workspace}").project("name-of-project")
dataset = project.version(1).download("yolov8")

Note

If you are unable to perform the commands after importing the dataset from roboflow, you can access the same dataset by downloading it, upload it to your personal drive and mount the drive to your Google Colab

My roboflow workspace containing the pothole dataset

Roboflow Workspace

Run the code with mentioned command below.

  • For training the data
!yolo task=detect mode=train model=yolov8m.pt data={dataset.location}/data.yaml epochs={number of epochs} imgsz=640
  • For yolov8 segmentation + Tracking & prediction
!yolo task=detect mode=predict model={HOME}/runs/detect/train/weights/best.pt conf=0.25 source='/content/drive/MyDrive/demo.mp4'