Downloads · 30 days
24.6K
95% of all-time downloads
esapzoi/litter-detection-yolov8
litter-detection-yolov8 is a object detection model from esapzoi. Use it when you need objects located in an image. It is set up for ultralytics. The card lists the license as mit.
This model detects plastic litter (bags and bottles) in images using YOLOv8.
Downloads · 30 days
24.6K
95% of all-time downloads
All-time downloads
25.8K
Public
Repo size
87.4 MB
Likes
2
Public
Click a slice to open those files.
.pt6.2 MB · 100%
From the Hugging Face model README
This model detects plastic litter (bags and bottles) in images using YOLOv8.
| Parameter | Value |
|---|---|
| Epochs | 8 |
| Batch Size | 16 |
| Image Size | 640px |
| Optimizer | AdamW |
| Learning Rate | 0.001 |
pip install ultralytics huggingface_hub
from ultralytics import YOLO
from huggingface_hub import hf_hub_download
# Download model
model_path = hf_hub_download(
repo_id="esapzoi/litter-detection-yolov8",
filename="best.pt"
)
# Load model
model = YOLO(model_path)
# Run inference
results = model.predict("path/to/image.jpg", conf=0.25)
# Process results
for result in results:
boxes = result.boxes
for box in boxes:
class_id = int(box.cls[0])
confidence = float(box.conf[0])
class_name = model.names[class_id]
print(f"Detected: {class_name} ({confidence:.2%})")
# Process multiple images
results = model.predict(["img1.jpg", "img2.jpg", "img3.jpg"])
# Save annotated images
for i, result in enumerate(results):
result.save(filename=f"result_{i}.jpg")
| ID | Class Name |
|---|---|
| 0 | Litter |
Use this model for litter detection systems, environmental monitoring, and waste management applications.
If you use this model, please cite:
@misc{litter_detection_yolov8,
author = {Your Name},
title = {Litter Detection with YOLOv8},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/esapzoi/litter-detection-yolov8}
}
MIT License
Model trained on plastic litter detection dataset focusing on bags and bottles.