Baction commited on
Commit
2b6cd1e
Β·
verified Β·
1 Parent(s): 6237e64

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +87 -4
README.md CHANGED
@@ -1,13 +1,96 @@
1
  ---
2
  title: Retail Shelf Detection
3
- emoji: 🐒
4
- colorFrom: purple
5
- colorTo: pink
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
- Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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