PaliGemma Chest X-Ray Vision Model

Fine-tuned vision-language model for Portuguese chest X-ray report generation.

Model Details

  • Base Model: google/medgemma-4b-it
  • Task: Medical image report generation (image-text-to-text)
  • Language: Portuguese (Brazilian)
  • Fine-tuning Method: QLoRA (4-bit quantization)

Capabilities

This model can:

  • Analyze chest X-ray images
  • Generate structured radiology reports with TÉCNICA, ACHADOS, and IMPRESSÃO sections
  • Identify common chest pathologies

Usage

from transformers import PaliGemmaProcessor, PaliGemmaForConditionalGeneration
from PIL import Image

processor = PaliGemmaProcessor.from_pretrained("MedeHealth/paligemma-chest-xray-vision")
model = PaliGemmaForConditionalGeneration.from_pretrained("MedeHealth/paligemma-chest-xray-vision")

image = Image.open("chest_xray.png")
prompt = "Analyze this chest X-ray and provide a structured radiology report."

inputs = processor(text=prompt, images=image, return_tensors="pt")
outputs = model.generate(**inputs, max_new_tokens=1024)
report = processor.decode(outputs[0], skip_special_tokens=True)
print(report)

Deployment

Deploy to HuggingFace Inference Endpoints with task type: image-text-to-text

Limitations

  • For research and educational purposes
  • Should not be used as sole basis for clinical decisions
  • Requires radiologist review and validation
Downloads last month
2
Safetensors
Model size
4B params
Tensor type
F16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for MedeHealth/paligemma-chest-xray-vision

Finetuned
(481)
this model
Quantizations
1 model