Clinical-grade dual-model pediatric diagnostic ecosystem uniting Edge CNN photographic scanning, WHO Anthropometric growth curves comparison, and Generative AI clinical support.
NutriVision AI is a venture-backed, production-grade, multi-tenant Healthcare SaaS platform designed for clinical networks, NGOs, and government organizations (such as the ICDS) to identify and triage child malnutrition (SAM/MAM, stunting, wasting, underweight). The platform is HIPAA-oriented, secure, off-line capable, and cloud-scalable.
The system implements a state-of-the-art Dual-Stage Machine Learning Pipeline coordinating real-time medical insights:
- CNN Classifier: Integrates a pre-trained MobileNetV2 backbone trained to detect visual indicators of acute malnutrition in child photography (224x224 input tensors).
- Explainable AI (Grad-CAM): Generates high-activation pixel overlays to explain network decisions (e.g. mapping subcutaneous muscle loss), which are rendered side-by-side with original photos.
- Quantized Edge flatbuffers: Converts weights to a localized TFLite edge model (
best_image_model.tflite) for instant, offline, sub-100ms camera scans on low-bandwidth field tablets.
- LMS Curves Interpolation: Interpolates chronological heights and weights against WHO reference standards dynamically, computing exact:
- WAZ (Weight-for-Age Z-score)
- HAZ (Height-for-Age Z-score)
- WHZ (Weight-for-Height Z-score)
- Champion Classifier: Integrates an ensemble Random Forest Classifier electing malnutrition severity classifications (SAM, MAM, or Normal Growth) with a validated F1 Accuracy of 1.0000.
- Triage referrals: Automatically logs stunting referrals and triggers emergency notifications to regional administrators if SAM is discovered.
The Mermaid flowchart below illustrates the clinical data integration from field workers up to regional directors:
graph TD
A[Field Worker Mobile Client] -->|Capture Photo| B(Stage 1: MobileNetV2 Edge CNN)
A -->|Log Height & Weight| C(Stage 2: WHO Z-Score Analyzer)
B -->|Local Offline Sync| D[SQL Sync Queue]
C -->|Local Offline Sync| D
D -->|REST API Synchronization| E{Nginx Gateway}
E -->|Proxy Path /api| F[FastAPI Backend Engine]
F -->|Secure Row Isolation| G[(PostgreSQL RDS Cluster)]
F -->|Calibrate Probabilities| H(Sigmoid Platt Calibrator)
F -->|Contextual Pediatrician| I[Gemini AI Assistant Chatbot]
I -->|Formulate Interventions| J[NRC Referral & RUTF Recipes]
G -->|Scrape Performance| K[Prometheus Scraper]
K -->|Monitor telemetries| L[Grafana Metrics HUD]
- HIPAA-Compliant Security Middlewares:
- HTTP Security Headers: Injects
X-Frame-Options: DENY,X-Content-Type-Options: nosniff, and secureContent-Security-Policyautomatically in response packets. - Payload limits: Rejects request uploads larger than 10MB to mitigate denial-of-service.
- IP rate-limiting: REST API throttling restricts clients to a maximum of 150 requests per minute.
- HTTP Security Headers: Injects
- IaC Terraform Modules: Provisioning high-availability VPC networks, multi-region AWS EKS clusters, managed PostgreSQL RDS instances, and AWS secrets vaults.
- Auto-Scaling Kubernetes (Helm): Helm charts detailing Vertical and Horizontal Pod Autoscalers (HPA) scaling pods up to 15 nodes based on traffic demands.
- Stripe Billing Integration: Implements organizational subscription limits (
Outpost,NGO Network,State Mission) checking patient counts before registering records. - Command Palette Keyboard Menu: Hitting
Ctrl + Kin the Next.js App Router workspace immediately opens a searchable dashboard dialog to jump pages, search profiles, or upgrade billing tiers.
Ensure Python 3.11 is installed, then train and serialize the neural weights:
# Install dependencies
cd api && pip install -r requirements.txt && cd ..
# Generate sample growth data & train models
python3 training/generate_sample_data.py
python3 training/train_anthropometric_model.py
python3 training/train_image_model.pyBoot the production-grade local Docker stack (DB, FastAPI, Next.js, and Nginx proxy) cleanly:
docker-compose up -d --buildAccess the unified portal components immediately:
- SaaS Dashboard (Nginx Proxy):
http://localhost/(Log in withadmin@nutrivision.org/admin123) - Interactive OpenAPI Swagger Docs:
http://localhost/docs - Local REST Port:
http://localhost:8001/
| Classifier Models | Accuracy Metric | Weighted F1 | ROC AUC Area |
|---|---|---|---|
| Random Forest (Champion) | 1.0000 | 1.0000 | 1.0000 |
| Gradient Boosting | 1.0000 | 1.0000 | 1.0000 |
| Multi-Layer Perceptron | 0.9940 | 0.9940 | 0.9993 |
| Support Vector Machine | 0.9740 | 0.9740 | 0.9979 |
All diagnostics correspond to international pediatric WHO standards.