Object Detection
ultralytics
English
computer-vision
pothole-detection
yolov8
yolov9
yolov11
yolov12
Instructions to use EngJamesO/pothole-detector with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use EngJamesO/pothole-detector with ultralytics:
from huggingface_hub import hf_hub_download from ultralytics import YOLO # pick the weights file from this repo's "Files and versions" tab weights = hf_hub_download("EngJamesO/pothole-detector", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,4 +12,90 @@ tags:
|
|
| 12 |
library_name: ultralytics
|
| 13 |
language:
|
| 14 |
- en
|
| 15 |
-
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
library_name: ultralytics
|
| 13 |
language:
|
| 14 |
- en
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
license: mit
|
| 19 |
+
tags:
|
| 20 |
+
- object-detection
|
| 21 |
+
- yolo
|
| 22 |
+
- computer-vision
|
| 23 |
+
- pothole-detection
|
| 24 |
+
- road-infrastructure
|
| 25 |
+
- ultralytics
|
| 26 |
+
library_name: ultralytics
|
| 27 |
+
---
|
| 28 |
+
|
| 29 |
+
# Pothole Detection Models
|
| 30 |
+
|
| 31 |
+
This repository contains trained YOLO models for detecting potholes in road images. The models were developed to assist with road infrastructure monitoring and maintenance planning.
|
| 32 |
+
|
| 33 |
+
## Model Overview
|
| 34 |
+
|
| 35 |
+
Five YOLO architectures were trained and evaluated for pothole detection:
|
| 36 |
+
|
| 37 |
+
| Model | Parameters | mAP50 | mAP50-95 | Latency (ms) | FPS |
|
| 38 |
+
|-------|-----------|-------|----------|--------------|-----|
|
| 39 |
+
| YOLOv9c | 25.3M | 0.792 | 0.485 | 36.3 | 27.6 |
|
| 40 |
+
| YOLOv12n | 2.56M | 0.785 | 0.463 | 13.9 | 72.1 |
|
| 41 |
+
| YOLOv8n | 3.01M | 0.782 | 0.465 | 6.9 | 144.7 |
|
| 42 |
+
| YOLOv11 | 2.58M | 0.779 | 0.460 | 9.3 | 107.0 |
|
| 43 |
+
| YOLOv8-FPN | 2.21M | 0.707 | 0.396 | 6.4 | 155.8 |
|
| 44 |
+
|
| 45 |
+
## Intended Uses
|
| 46 |
+
|
| 47 |
+
- **Primary Use**: Automated pothole detection in road images for infrastructure assessment
|
| 48 |
+
- **Secondary Use**: Research in object detection, computer vision applications for transportation
|
| 49 |
+
- **Target Users**: Road maintenance departments, urban planners, researchers
|
| 50 |
+
|
| 51 |
+
## Model Selection Guide
|
| 52 |
+
|
| 53 |
+
- **YOLOv9c**: Best overall accuracy (mAP50: 0.792), recommended when accuracy is prioritized over speed
|
| 54 |
+
- **YOLOv8n**: Good balance of accuracy and speed, suitable for real-time applications
|
| 55 |
+
- **YOLOv12n**: Lightweight with competitive accuracy, ideal for edge deployment
|
| 56 |
+
- **YOLOv11**: Efficient architecture with modern optimizations
|
| 57 |
+
- **YOLOv8-FPN**: Fastest inference, suitable for high-throughput scenarios
|
| 58 |
+
|
| 59 |
+
## Performance at Different Confidence Thresholds
|
| 60 |
+
|
| 61 |
+
Based on qualitative evaluation (40 test images, 86 ground truth objects):
|
| 62 |
+
|
| 63 |
+
### YOLOv9c (Recommended)
|
| 64 |
+
- **Conf=0.25**: Precision: 0.804, Recall: 0.831, F1: 0.790
|
| 65 |
+
- **Conf=0.50**: Precision: 0.846, Recall: 0.723, F1: 0.753
|
| 66 |
+
- **Conf=0.70**: Precision: 0.700, Recall: 0.505, F1: 0.558
|
| 67 |
+
|
| 68 |
+
### YOLOv8n
|
| 69 |
+
- **Conf=0.25**: Precision: 0.807, Recall: 0.838, F1: 0.791
|
| 70 |
+
- **Conf=0.50**: Precision: 0.840, Recall: 0.710, F1: 0.751
|
| 71 |
+
- **Conf=0.70**: Precision: 0.600, Recall: 0.437, F1: 0.482
|
| 72 |
+
|
| 73 |
+
## Usage
|
| 74 |
+
|
| 75 |
+
### Installation
|
| 76 |
+
|
| 77 |
+
```bash
|
| 78 |
+
pip install ultralytics opencv-python
|
| 79 |
+
```
|
| 80 |
+
|
| 81 |
+
### Python inference
|
| 82 |
+
|
| 83 |
+
```python
|
| 84 |
+
from ultralytics import YOLO
|
| 85 |
+
|
| 86 |
+
# Load model
|
| 87 |
+
model = YOLO("yolov9c.pt")
|
| 88 |
+
|
| 89 |
+
# Run inference
|
| 90 |
+
results = model("path/to/image.jpg")
|
| 91 |
+
|
| 92 |
+
# Visualize results
|
| 93 |
+
results[0].show()
|
| 94 |
+
```
|
| 95 |
+
|
| 96 |
+
### Limitations
|
| 97 |
+
|
| 98 |
+
- Models trained on specific road conditions; performance may vary on different terrain or weather conditions
|
| 99 |
+
- Detection accuracy depends on image quality and resolution
|
| 100 |
+
- Models may have difficulty with very small or heavily obscured potholes
|
| 101 |
+
- Performance not validated on night-time or extreme weather images
|