Instructions to use ShihoAI/yolov8s-garbage-detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- ultralytics
How to use ShihoAI/yolov8s-garbage-detection 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("ShihoAI/yolov8s-garbage-detection", "<weights>.pt") model = YOLO(weights) source = 'http://images.cocodataset.org/val2017/000000039769.jpg' model.predict(source=source, save=True) - Notebooks
- Google Colab
- Kaggle
YOLOv8s 6-Class Garbage Detection Model
This model is a fine-tuned version of YOLOv8s for local offline auxiliary recognition of six classes of domestic waste.
Model Performance
Under the unified 6-class evaluation protocol, the mAP@50 improved from 11.565% (approx. 12%) to 39.42%. Note: Limited by the dataset size (e.g., only 48 bounding boxes for biological waste) and weak localization annotations, the current metric is a reasonable engineering result under the existing data conditions.
Class List
Untrainable classes from the original dataset (glass: 0 boxes, textile: 4 boxes) were excluded, resulting in 6 final classes:
- 0: biological
- 1: cardboard
- 2: metal
- 3: paper
- 4: plastic
- 5: other
Quick Start
from ultralytics import YOLO
# Load your model
model = YOLO("ShihoAI/yolov8s-garbage-detection")
# Inference
results = model("path/to/your/image.jpg")
results[0].show()
- Downloads last month
- 55