Spaces:
Sleeping
Sleeping
Update README.md
Browse files
README.md
CHANGED
|
@@ -10,3 +10,90 @@ pinned: false
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 10 |
---
|
| 11 |
|
| 12 |
Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
|
| 13 |
+
|
| 14 |
+
# π¦ Traffic Sign Identifier
|
| 15 |
+
|
| 16 |
+
An interactive image classification app for identifying traffic signs using a pretrained **AutoGluon MultiModalPredictor** model hosted on Hugging Face.
|
| 17 |
+
The app provides **predictions with confidence scores**, a clean **Gradio interface**, and user-friendly visualizations.
|
| 18 |
+
|
| 19 |
+
---
|
| 20 |
+
|
| 21 |
+
## β¨ Features
|
| 22 |
+
|
| 23 |
+
- **Traffic Sign Classification**
|
| 24 |
+
Upload or capture an image of a traffic sign and receive predictions.
|
| 25 |
+
|
| 26 |
+
- **Model Integration**
|
| 27 |
+
Uses `cassieli226/sign-identification-automl` trained with AutoGluon, deployed via Hugging Face Hub.
|
| 28 |
+
|
| 29 |
+
- **Configurable Inference**
|
| 30 |
+
- Resize size: adjust input resolution (64β512 px).
|
| 31 |
+
- Top-k predictions: see multiple likely classes.
|
| 32 |
+
- Probability threshold: filter low-confidence results.
|
| 33 |
+
|
| 34 |
+
- **Interactive Interface**
|
| 35 |
+
Built with [Gradio](https://gradio.app/) for intuitive user experience, including drag-and-drop upload and webcam capture.
|
| 36 |
+
|
| 37 |
+
- **Styled Output**
|
| 38 |
+
Results are presented with clear visuals: top prediction, confidence %, and a ranked list of alternatives.
|
| 39 |
+
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
## π Project Structure
|
| 43 |
+
|
| 44 |
+
- **`app.py`** β main application with Gradio Blocks interface.
|
| 45 |
+
- **`autogluon_predictor_dir.zip`** β packaged AutoGluon model checkpoint (downloaded from Hugging Face Hub).
|
| 46 |
+
- **`requirements.txt`** β dependencies for running locally or in a Hugging Face Space.
|
| 47 |
+
- **`README.md`** β this documentation.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## π Running the App
|
| 52 |
+
|
| 53 |
+
### 1. Local Setup
|
| 54 |
+
Clone the repository and install dependencies:
|
| 55 |
+
```bash
|
| 56 |
+
pip install -r requirements.txt
|
| 57 |
+
```
|
| 58 |
+
## π Example Usage
|
| 59 |
+
|
| 60 |
+
1. Upload an image of a traffic sign (or use webcam capture).
|
| 61 |
+
2. Adjust resize size, top-k predictions, or probability threshold if desired.
|
| 62 |
+
3. Click **Predict**.
|
| 63 |
+
|
| 64 |
+
Youβll see:
|
| 65 |
+
- Original image preview.
|
| 66 |
+
- Top predicted sign + confidence score.
|
| 67 |
+
- Ranked list of additional predictions with probabilities.
|
| 68 |
+
|
| 69 |
+
---
|
| 70 |
+
|
| 71 |
+
## π Citations & References
|
| 72 |
+
|
| 73 |
+
- **AutoGluon**: Erickson et al., *AutoGluon: AutoML Toolkit for Deep Learning*, [GitHub](https://github.com/autogluon/autogluon).
|
| 74 |
+
- **Gradio**: Abid et al., *Gradio: Hassle-Free Sharing and Testing of ML Models*, [gradio.app](https://gradio.app).
|
| 75 |
+
- **Hugging Face Hub** for model hosting.
|
| 76 |
+
|
| 77 |
+
---
|
| 78 |
+
|
| 79 |
+
## π License
|
| 80 |
+
|
| 81 |
+
This project is distributed under the **MIT License**. See [LICENSE](LICENSE) for details.
|
| 82 |
+
|
| 83 |
+
---
|
| 84 |
+
|
| 85 |
+
## π Acknowledgments
|
| 86 |
+
|
| 87 |
+
- **Model** trained by `cassieli226` and shared via Hugging Face Hub.
|
| 88 |
+
- **App** adapted and deployed by `maryzhang`.
|
| 89 |
+
- Special thanks to classmates and instructors for feedback.
|
| 90 |
+
|
| 91 |
+
---
|
| 92 |
+
|
| 93 |
+
## π€ AI Usage
|
| 94 |
+
|
| 95 |
+
This project made use of **ChatGPT (OpenAI)** during development to:
|
| 96 |
+
- Refactor and debug the Gradio Blocks interface.
|
| 97 |
+
- Improve prediction display styling with HTML/CSS.
|
| 98 |
+
- Draft and polish this README for clarity and completeness.
|
| 99 |
+
|