How mushfiq525/medscreening works
MedScreen AI is a FastAPI research API for two distinct lung-screening workflows: CT-slice classification and symptom-survey risk scoring. Clients enter through the registered health or prediction routes; prediction handlers validate inputs, obtain cached models and metadata, prepare modality-specific inputs, run inference, and return typed results. Readiness checks report whether both model paths can load. The README is empty, and model binaries are not present in the supplied tree, so the graph shows only source-supported runtime relationships and does not assert artifact availability.
Main entry points: predictions.py Prediction endpoints · health.py Health and readiness · loader.py Model and metadata loader · config.py Runtime settings
Components 9
API routes
- FastAPI app
app/main.py - Health and readiness
app/routers/health.py - Prediction endpoints
app/routers/predictions.py
Inference workflows
- CT preprocessing
app/inference/preprocess_ct.py - Survey preparation
app/inference/preprocess_tabular.py - Model and metadata loader
app/inference/loader.py
Contracts and configuration
- Prediction contracts
app/schemas/prediction.py - Runtime settings
app/core/config.py
Other components
- API client
Connections 19
- API client → FastAPI app: sends requests
- FastAPI app → Health and readiness: registers routes
app/main.py - FastAPI app → Prediction endpoints: registers routes
app/main.py - API client → Health and readiness: calls endpoints
- API client → Prediction endpoints: submits inputs
- Health and readiness → Model and metadata loader: checks readiness
app/routers/health.py - Health and readiness → Runtime settings: reads app name
app/routers/health.py - Health and readiness → Prediction contracts: returns health types
app/routers/health.py - Prediction endpoints → Prediction contracts: validates and responds
app/routers/predictions.py - Prediction endpoints → Model and metadata loader: loads models
app/routers/predictions.py - Prediction endpoints → CT preprocessing: prepares CT input
app/routers/predictions.py - Prediction endpoints → Survey preparation: prepares survey input
app/routers/predictions.py - Prediction endpoints → Runtime settings: checks upload size
app/routers/predictions.py - Model and metadata loader → Runtime settings: resolves model paths
app/inference/loader.py - Model and metadata loader → CT preprocessing: loads CT metadata
app/inference/loader.py - Model and metadata loader → Survey preparation: loads survey metadata
app/inference/loader.py - CT preprocessing → Runtime settings: resolves metadata path
app/inference/preprocess_ct.py - Survey preparation → Runtime settings: resolves metadata path
app/inference/preprocess_tabular.py - Survey preparation → Prediction contracts: reads survey request
app/inference/preprocess_tabular.py