This model is a fine-tuned version of google/medgemma-4b-it for generating the FINDINGS section of structured chest X-ray radiology reports.
It was trained using LoRA (Low-Rank Adaptation) on the csrrg_ift_dataset containing instruction-following examples from MIMIC-CXR and CheXpert+ datasets.
Model Description
This model performs Structured Radiology Report Generation (SRRG) for chest X-rays, specifically generating detailed findings sections that describe anatomical observations organized by body regions (lungs, heart, mediastinum, bones, etc.).
Key characteristics:
Generates the FINDINGS section of radiology reports
Training framework: HuggingFace Transformers + PEFT
Usage
Loading the Model
python
1from transformers import AutoProcessor, AutoModelForVision2Seq
2from PIL import Image
3import torch
45# Load model and processor6model_name ="erjui/medgemma-4b-srrg-findings"7model = AutoModelForVision2Seq.from_pretrained(8 model_name,9 trust_remote_code=True,10 torch_dtype=torch.bfloat16,11 device_map="auto"12)13processor = AutoProcessor.from_pretrained("google/medgemma-4b-it", trust_remote_code=True)1415# Load chest X-ray image (single image for SRRG)16image = Image.open("chest_xray.jpg")1718# Prepare input19messages =[20{21"role":"system",22"content":[{"type":"text","text":"You are an expert radiologist."}]23},24{25"role":"user",26"content":[27{"type":"text","text":"Analyze the chest X-ray images and write the FINDINGS section of a radiology report. Use standard medical terminology and organize findings by anatomical regions."},28{"type":"image"}29]30}31]3233# Process and generate (max_images_per_sample: 1)34inputs = processor(images=image, text=messages, return_tensors="pt").to(model.device)35outputs = model.generate(**inputs, max_new_tokens=512)36generated_text = processor.decode(outputs[0], skip_special_tokens=True)3738print(generated_text)
Expected Output Format
FINDINGS:
Lungs and Airways:
- No pleural effusion or pneumothorax detected
- Bibasilar atelectasis present
Cardiovascular:
- Mild left ventricular enlargement
Musculoskeletal and Chest Wall:
- Bilateral rib fractures noted
Citation
If you use this model, please cite:
bibtex
1@article{kang2025automated,
2 title={Automated Structured Radiology Report Generation with Rich Clinical Context},
3 author={Kang, Seongjae and Lee, Dong Bok and Jung, Juho and Kim, Dongseop and Kim, Won Hwa and Joo, Sunghoon},
4 journal={arXiv preprint arXiv:2510.00428},
5 year={2025}
6}
Also cite the base model:
bibtex
1@article{sellergren2025medgemma,
2 title={Medgemma technical report},
3 author={Sellergren, Andrew and Kazemzadeh, Sahar and Jaroensri, Tiam and Kiraly, Atilla and Traverse, Madeleine and Kohlberger, Timo and Xu, Shawn and Jamil, Fayaz and Hughes, C{\'\i}an and Lau, Charles and others},
4 journal={arXiv preprint arXiv:2507.05201},
5 year={2025}
6}
Model Card Authors
Seongjae Kang (erjui)
Model Card Contact
For questions or issues, please open an issue on the model repository.