InstEditSeg: Instruction-Driven Image Editing for Polyp and Skin Lesion Segmentation

Ziquan Liu, Zhewei Zhu, Xuyang Shi
9/2/2026
cs.CVcs.AI

Official code: wincharm001/InstEditSeg (0 stars, MIT, last commit 2026-09-01).

Abstract

Accurate segmentation of polyps and skin lesions is pivotal for clinical diagnosis, yet existing methods struggle with low contrast, ambiguous boundaries, and cross-domain distribution discrepancies. Discriminative networks and most diffusion-based segmentation approaches predict standalone binary masks, leaving the visual priors of large-scale pretrained generative models largely unexploited. We propose InstEditSeg, a unified generative framework that reformulates medical segmentation as an instruction-driven image editing problem. Instead of emitting a mask, the model renders a color-coded overlay on the original image, conditioned on a textual instruction, so that the edited output aligns with the natural image distribution learned by latent diffusion models and mitigates the domain gap between natural and medical imagery. To recover fine anatomical structures, we introduce DINOv3 as an auxiliary visual encoder and a DINO Feature Guidance Block that builds a multi-scale feature pyramid. The pyramid is fused into the diffusion U-Net by channel concatenation and zero-initialized convolution so that hierarchical discriminative priors can be injected without perturbing the pretrained weights. A dual-branch classifier-free guidance strategy requiring only two forward passes per denoising step reduces inference cost. On polyp and skin lesion benchmarks the framework achieves accuracy competitive with strong discriminative baselines, and it further demonstrates concrete advantages of the generative formulation: notably better cross-domain generalization on unseen data, more complete multi-lesion segmentation, instruction-conditioned task control, and sampling flexibility. We also analyze the strengths and limitations of the paradigm, including its color sensitivity and unsupported attribute-conditioned selection. Code is available at: https://github.com/wincharm001/InstEditSeg.

View on arXivView PDF

Code Implementations(1)

MIT
00C++, CudaSep 1, 20261 months agoMIT

Similar Papers

Cite this paper

@article{liu2026insteditseg,
  title  = {InstEditSeg: Instruction-Driven Image Editing for Polyp and Skin Lesion Segmentation},
  author = {Ziquan Liu and Zhewei Zhu and Xuyang Shi},
  year   = {2026},
  eprint = {2609.02004},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.02004v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.02004.svg)](https://codeofpaper.com/paper/2609.02004)

Discussion