Update README.md
Browse files
README.md
CHANGED
|
@@ -1,171 +1,138 @@
|
|
| 1 |
-
|
| 2 |
-
license: mit
|
| 3 |
-
---
|
| 4 |
-
Waste Classification - YOLOv8 Large (HighRes)
|
| 5 |
-
|
| 6 |
-
ποΈ Model Summary
|
| 7 |
-
|
| 8 |
-
This model is a fine-tuned version of YOLOv8 Large (yolov8l) designed for the detection and classification of 12 different types of waste materials. It was trained on high-resolution images (1280px) to capture fine details in trash objects.
|
| 9 |
-
|
| 10 |
-
This project was developed by Kendrick as a Capstone Mini-Project for the REA AI Engineering Bootcamp.
|
| 11 |
-
|
| 12 |
-
Model Architecture: YOLOv8-Large
|
| 13 |
-
|
| 14 |
-
Task: Object Detection
|
| 15 |
-
|
| 16 |
-
Input Resolution: 1280x1280
|
| 17 |
-
|
| 18 |
-
Classes: 12
|
| 19 |
-
|
| 20 |
-
π― Intended Use
|
| 21 |
-
|
| 22 |
-
This model is intended to be used for:
|
| 23 |
-
|
| 24 |
-
Automated waste sorting systems.
|
| 25 |
-
|
| 26 |
-
Educational apps for recycling.
|
| 27 |
-
|
| 28 |
-
Environmental monitoring.
|
| 29 |
-
|
| 30 |
-
π Evaluation Results
|
| 31 |
-
|
| 32 |
-
The model was evaluated on a validation set of 1,935 images.
|
| 33 |
-
|
| 34 |
-
Metric
|
| 35 |
-
|
| 36 |
-
Score
|
| 37 |
-
|
| 38 |
-
Description
|
| 39 |
-
|
| 40 |
-
mAP@50
|
| 41 |
-
|
| 42 |
-
0.783
|
| 43 |
-
|
| 44 |
-
Strong overall performance across all classes.
|
| 45 |
-
|
| 46 |
-
Precision
|
| 47 |
|
| 48 |
-
|
|
|
|
| 49 |
|
| 50 |
-
|
| 51 |
-
|
| 52 |
-
Recall
|
| 53 |
-
|
| 54 |
-
0.733
|
| 55 |
-
|
| 56 |
-
Good ability to find objects, though struggles with organic waste.
|
| 57 |
-
|
| 58 |
-
mAP@50-95
|
| 59 |
-
|
| 60 |
-
0.576
|
| 61 |
-
|
| 62 |
-
High localization accuracy (bounding boxes are tight).
|
| 63 |
-
|
| 64 |
-
Performance by Class
|
| 65 |
-
|
| 66 |
-
The model excels at distinct rigid objects but struggles with amorphous organic matter.
|
| 67 |
-
|
| 68 |
-
Class
|
| 69 |
-
|
| 70 |
-
mAP@50
|
| 71 |
-
|
| 72 |
-
Status
|
| 73 |
-
|
| 74 |
-
Insight
|
| 75 |
-
|
| 76 |
-
Clothes
|
| 77 |
-
|
| 78 |
-
0.987
|
| 79 |
|
| 80 |
-
|
| 81 |
|
| 82 |
-
|
| 83 |
|
| 84 |
-
|
|
|
|
|
|
|
| 85 |
|
| 86 |
-
|
| 87 |
|
| 88 |
-
|
| 89 |
|
| 90 |
-
|
| 91 |
|
| 92 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
|
| 95 |
|
| 96 |
-
|
| 97 |
|
| 98 |
-
|
| 99 |
|
| 100 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 101 |
|
| 102 |
-
|
| 103 |
|
| 104 |
-
|
| 105 |
|
| 106 |
-
|
| 107 |
|
| 108 |
-
|
| 109 |
|
| 110 |
-
|
|
|
|
|
|
|
| 111 |
|
| 112 |
-
|
| 113 |
|
| 114 |
-
|
| 115 |
|
| 116 |
-
|
| 117 |
|
| 118 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 119 |
|
| 120 |
-
|
| 121 |
|
| 122 |
-
|
| 123 |
|
| 124 |
-
|
| 125 |
|
| 126 |
-
|
|
|
|
|
|
|
| 127 |
|
| 128 |
-
False Positives
|
| 129 |
|
| 130 |
-
|
|
|
|
| 131 |
|
| 132 |
-
|
|
|
|
| 133 |
|
| 134 |
-
|
| 135 |
|
| 136 |
-
|
| 137 |
|
| 138 |
-
|
| 139 |
|
| 140 |
-
|
| 141 |
|
| 142 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 143 |
|
| 144 |
-
|
| 145 |
|
| 146 |
-
|
| 147 |
|
| 148 |
-
|
| 149 |
|
| 150 |
-
|
|
|
|
|
|
|
| 151 |
|
| 152 |
-
|
| 153 |
|
|
|
|
| 154 |
from ultralytics import YOLO
|
| 155 |
|
| 156 |
-
# Load
|
| 157 |
model = YOLO("path/to/best.pt")
|
| 158 |
|
| 159 |
-
#
|
| 160 |
results = model("path/to/image.jpg")
|
| 161 |
|
| 162 |
# Display results
|
| 163 |
results[0].show()
|
|
|
|
| 164 |
|
|
|
|
| 165 |
|
| 166 |
-
π¨βπ» Author
|
| 167 |
|
| 168 |
-
Kendrick
|
| 169 |
-
Alumni
|
| 170 |
|
| 171 |
-
This model card
|
|
|
|
| 1 |
+
# ποΈ Waste Classification β YOLOv8 Large (High Resolution)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
|
| 3 |
+
A high-resolution waste-classification model built using **YOLOv8-Large**, fine-tuned to detect and categorize **12 types of waste**.
|
| 4 |
+
This model was developed as a Capstone Mini-Project for the **REA AI Engineering Bootcamp**.
|
| 5 |
|
| 6 |
+
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 7 |
|
| 8 |
+
## π Overview
|
| 9 |
|
| 10 |
+
This project provides a custom object-detection model designed to support:
|
| 11 |
|
| 12 |
+
* β»οΈ **Automated waste-sorting systems**
|
| 13 |
+
* π± **Recycling education applications**
|
| 14 |
+
* π **Environmental monitoring tools**
|
| 15 |
|
| 16 |
+
The model was trained on 1280Γ1280 high-resolution images to better capture fine-grained details common in trash and recyclables.
|
| 17 |
|
| 18 |
+
---
|
| 19 |
|
| 20 |
+
## π§ Model Details
|
| 21 |
|
| 22 |
+
| Property | Value |
|
| 23 |
+
| --------------------- | ---------------------- |
|
| 24 |
+
| **Architecture** | YOLOv8-Large (yolov8l) |
|
| 25 |
+
| **Task** | Object Detection |
|
| 26 |
+
| **Input Size** | 1280 Γ 1280 |
|
| 27 |
+
| **Number of Classes** | 12 |
|
| 28 |
+
| **Base Model** | `ultralytics/yolov8l` |
|
| 29 |
+
| **License** | MIT |
|
| 30 |
|
| 31 |
+
---
|
| 32 |
|
| 33 |
+
## π― Classes
|
| 34 |
|
| 35 |
+
The model detects 12 waste categories, including:
|
| 36 |
|
| 37 |
+
* Clothes
|
| 38 |
+
* Brown-Glass
|
| 39 |
+
* Shoes
|
| 40 |
+
* Plastic
|
| 41 |
+
* Biological
|
| 42 |
+
* (and others)
|
| 43 |
|
| 44 |
+
---
|
| 45 |
|
| 46 |
+
## π Evaluation Results
|
| 47 |
|
| 48 |
+
The model was evaluated on **1,935 validation images**.
|
| 49 |
|
| 50 |
+
### **Overall Performance**
|
| 51 |
|
| 52 |
+
| Metric | Score | Description |
|
| 53 |
+
| ---------- | --------- | ------------------------------------ |
|
| 54 |
+
| **mAP@50** | **0.783** | Strong overall detection performance |
|
| 55 |
|
| 56 |
+
---
|
| 57 |
|
| 58 |
+
### **Performance by Class**
|
| 59 |
|
| 60 |
+
The model performs extremely well on rigid, well-shaped objects but struggles with amorphous organic materials.
|
| 61 |
|
| 62 |
+
| Class | mAP@50 | Status | Insight |
|
| 63 |
+
| --------------- | ------ | ------------------- | ------------------------------- |
|
| 64 |
+
| **Clothes** | 0.987 | π Excellent | Consistent shape and texture |
|
| 65 |
+
| **Brown-Glass** | 0.905 | β
Very Good | Strong geometric patterns |
|
| 66 |
+
| **Shoes** | 0.847 | β
Good | High recall and precision |
|
| 67 |
+
| **Plastic** | 0.706 | β οΈ Moderate | Transparency/deformation issues |
|
| 68 |
+
| **Biological** | 0.580 | β Needs Improvement | Blends into background |
|
| 69 |
|
| 70 |
+
---
|
| 71 |
|
| 72 |
+
## π Deep Dive: Key Insights
|
| 73 |
|
| 74 |
+
### **1. Biological Waste Challenge**
|
| 75 |
|
| 76 |
+
* **Recall:** 0.445
|
| 77 |
+
* **Missed detections:** 741 biological items labeled as background
|
| 78 |
+
* **Cause:** Organic waste lacks distinct shape or edges, making it harder for YOLO to detect.
|
| 79 |
|
| 80 |
+
### **2. False Positives**
|
| 81 |
|
| 82 |
+
* **540 biological false positives** on plain backgrounds
|
| 83 |
+
* Possibly caused by:
|
| 84 |
|
| 85 |
+
* Noisy labels
|
| 86 |
+
* Complex textures that resemble organic material
|
| 87 |
|
| 88 |
+
### **3. Background Confusion**
|
| 89 |
|
| 90 |
+
* Cardboard items have **159 false positives** due to color similarity with ground surfaces.
|
| 91 |
|
| 92 |
+
---
|
| 93 |
|
| 94 |
+
## βοΈ Training Configuration
|
| 95 |
|
| 96 |
+
| Setting | Value |
|
| 97 |
+
| ----------------- | --------------------------------------------------- |
|
| 98 |
+
| **Hardware** | NVIDIA A100-SXM4-40GB |
|
| 99 |
+
| **Training Time** | 6.26 hours |
|
| 100 |
+
| **Epochs** | 50 |
|
| 101 |
+
| **Batch Size** | 8 |
|
| 102 |
+
| **Optimizer** | AdamW (lr = 0.000625) |
|
| 103 |
+
| **Image Size** | 1280 |
|
| 104 |
+
| **Augmentations** | Standard YOLOv8 + Mosaic (disabled final 10 epochs) |
|
| 105 |
|
| 106 |
+
---
|
| 107 |
|
| 108 |
+
## π» Usage
|
| 109 |
|
| 110 |
+
Install Ultralytics:
|
| 111 |
|
| 112 |
+
```bash
|
| 113 |
+
pip install ultralytics
|
| 114 |
+
```
|
| 115 |
|
| 116 |
+
Run inference:
|
| 117 |
|
| 118 |
+
```python
|
| 119 |
from ultralytics import YOLO
|
| 120 |
|
| 121 |
+
# Load model
|
| 122 |
model = YOLO("path/to/best.pt")
|
| 123 |
|
| 124 |
+
# Run inference
|
| 125 |
results = model("path/to/image.jpg")
|
| 126 |
|
| 127 |
# Display results
|
| 128 |
results[0].show()
|
| 129 |
+
```
|
| 130 |
|
| 131 |
+
---
|
| 132 |
|
| 133 |
+
## π¨βπ» Author
|
| 134 |
|
| 135 |
+
**Kendrick**
|
| 136 |
+
Alumni β REA AI Engineering Bootcamp
|
| 137 |
|
| 138 |
+
This README and model card were generated with training logs and evaluation outputs.
|