<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Joti Lohana</title>
    <description>The latest articles on DEV Community by Joti Lohana (@jotilohana21).</description>
    <link>https://dev.to/jotilohana21</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4176660%2F3810a2ae-92b8-43c0-a8eb-c566d07f30fc.png</url>
      <title>DEV Community: Joti Lohana</title>
      <link>https://dev.to/jotilohana21</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jotilohana21"/>
    <language>en</language>
    <item>
      <title>MedScribe AI — An Agentic Radiologist's Assistant</title>
      <dc:creator>Joti Lohana</dc:creator>
      <pubDate>Thu, 15 Oct 2026 05:00:56 +0000</pubDate>
      <link>https://dev.to/jotilohana21/medscribe-ai-an-agentic-radiologists-assistant-40i0</link>
      <guid>https://dev.to/jotilohana21/medscribe-ai-an-agentic-radiologists-assistant-40i0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fki6nukzl35x2l892y89b.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fki6nukzl35x2l892y89b.png" alt=" " width="799" height="357"&gt;&lt;/a&gt;---&lt;br&gt;
title: "MedScribe AI — An Agentic Radiologist's Assistant Built with Open-Source AI"&lt;br&gt;
published: true&lt;/p&gt;

&lt;h2&gt;
  
  
  tags: devchallenge, hf26challenge, ai, healthcare
&lt;/h2&gt;

&lt;h2&gt;
  
  
  The Problem
&lt;/h2&gt;

&lt;p&gt;Pakistan has approximately 1 radiologist per 100,000 people in rural areas. Radiology reporting is slow, expensive, and inaccessible — especially in low-resource healthcare settings where radiologists are scarce. Most diagnostic AI tools stop at a raw prediction, leaving clinicians unable to trust or act on the output efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;MedScribe AI&lt;/strong&gt; changes that.&lt;/p&gt;




&lt;h2&gt;
  
  
  What We Built
&lt;/h2&gt;

&lt;p&gt;MedScribe AI is an agentic radiologist's assistant that combines computer vision with generative AI to produce full structured clinical reports from chest X-ray images — in seconds.&lt;/p&gt;

&lt;p&gt;🔗 &lt;strong&gt;Live Demo:&lt;/strong&gt; &lt;a href="https://medscrib-ai.streamlit.app/" rel="noopener noreferrer"&gt;https://medscrib-ai.streamlit.app/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Built in &lt;strong&gt;48 hours&lt;/strong&gt; at the Pak Angels Generative &amp;amp; Agentic AI Hackathon (Cohort 11) by a team of 6 from Pakistan 🇵🇰&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr8fbgedu8g643bw3ht04.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fr8fbgedu8g643bw3ht04.png" alt=" " width="799" height="357"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgdi1alscjsn2vzlditap.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fgdi1alscjsn2vzlditap.png" alt=" " width="799" height="360"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  How It Works
&lt;/h2&gt;

&lt;p&gt;The system runs in three stages:&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 1 — Computer Vision Model
&lt;/h3&gt;

&lt;p&gt;We trained and benchmarked two models on the same held-out test set:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Model&lt;/th&gt;
&lt;th&gt;Accuracy&lt;/th&gt;
&lt;th&gt;Precision&lt;/th&gt;
&lt;th&gt;Recall&lt;/th&gt;
&lt;th&gt;F1-Score&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;ResNet18 (fine-tuned)&lt;/td&gt;
&lt;td&gt;90.5%&lt;/td&gt;
&lt;td&gt;98.4%&lt;/td&gt;
&lt;td&gt;88.4%&lt;/td&gt;
&lt;td&gt;93.2%&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;DenseNet121 TorchXRayVision&lt;/td&gt;
&lt;td&gt;63.8%&lt;/td&gt;
&lt;td&gt;94.8%&lt;/td&gt;
&lt;td&gt;53.3%&lt;/td&gt;
&lt;td&gt;68.3%&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;We selected &lt;strong&gt;ResNet18&lt;/strong&gt; as our primary model — it consistently outperformed the baseline on every metric, and more importantly, it caught more true pneumonia cases (higher recall), which matters most in a clinical setting.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Grad-CAM explainability&lt;/strong&gt; was applied to visualize the exact regions of the X-ray that influenced the prediction — so clinicians can see &lt;em&gt;why&lt;/em&gt; the model flagged something, not just &lt;em&gt;what&lt;/em&gt; it flagged.&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 2 — AI Agent Pipeline (LangGraph + Groq)
&lt;/h3&gt;

&lt;p&gt;The pipeline runs as a chain of four agents:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;Agent&lt;/th&gt;
&lt;th&gt;What it does&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;👁️ Vision&lt;/td&gt;
&lt;td&gt;Runs the CV model, returns detected pathologies + confidence scores&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🧠 Reasoning&lt;/td&gt;
&lt;td&gt;LLM agent decides which tools to call in what order (ReAct loop)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;📋 Reporting&lt;/td&gt;
&lt;td&gt;Generates structured clinical report + plain-language patient summary&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;🚨 Escalation&lt;/td&gt;
&lt;td&gt;Flags critical cases for immediate radiologist attention&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;The workflow is &lt;strong&gt;not hardcoded&lt;/strong&gt; — the LLM decides which tools to call and in what order based on the input. This makes the system genuinely agentic, not just a scripted pipeline.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;LLM used:&lt;/strong&gt; openai/gpt-oss-120b served via Groq&lt;br&gt;
&lt;strong&gt;Agent framework:&lt;/strong&gt; LangGraph (ReAct agent)&lt;/p&gt;

&lt;h3&gt;
  
  
  Stage 3 — Application Interface (Streamlit)
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Upload any chest X-ray → full clinical report in seconds&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Doctor-facing report:&lt;/strong&gt; Findings → Impression → Recommendation → Urgency → Reasoning&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Patient-facing summary:&lt;/strong&gt; Plain language, no medical jargon&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Bilingual output: English + Urdu 🇵🇰&lt;/strong&gt; — because patients deserve to understand their own diagnosis&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Downloadable PDF&lt;/strong&gt; including original X-ray + Grad-CAM heatmap&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;
  
  
  Why Open Source AI?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;openai/gpt-oss-120b via Groq&lt;/strong&gt; — fast inference, no patient data sent to proprietary servers&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;TorchXRayVision&lt;/strong&gt; — open-source medical imaging foundation model, fully auditable&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;LangGraph&lt;/strong&gt; — open-source agent framework, fully customizable for clinical workflows&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;PyTorch + torchvision&lt;/strong&gt; — open weights, reproducible training, no vendor lock-in&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Running on open models means &lt;strong&gt;patient X-rays never leave the user's control&lt;/strong&gt; — critical for healthcare privacy. In Pakistan, this also means the cost stays low enough that the product can actually work as a business.&lt;/p&gt;




&lt;h2&gt;
  
  
  Who Would Pay For This?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Private clinics in Pakistan and South Asia with no on-site radiologist&lt;/li&gt;
&lt;li&gt;Telehealth platforms needing automated preliminary screening reports&lt;/li&gt;
&lt;li&gt;Hospital chains processing high volumes of routine chest X-rays&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;A clinic paying &lt;strong&gt;$50/month&lt;/strong&gt; for AI-powered preliminary triage is far cheaper than hiring a part-time radiologist. That's the side hustle angle — open-source AI makes the unit economics actually work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Tech Stack
&lt;/h2&gt;

&lt;p&gt;CV Model: PyTorch · ResNet18 · TorchXRayVision · Grad-CAM · scikit-learn&lt;br&gt;
AI Agents: LangGraph · Groq (gpt-oss-120b) · ReAct&lt;br&gt;
App: Streamlit · Python&lt;/p&gt;




&lt;h2&gt;
  
  
  Why Pakistan Needs This 🇵🇰
&lt;/h2&gt;

&lt;p&gt;Pakistan has 1 radiologist per 100,000 people in rural areas. Most diagnostic AI stops at a prediction — MedScribe AI goes further, generating a full clinical report, flagging urgent cases, and explaining its reasoning in plain language that both doctors and patients can understand.&lt;/p&gt;

&lt;p&gt;Open-source AI isn't just a technical choice here — for healthcare in underserved regions, it's the only choice that makes the economics work.&lt;/p&gt;




&lt;h2&gt;
  
  
  Limitations &amp;amp; What's Next
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Current limitations:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tested only on pediatric chest X-rays — performance drops on adult datasets (domain shift)&lt;/li&gt;
&lt;li&gt;Agent output not verified by a human clinician before being shown to the user&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Next steps:&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Human-in-the-loop verification where radiologists can correct AI findings&lt;/li&gt;
&lt;li&gt;Expand beyond binary classification to detect multiple pathologies&lt;/li&gt;
&lt;li&gt;Fine-tune on multiple chest X-ray sources for better generalization&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Built with open-source AI, for the patients who need it most.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>devchallenge</category>
      <category>hf26challenge</category>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
