Manuscript Offprint

arXiv:2608.22281

CiUNet: A Hybrid Swin-CNN UNet for Medical Image Segmentation

Bin Dong, Jinghong Chen

Open access. PaperVantage converted this article to text, so layout and figures may differ from the original.

Abstract

Medical image segmentation requires high accuracy and robustness, yet practical commercial deployment also demands privacy preservation and computational efficiency. In this context, the U-Net architecture, which can be inherently decoupled into independent encoder and decoder components, serves as a natural commercial choice. However, pure Transformer-based variants like Swin-UNet often suffer from insufficient local detail capture and limited interpretability. In this paper, we propose a lightweight hybrid architecture built upon the Swin-UNet framework. Our model integrates a parallel CNN encoder to complement the shallow layer reasoning of Swin Transformers with local texture features. To bridge the semantic gap and enhance fine-grained spatial detail recovery, we design an asymmetric feature fusion strategy and introduce cross-layer skip (XSkip) connections that explicitly propagate shallow CNN features into the decoder. We further incorporate novel loss functions and an auxiliary supervision head (Aux-Head) to strengthen training stability, boundary delineation, and intermediate feature interpretability. Extensive experiments on the Synapse multi-organ segmentation dataset demonstrate that our approach achieves state-of-the-art competitive Dice scores and Hausdorff distances, offering an accurate, efficient, and interpretable solution for clinical deployment. Due to our commercial considerations, we publicly release only the trained weights on the Synapse dataset and a lightweight demo predictor at https://github.com/ciphoBD/CiUNet.

1 Introduction

Medical image segmentation is a fundamental task in clinical workflows, facilitating disease diagnosis, surgical navigation, and treatment assessment. For decades, Convolutional Neural Networks (CNNs), especially the U-Net architecture [17], have served as the de facto standard for this task. The U-Net's encoder-decoder structure with skip connections effectively integrates semantic context with spatial details. However, the intrinsic locality of convolutional operations restricts CNNs from capturing long-range global dependencies, often leading to sub-optimal boundaries for anatomically complex organs. Following these advances, Vision Transformers (ViTs) [4] have emerged as a powerful alternative to CNNs due to their self-attention mechanism, which excels at modeling long-range dependencies [19]. Building upon this, TransUNet [3] and Swin-UNet [2] introduce the Transformer as a strong encoder for medical image segmentation. In particular, Swin-UNet inherits the hierarchical Swin Transformer blocks with shifted window attention, achieving superior performance by reducing the quadratic complexity of standard ViTs. Despite these advancements, Swin-UNet still suffers from three critical limitations stemming from its pure Transformer design: insufficient preservation of local textural details due to the lack of convolutional inductive bias; inaccurate spatial reconstruction caused by inadequate feature propagation across skip connections; and limited interpretability and training instability in its deep decoder architecture. This work attempts to mitigate these deficiencies.

by revisiting the encoder-decoder paradigm of Swin-UNet, with specific enhancements tailored to each of the above bottlenecks.

To systematically validate our architectural improvements, we conduct our evaluation on the Synapse multi-organ CT dataset [1], a widely used benchmark for abdominal organ segmentation. This dataset consists of 30 contrast-enhanced CT scans comprising 3,779 axial slices, with ground-truth annotations for eight distinct abdominal organs: the aorta, gallbladder, spleen, left/right kidney, liver, pancreas, and stomach. We select the Synapse dataset because it features diverse organ sizes, highly variable patient anatomies, and clinically complex boundaries—particularly for the pancreas and gallbladder—which makes it a rigorous testbed for evaluating advanced segmentation frameworks. To comprehensively assess segmentation performance, we employ the Dice Similarity Coefficient (DSC) for measuring region-wise volumetric overlap, and the 95% Hausdorff Distance (HD95) as a boundary-aware metric. While DSC reflects the overall segmentation quality, HD95 is clinically critical as it reveals the largest boundary misalignment, which directly impacts downstream tasks such as surgical navigation and radiation therapy planning.

Trained and rigorously evaluated on the Synapse dataset, we introduce CiUNet—a novel hybrid U-shaped architecture specifically designed to overcome the above limitations of Swin-UNet. Our contributions are three-fold:

  1. Asymmetric Dual-Encoder Framework Upgrades: Instead of a single Swin encoder, we introduce a parallel lightweight ResNet encoder to explicitly capture local spatial details. The Swin branch remains the primary backbone for global context, while the ResNet branch provides complementary high-resolution features.

  2. XSkip Mechanism for Decoder Enhancement: To recover lost spatial resolution, we replace standard skip connections with our proposed XSkip module. This mechanism selectively aligns and propagates shallow CNN features into deeper decoder layers via spatial attention, ensuring sharper boundary delineation.

  3. Multi-Level Auxiliary Supervision: To improve the interpretability and training stability of the deep Swin decoder, we introduce auxiliary segmentation heads. By providing multi-level gradient guidance, this supervision aligns intermediate features with clinical expectations, significantly accelerating convergence and mitigating the black-box nature of the Transformer backbone.

Complementing these technical improvements, the inherent encoder-decoder separation of UNet architecture offers a strategic commercial security advantage. Sensitive patient CT images can be processed locally at the lightweight encoder layer, with only high-level semantic feature vectors transmitted to the cloud for the heavy decoder computation. This decoupling enables a privacy-preserving SaaS (Software-as-a-Service) model without compromising inference accuracy, making secure hospital-cloud collaboration feasible.

Finally, due to current commercial deployment plans, we are unable to release the full implementation or the instance-level inference heads at this time. To support reproducibility and practical evaluation, we provide a light-weight ONNX runtime predictor with a desktop GUI, operating at a fixed 224×224224 \times 224 resolution. The model achieves a competitive mean Dice score of 83.72% on the Synapse dataset with only 31.68M trainable parameters, demonstrating that our framework provides an accurate, efficient, and commercially viable solution for medical image segmentation.

References (20)