Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -11,33 +11,91 @@ license: mit
|
|
| 11 |
---
|
| 12 |
# Stop Sign Classifier
|
| 13 |
|
| 14 |
-
This
|
| 15 |
-
|
| 16 |
-
|
| 17 |
-
|
| 18 |
-
|
| 19 |
-
|
| 20 |
-
|
| 21 |
-
-
|
| 22 |
-
|
| 23 |
-
|
| 24 |
-
-
|
| 25 |
-
|
| 26 |
-
|
| 27 |
-
|
| 28 |
-
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
|
| 32 |
-
|
| 33 |
-
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
|
| 38 |
-
|
| 39 |
-
-
|
| 40 |
-
-
|
| 41 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 42 |
|
| 43 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
| 11 |
---
|
| 12 |
# Stop Sign Classifier
|
| 13 |
|
| 14 |
+
This Hugging Face Space hosts a **Gradio app** that predicts whether an uploaded traffic image contains a **Stop Sign**.
|
| 15 |
+
It uses a **classmate’s AutoGluon MultiModal model** trained during Homework 2.
|
| 16 |
+
|
| 17 |
+
---
|
| 18 |
+
|
| 19 |
+
## Dataset & Model Card
|
| 20 |
+
|
| 21 |
+
- **Dataset:** Traffic sign images (binary classification: Stop Sign vs. No Stop Sign).
|
| 22 |
+
- **Model Repo:** [scottymcgee/image-classifier](https://huggingface.co/scottymcgee/image-classifier)
|
| 23 |
+
- **Framework:** [AutoGluon MultiModal](https://auto.gluon.ai/stable/index.html)
|
| 24 |
+
- **Task:** Binary classification → predict `Stop Sign` or `No Stop Sign`.
|
| 25 |
+
|
| 26 |
+
### Input Features
|
| 27 |
+
| Feature | Type | Description |
|
| 28 |
+
|---------|----------------|---------------------------|
|
| 29 |
+
| Image | JPG/PNG/Webcam | Traffic scene input image |
|
| 30 |
+
|
| 31 |
+
### Label
|
| 32 |
+
- `0 → 🚫 No Stop Sign`
|
| 33 |
+
- `1 → 🛑 Stop Sign`
|
| 34 |
+
|
| 35 |
+
---
|
| 36 |
+
|
| 37 |
+
## App Interface
|
| 38 |
+
|
| 39 |
+
- **Widgets:**
|
| 40 |
+
- `Image Upload` (supports drag and drop or webcam).
|
| 41 |
+
- `Confidence Threshold` slider (filter low confidence results).
|
| 42 |
+
|
| 43 |
+
- **Output:**
|
| 44 |
+
- Original uploaded image.
|
| 45 |
+
- Preprocessed 256×256 version (what the model actually sees).
|
| 46 |
+
- Human readable prediction with probabilities.
|
| 47 |
+
|
| 48 |
+
- **Examples:** 3 preloaded example images for quick testing.
|
| 49 |
+
- **Validation:** Ensures uploaded files are valid images and not oversized.
|
| 50 |
+
|
| 51 |
+
---
|
| 52 |
+
|
| 53 |
+
## Example Usage
|
| 54 |
+
|
| 55 |
+
| Example Image | Predicted Class |
|
| 56 |
+
|-------------------|-----------------|
|
| 57 |
+
| `stop1.jpg` | 🛑 Stop Sign |
|
| 58 |
+
| `no_stop1.jpg` | 🚫 No Stop Sign |
|
| 59 |
+
| `stop2.jpg` | 🛑 Stop Sign |
|
| 60 |
+
|
| 61 |
+
---
|
| 62 |
+
|
| 63 |
+
## Technical Details
|
| 64 |
+
|
| 65 |
+
- **Backend:** AutoGluon `MultiModalPredictor` loaded from classmate’s Hugging Face repo.
|
| 66 |
+
- **Interface:** [Gradio](https://www.gradio.app/).
|
| 67 |
+
- **Deployment:** Hugging Face Spaces (`sdk: gradio`).
|
| 68 |
+
- **Environment:** Python 3.10, pinned requirements.
|
| 69 |
+
|
| 70 |
+
---
|
| 71 |
+
|
| 72 |
+
## Limitations
|
| 73 |
+
|
| 74 |
+
- **Binary labels only:** App only distinguishes `Stop Sign` vs. `No Stop Sign`.
|
| 75 |
+
- **Dataset limitations:** Accuracy depends heavily on dataset quality (lighting, occlusion, unusual traffic scenes).
|
| 76 |
+
- **Threshold behavior:** High thresholds may filter out useful predictions.
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
## Future Improvements
|
| 81 |
+
|
| 82 |
+
- Expand dataset to include more traffic sign types (yield, speed limit, etc.).
|
| 83 |
+
- Add bounding box detection to highlight the Stop Sign in the image.
|
| 84 |
+
- Display top-k predictions dynamically instead of threshold filtering.
|
| 85 |
+
- Improve UI with tooltips and confidence visualization (bar chart).
|
| 86 |
+
|
| 87 |
+
---
|
| 88 |
+
|
| 89 |
+
## AI Disclosure
|
| 90 |
+
|
| 91 |
+
This app was developed with support from AI assistance in:
|
| 92 |
+
|
| 93 |
+
- Adding input validation and a configurable threshold slider
|
| 94 |
+
- Streamlining the Gradio interface for better usability
|
| 95 |
+
- Drafting the initial version of this README
|
| 96 |
+
|
| 97 |
+
All core modeling and training artifacts come from a **classmate’s AutoGluon model**.
|
| 98 |
+
|
| 99 |
+
---
|
| 100 |
|
| 101 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|