maryzhang's picture
Update README.md
0aafa2b verified
|
Raw History Blame Contribute Delete
3.06 kB

A newer version of the Gradio SDK is available: 6.31.0

Upgrade
metadata
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 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:

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.
  • Gradio: Abid et al., Gradio: Hassle-Free Sharing and Testing of ML Models, gradio.app.
  • Hugging Face Hub for model hosting.

πŸ“œ License

This project is distributed under the MIT License. See 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.