Spaces:
Sleeping
Sleeping
| title: Image Gradio | |
| emoji: ๐ | |
| colorFrom: yellow | |
| colorTo: blue | |
| sdk: gradio | |
| sdk_version: 5.47.2 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| short_description: Stop sign image predictor interface | |
| # Stop Sign Detector | |
| A computer vision application that detects whether an image contains a stop sign using AutoGluon's MultiModalPredictor. | |
| ## Overview | |
| This application uses deep learning to classify images into two categories: | |
| - **Stop Sign**: Image contains a stop sign | |
| - **Not a Stop Sign**: Image does not contain a stop sign | |
| The model analyzes uploaded images in real-time and provides confidence scores for each class. | |
| ## Features | |
| - **Image Upload**: Upload images from your device or capture via webcam | |
| - **Real-time Classification**: Instant predictions as soon as you upload an image | |
| - **Confidence Scores**: See probability distribution across both classes | |
| - **Example Images**: Pre-loaded examples to test the model | |
| - **Multiple Input Sources**: Upload files or use your webcam | |
| ## How to Use | |
| 1. **Upload an Image**: | |
| - Click the image area to upload from your device | |
| - Or click "webcam" to capture a photo in real-time | |
| 2. **View Results**: | |
| - The model will automatically analyze the image | |
| - See the predicted class and confidence percentages | |
| 3. **Try Examples**: | |
| - Click on the example images to see how the model performs | |
| ## Model Details | |
| - **Framework**: AutoGluon MultiModalPredictor | |
| - **Task**: Binary Image Classification | |
| - **Model Repository**: `samder03/2025-24679-image-autogluon-predictor` | |
| - **Input**: RGB images (any size, automatically preprocessed) | |
| - **Output**: Binary classification with probability scores | |
| ### Classes | |
| | Class ID | Label | Description | | |
| |----------|-------|-------------| | |
| | 0 | Not a Stop Sign | Image does not contain a stop sign | | |
| | 1 | Stop Sign | Image contains a stop sign | | |
| ## Technical Architecture | |
| The application: | |
| 1. Accepts images via Gradio interface (upload or webcam) | |
| 2. Saves the image temporarily to disk | |
| 3. Loads the image into a pandas DataFrame (AutoGluon format) | |
| 4. Runs inference using the MultiModalPredictor | |
| 5. Returns probability scores for both classes | |
| ## Use Cases | |
| - **Traffic Sign Recognition**: Component for autonomous vehicle systems | |
| - **Road Safety Analysis**: Automated traffic sign inventory and monitoring | |
| - **Educational Tool**: Demonstrating computer vision and deep learning | |
| - **Dataset Validation**: Quickly verify stop sign annotations in datasets | |
| ## Limitations | |
| - Model is specifically trained for stop signs only | |
| - Performance may vary with: | |
| - Image quality and resolution | |
| - Lighting conditions | |
| - Viewing angles and partial occlusions | |
| - International stop sign variations | |
| - Not intended for real-time safety-critical applications without further validation | |
| ## Performance Considerations | |
| - First prediction may take longer due to model loading | |
| - Subsequent predictions are faster (model cached in memory) | |
| - Image preprocessing is automatic | |
| ## Requirements | |
| ```txt | |
| gradio | |
| autogluon.multimodal | |
| pandas | |
| Pillow | |
| huggingface_hub |