stop-sign-predictor / README.md
bareethul's picture
Update README.md
83c04ad verified
---
title: Stop Sign Predictor
emoji: 🦀
colorFrom: yellow
colorTo: yellow
sdk: gradio
sdk_version: 5.47.2
app_file: app.py
pinned: false
license: mit
---
# Stop Sign Classifier
This Hugging Face Space hosts a **Gradio app** that predicts whether an uploaded traffic image contains a **Stop Sign**.
It uses a **classmate’s AutoGluon MultiModal model** trained during Homework 2.
---
## Dataset & Model Card
- **Dataset:** Traffic sign images (binary classification: Stop Sign vs. No Stop Sign).
- **Dataset Information:** This app uses the [ecopus-sign--classification](https://huggingface.co/datasets/ecopus/sign_identification) The dataset is licensed under **MIT** and consists of **~300 records** in Parquet format (split into `original` and `augmented`)
- **Model Repo:** [scottymcgee/image-classifier](https://huggingface.co/scottymcgee/image-classifier)
- **Framework:** [AutoGluon MultiModal](https://auto.gluon.ai/stable/index.html)
- **Task:** Binary classification → predict `Stop Sign` or `No Stop Sign`.
### Input Features
| Feature | Type | Description |
|---------|----------------|---------------------------|
| Image | JPG/PNG/Webcam | Traffic scene input image |
### Label
- `0 → 🚫 No Stop Sign`
- `1 → 🛑 Stop Sign`
---
## App Interface
- **Widgets:**
- `Image Upload` (supports drag and drop or webcam).
- `Confidence Threshold` slider (filter low confidence results).
- **Output:**
- Original uploaded image.
- Preprocessed 256×256 version (what the model actually sees).
- Human readable prediction with probabilities.
- **Examples:** 3 preloaded example images for quick testing.
- **Validation:** Ensures uploaded files are valid images and not oversized.
---
## Example Usage
| Example Image | Predicted Class |
|-------------------|-----------------|
| `stop1.jpg` | 🛑 Stop Sign |
| `no_stop1.jpg` | 🚫 No Stop Sign |
| `stop2.jpg` | 🛑 Stop Sign |
---
## Technical Details
- **Backend:** AutoGluon `MultiModalPredictor` loaded from classmate’s Hugging Face repo.
- **Interface:** [Gradio](https://www.gradio.app/).
- **Deployment:** Hugging Face Spaces (`sdk: gradio`).
- **Environment:** Python 3.10, pinned requirements.
---
## Limitations
- **Binary labels only:** App only distinguishes `Stop Sign` vs. `No Stop Sign`.
- **Dataset limitations:** Accuracy depends heavily on dataset quality (lighting, occlusion, unusual traffic scenes).
- **Threshold behavior:** High thresholds may filter out useful predictions.
---
## Future Improvements
- Expand dataset to include more traffic sign types (yield, speed limit, etc.).
- Add bounding box detection to highlight the Stop Sign in the image.
- Display top-k predictions dynamically instead of threshold filtering.
- Improve UI with tooltips and confidence visualization (bar chart).
---
## AI Disclosure
This app was developed with support from AI assistance in:
- Adding input validation and a configurable threshold slider
- Streamlining the Gradio interface for better usability
- Drafting the initial version of this README
All core modeling and training artifacts come from a **classmate’s AutoGluon model**.
---
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference