Downloads · 30 days
295
22% of all-time downloads
Harisanth/Pothole-Finetuned-YOLOv8
Pothole-Finetuned-YOLOv8 is a object detection model from Harisanth. Use it when you need objects located in an image. It is set up for ultralytics. The card lists the license as mit.
A fine-tuned YOLOv8 model for pothole detection in road images. This model is optimized for detecting potholes with high precision and is production-ready.
Downloads · 30 days
295
22% of all-time downloads
All-time downloads
1.3K
Public
Repo size
22.5 MB
Likes
2
Public
Click a slice to open those files.
.pt22.5 MB · 100%
From the Hugging Face model README
A fine-tuned YOLOv8 model for pothole detection in road images. This model is optimized for detecting potholes with high precision and is production-ready.
This model was trained on a comprehensive pothole detection dataset with data augmentation and regularization techniques applied.
pip install ultralytics opencv-python pillow
from ultralytics import YOLO
from PIL import Image
# Load model from Hugging Face
model = YOLO('hf://your-username/Pothole-Finetuned-YOLOv8')
# Inference on image
results = model.predict(source='image.jpg', conf=0.28)
# Print results
for r in results:
print(r.boxes)
from ultralytics import YOLO
import cv2
# Load model
model = YOLO('hf://your-username/Pothole-Finetuned-YOLOv8')
# Inference on video
results = model.predict(source='video.mp4', conf=0.28, save=True)
# Custom confidence threshold
results = model.predict(source='image.jpg', conf=0.35)
# Get results in different formats
for result in results:
boxes = result.boxes.xyxy # Box coordinates
confidences = result.boxes.conf # Confidence scores
class_ids = result.boxes.cls # Class IDs
from ultralytics import YOLO
model = YOLO('hf://your-username/Pothole-Finetuned-YOLOv8')
# Batch inference
results = model.predict(source='image_folder/', batch=32, conf=0.28)
# Process results
for result in results:
for box in result.boxes:
print(f"Detection: {box.xyxy}, Confidence: {box.conf}")
You can fine-tune this model on your own pothole dataset:
from ultralytics import YOLO
# Load pre-trained model
model = YOLO('hf://your-username/Pothole-Finetuned-YOLOv8')
# Train on custom dataset
results = model.train(
data='path/to/dataset/data.yaml',
epochs=50,
imgsz=640,
batch=32,
device=0, # GPU device number
patience=50
)
Your dataset should follow YOLO format:
dataset/
├── images/
│ ├── train/
│ │ └── *.jpg
│ ├── val/
│ │ └── *.jpg
│ └── test/
│ └── *.jpg
├── labels/
│ ├── train/
│ │ └── *.txt
│ ├── val/
│ │ └── *.txt
│ └── test/
│ └── *.txt
└── data.yaml
path: /path/to/dataset
train: images/train
val: images/val
test: images/test
nc: 1 # number of classes
names: ['pothole'] # class names
This model and its weights are provided as-is for research and commercial use.
For issues, questions, or feedback about this model, please create an issue in the repository.
If you use this model in your research, please cite:
@software{pothole_yolov8_2024,
title={Pothole Detection YOLOv8 Fine-tuned Model},
author={Your Name},
year={2024},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/your-username/Pothole-Finetuned-YOLOv8}}
}
Last Updated: January 2026