DR-LabStack: Design and Implementation of a Clinician-Facing Web System for Diabetic Retinopathy Prediction
DR-LabStack is a React-Flask web system that unifies four heterogeneous pretrained diabetic retinopathy (DR) prediction models behind a single clinical interface The system resolves key integration challenges including differing input fields, serialization formats, preprocessing requirements, and output semantics across models Four models were successfully integrated: RuleFit (14 fields), Pruned RuleFit (6 fields), Elaborative XGBoost (8 fields), and Two-level Ensemble (25 fields) Functional eva
Analysis
TL;DR
- DR-LabStack is a React-Flask web system that unifies four heterogeneous pretrained diabetic retinopathy (DR) prediction models behind a single clinical interface
- The system resolves key integration challenges including differing input fields, serialization formats, preprocessing requirements, and output semantics across models
- Four models were successfully integrated: RuleFit (14 fields), Pruned RuleFit (6 fields), Elaborative XGBoost (8 fields), and Two-level Ensemble (25 fields)
- Functional evaluation confirmed correct model loading, input ordering, result rendering, and input-validation behavior across 98 total test scenarios
- The primary contribution is software engineering: a reusable interaction and serving workflow for heterogeneous ML models in clinical settings
Why It Matters
This work addresses a critical gap in deploying ML models in clinical practice: the difficulty of integrating diverse pretrained models with incompatible interfaces into a unified, clinician-accessible system. For AI practitioners building production ML systems, DR-LabStack demonstrates a practical architecture for abstracting model heterogeneity behind a common API and UI layer. The approach is directly transferable to other medical domains where multiple specialized models need to coexist within a single clinical workflow.
Technical Details
- Architecture: React frontend paired with Flask backend, using a shared form that retrieves ordered model features, renders model-specific numerical and categorical controls, and constructs positional input vectors
- Backend adapters: Load heterogeneous model artifacts and apply the ensemble's accompanying scaler, normalizing preprocessing differences across models
- Common JSON response format: Provides binary classification output alongside method and source metadata, enabling consistent result display regardless of underlying model
- Integration scope: Four externally developed pretrained models with varying field contracts (6 to 25 features), serialization formats, and preprocessing pipelines
- Evaluation methodology: 62 Flask test-client requests for service behavior characterization, 12 limited-vector checks for invocation-path and threshold consistency, and 24 browser-component scenarios with mocked transport for input ordering and rendering verification
Industry Insight
- The increasing fragmentation of specialized ML models in healthcare demands robust integration layers; DR-LabStack provides a reusable blueprint for abstracting model heterogeneity in clinical deployment pipelines
- Clinical ML systems must prioritize software engineering rigor—input validation, consistent API contracts, and isolated testing environments—as much as model accuracy to achieve real-world adoption
- The authors explicitly note that clinical effectiveness and clinician usability require separate evaluation, highlighting that technical integration success does not guarantee clinical utility; practitioners should plan for dedicated usability studies and clinical validation phases
Disclaimer: The above content is generated by AI and is for reference only.