UniMedSeg: Unified In-Context Learning for Multi-Paradigm 2D/3D Medical Image Segmentation

Yunzhou Li, Jiesi Hu, Yanwu Yang, Hanyang Peng, Chenfei Ye +3 more
7/14/2026
cs.CV

No official code found. Best implementation: black0017/MedicalZooPytorch (1,920 stars, MIT, PyTorch, last commit 2024-07-25).

Abstract

Medical image segmentation foundation models are expected to generalize across diverse clinical scenarios, yet existing universal methods remain fragmented by prompt paradigms and spatial dimensions. Visual in-context learning, interactive segmentation, and language-guided segmentation are typically handled by paradigm-specific models, while 2D and 3D images are also modeled separately. Such isolation prevents heterogeneous annotations and data from being jointly absorbed by a single scalable model and limits cross-paradigm knowledge transfer. To address this bottleneck, we propose UniMedSeg, a Transformer-centric universal segmentation framework that maps visual examples, geometric interactions, language instructions, and 2D/3D images into a shared sequence space, enabling heterogeneous medical supervision to be jointly learned through a unified in-context interface without prompt- or dimension-specific branches. To overcome the long-sequence memory bottleneck caused by visual contexts, we introduce Decoupled Split Attention, which reduces attention complexity to linear while preserving hardware-friendly computation and focused context-target interaction. Extensively trained and evaluated on a large corpus curated from 27 public datasets, UniMedSeg achieves state-of-the-art performance across visual in-context, interactive, and language-guided segmentation without task-specific fine-tuning, demonstrating strong generalization on diverse held-out tasks. The code and model weights are publicly available at https://github.com/Lii1228/UniMedSeg

View on arXivView PDF

Code Implementations(1)

PyTorchMIT

A pytorch-based deep learning framework for multi-modal 2D/3D medical image segmentation

1,920305Python, DockerfileJul 23, 20192 years agoMIT
3d-convolutional-networkbrats2018brats2019deep-learningdensenet+12 more

Similar Papers

Cite this paper

@article{li2026unimedseg,
  title  = {UniMedSeg: Unified In-Context Learning for Multi-Paradigm 2D/3D Medical Image Segmentation},
  author = {Yunzhou Li and Jiesi Hu and Yanwu Yang and Hanyang Peng and Chenfei Ye and Jianfeng Cao and Yixuan Yuan and Ting Ma},
  year   = {2026},
  eprint = {2607.12896},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2607.12896v1}
}

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/2607.12896.svg)](https://codeofpaper.com/paper/2607.12896)

Discussion