Skip to content

Harbringe/lung-xray-classification

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

lung-xray-classification

Welcome to the lung xray classification repository! This Jupyter Notebook focuses on classifying lung xrays of patients either having pneumonia, covid or healthy lungs. The dataset is organized into 3 folders (covid, pneumonia, normal), each containing chest X-ray posteroanterior (PA) images. In total, 6939 samples were used in the experiment, with 2313 samples for each case.

About

The repository contains a history.csv file which contains all the training data per epoch of the model. The .ipynb file contains all the model training and evaluation.

Getting Started

Prerequisites

Before running the notebook, ensure you have the following dependencies installed:

pip install -r requirements.txt

Steps to Run the Notebook

  1. Clone this repository to your local machine:
git clone https://github.com/Harbringe/lung-xray-classification/
  1. Navigate to the project directory:
cd lung-xray-classification
  1. Download the dataset using the provided link and place it in the project directory.

  2. Open and run the "lung_Xray_classification.ipynb" notebook using Jupyter Notebook or Jupyter Lab:

jupyter notebook lung_Xray_classification.ipynb

Follow the instructions in the notebook to execute each cell.

Model

The model showed exceptional results and has done very well at classifying the X-rays with 95% accuracy.

Download and Use Instructions:

  1. Click on the link model.keras to download the Keras model file.
  2. Ensure you have the required dependencies installed. You can install them using pip install -r requirements.txt.
  3. Load the model in your Python environment using TensorFlow or Keras:
    from tensorflow.keras.models import load_model
    
    model = load_model('path/to/model.keras')
  4. Once loaded, you can use the model to make predictions on new X-ray images:
    # Assuming 'image' contains your input image data
    prediction = model.predict(image)
  5. Interpret the prediction results as needed for your application.

Link to dataset: COVID19 Pneumonia Normal Chest Xray PA Database

Feel free to explore the notebook to understand the modeling process and results. Happy classifying!

About

This repository focuses on classifying lung xrays of patients either having pneumonia, covid or healthy lungs.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors