Spaces:
Build error
Build error
| title: Pneumonia Detection Assistant | |
| emoji: 🫁 | |
| colorFrom: blue | |
| colorTo: red | |
| sdk: gradio | |
| sdk_version: 4.44.0 | |
| app_file: app.py | |
| pinned: false | |
| license: mit | |
| # Pneumonia Detection Assistant | |
| A medical AI assistant that analyzes chest X-ray images to detect signs of pneumonia using a Vision Transformer (ViT) model. | |
| ## Features | |
| - **Multi-class Classification**: Distinguishes between Normal, Viral Pneumonia, and Bacterial Pneumonia | |
| - **Attention Visualization**: Shows heatmaps highlighting areas the model focuses on for diagnosis | |
| - **User-friendly Interface**: Simple drag-and-drop interface built with Gradio | |
| ## Model Details | |
| - **Architecture**: Vision Transformer (ViT) base model fine-tuned on chest X-ray data | |
| - **Base Model**: `google/vit-base-patch16-224-in21k` | |
| - **Dataset**: Chest X-Ray Images (Pneumonia) dataset | |
| - **Classes**: | |
| - Normal | |
| - Pneumonia (Bacterial) | |
| - Pneumonia (Viral) | |
| ## Usage | |
| 1. Upload a chest X-ray image (PNG, JPG, or JPEG format) | |
| 2. View the classification results with confidence scores | |
| 3. Examine the attention heatmap to understand the model's decision-making process | |
| ## Medical Disclaimer | |
| ⚠️ **IMPORTANT**: This application is for educational and research purposes only. It is NOT a diagnostic tool and should not be used for medical diagnosis. Always consult with qualified healthcare professionals for medical advice and diagnosis. | |
| ## Technical Implementation | |
| The model uses: | |
| - **Transformers**: Hugging Face transformers library | |
| - **PyTorch**: Deep learning framework | |
| - **Gradio**: Web interface | |
| - **OpenCV & Matplotlib**: Image processing and visualization | |
| ## Example Images | |
| The app includes sample images demonstrating different conditions: | |
| - Normal chest X-ray | |
| - Bacterial pneumonia | |
| - Viral pneumonia |