Abstract
Colonoscopy is crucial for identifying adenomatous polyps and preventing colorectal cancer. However, developing robust models for polyp detection is challenging by the limited size and accessibility of existing colonoscopy datasets. While previous efforts have attempted to synthesize colonoscopy images, current methods suffer from instability and insufficient data diversity. Moreover, these approaches lack precise control over the generation process, resulting in images that fail to meet clinical quality standards. To address these challenges, we propose CCIS-DIFF, a Controlled generative model for high-quality Colonoscopy Image Synthesis based on a Diffusion architecture. Our method offers precise control over both the spatial attributes (polyp location and shape) and clinical characteristics of polyps that align with clinical descriptions. Specifically, we introduce a blur mask weighting strategy to seamlessly blend synthesized polyps with the colonic mucosa, and a text-aware attention mechanism to guide the generated images to reflect clinical characteristics. Notably, to achieve this, we construct a new multi-modal colonoscopy dataset that integrates images, mask annotations, and corresponding clinical text descriptions. Experimental results demonstrate that our method generates high-quality, diverse colonoscopy images with fine control over both spatial constraints and clinical consistency, offering valuable support for downstream segmentation and diagnostic tasks.
Introduction
Developing AI for automatic polyp detection is a high-stakes task—missing a polyp during a colonoscopy can lead to undetected colorectal cancer. However, training these models requires massive amounts of high-quality, annotated data. In the medical field, such data is notoriously scarce due to privacy concerns and the high cost of expert annotation.
While researchers have tried using Generative Adversarial Networks (GANs) and Diffusion models to synthesize extra training data, existing methods fall short in two ways. First, they often lack precise control over spatial placement and clinical appearance (e.g., color or swelling). Second, synthetic polyps often suffer from poor integration, appearing like "stickers" pasted onto a background with harsh edges that do not match the surrounding tissue. This leads to "noisy" data that can confuse downstream AI models.
Methodology
CCIS-DIFF builds upon the ControlNet architecture, using a pre-trained Stable Diffusion v1.5 model as its foundation. The framework introduces two primary innovations to solve the control and realism issues:
- Blur Mask Weighting Strategy (BMWS): Instead of using a "hard" binary mask for the polyp shape, the model applies a Gaussian blur to the mask edges. It then uses two separate mask encoders and a multi-layer perceptron (MLP) to learn how to blend the polyp features into the background mucosa seamlessly.
- Text-Aware Attention Mechanism (TAAM): In standard models, structural constraints (the mask) often overpower text prompts. TAAM calculates a similarity matrix between text tokens and image pixels, ensuring the model adheres to clinical descriptions for every part of the generated polyp.
To train this text-controlled model, the researchers constructed a new multi-modal colonoscopy dataset. They augmented image-mask pairs from established benchmarks (EndoScene, CVC-ClinicDB, and Kvasir) using a LLaMA-based agent. This virtual doctor generated detailed clinical captions describing the polyp's color, shape, texture, and degree of swelling, resulting in a dataset of triplets (Image, Mask, Text) for fine-grained training.
Results and Discussion
CCIS-DIFF significantly outperforms standard ControlNet and Uni-ControlNet across multiple dimensions. It achieved a Fréchet Inception Distance (FID) of 71.73, compared to ControlNet’s 87.32, indicating superior visual realism. Text alignment, measured by CLIP-score (31.96), confirmed that generated images accurately reflect clinical descriptions.
Crucially, the synthetic data proved highly effective for downstream tasks. When CCIS-DIFF's synthetic images were added to the training set of a segmentation model (PraNet), the model's performance on the Kvasir dataset improved from 89.2 to 92.8 mDice. This demonstrates that the synthetic data is high-fidelity enough to effectively train models for real-world clinical applications. A key insight from the study was identifying the "Visual Dominance" bias, where structural masks tend to suppress textual nuances; the TAAM module provides a surgical fix for this specific imbalance.
Conclusion
CCIS-DIFF represents a significant advancement in controlled medical image synthesis. While the model currently relies on a general-purpose Stable Diffusion prior and requires substantial computational resources, it demonstrates the power of combining diffusion models with LLM-augmented datasets. Future work will focus on expanding the framework to a broader range of colonic pathologies and optimizing the architecture for lower-end hardware.
Summary updated