Boosting Dermatoscopic Lesion Segmentation Via Diffusion Models With Visual And Textual Prompts

Shiyi Du, Xiaosong Wang, Yongyi Lu, Yuyin Zhou, Shaoting Zhang, Alan L. Yuille, Kang Li, Zongwei Zhou

TL;DR

This paper introduces a novel framework that uses diffusion models (specifically ControlNet) to generate highly realistic and controllable synthetic skin lesion images. By using both visual masks and textual descriptions as "prompts," the authors can generate specific rare disease patterns that significantly boost the performance of downstream segmentation models, outperforming traditional GAN-based methods by over 5% in Dice coefficients.

What Problem Does This Paper Address?

In medical imaging, "data hunger" is a constant hurdle. While deep learning models require massive amounts of annotated data to perform well, medical datasets are often small, and high-quality annotations from experts are expensive and time-consuming to obtain. Furthermore, medical data is often plagued by class imbalance: common conditions are over-represented, while "corner cases" or rare, dangerous lesions (like specific types of melanoma) are scarce.

Previous attempts to solve this using Generative Adversarial Networks (GANs) fell short because they lacked fine-grained control. You could ask a GAN to "make a skin lesion," but you couldn't easily tell it to "put a melanoma with a specific pigment network at these exact coordinates." This paper aims to provide that "steering wheel" for medical image synthesis.

Methods

The authors move away from GANs and leverage the power of Diffusion Models, specifically building upon Stable Diffusion and ControlNet.

The framework uses two types of prompts to guide the image generation:

  1. Visual Prompts: Segmentation masks that define the exact shape and location of the lesion.
  2. Textual Prompts: Labels describing the lesion type (e.g., Melanoma, Nevus) and specific clinical attributes (e.g., pigment networks, globules, streaks).

A key innovation is their Automatic Lesion Mask Generation module. Instead of relying only on existing masks, they created a system to generate "unlimited" synthetic masks. They start with simple geometric shapes (like circles), apply Gaussian blurring, elastic deformations, and morphological operations to create realistic, varied lesion boundaries. These synthetic masks are then fed into the diffusion model to "fill in" the realistic medical textures.

Datasets

The study primarily utilizes the International Skin Imaging Collaboration (ISIC) dataset (specifically versions from 2017, 2018, and 2019).

  • G Set (Generation): 1,594 samples used to train the generative model.
  • S Set (Segmentation): 1,000 samples used to evaluate the downstream segmentation task, split into training, validation, and testing sets.

Key Insights and Ideas

  • Controllability is King: The transition from GANs to Diffusion-plus-ControlNet allows researchers to synthesize specific "rare cases" on demand. This is crucial for training models to recognize dangerous but infrequent pathologies.
  • Texture Fidelity: Diffusion models excel at capturing the stochastic, fine-grained textures of human skin and lesions. The paper highlights that GANs often produce "blurry" or "hallucinated" textures, whereas diffusion models maintain high structural similarity (SSIM) to real images.
  • Synthetic Data as a Force Multiplier: The results show a clear "more is better" trend. As the number of synthetic images added to the training set increased (from 1K to 5K), the segmentation performance continued to climb, suggesting that the synthetic images are diverse enough to prevent the model from over-fitting.

Key Results

The authors compared their method against Pix2PixHD (a popular GAN-based image-to-image translation model):

  • Image Quality: Their model achieved an SSIM of 0.80, a 9% improvement over Pix2PixHD (0.71). It also showed superior Peak Signal-to-Noise Ratio (PSNR).
  • Segmentation Boost: When synthetic data from their model was used to augment a segmentation task, the model achieved a Dice score of 0.914. This is a significant jump over the baseline U-Net (0.861) and even outperformed specialized architectures like DCSAU-Net (0.903).
  • Qualitative "Quiz": The paper opens with a "quiz" (Fig. 1) challenging readers to distinguish real samples from synthesized ones, demonstrating the high visual fidelity of the results.

Limitations and Future Work

While the results are impressive, the paper leaves a few areas for future exploration:

  • Computational Overhead: Diffusion models are notoriously more computationally expensive and slower to sample from than GANs. The paper does not focus on the inference time or hardware requirements for generating these large synthetic datasets.
  • Domain Expansion: The current work is focused strictly on dermatoscopic (skin) images. The authors suggest that the "transferability" of this method to other modalities (like CT or MRI) is a goal, but it hasn't been demonstrated here.
  • Prompt Engineering: The textual prompts are currently derived from existing dataset labels. Future work could involve using Large Language Models (LLMs) to generate even more descriptive and nuanced textual prompts for more complex medical scenes.

Summary updated

BibTeX
@inproceedings{du2024boosting,
  author = {Shiyi Du and Xiaosong Wang and Yongyi Lu and Yuyin Zhou and Shaoting Zhang and Alan L. Yuille and Kang Li and Zongwei Zhou},
  title = {{Boosting Dermatoscopic Lesion Segmentation Via Diffusion Models With Visual And Textual Prompts}},
  booktitle = {ISBI},
  year = {2024},
  doi = {10.1109/isbi56570.2024.10635486},
}
Figure