├── Copy_of_PotholeDetectionUsingYOLO.ipynb ├── LICENSE ├── PotholeDetectionUsingYOLO.ipynb ├── Potholes.ipynb └── README.md /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2023 Mounish Vatti 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![3](https://github.com/mounishvatti/pothole_detection_yolov8/assets/76279858/5e5a2ea1-c512-4c86-b0e6-b8128c997503) 2 | 3 |

Image Segmentation & Pothole Detection

4 | 5 | ## Google Colab File Link (A Single Click Solution) 6 | 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 7 | ,you just need to select the Run Time as GPU, and click on Run All. 8 | 9 | [`Google Colab File`](https://colab.research.google.com/drive/17SLXw-wdHG2syQhLSHH5r5_rkZx5poo0) 10 | 11 | ## Tech stack 12 | 13 | ![Python](https://img.shields.io/badge/python-3670A0?style=for-the-badge&logo=python&logoColor=ffdd54) 14 | 15 | ## Object Segmentation and Tracking (ID + Trails) using YOLOv8 on Custom Data 16 | 17 |

Clone the repository

18 | 19 | ```bash 20 | !git clone https://github.com/mounishvatti/pothole_detection_yolov8.git 21 | ``` 22 |

Goto the cloned folder

23 | 24 | ```bash 25 | cd pothole_detection_yolov8 26 | ``` 27 |

Install the Dependencies

28 | 29 | ```bash 30 | !pip install ultralytics 31 | ``` 32 | ```bash 33 | !pip install roboflow 34 | ``` 35 | ```bash 36 | !pip install fastapi kaleido python_multipart uvicorn 37 | ``` 38 |

Importing YOLO and a roboflow workspace for Image Segmentation

39 | 40 | ```python 41 | from roboflow import Roboflow 42 | rf = Roboflow(api_key="{the api key}") 43 | project = rf.workspace("{name of workspace}").project("name-of-project") 44 | dataset = project.version(1).download("yolov8") 45 | ``` 46 | 47 | > [!NOTE] 48 | > 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 49 | 50 |

My roboflow workspace containing the pothole dataset

51 | 52 | [`Roboflow Workspace`](https://app.roboflow.com/vit-76kid/pothole-detection-project-3yiqt/1) 53 | 54 | Run the code with mentioned command below. 55 | - For training the data 56 | ```python 57 | !yolo task=detect mode=train model=yolov8m.pt data={dataset.location}/data.yaml epochs={number of epochs} imgsz=640 58 | ``` 59 | - For yolov8 segmentation + Tracking & prediction 60 | ```python 61 | !yolo task=detect mode=predict model={HOME}/runs/detect/train/weights/best.pt conf=0.25 source='/content/drive/MyDrive/demo.mp4' 62 | ``` 63 | 64 | --------------------------------------------------------------------------------