Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,13 +1,96 @@
|
|
| 1 |
---
|
| 2 |
title: Retail Shelf Detection
|
| 3 |
-
emoji:
|
| 4 |
-
colorFrom:
|
| 5 |
-
colorTo:
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.16.0
|
| 8 |
python_version: '3.13'
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
|
|
|
|
|
|
| 11 |
---
|
| 12 |
|
| 13 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
title: Retail Shelf Detection
|
| 3 |
+
emoji: π
|
| 4 |
+
colorFrom: blue
|
| 5 |
+
colorTo: indigo
|
| 6 |
sdk: gradio
|
| 7 |
sdk_version: 6.16.0
|
| 8 |
python_version: '3.13'
|
| 9 |
app_file: app.py
|
| 10 |
pinned: false
|
| 11 |
+
license: mit
|
| 12 |
+
short_description: YOLOv8 retail shelf product detection and compliance scoring
|
| 13 |
---
|
| 14 |
|
| 15 |
+
# π Retail Shelf Detection β AI Prototype
|
| 16 |
+
|
| 17 |
+
An AI-powered retail shelf analysis tool built with **YOLOv8 + Gradio**.
|
| 18 |
+
Upload a shelf photo taken by a field rep β model detects every product β compliance score is calculated automatically.
|
| 19 |
+
|
| 20 |
+
---
|
| 21 |
+
|
| 22 |
+
## π How to Use
|
| 23 |
+
|
| 24 |
+
1. Upload a shelf photo (JPG or PNG)
|
| 25 |
+
2. Adjust the **Confidence %** slider β lower means more detections
|
| 26 |
+
3. Set your **Compliance threshold %** β the minimum fill rate to pass
|
| 27 |
+
4. Click **Run Detection**
|
| 28 |
+
|
| 29 |
+
The model draws bounding boxes around every product and tells you whether the shelf is compliant.
|
| 30 |
+
|
| 31 |
+
---
|
| 32 |
+
|
| 33 |
+
## π What It Detects
|
| 34 |
+
|
| 35 |
+
| Detection | Meaning |
|
| 36 |
+
|---|---|
|
| 37 |
+
| **Products on shelf** | Items present and correctly stocked |
|
| 38 |
+
| **Empty slots** | Out-of-stock or missing products |
|
| 39 |
+
| **Shelf fill rate** | Products Γ· (Products + Empty) Γ 100 |
|
| 40 |
+
| **Compliance status** | β
Compliant if fill rate β₯ threshold |
|
| 41 |
+
|
| 42 |
+
---
|
| 43 |
+
|
| 44 |
+
## π§ Model
|
| 45 |
+
|
| 46 |
+
| Detail | Info |
|
| 47 |
+
|---|---|
|
| 48 |
+
| Architecture | YOLOv8s (small) |
|
| 49 |
+
| Fine-tuned on | Roboflow Retail Shelf Detection dataset |
|
| 50 |
+
| Training | 50 epochs, 640Γ640 input size |
|
| 51 |
+
| Task | Object detection β product presence & counting |
|
| 52 |
+
|
| 53 |
+
---
|
| 54 |
+
|
| 55 |
+
## π Files in This Space
|
| 56 |
+
|
| 57 |
+
```
|
| 58 |
+
app.py β Gradio application
|
| 59 |
+
requirements.txt β Python dependencies
|
| 60 |
+
best.pt β Fine-tuned YOLOv8s model weights
|
| 61 |
+
README.md β This file
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
---
|
| 65 |
+
|
| 66 |
+
## βοΈ Sliders Explained
|
| 67 |
+
|
| 68 |
+
**Confidence % (default: 30%)**
|
| 69 |
+
How certain the model must be before drawing a box.
|
| 70 |
+
- Lower β more boxes, catches more products but may include false positives
|
| 71 |
+
- Higher β fewer boxes, only high-confidence detections
|
| 72 |
+
|
| 73 |
+
**Compliance threshold % (default: 70%)**
|
| 74 |
+
The minimum shelf fill rate the client requires.
|
| 75 |
+
- If fill rate β₯ threshold β β
COMPLIANT
|
| 76 |
+
- If fill rate < threshold β β NON-COMPLIANT
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## ποΈ Part of the Retail Field Execution AI Platform
|
| 81 |
+
|
| 82 |
+
This prototype demonstrates the **core detection engine**. The full production system adds:
|
| 83 |
+
|
| 84 |
+
- π·οΈ SKU-level classification (Pepsi vs Coke vs Lays by name)
|
| 85 |
+
- π POSM detection (posters, danglers, shelf units, CTUs)
|
| 86 |
+
- π Execution dashboard with sales hierarchy rollups
|
| 87 |
+
- πΊοΈ Store coverage and customer coverage metrics
|
| 88 |
+
- π Full audit trail β every compliance % links back to source image
|
| 89 |
+
|
| 90 |
+
---
|
| 91 |
+
|
| 92 |
+
## π οΈ Built With
|
| 93 |
+
|
| 94 |
+
- [Ultralytics YOLOv8](https://github.com/ultralytics/ultralytics)
|
| 95 |
+
- [Gradio](https://gradio.app)
|
| 96 |
+
- [Roboflow](https://roboflow.com) β dataset and labeling
|