bareethul commited on
Commit
b3e51d0
·
verified ·
1 Parent(s): 6a7b3f5

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +86 -28
README.md CHANGED
@@ -11,33 +11,91 @@ license: mit
11
  ---
12
  # Stop Sign Classifier
13
 
14
- This is a simple Gradio app that wraps an **AutoGluon MultiModalPredictor** trained on images of stop signs.
15
- Upload a traffic sign and the model will predict whether it contains a **Stop Sign**.
16
-
17
- ## Features
18
- - Upload your own image (PNG/JPG) or use your webcam.
19
- - Get predictions with **probabilities** (Stop Sign vs No Stop Sign).
20
- - Preview **example images** for quick testing.
21
- - Built with [AutoGluon](https://auto.gluon.ai/stable/index.html) + [Gradio](https://gradio.app/).
22
-
23
- ## How It Works
24
- - The trained model is downloaded directly from Hugging Face Hub (`scottymcgee/image-classifier`).
25
- - Images are preprocessed (resized to 256x256) and passed into the model.
26
- - Probabilities are returned and displayed in a simple UI.
27
-
28
- ## Example Inputs
29
- - Clear stop sign picture
30
- - Street scene without stop sign
31
- - Mixed images
32
-
33
- ## Files in this Space
34
- - `app.py`: Gradio interface.
35
- - `requirements.txt`: Dependencies.
36
- - `README.md`: This documentation.
37
-
38
- ## Notes
39
- - This app is for **educational/demo** purposes.
40
- - Model was trained by a classmate as part of Homework 2 (CMU 24679).
41
- - Deployment exercise for **Driving an Image Network Model with Gradio** assignment.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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