RadAIChest X-ray Analysis
← Back to the tool

How RadAI works

RadAI turns a single chest radiograph into a structured, section-by-section report. It pairs Stanford's CheXagent vision-language model with a cost-aware GPU serving setup on AWS that runs only when someone actually uses it.

The model

CheXagent-2 (3B) is a multimodal vision-language model from Stanford AIMI, trained to read chest X-rays and describe findings in natural clinical language. RadAI prompts it once per anatomical region, then asks it to condense those findings into a single impression — mirroring how a radiologist structures a read.

3B
Parameters
5
Anatomical sections
VLM
Vision-language
GPU
T4 inference

The request pipeline

  1. 1

    Upload, in the browser

    Your X-ray is downscaled client-side and sent to a Next.js API route. AWS credentials live only on the server — they never reach the browser.

  2. 2

    Asynchronous invocation

    The server stores the image in S3 and calls SageMaker Asynchronous Inference. Async (rather than real-time) suits a model whose full report takes a minute or more, and it's what makes scale-to-zero possible.

  3. 3

    Section-by-section inference

    On the GPU, CheXagent standardizes the image and generates a finding for each of the five regions, then summarizes them into an impression.

  4. 4

    Poll & render

    The browser polls for the result in S3 and renders the structured report. The bundled sample skips all of this with a precomputed result, so the demo is instant.

Serving that scales to zero

A 3-billion-parameter model needs a GPU, and GPUs are expensive to leave running. So the endpoint is configured to scale to zero instances when idle: there is no cost when no one is using it. When a request arrives, autoscaling spins up a GPU, runs the analysis, and scales back down afterward.

Idle cost

$0 — no running instances

Warm scan

~45–60 seconds

Cold start

a few minutes to wake

The trade-off is the cold start: the first scan after a quiet period waits while a GPU boots and the model loads. For a portfolio-scale tool, that's a worthwhile price for near-zero idle cost.

Stack

Next.js 15React 19Tailwind CSSAWS SageMakerAsync InferenceAuto ScalingAmazon S3CheXagent-2 (3B)PyTorch

A clear limitation

RadAI is a research and educational demonstration. Its output is an AI-generated estimate, not a medical diagnosis, and it can be wrong. It is not a medical device and must never be used for clinical decisions. Always consult a qualified radiologist or physician.