Downloads · 30 days
48
30% of all-time downloads
StanfordAIMI/chexanatomy-paligemma-3b-224
chexanatomy-paligemma-3b-224 is a text generation model from StanfordAIMI. Use it when you need the model to write or continue text. It is set up for peft. The card lists the license as gemma.
This release contains CheXanatomy adapter weights for a PaliGemma-based model. Use of these weights is subject to: - the license and usage terms of the underlying PaliGemma/Gemma base model - the license and terms gov…
Downloads · 30 days
48
30% of all-time downloads
All-time downloads
161
Public
Repo size
130 MB
Likes
1
Public
Click a slice to open those files.
.safetensors95.1 MB · 73%
From the Hugging Face model README
This release contains CheXanatomy adapter weights for a PaliGemma-based model. Use of these weights is subject to:
This release is provided for research use.
This repository contains the released CheXanatomy model for anatomy-aware vision-language modeling on chest radiographs.
CheXanatomy is described in:
CheXanatomy: Anatomy-Aware Vision-Language Modeling for Chest Radiographs
Sergios Gatidis, Curtis Langlotz, Christian Bluethgen
Published at MICCAI 2026: paper · arXiv:2606.08420 · interactive demo (runs the 10B-448 model)
CheXanatomy augments a pretrained vision-language model with explicit anatomical supervision in token space. Instead of introducing task-specific decoder heads, the model is trained autoregressively to generate anatomical localization and segmentation outputs as structured tokens.
The model supports anatomy-aware tasks such as:
The training approach uses synthetic chest radiographs generated from CT volumes, with forward-projected anatomical labels providing anatomically consistent 2D supervision.
This model is intended for research use in:
This release is not intended for:
CheXanatomy uses synthetic chest radiograph training data derived from CT volumes. Synthetic chest radiographs can be generated from the CT-RATE dataset together with the CheXsynth pipeline:
The CheXanatomy code repository is available at:
The model takes:
Example prompts:
detect heartsegment left lungsegment aortacaption <loc0400><loc0312><loc0703><loc0625>The model generates autoregressive token outputs that may include:
<loc0123><seg045>Segmentation masks may require postprocessing and token decoding using the utilities released in the CheXanatomy code repository.
from pathlib import Path
import torch
from peft import PeftConfig, PeftModel
from PIL import Image
from transformers import PaliGemmaForConditionalGeneration, PaliGemmaProcessor
model_id = "StanfordAIMI/chexanatomy-paligemma-3b-224"
peft_config = PeftConfig.from_pretrained(model_id)
base_model_id = peft_config.base_model_name_or_path
base_model = PaliGemmaForConditionalGeneration.from_pretrained(base_model_id)
model = PeftModel.from_pretrained(base_model, model_id)
processor = PaliGemmaProcessor.from_pretrained(base_model_id)
image = Image.open("chest_xray.png").convert("RGB")
prompt = "segment left lung"
inputs = processor(image, prompt, return_tensors="pt")
device = "cuda" if torch.cuda.is_available() else "cpu"
model = model.to(device)
inputs = {k: v.to(device) for k, v in inputs.items()}
with torch.no_grad():
outputs = model.generate(
**inputs,
max_new_tokens=256,
do_sample=False,
)
decoded = processor.decode(outputs[0], skip_special_tokens=False)
print(decoded) # <loc>/<seg> tokens; decode masks with the CheXanatomy repo utilities