CSWinUNETR: Segmentation of Thin Anatomical Structures in Medical Images

arXiv:2606.19824 · cs.CV, cs.AI · Submitted 2026-06-18 · Read on arXiv

Listen

Radio episode about this paper

Transcript

Introduction to the show: ident: AI Radio. Generated commentary on the latest Artificial Intelligence papers.

Tom: I'm Tom.

Jane: And I'm Jane, here with Lu, Meng and our in-house large language model, Lalam.

Tom: Today's paper: "CSWinUNETR: Segmentation of Thin Anatomical Structures in Medical Images".

Jane: The gist: CSWinUNETR is a general-purpose backbone designed for 2D and 3D medical images to accurately segment thin, tortuous anatomical structures by employing cross-shaped stripe self-attention, detail-enhanced multi-scale self-attention,

Tom: First, who's behind it and why it matters.

Paper summary: Tom: So, we're looking at this paper now called CSWinUNETR. The big idea here is that segmenting things like retinal vessels or cerebral vasculature is really hard because they have low contrast and lots of gaps.

Jane: Right, and even the latest models often end up giving you fragmented predictions or missing those fine branches, which makes it tough to get a complete picture.

Tom: This paper proposes CSWinUNETR as this general-purpose backbone for both 2D and three dee thin-structure segmentation <ref:2606.19824#pg1,2D and 3D thin-structure segmentation>. It claims this architecture handles the complexity better than previous methods.

Jane: The authors are focusing on solving that problem by using specific mechanisms to model long-range context and preserve fine details simultaneously.

Tom: They use cross-shaped stripe self-attention for the first part, which they say models orientation-aware long-range dependencies and they add cyclic shifts to help with information exchange across those stripes.

Lu: What that means is they are splitting the attention heads into vertical and horizontal stripes, and computing attention independently in those axis-aligned windows #pg6. If you look at page three that’s where you see how it sets up the core structure <ref:2606.19824#pg1>.

Meng: From a deployment standpoint, I wonder if this complexity adds too much overhead for real-time use when dealing with high-resolution medical scans on a production server.

Lalam: The literature shows that existing approaches often rely on task-specific architectural modifications or bespoke loss functions, which the authors are trying to avoid by creating a backbone that natively represents these thin, tortuous structures #pg2.

Tom: Exactly. And then they introduce this detail-enhanced multi-scale self-attention module to aggregate contextual features from different resolutions so fine details aren't lost.

Jane: That sounds like a way to get the big picture context while also keeping track of those tiny, important structures that define the segmentation #pg5.

Meng: But how do you manage that feature aggregation without just making the model significantly larger and slower?

Lu: The paper describes this module as involving several lightweight depthwise convolution branches operating in parallel, including an axial strip branch and a local-refinement branch using a three by three depthwise convolution #pg6.

Tom: And the final piece they introduce is sparse-control dynamic snake convolution, which they use to reconstruct reliable dense curvilinear kernels from sparsely predicted control points #pg6.

Jane: That sounds like it directly tackles the issue of following tortuous geometry by using trajectory construction instead of just relying on simple point prediction.

Meng: So, it’s about predicting a few key points and then letting the network build the dense line based on that sparse information? That sounds promising for efficiency if implemented well.

Lalam: The results they show across ophthalmology, neurovascular imaging, and dermatology are quite strong, with CSWinUNETR consistently outperforming state-of-the-art methods without needing task-specific post-processing #pg6.

Conclusion: Tom: So, looking at CSWinUNETR by Moon et al., the core contribution is building a general-purpose backbone that natively understands thin, tortuous structures across both 2D and three dee medical images #pg1 <ref:2606.19824#pg1>.

Jane: What that means for us is that instead of needing to tweak the whole model every time we switch from one type of imaging—say, from an eye scan to a brain scan—we have this one backbone that should work.

Tom: The paper shows they achieved this by combining orientation-aware attention with detail enhancement and a specific way to handle the geometry using dynamic snake convolution #pg3.

Jane: It simplifies the workflow for researchers who are working on these hard segmentation problems because they don't have to spend all their time inventing new architectural tweaks for every single application.

Tom: The implication is that we can expect more reliable and continuous predictions, especially where structures are thin or where the geometry is highly curved, which is often where standard models fail.

Jane: It moves the focus away from just making bigger models and toward designing architectures that have a better intrinsic understanding of how these complex shapes behave.

Tom: The authors are pretty clear that their approach works without needing those extra task-specific losses or topology-aware losses, which is a nice thing for transferability.

Jane: It suggests that the performance gains come from the architectural inductive biases they introduced, like those stripe attentions and control point prediction methods #pg6.

Tom: So, in short, CSWinUNETR gives us a solid framework for geometry-aware attention and robust feature aggregation when dealing with challenging curvilinear segmentation scenarios #pg9.

Hanyang University · Hankuk University of Foreign Studies

cs.CV, cs.AI

Submitted: 2026-06-18

Updated: 2026-06-18

Comments: Accepted at MICCAI 2026

Journal ref: Medical Image Computing and Computer Assisted Intervention - MICCAI 2026, LNCS 16883, pp. 79-89 (2027)

DOI: 10.1007/978-3-032-38082-1_8

Code: https://github.com/labhai/CSWinUNETR

License: http://creativecommons.org/licenses/by-nc-sa/4.0/

Importance score: 92/100

The gist: The gist: CSWinUNETR is a general-purpose backbone designed for 2D and 3D medical images to accurately segment thin, tortuous anatomical structures by employing cross-shaped stripe self-attention,

Key concepts

Shifted CSWin Self-Attention
This mechanism uses cross-shaped stripe attention partitioned into vertical and horizontal groups. It models long-range dependencies by computing self-attention independently within these axis-aligned windows, using cyclic shifts to reduce isolation and boundary artifacts between stripes.
DetailEnhanced Multi-Scale MHSA
This module fuses contextual information across multiple resolutions to retain high-frequency details. It employs several parallel depthwise convolution branches—one for axial strips, one for local refinement (3x3 DWC), and one for semantic context (average pooling + 3x3 DWC)—fusing their outputs adaptively.
Sparse-Control Dynamic Snake Convolution
This component reconstructs reliable dense kernels from sparse control points. Instead of predicting offsets at every location, it predicts a few sparse points and uses Gaussian Radial Basis Functions (RBF) to construct a dense snake-like kernel that follows the structure's tortuous geometry.

Terminology

Summary

The gist: CSWinUNETR is a general-purpose backbone designed for 2D and 3D medical images to accurately segment thin, tortuous anatomical structures by employing cross-shaped stripe self-attention, detail-enhanced multi-scale self-attention, and sparse-control dynamic snake convolution.

CSWinUNETR Architecture

The architecture of CSWinUNETR comprises three core components: (1) Shifted CSWin Self-Attention captures orientation-aware longrange dependencies via cross-shaped stripe attention with cyclic shifts <ref:2606.19824#pg2> (Page 3). (2) DetailEnhanced MS-MHSA fuses contextual information across multi-scale features to better preserve fine-grained structural details <ref:2606.19824#pg5> (Page 3). (3) SDSConv encourages continuity along tortuous trajectories by constructing reliable, geometry-aligned curvilinear responses from sparsely predicted control points <ref:2606.19824#pg6> (Page 3).

Shifted CSWin Self-Attention

To model long-range context efficiently, the method adopts CSWin self-attention to model long-range context via cross-shaped stripe attention with cyclic shifts <ref:2606.19824#pg2> (Page 3). The attention heads are partitioned into two groups corresponding to vertical and horizontal stripes, and self-attention is computed independently within the associated axis-aligned stripe windows <ref:2606.19824#pg6> (Page 3). A cyclic shift is applied in the second CSWin Transformer block to alleviate stripe-wise isolation and boundary artifacts <ref:2606.19824#pg6> (Page 3).

Detail-Enhanced Multi-Scale MHSA

To better preserve high-frequency details while integrating multiscale context, a detail-enhanced MS-MHSA module is proposed, which constructs several lightweight depthwise convolution (DWC) branches that operate in parallel <ref:2606.19824#pg6> (Page 4). This module involves an axial strip branch, a local-refinement branch using a 3×3 DWC, and a semantic-context branch applying average pooling followed by a 3 × 3 DWC <ref:2606.19824#pg6> (Page 4). A spatial fusion gate adaptively combines the branch outputs to compute the fused feature map Xe(t) <ref:2606.19824#pg6> (Page 4).

Sparse-control Dynamic Snake Convolution

SDSConv addresses anisotropic evidence aggregation by deforming an axial convolutional kernel using location-adaptive offsets, avoiding cumulative drift <ref:2606.19824#pg6> (Page 5). Instead of regressing P independent offsets at each spatial location, SDSConv predicts M sparse control points and constructs a dense snake-like kernel via trajectory construction <ref:2606.19824#pg6> (Page 5). The dense curvilinear trajectory is obtained by interpolating offsets along the kernel using Gaussian radial basis functions (RBF) <ref:2606.19824#pg6> (Page 5). A learnable distance-ramped scope is introduced to stabilize deformation near the anchor while permitting larger curvature toward the kernel ends <ref:2606.19824#pg6> (Page 5).

Experimental Results and Conclusions

Extensive experiments on four heterogeneous benchmarks across ophthalmology, neurovascular imaging, and dermatology demonstrate that CSWinUNETR consistently outperforms state-of-the-art methods without task-specific post-processing or topology-aware losses <ref:2606.19824#pg6> (Page 1). Table 3 indicates that adding the cyclic shift, MS-MHSA, and SDSConv leads to consistent, stepwise improvements across all evaluation metrics <ref:2606.19824#pg6> (Page 8). The qualitative results further corroborate these findings, showing that CSWinUNETR more faithfully reconstructs fine branches and terminal structures <ref:2606.19824#pg6> (Page 7). CSWinUNETR is a general-purpose segmentation architecture for thin, tortuous anatomical structures across heterogeneous medical imaging modalities, encompassing both 2D images and 3D volumes <ref:2606.19824#pg6> (Page 9). The results suggest that CSWinUNETR offers a principled framework for geometry-aware attention and robust curvilinear feature aggregation, enabling reliable dense prediction in challenging curvilinear segmentation scenarios <ref:2606.19824#pg6> (Page 9).

Comparison with Baselines

Table 1 and Table 2 indicate that CSWinUNETR consistently outperforms the competing methods across all four benchmarks <ref:2606.19824#pg6> (Page 6). In particular, the observed improvements are statistically significant (p (Page 7). The best and second-best results are highlighted in bold and underlined <ref:2606.19824#pg6> (Page 7). Table 3 indicates that the cyclic shift enhances performance without increasing the number of parameters <ref:2606.19824#pg6> (Page 8). The addition of MS-MHSA and SDSConv further strengthens the results, with only a modest parameter overhead <ref:2606.19824#pg6> (Page 8). This unified setting indicates that the performance gains are more plausibly attributable to CSWinUNETR’s architectural inductive biases than to extensive dataset-specific hyperparameter tuning <ref:2606.19824#pg6> (Page 7). The qualitative comparisons in Fig. 2 further corroborate these findings, showing that CSWinUNETR more faithfully reconstructs fine branches and terminal structures, while reducing false positives in non-target regions <ref:2606.19824#pg6> (Page 7). By emphasizing consistent evidence across the trajectory, this mechanism can recover continuity even when the structure appears locally disrupted due to limited spatial resolution, motion, or acquisition artifacts <ref:2606.19824#pg6> (Page 9).

Optimization and Implementation Details

To assess generality, an identical network architecture is adopted across all datasets, modifying only settings that depend on the input dimensionality when switching between 2D and 3D <ref:2606.19824#pg6> (Page 10). The base embedding dimension is fixed to C0 = 48 <ref:2606.19824#pg6> (Page 10). The number of attention heads is set to (2, 4, 8, 16) for 2D inputs and (3, 6, 12, 24) for 3D inputs <ref:2606.19824#pg6> (Page 10). For the SDSConv, the kernel length P is set to (11, 9, 7, 5) from shallow to deep stages <ref:2606.19824#pg6> (Page 10). Model training is performed using a composite objective combining Dice and cross-entropy losses <ref:2606.19824#pg6> (Page 10). The evaluation metrics used include overlap metrics such as Dice [4] and clDice [24], topology error (Betti) <ref:2606.19824#pg6> (Page 7), and boundary distance error (95th-percentile Hausdorff Distance; HD95 [25]) <ref:2606.19824#pg6> (Page 7). The proposed method is applicable to both 2D and 3D inputs, with the description focused on the 2D setting for clarity <ref:2606.19824#pg6> (Page 3). The code is available at https://github.com/labhai/CSWinUNETR <ref:2606.19824#pg6> (Page 1). The authors propose CSWinUNETR, a segmentation backbone designed for thin, tortuous anatomical structures in 2D and 3D medical images across diverse modalities <ref:2606.19824#pg6> (Page 1). Accurate segmentation of such structures requires two complementary capabilities: (i) orientation-aware long-range information propagation to bridge low-contrast gaps and interruptions <ref:2606.19824#pg6> (Page 3), and (ii) anisotropic, trajectoryaligned integration of local evidence to preserve continuity and recover fine terminal branches <ref:2606.19824#pg6> (Page 3). The authors propose CSWinUNETR, a general-purpose backbone for 2D and 3D thin-structure segmentation <ref:2606.19824#pg6> (Page 1). Accurate segmentation of such structures requires two complementary capabilities: (i) orientation-aware long-range information propagation to bridge low-contrast gaps and interruptions <ref:2606.

Improvements for AI systems

  1. This system can perform accurate segmentation of thin, tortuous anatomical structures such as retinal vessels, cerebral vasculature, and facial wrinkles across 2D and 3D medical images with state-of-the-art performance on diverse benchmarks without requiring task-specific post-processing or topology-aware losses.

  2. The architecture incorporates a cross-shaped stripe self-attention to model long-range principal-axis context and cyclic shifts to enhance information exchange across stripes, enabling orientation awareness for capturing global dependencies in curvilinear anatomy.

  3. The system utilizes a detail-enhanced multi-scale self-attention module that aggregates contextual features from multi-resolution representations to better preserve fine structures, complemented by the sparse-control dynamic snake convolution which reconstructs reliable dense curvilinear kernels from sparsely predicted control points to better follow tortuous geometry.

  4. The proposed framework provides a general-purpose backbone that natively represents thin, tortuous structures, reducing reliance on task-specific modifications and allowing for robust delineation across heterogeneous imaging modalities.

Abstract

Accurate segmentation of thin, tortuous anatomical structures, such as retinal vessels, cerebral vasculature, and facial wrinkles, remains challenging due to low contrast, frequent discontinuities, and severe class imbalance. Although recent convolutional and Transformer-based models have improved performance, they often yield fragmented predictions and fail to recover fine branches. We propose CSWinUNETR, a general-purpose backbone for 2D and 3D thin-structure segmentation. It employs cross-shaped stripe self-attention to model long-range principal-axis context and incorporates cyclic shifts to enhance information exchange across stripes. To better preserve fine-grained details, we further introduce a detail-enhanced multi-scale self-attention module that aggregates contextual features from multi-resolution representations. In addition, we propose sparse-control dynamic snake convolution, which reconstructs reliable dense curvilinear kernels from sparsely predicted control points to better follow tortuous geometry. Extensive experiments on four benchmarks across ophthalmology, neurovascular imaging, and dermatology demonstrate that CSWinUNETR consistently outperforms state-of-the-art methods without task-specific post-processing or topology-aware losses. The code is available at https://github.com/labhai/CSWinUNETR.

Sources

Related papers