Context-Preserving Dermoscopic Editing: Mask-Guided Lesion-Aware Diffusion for Attribute Modification
Tao Sun · Yun Jiang · Yarong Jin · Zequn Zhang · Huanting Guo
Abstract
Controllable dermoscopic image editing has the potential to enable clinically meaningful data augmentation and to support diagnostic decision-making. However, existing diffusion-based approaches are not tailored to the unique constraints of lesion-level attribute modification. Meanwhile, generic editing methods commonly produce global changes or fail to preserve surrounding tissue context, risking alteration of diagnostic cues. To address these shortcomings, we propose CPDE, a context-preserving dermoscopic editing framework that utilizes mask-guided lesion-aware diffusion for precise attribute modification. CPDE employs a three-stage denoising pipeline with a dual-branch design that separates lesion editing from background reconstruction. The framework incorporates a Spatial-channel Transformer that predicts semantic residuals in $h$-space via sequential spatial–channel attention. Additionally, a lesion-aware mask-guided training strategy enforces semantic directionality while restricting optimization to pathology regions. Extensive experiments on dermoscopic benchmarks demonstrate that CPDE produces spatially localized, clinically coherent edits while preserving diagnostic context and background fidelity. Our method achieves superior performance with FID of 0.274, $S_{dir}$ of 0.486, and NS-LPIPS of 0.012, outperforming existing generative editing approaches.
Successful Page Load