---
title: "MedScribe AI — An Agentic Radiologist's Assistant Built with Open-Source AI"
published: true

tags: devchallenge, hf26challenge, ai, healthcare

The Problem

Radiology reporting is slow, expensive, and inaccessible — especially in
low-resource settings like Pakistan where radiologists are scarce. Most
diagnostic AI tools stop at a raw prediction, leaving clinicians unable
to act efficiently.

MedScribe AI changes that.

What We Built

MedScribe AI is an agentic assistant that supports radiologists by
combining computer vision with generative AI to produce full clinical
reports from chest X-ray images — in seconds.

🔗 Live Demo:


How It Works

The system runs in three stages:

1. Computer Vision Model

  • ResNet18 trained on pediatric chest X-rays (Kaggle dataset)
  • 90.5% accuracy, 98.4% precision, 93.2% F1-score
  • Grad-CAM explainability — highlights exactly which regions influenced the prediction

2. AI Agent Pipeline (LangGraph + Groq)

Four agents run in sequence:

Agent What it does
Vision Runs CV model, returns findings + confidence
Reasoning LLM decides which tools to call (ReAct loop)
Reporting Generates structured clinical report
Escalation Flags critical cases for immediate attention

3. Application Interface (Streamlit)

  • Upload chest X-ray → get full clinical report in seconds
  • Doctor-facing report + patient-facing plain language summary
  • Bilingual output: English + Urdu 🇵🇰
  • Downloadable PDF with original X-ray + Grad-CAM heatmap

Why Open Source AI?

  • openai/gpt-oss-120b via Groq — fast, free inference with no data sent to proprietary servers
  • TorchXRayVision — open-source medical imaging foundation model
  • LangGraph — open-source agent framework, fully customizable
  • PyTorch + torchvision — open weights, reproducible training

Running on open models means patient X-rays never leave the
user's control — critical for healthcare privacy.

Who Would Pay For This?

  • Private clinics in Pakistan and South Asia with no on-site radiologist
  • Telehealth platforms needing automated preliminary reports
  • Hospital chains processing high volumes of routine chest X-rays

A clinic paying $50/month for preliminary AI triage is far cheaper
than hiring a part-time radiologist.

Tech Stack

CV Model: PyTorch · ResNet18 · TorchXRayVision · Grad-CAM
AI Agents: LangGraph · Groq (gpt-oss-120b) · ReAct
App: Streamlit · Python

Team

Built in 48 hours at Pak Angels Generative & Agentic AI Hackathon
(Cohort 11) by a team of 6 from Pakistan 🇵🇰

Open source AI isn't just a technical choice — for healthcare in
underserved regions, it's the only choice that makes the economics work.