The problem
The Pneumonia Detection system is a healthcare-AI final-year project that classifies chest X-ray images as normal or pneumonia-positive using a fine-tuned convolutional neural network. The model is trained on the NIH Chest X-ray dataset (112,000+ frontal-view images) and fine-tunes a ResNet50/MobileNetV2 backbone pre-trained on ImageNet — the transfer-learning story alone answers a dozen viva questions. The LungScan Streamlit app returns the prediction with a confidence score and overlays Grad-CAM heatmaps on the lung regions that drove the decision, so the examiner sees visual proof, not just a number. A batch-screening dashboard lets you process a folder of X-rays and export results for your report's evaluation chapter.
This is a built-to-order software project: code, trained model weights and the complete viva kit (report, PPT, Q&A) are prepared fresh for you.
How it works
- A chest X-ray is uploaded to the LungScan app (or dropped into the batch folder).
- The preprocessing pipeline resizes and normalizes the image and applies CLAHE contrast enhancement so lung opacities stand out.
- The fine-tuned CNN (ResNet50/MobileNetV2) extracts deep features and outputs a pneumonia probability.
- Grad-CAM back-projects the prediction onto the X-ray, highlighting the infiltrated lung regions in a heatmap.
- The dashboard shows the verdict, confidence and heatmap per image, and aggregates batch results into the metrics tables used in your report.
Project features
- Normal vs. pneumonia binary classification of chest X-rays with confidence score
- Transfer learning on ResNet50/MobileNetV2 pre-trained backbones
- Grad-CAM heatmaps overlaid on lung regions as visual evidence
- LungScan Streamlit app — upload, predict and visualize in one click
- Batch-screening dashboard: process folders of X-rays, export CSV results
- Class-imbalance handling (weighted loss / augmentation) documented in the report
- Training notebooks with ROC curves, confusion matrix and per-class metrics
- CLAHE contrast enhancement and lung-aware preprocessing pipeline
- Evaluation chapter: accuracy, sensitivity, specificity, F1 and AUC
What is included
- Complete source code (training, evaluation, inference, Streamlit app)
- Trained model weights (.h5) — demos run on any laptop CPU
- Data preparation scripts and augmentation pipeline
- Project report PDF (clinical background, literature survey, methodology, results, ethics)
- PPT presentation for final review
- Viva Q&A preparation document (CNNs, transfer learning, Grad-CAM, ROC/AUC, class imbalance)
- Setup guide (environment, dependencies, dataset download steps)
Limitations & prerequisites
- This is an educational screening demonstrator, not a certified diagnostic device — predictions must never be used for real clinical diagnosis or treatment decisions.
- The model is trained on adult frontal chest X-rays; performance on pediatric images, lateral views or scans from different equipment is not validated.
- Accuracy depends on image quality — rotated, cropped or low-contrast scans degrade results, which the report's error analysis documents honestly.
Components & software requirements
- Python 3.10, TensorFlow/Keras (transfer learning, training)
- OpenCV (CLAHE enhancement, preprocessing), NumPy, scikit-learn
- Matplotlib/Seaborn (ROC curves, confusion matrix, training plots)
- Streamlit web app (LungScan) — no frontend coding needed for demos
- NIH Chest X-ray dataset (112,000+ images) for training and evaluation
- Trained weights shipped as .h5 file — CPU inference in seconds