Abstract
Deep learning models for medical image segmentation are often limited by the scarcity of high-quality, annotated datasets. While generative models offer a potential solution for data augmentation, they typically require large-scale training data to capture domain-specific features. We present MedDiff-FT, a resource-efficient framework that fine-tunes Stable Diffusion to generate high-fidelity, paired medical images and segmentation masks using as few as 30 training samples. By integrating structural mask guidance with automated quality filtering, MedDiff-FT ensures pixel-level alignment between lesions and masks. Experimental results across five diverse datasets demonstrate that MedDiff-FT improves segmentation performance by an average of 1-3% in Dice score, providing a practical and accessible tool for medical data augmentation.
Introduction
The development of robust medical image segmentation models is hindered by the "data-hungry" nature of deep learning and the high cost of expert annotation. Generative models, particularly Diffusion Models (DMs), have shown promise in synthesizing training data. However, standard DMs often struggle with the structural dependency required in medical imaging—where a generated lesion must perfectly align with its corresponding mask—and typically require extensive datasets to overcome the domain shift from natural to medical images.
MedDiff-FT addresses these challenges by enabling high-quality synthesis in low-data regimes. It leverages the prior knowledge of large-scale foundation models and adapts them to specific medical modalities through efficient fine-tuning and structural guidance.
Methodology
The MedDiff-FT framework consists of several key components designed to maximize data efficiency and structural fidelity.
Data-Efficient Fine-tuning and Structural Guidance
Instead of training from scratch, MedDiff-FT fine-tunes Stable Diffusion 1.5 using specific "trigger words" to represent lesion types. By unfreezing U-Net parameters, the model adapts to medical noise patterns and intensities in under 20 minutes on a single consumer-grade GPU. During the inference phase, a dynamic adaptive guiding mask constrains the diffusion process, ensuring lesions are generated within specific spatial regions while maintaining the integrity of the healthy background.
The "Repair" Paradigm and Quality Control
A unique feature of MedDiff-FT is the "non-lesion image generator." By inverting masks during training, the model learns to "repair" lesion areas back into healthy tissue, allowing for the generation of diverse backgrounds. To ensure the utility of synthetic data, an automated quality assessment protocol using DINOv2 features filters out "hallucinations" or overfitted copies. Finally, morphological mask corrosion is applied to refine lesion boundaries.
Experimental Results
MedDiff-FT was evaluated on five public datasets: skin lesions (PH2, ISIC-2017, ISIC-2018), breast cancer ultrasound (BUSI), and thyroid ultrasound (DDTI).
Performance Gains
Augmenting training sets with approximately 2,750 synthetic pairs led to a consistent improvement in Dice scores across four major segmentation architectures: UPerNet, DeepLabV3+, Swin Transformer, and nnU-Net. For instance, on the BUSI dataset, the nnU-Net model's performance improved from 77.01% to 78.69%.
Efficiency and Accessibility
The framework is highly efficient, requiring less than 30 minutes for fine-tuning on a 24GB VRAM GPU. This makes it a viable solution for clinical research environments with limited computational resources.
Discussion and Conclusion
MedDiff-FT demonstrates that for medical AI, the quality and structural alignment of synthetic data are more critical than sheer volume. By utilizing a "lighter" approach compared to heavy controllable generation tools like ControlNet, MedDiff-FT remains stable even with extremely limited training samples.
Future work will explore extending this framework to 3D volumetric data (e.g., CT or MRI), which presents additional challenges in maintaining spatial consistency across slices. MedDiff-FT represents a significant step toward democratizing high-fidelity medical data augmentation.
Summary updated