π«β‘ A lightweight machine learning web app that detects Pneumonia from chest X-rays with 94.6% accuracy in under 1.5 seconds. Built for low-resource clinics.
# π« Pneumonia Detection System using Chest X-Rays through Machine Learning
Project website: PNEUMONIA DETECTION
An intelligent web-based application that detects pneumonia from chest X-ray images using classical Machine Learning techniques. The system combines image preprocessing, handcrafted feature extraction, ensemble classification, and explainable AI to provide accurate, fast, and interpretable predictions.
---
## π Overview
Pneumonia is one of the leading causes of respiratory-related deaths worldwide, especially among children and elderly patients. Accurate diagnosis from chest X-rays requires experienced radiologists, which may not always be available in rural or resource-constrained healthcare facilities.
This project provides an AI-assisted diagnosis system that analyzes chest X-ray images and predicts whether a patient is suffering from pneumonia. Unlike many deep learning-only approaches, this project focuses on an interpretable and lightweight machine learning pipeline that can be deployed efficiently without requiring high-end GPU infrastructure.
---
## β¨ Key Features
- π©» Chest X-ray image upload
- β
Four-layer X-ray validation system
- π¨ CLAHE-based image enhancement
- π HOG (Histogram of Oriented Gradients) feature extraction
- π§© LBP (Local Binary Pattern) feature extraction
- βοΈ Feature normalization using StandardScaler
- π€ Ensemble Machine Learning classifier
- π Pneumonia severity scoring
- π SHAP-based explainability
- π PDF report generation
- π FastAPI backend
- π» Responsive web interface
- βοΈ Serverless deployment
---
# ποΈ System Workflow
```
Chest X-ray Upload
β
βΌ
4-Layer Image Validation
β
βΌ
Image Preprocessing (CLAHE)
β
βΌ
Feature Extraction
(HOG + LBP + Statistical Features)
β
βΌ
Feature Scaling
(StandardScaler)
β
βΌ
Ensemble Classifier
(SVM + Random Forest + Gradient Boosting)
β
βΌ
Prediction
β
βΌ
Severity Analysis
β
βΌ
SHAP Explainability
β
βΌ
Result & PDF Report
```
---
# π§ Machine Learning Pipeline
### Image Preprocessing
- β¦