DEV Community

Romina Mendez
Romina Mendez

Posted on

MedGemma: Google’s Open-Source AI Model for Healthcare

After attending Google I/O Connect 🇩🇪 Berlin 2025, one of the topics that really caught my attention was Google’s launch of its new open-source AI models, known as Gemma, a family of lightweight models designed to bring advanced AI capabilities to a broader developer community.

Among them, MedGemma stands out as a variant optimized for medical text and image analysis. So I decided to run a quick proof of concept and put together this short article to give you an overview of the models, how to use them, and show you a real example you can try on your own.

If you want to see my post with all the most relevant news you can see them in the following Google I/O Connect 2025 Recap: Gemini, Open Models, and AI in Action


💎 What is Gemma?

Gemma is a family of open language models developed by Google DeepMind and other Google teams. Built on the same underlying technology as the Gemini models, 💎Gemma models offer free access to their weights. While categorized as "open models" their terms of use, redistribution rights, and ownership vary by version and may not conform to standard open-source licenses.

The Gemma family includes variants tailored to different use cases, such as code generation, multimodal processing (text and images), structured data reasoning, and content classification. MedGemma is a specialized variant optimized for medical applications, with the ability to interpret clinical text and medical images such as mammograms. Other models, such as ShieldGemma 2, focus on detecting harmful content, while DataGemma integrates real-world statistical data through retrieval techniques to improve factual accuracy and reduce hallucinations in model outputs.


❤️ MedGemma: Introducing MedGemma

Among these, MedGemma stands out as the medically optimized model within the Gemma family. It was officially released by Google DeepMind between May 20–22, 2025, during Google I/O,

MedGemma is available in two distinct configurations, tailored for different needs:

  • 🩺 MedGemma 4B (Multimodal):

    Designed to handle both clinical text and medical images, this version integrates a SigLIP image encoder and is well-suited for tasks such as classification, interpretation, and synthetic data generation.

  • 📖 MedGemma 27B (Text-only):

    Focused exclusively on medical text processing, this larger model (with 27 billion parameters) is optimized for deep clinical comprehension and inference-time reasoning.

In the following sections, we’ll demonstrate a simple implementation using MedGemma via Hugging Face. However, this model is also accessible on Google Cloud, depending on your preferred development stack.


❤️ MedGemma: Use cases

Thanks to its multimodal capabilities, MedGemma opens the door to a wide range of potential applications in the healthcare.

Below are several implementation scenarios I identified that showcase how MedGemma can be applied in real-world clinical or research contexts:

  1. AI-assisted detection in medical imaging Support for early identification of clinical findings in mammograms, X-rays, CT scans, or ultrasounds through visual pattern analysis.

  2. Summarization of medical reports with attached images Ability to generate automatic summaries from clinical reports that include image references, improving efficiency in medical documentation.

  3. Virtual assistant for diagnostic interpretation Real-time support for healthcare professionals in interpreting findings from medical images and linking them to patient history or reported symptoms.

  4. Synthetic data generation for medical training Generation of simulated clinical text from image inputs, useful for medical education or testing diagnostic tools.

  5. Image-text consistency verification Automatic validation of whether the written report accurately reflects the visual content of the associated medical image.


⚒ Prerequisites

Hugging Face Access Token:

To use MedGemma via Hugging Face, you’ll need a read access token linked to your Hugging Face account.

You can generate it here: https://huggingface.co/settings/tokens and then, follow the step-by-step instructions shown in the image below to set it up properly.


⚒ Tutorial

If you want to find the complete code, including the exploratory data analysis and dataset files, you can check out my GitHub repository

GitHub logo r0mymendez / MedGemma

MedGemma: Google’s Open-Source AI Model for Healthcare

Buy Me A Coffee


🔄 License Notice

This notebook is based on the official Google tutorial "quick_start_with_hugging_face", released under the Apache 2.0 License.

Copyright 2025 Google LLC. Licensed under the Apache License, Version 2.0.




💎 What is Gemma?

Gemma is a family of open language models developed by Google DeepMind and other Google teams. Built on the same underlying technology as the Gemini models, Gemma models offer free access to their weights. While categorized as "open models," their terms of use, redistribution rights, and ownership vary by version and may not conform to standard open-source licenses.

gemma

The Gemma family includes variants tailored to different use cases, such as code generation, multimodal processing (text and images), structured data reasoning, and content classification. MedGemma is a specialized variant optimized for medical applications, with the ability to interpret clinical text and medical images such as mammograms. Other models, such as ShieldGemma 2, focus on detecting…

If you find this tutorial helpful, feel free to leave a star ⭐️ and follow me to get notified about new articles. Your support helps me grow within the tech community and create more valuable content! 🚀


🩻 Example Output from MedGemma

Below you can see an example of the kind of output you can generate by running this model.

This tutorial is based on the official notebook provided by Google Health, which you can find here: 🔗 Colab – MedGemma Quick Start with Hugging Face

The following image was taken from a public dataset on Kaggle: Bone Fracture Detection: Computer Vision Project🔗 View dataset

🩻 Image usedfracture-of-the-humeral-capitellum-milch-type-1-1-1-_jpg.rf.8b022b79c884d0b37d923a3c961591c6.jpg


[ MedGemma Input ]

  • 📄 Prompt : "Describe this radiography pic"
  • 👤 Role: You are a board-certified radiologist specialized. Respond using appropriate clinical terminology


[ MedGemma Output ]

Based on the provided radiograph, the following observations can be made:

  • Anatomy: The image depicts a lateral view of the left humerus. The bony structures of the humerus, including the humeral head, greater and lesser tubercles, and the shaft of the humerus, are visible. The joint spaces are also apparent.
  • Findings: There is a radiopaque lesion within the humeral shaft, which could represent a bone lesion. Further evaluation is needed to determine the nature of the lesion.
  • Impression: The radiograph shows a lesion within the humeral shaft. Further imaging, such as MRI or CT, is recommended to characterize the lesion and determine its etiology.

Disclaimer: This interpretation is based solely on the provided radiograph and is not a definitive diagnosis. A complete evaluation requires clinical history, physical examination, and potentially additional imaging studies.


📚 References

  1. DeepMind. (s.f.). MedGemma – Gemma models for medical applications. Google DeepMind. https://deepmind.google/models/gemma/medgemma/
  2. Google. (s.f.). Health AI Developer Foundations – Terms of use. https://developers.google.com/health-ai-developer-foundations/terms
  3. MedGemma.org. (s.f.). MedGemma – Features and capabilities overview. https://medgemma.org/#features

Top comments (0)