This project aims to classify chest X-ray images into three categories: COVID-19, Pneumonia, and Normal, using a Convolutional Neural Network (CNN) model. The project also includes a deployment using Streamlit for interactive web-based prediction of chest X-ray images.
- Test Images : Sample Images for Testing Model
The dataset used for this project consists of a collection of chest X-ray images obtained from Chest X-Ray Images Dataset (Kaggle), including COVID-19-positive cases, pneumonia cases, and normal cases.
- Convolutional layer 1: 16 filters, 3x3 kernel, ReLU activation, followed by MaxPooling2D layer (2x2 pool size).
- Convolutional layer 2: 64 filters, 3x3 kernel, ReLU activation, padding set to 'same', followed by MaxPooling2D layer (2x2 pool size).
- Dropout layer (0.25) added after Convolutional layer 2.
- Convolutional layer 3: 128 filters, 3x3 kernel, ReLU activation, padding set to 'same', followed by MaxPooling2D layer (2x2 pool size).
- Dropout layer (0.3) added after Convolutional layer 3.
- Convolutional layer 4: 128 filters, 3x3 kernel, ReLU activation, padding set to 'same', followed by MaxPooling2D layer (2x2 pool size).
- Dropout layer (0.4) added after Convolutional layer 4.
- Output from convolutional layers is flattened using a Flatten layer.
- First dense layer: 128 neurons, ReLU activation.
- Dropout layer (0.25) added after the first dense layer.
- Second dense layer: 64 neurons, ReLU activation.
- Output layer: 3 neurons (one for each class), softmax activation for multi-class classification.
To run the Streamlit app, follow these steps:
-
Install the required dependencies, Run the Streamlit app:
pip install -r requirements.txt streamlit run predict.py
-
Upload a chest X-ray image and click the "Predict" button to get the Result.