Downloads · 30 days
23
19% of all-time downloads
WafaaFraih/medical-image-captioning-roco
medical-image-captioning-roco is a machine learning model from WafaaFraih. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This model is fine-tuned for medical image captioning using the ROCOv2 radiology dataset.
Downloads · 30 days
23
19% of all-time downloads
All-time downloads
122
Public
Parameters
177M
707 MB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors707 MB · 100%
From the Hugging Face model README
This model is fine-tuned for medical image captioning using the ROCOv2 radiology dataset.
from transformers import AutoProcessor, AutoModelForCausalLM
from PIL import Image
# Load model and processor
processor = AutoProcessor.from_pretrained("WafaaFraih/medical-image-captioning-roco")
model = AutoModelForCausalLM.from_pretrained("WafaaFraih/medical-image-captioning-roco")
# Load and process image
image = Image.open("path_to_medical_image.jpg")
inputs = processor(images=image, return_tensors="pt")
# Generate caption
generated_ids = model.generate(pixel_values=inputs.pixel_values, max_length=100)
caption = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
print(caption)
Evaluated using Word Error Rate (WER) metric on medical image descriptions.
If you use this model, please cite:
@misc{medical-image-captioning,
author = {WafaaFraih},
title = {Medical Image Captioning Model},
year = {2025},
publisher = {Hugging Face},
url = {https://huggingface.co/WafaaFraih/medical-image-captioning-roco}
}