This project is designed to detect pneumonia in chest X-ray images using three pre-trained deep learning models: VGG19, ResNet50, and MobileNet. The models were trained on a labeled dataset containing both normal and pneumonia cases.
To set up the project, follow these steps:
Clone this repository to your local machine using the following command:
git clone https://github.com/s20488/NAI_project_pneumonia_detection.gitNavigate to the project directory and install the required Python libraries:
pip install -r requirements.txtThe dataset was sourced from Kaggle: https://www.kaggle.com/datasets/paultimothymooney/chest-xray-pneumonia/data
Ensure the dataset is organized in the following structure:
data/
|-- chest_xray/
| |-- train/
| |-- NORMAL/
| |-- PNEUMONIA/
| |-- val/
| |-- NORMAL/
| |-- PNEUMONIA/
| |-- test/
| |-- NORMAL/
| |-- PNEUMONIA/Launch the app and visit http://localhost:5000/ in your browser to upload and predict X-ray images.
python main.pyPortions of the code were adapted from this Kaggle notebook: https://www.kaggle.com/code/karan842/pneumonia-detection-transfer-learning-94-acc/notebook#Importing-necessary-libraries.