This project is a web-based application that leverages a deep learning model to predict whether a given chest X-ray indicates pneumonia. The application is implemented using Streamlit, PyTorch, and other essential libraries to provide an easy-to-use interface for medical image analysis.
- Project Overview
- Features
- Architecture
- Installation and Usage
- Model Training
- Results
- Future Work
- Contributing
- License
This project aims to assist healthcare professionals and individuals by providing an AI-driven tool for pneumonia detection using chest X-ray images. The web app accepts an uploaded image, preprocesses it, and outputs a prediction along with a confidence score. It serves as an informational tool and emphasizes that it should not replace professional medical diagnosis.
- Upload and Analyze X-Ray Images: Users can upload chest X-ray images in JPEG format for analysis.
- Deep Learning Model: Powered by a convolutional neural network (CNN) based on an extended TinyVGG architecture.
- Real-Time Predictions: Displays the prediction result (Normal or Pneumonia) with a confidence score.
- User-Friendly Interface: Built with Streamlit for intuitive interaction.
The project employs a custom CNN architecture with the following key components:
- Multiple convolutional blocks with
ReLU
activation andMaxPooling
. - Fully connected layer for classification.
- Grayscale input preprocessing.
- Streamlit: For building the interactive web application.
- PyTorch: For model loading, inference, and tensor operations.
- Pillow (PIL): For image processing.
- Torchvision: For image transformations.
- Python 3.8 or higher.
- PyTorch (compatible with your hardware and OS).
- Streamlit and other required Python libraries.