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