How kritanuscodingdelight/neuroscan-ai works
NeuroScan AI is a web application that classifies structural brain MRI scans into four Alzheimer’s impairment stages and presents confidence, clinical guidance, and visual explanations. The primary workflow is scan upload, image preprocessing, model inference, then result and interpretation display; users can also access informational pages and API health/statistics capabilities. The graph reflects both the documented web and API surfaces. Some route internals and frontend wiring are unsampled, so uncertain connections are omitted.
Main entry points: api.py Prediction API · templates Upload and results UI · script.js Upload interactions · model_loader.py Model loading
Components 17
Web experience
- Upload and results UI
frontend/templates - Upload interactions
frontend/static/js/script.js - Web routes
backend/app.py - Prediction API
backend/api.py - Result cache
backend/api.py - Analysis presentation
frontend/static/js/script.js - Clinical information pages
frontend/templates
Classification pipeline
- MRI preprocessing
backend/utils/preprocessor.py - Model loading
backend/utils/model_loader.py
Clinical interpretation
- Grad-CAM++
backend/utils/grad_cam.py - Saliency explanations
backend/utils/explainer.py - Risk and recommendations
backend/api.py
Model integration
- Model checkpoint
backend/models - Model downloader
backend/utils/model_downloader.py - Class mappings
backend/models/class_names.json
Other components
- Scan submitter
- Hugging Face Hub
Connections 15
- Scan submitter → Upload and results UI: submits scan
- Upload and results UI → Upload interactions: handles upload
- Upload interactions → Prediction API: requests prediction
- Prediction API → MRI preprocessing: preprocesses scan
- Prediction API → Model loading: loads model
- Model loading → Model checkpoint: loads checkpoint
- Prediction API → Class mappings: reads mappings
- Model downloader → Hugging Face Hub: downloads weights
- Prediction API → Grad-CAM++: generates heatmap
- Prediction API → Risk and recommendations: assesses prediction
- Prediction API → Result cache: stores result
- Upload interactions → Analysis presentation: renders response
- Prediction API → Analysis presentation: returns analysis
- Scan submitter → Clinical information pages: views guidance
- Upload and results UI → Web routes: requests web pages