Healthcare AI Examples
Healthcare AI Examples is a comprehensive collection of code samples, templates, and solution patterns that demonstrate how to deploy and use Microsoft's healthcare AI models across diverse medical scenarios—from basic model deployment to advanced multimodal healthcare applications.
This repository contains comprehensive information to help you get started with Microsoft's cutting-edge healthcare AI models.
[!IMPORTANT]
Healthcare AI Examples is a code sample collection intended for research and model development exploration only. The models, code and examples are not designed or intended to be deployed in clinical settings as-is nor for use in the diagnosis or treatment of any health or medical condition, and the individual models' performances for such purposes have not been established. By using the Healthcare AI Examples, you are acknowledging that you bear sole responsibility and liability for any use of these models and code, including verification of outputs and incorporation into any product or service intended for a medical purpose or to inform clinical decision-making, compliance with applicable healthcare laws and regulations, and obtaining any necessary clearances or approvals.
Features
- Model Deployment Patterns: Programmatic deployment examples for key healthcare AI models including MedImageInsight, MedImageParse, and CXRReportGen
- Basic Usage Examples: Zero-shot classification, image segmentation, and foundational calling patterns for medical imaging
- Advanced Solutions: Multimodal analysis, outlier detection, exam parameter extraction, and 3D image search capabilities
- Production-Ready Code: Concurrent calling patterns, batch processing, and efficient image preprocessing for scalable healthcare AI systems
- Fine-tuning Templates: Complete workflows for adapter training and model fine-tuning using AzureML pipelines
- Real-World Applications: Cancer survival prediction, radiology-pathology analysis, and clinical decision support scenarios
- Integrated Toolkit: Helper utilities and model libraries through the
healthcareai_toolkit package
- Azure Integration: Seamless deployment using Azure Developer CLI (azd) and Azure Machine Learning
What's Available
🚀 Deployment Samples and Basic Usage Examples
These notebooks show how to programmatically deploy some of the models available in the catalog:
- MedImageInsight [MI2] - Image and text embedding foundation model deployment
- MedImageParse [MIP] - Medical image segmentation model deployment
- CXRReportGen [CXR] - Chest X-ray report generation model deployment
- Providence-GigaPath [PGP] - Embedding model specifically for histopathology
📋 Basic Usage Examples and Patterns
These notebooks show basic patterns that require very little specialized knowledge about medical data or implementation specifics:
- MedImageParse call patterns [MIP] - a collection of snippets showcasing how to send various image types to MedImageParse and retrieve segmentation masks. See how to read and package xrays, ophthalmology images, CT scans, pathology patches, and more.
- Zero shot classification [MI2] - learn how to use MedImageInsight to perform zero-shot classification of medical images using its text or image encoding abilities.
- Training adapters [MI2] - build on top of zero shot pattern and learn how to train simple task adapters for MedImageInsight to create classification models out of this powerful image encoder. For additional thoughts on when you would use this and the zero shot patterns as well as considerations on fine tuning, read our blog on Microsoft Techcommunity Hub.
- Advanced calling patterns [MI2] - no production implementation is complete without understanding how to deal with concurrent calls, batches, efficient image preprocessing, and deep understanding of parallelism. This notebook contains snippets that will help you write more efficient code to build your cloud-based healthcare AI systems.
- Fine-tuning MedImageInsight with AzureML Pipelines [MI2] - comprehensive guide through prerequisites, data preprocessing, GPU-accelerated training, model deployment, and performance validation. Read our blog for additional insights on fine-tuning strategies.