How saaksshi18/pneumoscan works
PneumoScan AI is a chest-X-ray pneumonia screening demo with a static web interface, serverless prediction and health endpoints, and a locally generated TensorFlow model. The primary workflow is image submission, model inference, Grad-CAM visualization and a structured screening response. Model training is a separate preparation workflow that produces the model artifact used at runtime. The README documents the frontend and API routes; the frontend source was not sampled, so its specific request behavior is not verified. The graph uses the prediction function for its inline processing stages rather than implying separate modules.
Main entry points: predict.py Model inference · index.html Static interface · pneumonia_model.h5 Pneumonia model · model_train.py Model training
Components 13
Web interface
- Static interface
public/index.html
Serverless API
- Prediction endpoint
api/predict.py - Health endpoint
api/health.py - Image upload parsing
api/predict.py
Model and explanations
- Model inference
api/predict.py - Model loading
api/predict.py - Pneumonia model
model/pneumonia_model.h5 - Grad-CAM heatmap
api/predict.py - Region identification
api/predict.py - Screening guidance
api/predict.py
Model preparation
- Model training
model_train.py - Chest X-ray dataset
Other components
- User
Connections 14
- User → Static interface: opens
README.md - User → Prediction endpoint: submits image
README.md - Static interface → Prediction endpoint: calls API
- Prediction endpoint → Image upload parsing: parses upload
api/predict.py - Prediction endpoint → Model inference: requests prediction
api/predict.py - Model inference → Model loading: loads model
api/predict.py - Model loading → Pneumonia model: reads weights
README.md - Model inference → Grad-CAM heatmap: generates heatmap
api/predict.py - Model inference → Region identification: identifies regions
api/predict.py - Model inference → Screening guidance: builds guidance
api/predict.py - Prediction endpoint → Static interface: returns result
- Health endpoint → Pneumonia model: checks existence
api/health.py - Chest X-ray dataset → Model training: trains on
model_train.py - Model training → Pneumonia model: saves model
model_train.py