A distributed, privacy-first medical document analysis system. Your phone captures images or live video, sends them over Tailscale WireGuard to local compute nodes, where Gemma 4 analyzes them, RxNorm looks up drug interactions, and MedGemma provides specialist interpretation. All without a single byte leaving your private network.
Krishnendu Dasgupta · AXONVERTEX AI RESEARCH | Dr. Julia Hitzbleck · HI10x Innovation & Transformation GmbH
User photographs a prescription, holds a drug packet to the camera, or types a medical question. Three input paths: image upload, live webcam, or text chat with optional photo attachment.
Data travels over encrypted WireGuard mesh. For Video tab, Cloudflared provides HTTPS tunnel (required for getUserMedia). All inference stays on private network.
Single containerized backend orchestrates all models. Images normalized to 800px JPEG. Video frames rate-limited. Chat maintains full session context including MedGemma responses.
Image tab: LiteRT-LM on CPU via XNNPACK. Video + Chat: Ollama on Node A GPU. All paths produce structured analysis with multilingual OCR (Hindi, German, English), medication extraction, and clinical observations streamed via SSE.
~80 medical keywords scanned across user prompt and Gemma 4 response. If medical content found, the pipeline chains forward. Works identically across image, video, and chat tabs.
Extracts drug names via pattern matching + brand-to-generic mapping (Trental to Pentoxifylline, Lipitor to Atorvastatin). Four-strategy lookup: exact, approximate, brand map, drugs endpoint. Retrieves RxCUI identifiers and pairwise interactions.
Receives triple context: original image (base64), Gemma 4 analysis, and RxNorm drug data. Provides clinical interpretation, interaction warnings, conditions, and next steps.
LiteRT-LM runs Gemma 4 on CPU inside Docker. Ollama runs Gemma 4 and MedGemma on GPU in separate containers. No memory contention.
Zero cloud inferenceMedical detection triggers a three-stage chain: Gemma 4 analysis, RxNorm drug lookup, MedGemma interpretation. Each stage feeds context to the next.
RxNorm + MedGemma chainExact match, approximate term, brand-to-generic mapping (20+ brands), and drugs endpoint. Pairwise interaction checks for multi-drug prescriptions.
NLM REST APITailscale WireGuard mesh: no port forwarding, no public IP. Images deleted after inference. GDPR-aligned architecture for EU healthcare.
GDPR-readySingle docker compose up. Persistent volumes for models (survive rebuilds). Ollama containers deployed separately on GPU nodes.
Webcam frames every 8s to Ollama GPU. Rate-limited: skip if busy. Medical routing on video too. Cloudflared for HTTPS camera access.
Cloudflared tunnel