This project leverages deep learning techniques to automatically detect pneumonia from chest X-ray images. It utilizes a Convolutional Neural Network (CNN) to classify X-ray scans as either Normal or Pneumonia.
git clone https://github.com/Alex0-7/Pneumonia-Detection-using-Deep-Learning.git
Download the chest X-ray dataset from Kaggle and extract it into your project directory:
Dataset Link: Chest X-Ray Pneumonia Dataset
Install the required dependencies using the requirements.txt
file:
pip install -r requirements.txt
Before running the training script, update the following lines in Pneumonia.py
with your local dataset paths:
- Line 10
- Line 11
- Line 16
- Line 32
- Line 36
Then, run the script:
python Pneumonia.py
To evaluate the model on validation data:
- Open the
test.py
file. - Update line 11 with the correct path to the
PNEUMONIA
folder inside theval
directory. - Run the test script:
python test.py
The model will output predictions for the input X-ray images, indicating whether the image is Normal or shows signs of Pneumonia.
- Ensure the dataset folder structure aligns with the script expectations.
- Training time may vary based on your hardware (e.g., CPU vs GPU).
- Dataset provided by Paul Mooney on Kaggle
- Inspired by real-world applications in medical image analysis and diagnostics.
Feel free to contribute, suggest improvements, or report issues!