Adapting Stable Diffusion Models for Domain-Specific Medical Imaging: A Case Study in Synthetic Retinal Fundus Image Generation
摘要
Despite extensive research, the adoption of AI solutions in real-world healthcare remains limited due to persistent challenges in model development: (i) restricted access to healthcare datasets due to privacy concerns, and (ii) poor quality of available data, which is often incomplete, imbalanced, and unrepresentative of diverse sociodemographic populations. Synthetic data has emerged as a promising solution to overcome these barriers by enabling the creation of high-quality, diverse, and privacy-preserving datasets. This work explores how general-purpose Stable Diffusion models can be effectively customized and controlled for domain-specific tasks, specifically for generating realistic and representative synthetic retinal fundus images. The focus is on generating images that not only capture key pathological features of diseases such as diabetic retinopathy and glaucoma but also reflect the natural variability in image characteristics, such as brightness, contrast, colorfulness, and sharpness, to support the development and evaluation of robust and AI-based tools for ophthalmology. Our methodological contributions to adapting general-purpose SD models for this domain include: i) leveraging both manual annotations and automatically extracted labels for image characteristics using the pyMDMA library; ii) optimizing inference hyperparameters with the Optuna framework; and iii) enforcing a terminal zero signal-to-noise ratio. To train and evaluate the proposed generative approach, we used two large-scale retinal fundus image datasets-EyePACS and AIROGS-comprising a total of 189,955 images. For evaluating the quality of the synthetic data, the computed metrics indicated promising performance in both realism (Improved Precision: 0.500, Density: 0.269) and diversity (Improved Recall: 0.526, Coverage: 0.351).