| title | MedXAI API |
|---|---|
| emoji | 🩺 |
| colorFrom | blue |
| colorTo | green |
| sdk | docker |
| app_port | 7860 |
| pinned | false |
Production-Ready Chest X-Ray Classification & Explainability Platform
An end-to-end medical imaging AI system that classifies chest X-rays across 18 pathology classes, generates Grad-CAM/SHAP explainability heatmaps, and provides an AI-powered clinical chat interface — all wrapped in a secure, full-stack web application with JWT authentication, role-based access control, and one-click cloud deployment.
- Features
- Architecture Overview
- Tech Stack
- Repository Structure
- Prerequisites
- Quick Start — Local Development
- Configuration Reference
- API Reference
- Training Pipeline
- Docker — Full Stack
- Cloud Deployment
- Security Model
- Testing
- Makefile Reference
- Environment Variables
- Roadmap
- License
| Capability | Details |
|---|---|
| Multi-label Classification | 18-class chest X-ray pathology detection using TorchXRayVision DenseNet-121 (primary) or custom EfficientNet-B3 |
| Explainability | Grad-CAM heatmaps, SHAP overlays, and bounding-box localization for every prediction |
| Calibration | Temperature scaling and Platt calibration for clinically reliable probability outputs |
| Out-of-Distribution Detection | CLIP-based OOD detector flags non-CXR uploads before inference |
| Per-class Thresholds | Optimized decision thresholds per pathology for sensitivity / specificity trade-offs |
| Active Learning | Uncertainty-based sampling to identify the most informative images for re-training |
| Clinical Ranking | Severity-aware ranking of detected pathologies for triage prioritization |
| Capability | Details |
|---|---|
| X-Ray Upload & Viewer | Drag-and-drop DICOM / JPEG / PNG upload with pan, zoom, and windowing controls |
| Results Dashboard | Confidence bars, severity indicators, and side-by-side explainability overlays |
| AI Chat Assistant | Context-aware clinical chat powered by GPT / local LLM — grounded in the current prediction |
| Prediction History | Full audit trail of past analyses with detail drawers and re-analysis capability |
| Clinician Feedback | In-app feedback modal for clinicians to confirm, reject, or correct AI predictions |
| Authentication | JWT-based login / registration with HttpOnly cookies, refresh token rotation |
| Role-Based Access | user, clinician, and admin roles with route-level enforcement |
| Admin Panel | User management, model reload, audit log viewer, retraining triggers |
┌──────────────────────────────────────────────────────────────────┐
│ FRONTEND (React + Vite) │
│ UploadPanel → ImageViewer → ResultsPanel → ChatPanel │
│ LoginPage / RegisterPage / HistoryPage / AuditTable │
│ AuthContext (JWT session state) │
└──────────────────────┬───────────────────────────────────────────┘
│ HTTPS /v1/*
┌──────────────────────▼───────────────────────────────────────────┐
│ BACKEND (FastAPI + Gunicorn) │
│ │
│ ┌─── Routers ──────────────────────────────────────────┐ │
│ │ /v1/auth/* Login, Logout, Refresh, Register, Me │ │
│ │ /v1/predict Upload CXR → 18-class probabilities │ │
│ │ /v1/explain Grad-CAM / SHAP heatmap generation │ │
│ │ /v1/chat AI clinical Q&A (context-aware) │ │
│ │ /v1/pathologies TorchXRayVision raw pathology scores │ │
│ │ /v1/records Prediction history CRUD │ │
│ │ /v1/admin/* Model reload, audit, retraining │ │
│ │ /health Liveness + readiness probes │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌─── Services ─────────────────────────────────────────┐ │
│ │ txrv_primary_adapter TorchXRayVision inference │ │
│ │ explanation_engine Grad-CAM + SHAP + BBox │ │
│ │ chat_service LLM-powered clinical chat │ │
│ │ ood_detector CLIP out-of-distribution │ │
│ │ pathology_detector 18-class pathology scoring │ │
│ │ clinical_ranker Severity-based triage │ │
│ │ calibration Temperature / Platt scaling │ │
│ │ prediction_store Postgres persistence │ │
│ │ audit JSONL audit trail │ │
│ └──────────────────────────────────────────────────────┘ │
│ │
│ ┌─── Auth ─────────────────────────────────────────────┐ │
│ │ Token management, password hashing, session CRUD │ │
│ │ Role-based access guards (AuthRequired / AdminOnly) │ │
│ └──────────────────────────────────────────────────────┘ │
└────────────┬─────────────────────────┬───────────────────────────┘
│ │
┌───────▼───────┐ ┌───────▼───────┐
│ PostgreSQL │ │ Redis │
│ Users, Preds │ │ Rate limiting│
│ Audit logs │ │ Session cache│
└───────────────┘ └───────────────┘
| Layer | Technologies |
|---|---|
| Frontend | React 18, TypeScript, Vite, Tailwind CSS, Framer Motion, Lucide Icons |
| Backend | FastAPI, Gunicorn, Uvicorn, Pydantic v2 |
| ML / DL | PyTorch, MONAI, TorchXRayVision, timm, scikit-learn, scikit-image |
| Explainability | Grad-CAM, SHAP, OpenCV (bounding box extraction) |
| Auth | JWT, HttpOnly cookies, rate limiting |
| Database | PostgreSQL 16, Redis |
| Experiment Tracking | MLflow |
| Deployment | Docker, Docker Compose, nginx, Render.com Blueprint, Hugging Face Spaces |
medxai-main/
├── frontend/ # React + Vite SPA
│ ├── src/
│ │ ├── App.tsx # Main application (routing + layout)
│ │ ├── main.tsx # React entry point
│ │ ├── types.ts # Shared TypeScript interfaces
│ │ ├── components/
│ │ │ ├── UploadPanel.tsx # Drag-and-drop X-ray upload
│ │ │ ├── ImageViewer.tsx # CXR viewer with zoom / pan
│ │ │ ├── ResultsPanel.tsx # Prediction results + explainability
│ │ │ ├── ChatPanel.tsx # AI clinical chat interface
│ │ │ ├── Header.tsx # Navigation bar + auth controls
│ │ │ ├── LoginPage.tsx # User login form
│ │ │ ├── RegisterPage.tsx # User registration form
│ │ │ ├── HistoryPage.tsx # Prediction history browser
│ │ │ ├── RecordDetailDrawer.tsx # Record detail side panel
│ │ │ ├── FeedbackModal.tsx # Clinician feedback dialog
│ │ │ └── AuditTable.tsx # Admin audit log viewer
│ │ ├── context/
│ │ │ └── AuthContext.tsx # JWT session state management
│ │ └── services/
│ │ └── api.ts # Centralised fetch layer (auto token refresh)
│ ├── package.json
│ ├── vite.config.ts
│ ├── tsconfig.json
│ ├── tailwind.config.js
│ └── vercel.json # Vercel deployment config
│
├── src/ # Python backend + ML pipeline
│ ├── common/ # Shared utilities
│ │ ├── config.py # Pydantic v2 configuration models
│ │ ├── logging.py # Structured logging setup
│ │ ├── utils.py # Seeds, device selection, paths, timers
│ │ ├── schemas.py # LabelMap + DataSample schemas
│ │ └── exceptions.py # Custom exception hierarchy
│ │
│ ├── serve/ # FastAPI inference server
│ │ ├── app.py # Application factory + lifespan
│ │ ├── dependencies.py # AppState + shared dependencies
│ │ ├── auth/ # Authentication subsystem
│ │ ├── routers/ # API route handlers
│ │ │ ├── auth.py # /v1/auth/* (login, logout, refresh, me, register)
│ │ │ ├── predict.py # /v1/predict (image → classification)
│ │ │ ├── explain.py # /v1/explain (Grad-CAM / SHAP heatmaps)
│ │ │ ├── chat.py # /v1/chat (AI clinical assistant)
│ │ │ ├── pathologies.py # /v1/pathologies (raw TXRv scores)
│ │ │ ├── records.py # /v1/records (prediction history CRUD)
│ │ │ ├── admin.py # /v1/admin/* (model reload, audit, retrain)
│ │ │ └── health.py # /health + /ready probes
│ │ ├── services/ # Business logic layer
│ │ │ ├── txrv_primary_adapter.py # TorchXRayVision inference wrapper
│ │ │ ├── explanation_engine.py # Grad-CAM + SHAP generation
│ │ │ ├── chat_service.py # LLM-powered clinical Q&A
│ │ │ ├── ood_detector.py # CLIP-based OOD filtering
│ │ │ ├── pathology_detector.py # 18-class pathology scoring
│ │ │ ├── clinical_ranker.py # Severity-based triage ranking
│ │ │ ├── calibration.py # Post-hoc calibration
│ │ │ ├── thresholds.py # Per-class threshold loading
│ │ │ ├── bbox_extractor.py # Bounding box from heatmaps
│ │ │ ├── pleural_analyzer.py # Pleural effusion analysis
│ │ │ ├── preprocessing.py # Image preprocessing pipeline
│ │ │ ├── model_loader.py # Checkpoint loading
│ │ │ ├── artifact_loader.py # Startup artifact orchestration
│ │ │ ├── prediction_store.py # Postgres prediction persistence
│ │ │ ├── response_builder.py # Structured API response builder
│ │ │ ├── database.py # Database connection management
│ │ │ ├── audit.py # JSONL audit logging
│ │ │ ├── retraining_service.py # Model retraining triggers
│ │ │ └── inference.py # Core inference orchestrator
│ │ ├── middleware/ # Request pipeline middleware
│ │ └── schemas/ # Pydantic request / response models
│ │
│ ├── train/ # Training pipeline
│ │ ├── train.py # Main training loop (CLI entry point)
│ │ ├── evaluate.py # Evaluation loop (CLI entry point)
│ │ ├── dataset.py # CXRDataset (bytes + file paths)
│ │ ├── transforms.py # MONAI train / val augmentation pipelines
│ │ ├── model_factory.py # DenseNet-121 / EfficientNet factory
│ │ ├── losses.py # Weighted Cross-Entropy + Focal Loss
│ │ ├── metrics.py # AUROC, AUPRC, F1, specificity, CM
│ │ ├── calibrate.py # Temperature scaling calibration
│ │ ├── calibrate_txrv.py # TXRv-specific calibration
│ │ ├── thresholds.py # Per-class threshold optimisation
│ │ ├── explainability.py # Training-time explainability
│ │ ├── hierarchical.py # Hierarchical classification
│ │ ├── active_learning.py # Uncertainty-based active learning
│ │ ├── review_logic.py # Human-in-the-loop review
│ │ ├── mlflow_utils.py # MLflow tracking helpers
│ │ ├── bundle_utils.py # MONAI Bundle structure validator
│ │ ├── artifacts.py # Artifact management
│ │ └── zoo_bootstrap.py # MONAI Zoo model lookup
│ │
│ ├── evaluation/ # Evaluation utilities
│ ├── inference/ # Standalone inference scripts
│ ├── ml/ # ML utilities
│ └── config/ # Additional configuration
│
├── configs/ # YAML / JSON configuration files
│ ├── train.yaml # Main training config
│ ├── train_v2.yaml # V2 training config
│ ├── train_v3.yaml # V3 training config
│ ├── train_efficientnet_b3.yaml # EfficientNet-B3 specific config
│ ├── model.yaml # Per-architecture presets
│ ├── inference.yaml # Inference configuration
│ ├── calibration.yaml # Calibration settings
│ ├── thresholds.yaml # Decision thresholds
│ ├── logging.yaml # Python logging config
│ ├── api.yaml # API configuration
│ ├── metadata.json # MONAI Bundle metadata
│ ├── stage1.yaml # Stage 1 training config
│ └── stage2.yaml # Stage 2 training config
│
├── deployment/ # Docker + infrastructure configs
│ ├── Dockerfile.api # FastAPI production image
│ ├── Dockerfile.frontend # React → nginx multi-stage image
│ ├── docker-compose.yml # Full stack: frontend + API + Postgres + Redis
│ ├── nginx.conf # Reverse proxy + security headers
│ └── gunicorn.conf.py # Worker / timeout / preload config
│
├── bundles/ # MONAI Bundle export directory
├── models/ # Saved model checkpoints
├── scripts/ # Shell scripts for common workflows
│ ├── train_local.sh # Local training launcher
│ ├── eval_local.sh # Local evaluation launcher
│ ├── calibrate_local.sh # Calibration script
│ ├── generate_explanations.sh # Batch explanation generation
│ ├── diagnose.py # System diagnostics
│ └── external_validate.py # External validation script
│
├── tests/ # Test suite
│ ├── unit/ # Unit tests
│ └── integration/ # Integration tests
│
├── Dockerfile # Hugging Face Spaces image
├── Dockerfile.train # Training-specific Docker image
├── Makefile # Developer workflow shortcuts
├── pyproject.toml # Python project + dependency config
├── render.yaml # Render.com Blueprint (one-click deploy)
└── .env.example # Environment variable template
| Requirement | Version | Purpose |
|---|---|---|
| Python | 3.10+ | Backend + ML pipeline |
| Node.js | 20+ | Frontend build toolchain |
| Docker Desktop | Latest | Containerised deployment (optional) |
| PostgreSQL | 16+ | Production persistence (optional — falls back to JSONL in dev) |
| GPU | Optional | CUDA or Apple MPS for accelerated inference; CPU works fine |
git clone https://github.com/himanggii/MedXAI.git
cd MedXAI# Create and activate a virtual environment
python3 -m venv .venv
source .venv/bin/activate # macOS / Linux
# .venv\Scripts\activate # Windows
# Install all dependencies (including dev extras)
pip install -e ".[dev]"
# Copy the environment template and configure
cp .env.example .env
# Edit .env — at minimum set:
# JWT_SECRET_KEY=$(openssl rand -hex 32)
# MEDXAI_ADMIN_EMAIL=<your-dev-email>
# MEDXAI_ADMIN_PASSWORD=<your-dev-password># Development mode (auto-reload on code changes)
uvicorn src.serve.app:app --reload --port 8000
# Or use the Makefile shortcut:
make serveDev mode (no Postgres): When
DATABASE_URLis not set, the backend falls back to an in-memory store. To enable login, setMEDXAI_ADMIN_EMAILandMEDXAI_ADMIN_PASSWORDin your.envfile.
⚠️ Use strong, unique credentials — even in development.
The API will be available at http://localhost:8000. Visit http://localhost:8000/docs for the interactive Swagger documentation.
cd frontend
npm install
npm run devThe frontend will be available at http://localhost:4000 and automatically proxies all /v1/* API requests to the backend at :8000.
Navigate to http://localhost:4000 in your browser. You can:
- Log in with the credentials you set in
.env - Upload a chest X-ray image (JPEG or PNG)
- View results — classification probabilities, Grad-CAM heatmaps, severity ranking
- Ask questions in the AI chat panel about the diagnosis
- Browse history of past predictions
| Key | Default | Description |
|---|---|---|
model.architecture |
densenet121 |
Model backbone — also supports efficientnet_b0, efficientnet_b3, resnet50 |
model.pretrained |
true |
Use ImageNet pretrained weights; auto-adapts first conv for 1-channel input |
training.class_balance_strategy |
weighted_loss |
Class imbalance strategy — focal or weighted_sampler also available |
training.use_amp |
true |
Automatic mixed precision (FP16) on CUDA |
training.batch_size |
32 |
Reduce if encountering OOM errors |
training.epochs |
50 |
Maximum training epochs |
early_stopping.patience |
7 |
Stop if val_auroc_macro doesn't improve for N epochs |
data.train_path |
— | Path to training CSV |
data.val_path |
null |
Path to validation CSV — null = automatic 15% split |
| Variable | Default | Description |
|---|---|---|
MEDXAI_PRIMARY_MODEL |
txrv |
Primary classifier — txrv (TorchXRayVision) or efficientnet |
MEDXAI_ARCH |
efficientnet_b3 |
Model architecture (when using custom models) |
MEDXAI_IMAGE_SIZE |
320 |
Input image resolution (square) |
MEDXAI_OOD_ENABLED |
false |
Enable CLIP-based out-of-distribution detection |
MEDXAI_PATHOLOGY_ENABLED |
false |
Enable 18-class TXRv pathology detector |
All API endpoints are prefixed with /v1/. Authentication is required for most endpoints (JWT token via HttpOnly cookie).
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/v1/auth/login |
Login with email + password → sets HttpOnly JWT cookie | No |
POST |
/v1/auth/register |
Create a new user account | No (if open registration is enabled) |
POST |
/v1/auth/refresh |
Rotate access + refresh tokens | Yes (refresh token) |
POST |
/v1/auth/logout |
Invalidate session and clear cookies | Yes |
GET |
/v1/auth/me |
Get current user profile | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/v1/predict |
Upload a CXR image → returns classification probabilities, severity ranking, calibrated confidences | Yes |
POST |
/v1/explain |
Generate Grad-CAM / SHAP heatmap for a prediction | Yes |
POST |
/v1/pathologies |
Get raw TorchXRayVision 18-class pathology scores | Yes |
POST |
/v1/chat |
Send a clinical question about the current prediction | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/v1/records |
List prediction history (paginated) | Yes |
GET |
/v1/records/:id |
Get prediction detail by ID | Yes |
DELETE |
/v1/records/:id |
Delete a prediction record | Yes |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
POST |
/v1/admin/reload-model |
Hot-reload the model checkpoint without restarting | Admin |
GET |
/v1/admin/audit |
View audit log | Admin |
POST |
/v1/admin/retrain |
Trigger model retraining | Admin |
| Method | Endpoint | Description | Auth Required |
|---|---|---|---|
GET |
/health |
Liveness probe — returns 200 if server is running |
No |
GET |
/ready |
Readiness probe — returns 200 only if model + artifacts are loaded |
No |
The training pipeline supports training custom classifiers on the MIMIC-CXR dataset (or any similarly formatted CSV).
The training CSV must contain these columns:
| Column | Type | Description |
|---|---|---|
image |
bytes literal | JPEG image data as a Python bytes literal string |
image_path |
string | OR a file-system path to a JPEG/PNG (auto-detected per row) |
impression |
string | 17-class diagnostic impression label |
findings |
string | Free-text radiology findings (optional) |
# 1. Configure data paths
# Edit .env:
export MEDAI_TRAIN_CSV=/path/to/mimic_cxr_processed.csv
# Or edit configs/train.yaml:
# data:
# train_path: /path/to/mimic_cxr_processed.csv
# val_path: null # null = automatic 15% split
# 2. Start training
make train
# Or: python -m src.train.train --config configs/train.yaml
# 3. Monitor with MLflow
make mlflow-ui
# Opens at http://localhost:5000# Evaluate latest checkpoint on validation split
make eval
# Evaluate a specific checkpoint on a test set
python -m src.train.evaluate \
--config configs/train.yaml \
--checkpoint artifacts/checkpoints/best.pt \
--data-csv /path/to/test.csv \
--split-name test# Run temperature scaling calibration on validation set
bash scripts/calibrate_local.shInput (grayscale CXR, 1×224×224 or 1×320×320)
↓
MONAI Transforms (augmentation / normalisation)
↓
Backbone (DenseNet-121 / EfficientNet-B3 — pretrained, 1-channel adapted)
↓
Dropout + Linear head (17–18 classes)
↓
Loss: Weighted Cross-Entropy / Focal Loss (class-balanced)
↓
Optimiser: AdamW + CosineAnnealingWarmRestarts scheduler
↓
MLflow tracking + MONAI Bundle-compatible artefact export
The deployment/ directory contains a complete Docker Compose stack for running the entire application.
| Service | Port | Description |
|---|---|---|
| frontend | 80 |
React SPA served via nginx |
| api | 8000 |
FastAPI + Gunicorn backend |
| postgres | 5432 (internal) |
PostgreSQL 16 database |
| redis | 6379 (internal) |
Redis for rate limiting + session cache |
# 1. Copy and configure environment
cp .env.example .env
# Edit .env — set at minimum:
# JWT_SECRET_KEY=<output of: openssl rand -hex 32>
# POSTGRES_PASSWORD=<strong random password>
# 2. Build and start all services
docker compose -f deployment/docker-compose.yml up --build -d
# 3. View logs
docker compose -f deployment/docker-compose.yml logs -f api
# 4. Stop all services
docker compose -f deployment/docker-compose.yml downAfter startup:
- Frontend: http://localhost (port 80)
- API + Swagger docs: http://localhost:8000/docs
- Health check: http://localhost:8000/health
# Build the training image
make docker-build
# Run training inside Docker (with GPU passthrough)
make docker-trainThe project includes a render.yaml Blueprint for one-click deployment:
# 1. Push your code to GitHub
git push origin main
# 2. Go to Render Dashboard → New → Blueprint
# 3. Connect your repo — Render auto-detects render.yaml
# 4. Set secret environment variables in the dashboard:
# JWT_SECRET_KEY → openssl rand -hex 32
# POSTGRES_PASSWORD → strong random passwordRender automatically provisions:
| Service | Type | Notes |
|---|---|---|
medicalxai-api |
Docker Web Service | Standard plan (2 vCPU, 4 GB RAM) + 10 GB disk |
medicalxai-frontend |
Static Site | Built from frontend/ with security headers |
medicalxai-postgres |
Managed PostgreSQL | Starter plan with auto-connection |
medicalxai-redis |
Managed Redis | Add manually in dashboard |
The root Dockerfile is configured for Hugging Face Spaces deployment:
# The Space auto-builds from Dockerfile on push
# Backend runs on port 7860 (HF requirement)The frontend/vercel.json is pre-configured for deploying just the frontend to Vercel, with API rewrites pointing to your backend URL.
| Layer | Implementation |
|---|---|
| Auth tokens | JWT in HttpOnly cookies — tokens are never exposed to JavaScript |
| Password storage | Industry-standard hashing (salted + stretched) |
| Session rotation | Refresh token is rotated on every refresh call |
| Rate limiting | Configurable per-route rate limiting (e.g., login endpoints) |
| Secure headers | Reverse proxy enforces security headers (frame options, CSP, content-type) |
| File uploads | MIME type validation + size cap |
| RBAC | user / clinician / admin roles with route-level enforcement |
| CORS | Configurable origin allowlist |
| CSRF | Cross-site request forgery protection enabled |
# Run the full test suite with coverage report
make test
# Run tests quickly without coverage
make test-fast
# Run linting
make lint
# Run type checking
make typecheck
# Auto-format code
make fmt| Command | Description |
|---|---|
make help |
Show all available targets |
make install |
Install dependencies from pyproject.toml |
make install-dev |
Install with dev extras (pytest, black, ruff, mypy) |
make train |
Run training with default config |
make eval |
Evaluate latest checkpoint |
make eval-test |
Evaluate on explicit test CSV |
make serve |
Start FastAPI dev server (auto-reload) |
make serve-prod |
Start Gunicorn production server (4 workers) |
make test |
Run tests with coverage |
make test-fast |
Run tests without coverage |
make lint |
Lint with ruff |
make fmt |
Format with black + isort |
make typecheck |
Run mypy type checker |
make mlflow-ui |
Launch MLflow UI at http://localhost:5000 |
make docker-build |
Build the training Docker image |
make docker-train |
Run training inside Docker |
make clean |
Remove __pycache__, .pytest_cache, build artifacts |
| Variable | Required | Default | Description |
|---|---|---|---|
JWT_SECRET_KEY |
Yes | — | Auth signing key — generate with openssl rand -hex 32 |
DATABASE_URL |
Prod only | — | PostgreSQL connection string (dev falls back to in-memory) |
REDIS_URL |
No | — | Redis URL for rate limiting and session cache |
POSTGRES_PASSWORD |
Docker only | — | Database password for Docker Compose |
COOKIE_SECURE |
No | true |
Set to false for local HTTP dev |
COOKIE_SAMESITE |
No | lax |
Cookie SameSite attribute |
MEDXAI_OPEN_REGISTRATION |
No | false |
true = allow public user signup |
MEDXAI_PRIMARY_MODEL |
No | txrv |
Primary model: txrv or efficientnet |
MEDXAI_ARCH |
No | efficientnet_b3 |
Model architecture |
MEDXAI_IMAGE_SIZE |
No | 320 |
Input image size (square) |
MEDXAI_OOD_ENABLED |
No | false |
Enable CLIP out-of-distribution detection |
MEDXAI_ADMIN_SECRET |
No | — | Admin bootstrap secret (keep private) |
OPENAI_API_KEY |
No | — | OpenAI API key for chat assistant (GPT fallback) |
HF_TOKEN |
No | — | Hugging Face token for gated model downloads |
WEB_CONCURRENCY |
No | 2 |
Number of Gunicorn workers |
CORS_ORIGINS |
No | — | Comma-separated allowed CORS origins |
ENVIRONMENT |
No | production |
dev, staging, or production |
See .env.example for the full annotated list.
- 18-class chest X-ray classification (TorchXRayVision + custom EfficientNet)
- Grad-CAM / SHAP explainability with bounding box localization
- JWT authentication with HttpOnly cookies and RBAC
- Full-stack React frontend with prediction history
- AI-powered clinical chat assistant
- Docker Compose full-stack deployment
- Render.com one-click Blueprint deployment
- Out-of-distribution detection (CLIP)
- Temperature scaling calibration
- Per-class threshold optimisation
- Active learning pipeline
- ONNX export via
monai.bundle - Triton Inference Server config
- DICOM native support (currently JPEG/PNG only)
- Multi-language clinical report generation
- Federated learning support
This project is licensed under the Apache License 2.0. See the LICENSE file for details.
Built with ❤️ for advancing medical AI transparency and trust.