A subscription to JoVE is required to view this content. Sign in or start your free trial.

Method Article

Multi-view Vision Mamba U-Shaped Network Framework for Medical Image Segmentation

60 views

DOI:

10.3791/72616

August 7th, 2026

In This Article

Summary

This protocol describes how to construct, train, and evaluate a multiview Vision Mamba U-Shaped Network framework for medical image segmentation, enabling reproducible segmentation of skin lesions and abdominal organs through standardized dataset preparation, model implementation, and performance evaluation.

Abstract

Medical image segmentation requires computational methods that accurately capture global context, local boundaries, and multiscale anatomical structures while remaining reproducible across different applications. This article presents a protocol for constructing, training, and evaluating a Multi-view Vision Mamba U-Shaped Network framework for two-dimensional medical image segmentation. The protocol provides a reproducible workflow that includes public dataset acquisition, image and mask preprocessing, network construction, model training, checkpoint selection, and quantitative and qualitative performance evaluation. The framework incorporates multiview feature scanning to capture complementary spatial, contour, scale, and boundary information and applies multistage feature fusion within a U-shaped encoder-decoder architecture to improve feature integration during segmentation. The protocol is demonstrated using publicly available skin lesion and abdominal organ segmentation datasets. Under the described implementation workflow, the framework achieves competitive segmentation performance using standard evaluation metrics. By following the procedures presented in this protocol, researchers can reproduce the model implementation, train the network using defined experimental settings, evaluate segmentation performance, and adapt the workflow for related medical image segmentation tasks requiring reproducible deep learning–based analysis.

Introduction

Medical image segmentation is a fundamental task in the fields of computer vision and medical image analysis1,2,3. It involves partitioning an image into multiple regions or objects for further analysis and processing. This technology is particularly important in medical imaging because it assists clinicians in identifying and localizing pathological regions, thereby improving diagnostic accuracy and treatment planning. With the advancement of medical imaging technologies, such as magnetic resonance imaging (MRI), computed tomography (CT), and positron emission tomography (PET), the demand for accurate medical image segmentation techniques has continued to increase. Current methods for medical image segmentation can be broadly categorized into three main approaches: convolutional neural network (CNN)-based methods4, Transformer-based methods5, and state-space model (SSM)-based methods6,7. CNN-based methods typically employ U-shaped network architectures for medical image segmentation. The most widely used architecture in this category is U-Net8, which demonstrated the effectiveness of a U-shaped encoder–decoder architecture for biomedical image segmentation. U-Net3+ combines dense skip connections from UNet++9 with full-scale skip connections to enhance multiscale feature aggregation. However, CNN-based methods have limited ability to capture long-range dependencies and, therefore, may not effectively model long-range contextual information.

Transformer-based methods effectively capture long-range dependencies through the self-attention mechanism, which enables parallel computation and assigns different attention weights to different regions of interest. UNETR++10 introduces the Efficient Paired Attention (EPA) module to reduce the number of parameters and computational cost. nnFormer11 combines interleaved convolutional and self-attention operations and introduces a local–global volume-based self-attention mechanism for learning volumetric representations in three-dimensional (3D) medical image segmentation. H2Former12 proposes an efficient hierarchical hybrid Vision Transformer that combines attention mechanisms with CNN-based feature extraction in the encoder. However, Transformer-based methods exhibit quadratic computational complexity with increasing sequence length, resulting in substantially higher computational cost. Figure 1 illustrates the motivation for MVM-UNet and compares the proposed multiview scanning strategy with existing SSM-based segmentation frameworks.

Machine learning algorithm flowchart comparing MV4D and SS2D SSM methods with data processing blocks.
Figure 1. Comparison of MVM-UNet with existing pure state-space-model (SSM)-based segmentation architectures. Comparison between a conventional pure state-space model (SSM)-based segmentation framework and the proposed Multi-View Mamba U-Net (MVM-UNet) architecture. The upper panel illustrates MVM-UNet, in which the Multi-View 4-Directional (MV4D) module extracts complementary features using zigzag, hierarchical, spiral, and radial scan pairs that are integrated by Spatial Fusion Mamba (SFusion Mamba), while Multistage Fusion Mamba (MFusion Mamba) aggregates multiscale encoder features before decoding. The lower panel shows a representative pure SSM-based architecture using Selective Scan 2-Dimensional (SS2D) modules with cross scanning. The figure highlights the architectural differences between conventional SSM-based segmentation networks and the proposed MVM-UNet. Please click here to view a larger version of this figure.

SSM-based methods combine the global modeling capability of Transformers with linear computational complexity. The Mamba architecture selectively processes input information using a selective state-space model (Selective-SSM), enabling the model to dynamically adjust its parameters according to the input while filtering irrelevant information and emphasizing informative features. Vim13 and VMamba14 adapt the Mamba architecture for computer vision tasks. U-Mamba15 employs a hybrid CNN–SSM architecture to explore the application of SSMs in medical image segmentation, whereas Mamba-UNet16 adopts a fully SSM-based encoder–decoder architecture for medical image segmentation. These methods achieve competitive performance while using substantially fewer parameters. However, current SSM/Mamba-based methods primarily extract image features using simple image patches and SS2D scanning strategies, which present several limitations for medical image segmentation. First, SS2D and patch-based techniques are primarily designed for general computer vision tasks. Local Mamba17 and Motion Mamba18 have suggested that the SS2D scanning strategy is insufficient for all visual tasks because different scanning strategies capture different types of visual information. Second, the SS2D scanning strategy is relatively simple, relying only on horizontal and vertical scanning directions. Consequently, it may not adequately capture complex spatial relationships and fine structural details. Medical image segmentation requires simultaneous modeling of both global spatial context and precise local anatomical features. Furthermore, current SSM/Mamba-based methods provide limited feature fusion between the encoder and decoder. Architectures such as UNet++ and FATNet improve segmentation accuracy through enhanced feature fusion, highlighting the importance of effective feature integration for medical image segmentation.

To address these limitations, this paper proposes a novel Mamba-based medical image segmentation framework, termed MVM-UNet. As shown in Figure 1, the proposed Multi-View Four-Directional (MV4D) module serves as the core feature extraction component of MVM-UNet and is specifically designed for medical image segmentation by integrating information from four distinct scanning strategies. Each scanning strategy extracts complementary image features and represents a different view of the input image. Zigzag scanning19 alternates the traversal direction at the end of each row or column, thereby balancing local and global spatial information. In contrast, spiral and radial scanning schemes20 provide comprehensive coverage by extending either outward from the center or inward from the periphery. Hierarchical scanning18 captures both local and global features at multiple scales. To improve the robustness of each scanning strategy, scan pairs are merged before being input to the S6 Block. The Scan-view Fusion Mamba (SFusion Mamba) module subsequently integrates the features extracted from the four scanning modalities. To effectively utilize multiscale encoder features, this paper further proposes a multiscale Mamba fusion module (MFusion Mamba), which accumulates and fuses the outputs from each encoder stage before passing the fused features to the decoder. MVM-UNet was evaluated on the ISIC 2017, ISIC 2018, and Synapse datasets. Experimental results demonstrate that MVM-UNet achieves competitive segmentation performance on the ISIC 2017, ISIC 2018, and Synapse datasets.

Representative segmentation architectures have further advanced medical image segmentation. U-Net has also been successfully applied to biomedical image analysis tasks such as cell counting, detection, and morphometry21. Attention-enhanced CNN architectures, such as CA-Net22, improve feature representation through comprehensive attention mechanisms. Representative Transformer-based segmentation frameworks, including TransUNet23, Pyramid Medical Transformer24, Swin U-Net25, TransAttUNet26, and TransCUNet27, further demonstrate the effectiveness of attention-based global feature modeling for medical image segmentation.

The design of MVM-UNet is motivated by two limitations of existing SSM/Mamba-based segmentation methods. First, many current Vision Mamba models rely on simple two-dimensional scanning strategies, which may be insufficient for medical images containing irregular lesion boundaries, small target regions, and multiscale anatomical structures. Second, conventional U-shaped encoder–decoder architectures primarily transfer features through corresponding skip connections, limiting the direct use of multistage encoder information during decoding. Therefore, MVM-UNet introduces MV4D to enhance multiview spatial modeling and MFusion Mamba to explicitly aggregate multistage encoder features. This design is intended to adapt Mamba-based long-range modeling to the specific requirements of medical image segmentation.

Although MVM-UNet is built upon the general encoder–decoder paradigm and Mamba-based sequence modeling, its novelty lies in how these components are adapted and integrated for medical image segmentation. Rather than simply incorporating a standard Mamba block into a U-shaped network backbone, the proposed framework redesigns the spatial modeling process through multiple task-oriented scan-pair branches, introduces SFusion Mamba to integrate scan-specific representations, enhances the MVV Block with residual and projection pathways, and inserts MFusion Mamba between the encoder and decoder to aggregate multistage encoder features before decoding. This architecture-level design aims to address the irregular boundaries, small target regions, and multiscale anatomical structures commonly observed in medical images.

This protocol is most appropriate for segmentation tasks requiring simultaneous modeling of long-range contextual information, irregular object boundaries, and multiscale anatomical structures in two-dimensional medical images. Compared with CNN-based segmentation methods, the Mamba-based encoder–decoder design provides an effective context-modeling mechanism while retaining a U-shaped workflow familiar to medical image segmentation researchers. Compared with Transformer-based methods, the proposed framework avoids the direct use of quadratic self-attention and is intended for researchers seeking global contextual modeling using a relatively efficient sequence-modeling mechanism. Accordingly, this protocol is suitable for skin lesion segmentation, abdominal organ segmentation, and similar two-dimensional medical image segmentation tasks in which both global structural information and local boundary details are important.

This protocol also has limitations that should be considered before use. It may not be necessary for relatively simple segmentation tasks in which a lightweight CNN already provides sufficient performance. In addition, it is not directly designed for full three-dimensional volumetric segmentation without architectural adaptation. Researchers with very limited annotated data, limited graphics processing unit (GPU) resources, or a requirement for highly interpretable classical models should also consider these constraints before applying the protocol. Overall, this method is intended for researchers seeking to reproduce and evaluate a Mamba-based U-shaped segmentation framework that balances long-range context modeling, local boundary representation, and multistage feature fusion.

The key contributions are as follows:

1. This paper presents a novel Mamba-based medical image segmentation framework, termed MVM-UNet. Unlike approaches that directly incorporate existing SS2D-based or standard Mamba blocks, MVM-UNet introduces MV4D to model medical image features from four complementary scan-pair views, including zigzag, hierarchical, spiral, and radial scanning.

2. This paper designs SFusion Mamba and the MVV Block to integrate scan-specific representations and enhance feature transformation. SFusion Mamba fuses the features extracted from different scan-pair branches, whereas the residual and Up-Down Projection branches within the MVV Block provide complementary feature pathways that stabilize and enrich feature representations.

3. This paper introduces MFusion Mamba as an intermediate multistage fusion module between the encoder and decoder. Unlike conventional skip connections that primarily transfer corresponding-stage features, MFusion Mamba explicitly aggregates multistage encoder features through coarse-to-fine fusion and provides enriched information for decoding.

4. Extensive experimental results demonstrate that the proposed MVM-UNet achieves competitivesegmentation performance on the ISIC 2017 and ISIC 2018 datasets and strong performance on the Synapse multiorgan segmentation dataset. Furthermore, comprehensive ablation studies validate the contribution of each component within MVM-UNet.

Access restricted. Please log in or start a trial to view this content.

Protocol

This study used only publicly available and de-identified medical image datasets, including ISIC 2017, ISIC 2018, and Synapse. No new human participants, animal subjects, or identifiable private medical records were collected in this study. The ISIC 2017 dataset used in this study was the ISIC 2017 Challenge skin lesion segmentation dataset, obtained from the official International Skin Imaging Collaboration challenge data repository (https://challenge.isic-archive.com/data/#2017). The dataset version used in this study corresponds to the ISIC 2017 lesion segmentation task, including the official training, validation, and testing partitions. The dataset was downloaded on March 15, 2024. The ISIC 2018 dataset used in this study was the ISIC 2018 Challenge Task 1 lesion boundary segmentation dataset, obtained from the official International Skin Imaging Collaboration challenge data repository (https://challenge.isic-archive.com/data/#2018). The dataset version used in this study corresponds to ISIC 2018 Task 1: Lesion Boundary Segmentation. The dataset was downloaded on July 8, 2024.

The Synapse dataset used in this study was the Multi-Atlas Labeling Beyond the Cranial Vault abdominal CT dataset, obtained from the Synapse repository under accession identifier syn3193805 (https://www.synapse.org/Synapse:syn3193805). The dataset used in this study corresponds to the commonly used 30-case abdominal CT multiorgan segmentation dataset. The downloaded archive was Abdomen/RawData.zip, available under accession syn3193805. No separate version number, release label, or dated release tag was provided by the repository at the time of download. Following the standard split adopted in previous studies, 18 cases were used for training and 12 cases were used for testing. The data split followed the case list used by TransUNet23. Specifically, the training cases were case0031, case0007, case0009, case0005, case0026, case0039, case0024, case0034, case0033, case0030, case0023, case0040, case0010, case0021, case0006, case0027, case0028, and case0037, whereas the testing cases were case0008, case0022, case0038, case0036, case0032, case0002, case0029, case0003, case0001, case0004, case0025, and case0035. The dataset was downloaded on July 9, 2024. Because this study used only publicly available, de-identified datasets and did not involve the collection of new human-subject data or identifiable private information, institutional review board approval was not required for the computational experiments described in this protocol. No formal written institutional exemption determination was obtained. If required by local institutional policy, researchers should obtain an institutional exemption determination before conducting secondary analyses of publicly available datasets. No institutional ethics exemption reference number or formal exemption documentation was available for this study.

1. Preparation of datasets

  1. Download the ISIC 2017 skin lesion segmentation dataset from the official International Skin Imaging Collaboration repository. Use the official training, validation, and testing partitions. Verify that the dataset contains 2,000 training images, 150 validation images, and 600 testing images.
  2. Download the ISIC 2018 skin lesion segmentation dataset from the official International Skin Imaging Collaboration repository. Use the official training, validation, and testing partitions. Verify that the segmentation dataset contains 2,594 training images, 100 validation images, and 1,000 testing images.
  3. Download the Synapse multiorgan segmentation dataset. Use the standard split consisting of 18 cases (2,212 axial slices) for training and 12 cases (1,567 axial slices) for testing. Do not introduce a separate validation set.
    1. Reserve the 12 testing cases exclusively for final evaluation. Do not use the testing cases for model training, hyperparameter tuning, or model selection. The segmentation task includes eight abdominal organs: aorta, gallbladder, spleen, left kidney, right kidney, liver, pancreas, and stomach.
    2. Use the following Synapse dataset split. The 18 training cases were case0031, case0007, case0009, case0005, case0026, case0039, case0024, case0034, case0033, case0030, case0023, case0040, case0010, case0021, case0006, case0027, case0028, and case0037. The 12 testing cases were case0008, case0022, case0038, case0036, case0032, case0002, case0029, case0003, case0001, case0004, case0025, and case0035.
  4. Organize each dataset into separate image and mask folders. Ensure that each image has a corresponding segmentation mask with the same case identifier.
    1. Convert each skin lesion mask into a binary foreground-background segmentation map. Retain the original multiclass organ labels for the Synapse dataset.
    2. For the ISIC 2017 and ISIC 2018 datasets, assign a label value of 0 to background pixels and 1 to lesion (foreground) pixels after binary mask conversion. Pixels with original mask values greater than 0 are treated as foreground and converted to 1, whereas pixels with original mask values equal to 0 are treated as background and retained as 0. For the Synapse dataset, retain the original integer label values, with 0 representing the background class and 1–8 representing the eight foreground organ classes.
  5. Resize ISIC 2017 and ISIC 2018 images and masks to 256 × 256 pixels without preserving the original aspect ratio. Do not apply cropping or padding.
    1. Resize each Synapse CT slice and corresponding label map to 224 × 224 pixels. Use bilinear interpolation for RGB images, third-order spline interpolation for CT slices, and nearest-neighbor interpolation for segmentation masks.
    2. Resize images in Python.
      1. For the ISIC 2017 and ISIC 2018 datasets, use the custom myResize transform implemented in utils.py, which calls torchvision.transforms.functional.resize to resize both image and mask tensors to 256 × 256 pixels. Do not specify an explicit interpolation mode or anti-aliasing argument in this transform.
      2. For the Synapse dataset, use scipy.ndimage.zoom in datasets/dataset.py. Resize CT image slices to 224 × 224 pixels using third-order spline interpolation (order = 3), and resize label maps using nearest-neighbor interpolation (order = 0). Do not apply a separate anti-aliasing operation or an anti_aliasing=True setting during resizing.
  6. Normalize each ISIC RGB image before tensor conversion using the dataset-specific mean and standard deviation (SD) using Equation 1 as follows:
    Statistical normalization equation, \( x_{\text{norm}} = \frac{x - \mu}{\sigma} \), formula representation. (1)
    ​Then rescale the normalized image to the range of 0–255 using min–max normalization.
    1. Use µ = 159.922 and σ = 28.871 for the ISIC 2017 training set and µ = 148.429 and σ = 25.748 for the ISIC 2017 validation and testing sets. Use µ = 157.561 and σ = 26.706 for the ISIC 2018 training set and µ = 149.034 and σ = 32.022 for the ISIC 2018 validation and testing sets.
    2. Convert each normalized image into a tensor of shape 3 × 256 × 256. Convert each binary mask into a tensor of shape 1 × 256 × 256.
    3. Perform min–max normalization independently for each image after dataset-specific mean and standard deviation normalization. Specifically, subtract the dataset-specific mean from each image and divide by the corresponding standard deviation.
    4. Calculate the minimum and maximum intensity values from the normalized image and rescale the image to the range 0–255 using these per-image minimum and maximum values. Do not use dataset-wide minimum and maximum values for this min–max rescaling step.
  7. Prepare each Synapse CT slice as a two-dimensional grayscale image. Convert each CT slice to float32 and add a singleton channel dimension to obtain an input tensor with shape 1 × 224 × 224.
    1. Retain each Synapse label map as a single-channel integer mask with shape 224 × 224. Do not apply additional dataset-level mean-SD normalization in the data loader.
    2. Use the preprocessed Synapse files provided in .npz format for training slices and .npy.h5 format for testing volumes. Load the image and label arrays directly from each .npz file during training and directly from each .npy.h5 file during testing. Do not apply additional intensity clipping, CT windowing, dataset-level normalization, or raw-volume resampling in the released data loader.
    3. During model training, convert each loaded two-dimensional slice to float32, resize it to the target spatial size using scipy.ndimage.zoom with order = 3 for image slices and order = 0 for label maps, and then convert the resized arrays to tensors with a singleton channel dimension.
  8. Apply data augmentation only to the training set. For ISIC 2017 and ISIC 2018, apply random horizontal flipping (p = 0.5), random vertical flipping (p = 0.5), and random rotation (p = 0.5) with an angle sampled from 0° to 360°.
    1. Apply the same geometric transformation to each image-mask pair. During validation and testing, apply only resizing, normalization, and tensor conversion.
    2. For the Synapse dataset, apply random rotation and random flipping during training. Randomly rotate each image-label pair by k × 90°, where ∈ {0,1,2,3}, randomly flip the image-label pair along one spatial axis, or randomly rotate the image-label pair by an angle sampled from −20° to 20°.
    3. Do not apply stochastic augmentation during testing.
    4. Apply data augmentation to the Synapse dataset using the mutually exclusive branches implemented in the RandomGenerator transform.
      1. For each training sample, first evaluate the condition random.random() > 0.5. If this condition is satisfied, apply random_rot_flip, consisting of a random 90° rotation (k = 0, 1, 2, or 3) followed by a random flip along one spatial axis.
      2. If the first branch is not selected, evaluate a second condition, random.random() > 0.5. If this condition is satisfied, apply random_rotate using a randomly selected rotation angle between −20° and 20°. If neither condition is satisfied, do not apply stochastic augmentation to the sample.
      3. Apply the same transformation to both the input image and the corresponding label map.
  9. Set the random seed before dataset loading, preprocessing, and training. Use random seeds 1, 52, and 100 for the main comparison experiments and use seed 100 for ablation studies unless otherwise specified.
    1. Initialize the Python, NumPy, PyTorch CPU, PyTorch CUDA, and cuDNN random generators before constructing the data loader. Keep the dataset partitions, preprocessing procedures, augmentation settings, normalization parameters, resizing strategy, and evaluation preprocessing unchanged across all seed runs.
    2. Set num_workers = 0 for both the ISIC and Synapse experiments to perform data loading in the main process. Before constructing the dataset and creating the DataLoader, initialize the global random seed using the set_seed function to seed the Python, NumPy, PyTorch CPU, PyTorch CUDA, and cuDNN random number generators. Do not define a separate worker_init_fn or DataLoader-specific random generator, as these are not used in the released implementation.

2. Construction of the MVM-UNet architecture

  1. Build the proposed Multi-view Vision Mamba UNet (MVM-UNet) using a U-shaped encoder-decoder architecture.
  2. Set the input image dimension to H × W × 3. Pass the input image through the patch embedding layer.
    1. Implement the patch embedding layer using a 2D convolution with a kernel size of 4 × 4, stride of 4, three input channels, and 96 output channels.
    2. Transform the input feature map to a spatial resolution of H/4 × W/4 with C = 96 output channels.
  3. Construct four encoder stages and four decoder stages. Reduce the spatial resolution by one-half and double the channel dimension after each encoder stage.
  4. Use a symmetric encoder-decoder configuration. Set the number of MVV Blocks in both the encoder and decoder to {2, 2, 2, 2}.
    1. Place two MVV Blocks in each encoder stage and two MVV Blocks in each decoder stage.
  5. Insert an MVV Block into every encoder and decoder stage. Use the MV4D module as the core feature extraction module inside each MVV Block.
  6. Insert the MFusion Mamba module between the encoder and decoder. Use this module to fuse multistage encoder features before decoding.
  7. Configure the overall MVM-UNet workflow. Use MV4D for feature extraction throughout the encoder.
    1. Retain encoder outputs as skip connections. Pass the encoder outputs to the corresponding decoder stages.
    2. Pass the encoder features to MFusion Mamba before decoding. Progressively upsample the fused representation through the decoder and generate the final segmentation map using the segmentation head.
  8. Pass the input image ∈ ℝB×H×W×3 through the patch embedding layer to obtain Mathematical equation for tensor dimensions, featuring shapes and subscripts in notation form. Here, C = 96.
    1. Generate encoder feature maps: E∈ ℝB×H/4×W/4×CE∈ ℝB×H/8×W/8×2C, E∈ ℝB×H/16×W/16×4C, and E∈ ℝB×H/32×W/32×8C. Use MVV Blocks containing MV4D within every encoder stage.
    2. Preserve every encoder feature for the corresponding skip connection. Pass all encoder features to MFusion Mamba for multistage feature fusion.
    3. Align encoder features to a common feature space before coarse and fine fusion within MFusion Mamba. Pass the fused representation to the decoder.
    4. Progressively upsample the decoder representation. Fuse the decoder features with E3 at H/16 × W/16, Eat H/8 × W/8, and E1 at H/4 × W/4.
    5. Upsample the final decoder feature to the original image resolution. Generate the prediction map Microscopy image displaying static equilibrium ΣFx=0 diagram; includes force vectors, balance points. ∈ ℝB×H×W×K. Here, K = 1 for binary lesion segmentation and K = 8 for Synapse multiorgan segmentation.
    6. Refer to Figure 2 for the overall network architecture and Supplementary Table 1 for the complete layer-by-layer architecture specification, including the operations, principal parameters, and output feature dimensions for each stage
    7. Encoder–decoder transition layers
      1. Downsample encoder features using patch-merging transition layers. For each transition, sample four spatially interleaved feature groups from a 2 × 2 neighborhood, concatenate them along the channel dimension, apply Layer Normalization (LayerNorm), and project the resulting 4C-dimensional feature to 2C channels using a bias-free linear layer. This operation reduces the spatial resolution by a factor of 2 while doubling the channel dimension.
      2. Upsample decoder features using patch-expanding transition layers. Apply a bias-free linear projection, rearrange the expanded features spatially to increase the resolution by a factor of 2, and apply LayerNorm after spatial expansion. Repeat this operation to progressively reconstruct the feature maps from H/32 × W/32 to H/16 × W/16, H/8 × W/8, and H/4 × W/4.
      3. Align encoder features within the MFusion Mamba module by resizing them to the target spatial resolution using bilinear interpolation (align_corners = False) and then applying a learnable linear channel projection before feature fusion.
    8. Segmentation head
      1. Upsample the final decoder feature map from H/4 × W/4 to the original image resolution (H × W) using the final patch-expanding layer. Apply linear projection, perform spatial rearrangement with an expansion factor of 4, and apply LayerNorm.
      2. Project the reconstructed feature map to K output channels using a 1 × 1 convolution after converting the tensor to channel-first format.
      3. Generate the final prediction during evaluation by applying a sigmoid activation function for binary lesion segmentation or a softmax activation followed by argmax for Synapse multiorgan segmentation. Do not apply an activation function within the segmentation head itself.

Image segmentation process diagram; patch embedding, merging, expanding stages with Mfusion Mamba method.
Figure 2. Overall architecture of Multi-View Mamba U-Net (MVM-UNet). Overview of the proposed Multi-View Mamba U-Net (MVM-UNet) architecture. The input image is converted into patch embeddings and processed through four encoder stages composed of Multi-View Vision (MVV) Blocks separated by patch-merging operations. Encoder features are aggregated by Multi-stage Fusion Mamba (MFusion Mamba) and propagated to the decoder through skip connections. The decoder progressively restores spatial resolution using patch-expanding operations and generates the final segmentation map through the projection layer. Please click here to view a larger version of this figure.

3. Construction of the MV4D module

  1. Use the MV4D module as the basic feature extraction unit in the MVV Block. Feed the input feature patches into four scan-pair branches. Refer to Algorithm 1, Supplementary File 1 for the complete pseudocode of spatial flattening, scan-pair index construction, sequence gathering, S6/Mamba processing, inverse spatial reordering, scan-pair fusion, SFusion Mamba fusion, projection, and output reshaping.
  2. Use the exact zigzag, hierarchical, spiral, and radial scan-index generation procedures implemented in models/mvmunet/core.py. For each scanning strategy, use the forward scan order and its reverse order as one bidirectional scan pair.
  3. Construct the zigzag scan pair. Traverse the image features in alternating directions at the end of each row or column. Use this scan pattern to balance local and global spatial information.
  4. Construct the hierarchical scan pair. Capture features at multiple spatial scales. Use this scan pattern to strengthen the extraction of both local and global representations.
  5. Construct the spiral scan pair. Scan the image features from the center toward the boundary or from the boundary toward the center. Use this scan pattern to enhance the extraction of global contour information.
  6. Construct the radial scan pair. Scan image features along multiple radial directions. Use this scan pattern to enhance the extraction of local boundary and edge details.
  7. Merge each scan pair before feeding the merged sequence into the S6 block. Use the paired design to improve the robustness of each scanning strategy while preserving computational efficiency.
  8. Feed the output sequence of each scan-pair branch into an S6 block. Obtain four feature representations corresponding to the zigzag, hierarchical, spiral, and radial scanning views.
  9. Fuse the four extracted feature representations using the SFusion Mamba module. Use two parallel fusion pathways. In the first pathway, integrate the four features by element-wise addition.
  10. In the second SFusion Mamba pathway, concatenate the four features. Process the concatenated representation using Conv1d and Mamba. Reduce the channel dimension using a projection layer to match the S6 block output dimension.
  11. Configure the S6/Mamba block using the feature dimension C as the model dimension. Use a projection layer to map each merged scan-pair feature back to channel dimension C before fusion.
  12. In SFusion Mamba, perform element-wise addition in the first pathway. Concatenate the four scan-view features in the second pathway before Conv1d, Mamba, and linear projection. Use the normalization, linear projection, depth-wise separable convolution, and activation operations surrounding MV4D as described in Step 4.
  13. Add the outputs of the two fusion pathways to obtain the final output of the MV4D module.
  14. Construct four complementary scan-pair branches instead of using only horizontal and vertical scanning directions. Use zigzag scanning to emphasize continuous spatial traversal, hierarchical scanning to strengthen multiscale representation, spiral scanning to capture center-to-boundary contour information, and radial scanning to enhance boundary-oriented local detail extraction.
  15. Process each scan-pair branch independently. Fuse the resulting features using SFusion Mamba. Map each processed sequence back to its original spatial order before fusion.
  16. Given an input feature map ∈ ℝB×H×W×C, flatten it into Xseq ∈ ℝB×L×C, where L = H × W.
  17. Reorder the flattened sequence according to the scan indices for each scan-pair branch. Process each reordered sequence using the S6 block. Restore the processed sequence to the original spatial order.
  18. Fuse the four scan-view features through the additive pathway and the SFusion Mamba pathway to obtain the final MV4D output. Refer to Figure 3 for the MV4D architecture and Algorithm 1, Supplementary File 1 for the complete tensor-level implementation workflow.
  19. Use the complete software implementation in models/mvmunet/core.py. This file contains the scan-index generators, PairwiseScanMamba, SequenceS6, SFusion Mamba, and the MV4D wrapper module.
  20. Generate multiview scan indices
    1. Generate the scan indices by following the released implementation in models/mvmunet/core.py. For an input feature map of spatial size H × W, flatten each pixel location into a one-dimensional index using: index = r × W + c, where r and c denote the row and column coordinates, respectively.
    2. Generate the zigzag scan by traversing image diagonals with constant r + c. Collect the valid pixel indices for each diagonal and alternate the traversal direction by reversing the order of every even-numbered diagonal.
    3. Generate the hierarchical scan by recursively dividing the image into four quadrants. Visit the top-left, top-right, bottom-left, and bottom-right quadrants sequentially until the subregion height or width is no greater than 2 pixels, and then traverse the remaining pixels in row-major order.
    4. Generate the spiral scan by traversing the outer image boundary from left to right along the top row, downward along the right column, right to left along the bottom row, and upward along the left column while progressively shrinking the boundary toward the image center.
    5. Generate the radial scan by sorting each pixel according to its squared distance from the image center and then according to its polar angle calculated using the atan2 function.
    6. Generate the reverse scan for each scanning strategy by reversing the corresponding forward scan order. Combine the forward and reverse scan sequences to form one scan pair for each scanning strategy before passing the scan pairs to the MV4D module.

MV4D image processing flowchart with scan pairs, SC blocks, and fusion for patch analysis.
Figure 3. Architecture of the Multi-View 4-Directional (MV4D) module. Structure of the Multi-View 4-Directional (MV4D) feature extraction module. Input patches are processed through four complementary scan-pair branches, including zigzag, hierarchical, spiral, and radial scanning. Features extracted from the four branches are merged, processed using state-space blocks, and integrated by Spatial Fusion Mamba (SFusion Mamba) to generate the output feature representation. Please click here to view a larger version of this figure.

4. Construction of the MVV Block

  1. Build the MVV Block using one main branch and two auxiliary branches. Use the overall structure shown in Figure 4.
  2. Apply layer normalization to the input feature in the main branch. Feed the normalized feature into a linear layer. Pass the transformed feature to the depth-wise separable convolution.
  3. Process the transformed feature using the depth-wise separable convolution. Apply the GELU activation function. Feed the activated feature into the MV4D module.
  4. Construct the first auxiliary branch as an identity residual connection. Connect the input feature directly to the final output. Use this branch to preserve the original representation and stabilize training.
  5. Construct the second auxiliary branch as a projection down-up branch. Compress the input feature using a down-projection layer. Restore the feature dimension using an up-projection layer.
  6. Merge the outputs of the main branch and both auxiliary branches. Obtain the final MVV Block output. Refer to Figure 4 for the complete architecture.
  7. Set the hidden dimension of the main branch equal to the input channel dimension Cs. Apply LayerNorm(Cs) before the main linear projection and use a linear layer with dimensions CsCs. Use a depth-wise separable convolution consisting of a 3×3 depth-wise convolution with padding 1, groups = Cs, and no bias, followed by a 1×1 point-wise convolution without bias.
  8. Apply the GELU activation function after the depth-wise separable convolution. Feed the activated feature into MV4D and apply an output linear projection with dimensions CsCs. Configure the projection down-up branch using LayerNorm(Cs), a projection ratio of 4, a down-projection CsCs/4, GELU activation, and an up-projection Cs/4→Cs.
  9. Combine the identity branch, projection down-up branch, and drop-path-processed main branch using element-wise addition to obtain the final MVV Block output.

Neural network layer diagram, showing SiLU activation, MV4D, linear layers, and normalization process.
Figure 4. Architecture of the Multi-View Vision (MVV) Block. Structure of the Multi-View Vision (MVV) Block. The block consists of a main feature extraction branch containing the Multi-View 4-Directional (MV4D) module together with depthwise convolution, normalization, and linear projection layers. An auxiliary up-down projection branch provides gated feature modulation through element-wise multiplication before residual addition to generate the output feature representation. Please click here to view a larger version of this figure.

5. Construction of MFusion Mamba

  1. Collect the feature maps from all encoder stages. Align the encoder features to a unified representation space by resizing or projecting them when necessary. Refer to Algorithm 2, Supplementary File 1 for the complete tensor-level implementation workflow.
  2. Resize encoder features to the target spatial resolution when necessary. Project features with different channel dimensions into the same channel dimension. Align all encoder features before multistage fusion.
  3. Feed the aligned encoder features into the Coarse Fusion component. Perform coarse fusion using the Hadamard product. Generate the coarse fused representation.
  4. Feed the coarse fused representation into the Fine Fusion component. Construct two parallel fine-fusion pathways. Process both pathways independently.
  5. Process the first Fine Fusion pathway using a linear layer. Process the second Fine Fusion pathway using up-projection, Conv1d, Mamba, and down-projection. Restore the feature dimension after down-projection.
  6. Merge the outputs of the two Fine Fusion pathways using the Hadamard product. Apply the final linear layer. Obtain the MFusion Mamba output.
  7. Feed the MFusion Mamba output into the decoder. Decode the fused multistage representation together with the encoder-decoder skip features. Generate the final segmentation map.
  8. Align encoder features from different stages into a unified feature space before coarse fusion. Process the aligned feature representations using the coarse and fine fusion stages. Refer to Figure 5 for the MFusion Mamba architecture and Supplementary Algorithm 2 for the complete tensor-level implementation workflow.
  9. Use the implementation parameters of MFusion Mamba as follows. For each encoder feature Ei, project the channel dimension from Ci to Ct. Resize projected features to the target spatial size using bilinear interpolation with align_corners=False when necessary.
  10. Apply the Hadamard product to perform Coarse Fusion across the aligned encoder features. Configure the first Fine Fusion pathway using a linear layer with dimensions C→ Ct. Configure the second Fine Fusion pathway using an up-projection C→ 2Ct, Conv1d, a Mamba/S6 block with model dimension 2Ct, one scanning direction, state dimension 16, and a down-projection 2C→ Ct.
  11. Fuse the outputs of the Fine Fusion pathways using the Hadamard product. Apply a final linear projection with dimensions Ct to Ct. Feed the fused multistage representation into the decoder.
  12. Fuse multistage encoder features using MFusion Mamba
    1. Collect the encoder features from all four encoder stages (E1, E2, E3, and E4) and use them as the input to the MFusion Mamba module. Do not select only the corresponding-stage encoder feature for decoder fusion.
    2. Align all encoder features to the spatial resolution required for the current decoder stage. Resize the encoder features to the target resolution and project them to the required channel dimension before feature fusion.
    3. Repeat the feature alignment procedure for each decoder stage. When the decoder operates at H/16 × W/16, H/8 × W/8, and H/4 × W/4, resize and project E1, E2, E3, and E4 to the corresponding target feature space.
    4. Fuse the aligned multistage encoder features using the Coarse Fusion and Fine Fusion operations of the MFusion Mamba module, and combine the fused representation with the decoder features at the corresponding scale.
    5. Perform the feature projection, resizing, and fusion operations according to the released implementation in models/mvmunet/core.py.

Neural network diagram showing feature extraction, Hadamard product, fusion processes, projection layers.
Figure 5. Architecture of the Multi-stage Fusion Mamba (MFusion Mamba) module. Structure of the Multi-stage Fusion Mamba (MFusion Mamba) module. Multi-scale encoder features are first combined by coarse fusion and subsequently refined through the Fine Fusion module consisting of linear projection, one-dimensional convolution (Conv1d), a Mamba block, and feature projection layers before generation of the fused feature representation used by the decoder. Please click here to view a larger version of this figure.

6. Model training

  1. Train MVM-UNet on Ubuntu 22.04.1 with Linux kernel version 6.8.0. Use a workstation equipped with a 13th Gen Intel Core i9-13900K CPU and an NVIDIA A800 GPU. Use the same hardware configuration throughout training and evaluation.
  2. Implement and train the model using PyTorch 2.0.1 with CUDA 11.8. Install all required software dependencies before training.
  3. Use the AdamW optimizer with an initial learning rate of 3 × 10−5, β1 = 0.9, β2 = 0.999, ε = 1 × 10−8, and a weight decay of 0.01. Set the batch size to 32 unless otherwise specified.
  4. Train each model for 300 epochs. Use a cosine annealing learning-rate schedule with ηmin = 1 × 10−5. Set the input image size to 256 × 256 for ISIC 2017 and ISIC 2018 and to 224 × 224 for Synapse.
  5. Use three independent random seeds (1, 52, and 100) for the main comparison experiments. Repeat the complete training and evaluation procedure for each seed. Report the final quantitative results as mean ± SD across the three runs.
  6. Use a fixed random seed of 100 for all ablation studies unless otherwise specified. Keep the dataset partitions, preprocessing strategy, network architecture, optimizer, learning rate, batch size, and number of training epochs unchanged across all ablation experiments.
  7. Use the BCE-Dice loss for binary lesion segmentation on ISIC 2017 and ISIC 2018. Set the BCE and Dice loss weights to 1.0. Use the CE-Dice loss for Synapse and set both the cross-entropy and Dice loss weights to 1.0.
  8. Resize, normalize, and augment the ISIC 2017 and ISIC 2018 training images using the preprocessing procedure described in Step 1. Apply resizing, random rotation, and random flipping to Synapse training images as described in Step 1. Use identical preprocessing settings during all training runs.
  9. Select model checkpoints according to the dataset-specific validation protocol. Save the checkpoint with the best validation performance for ISIC 2017 and ISIC 2018, and perform validation every 30 epochs. Train Synapse for 300 epochs without a validation set and use the final training checkpoint for testing.
  10. Use the official validation set only for model selection on ISIC 2017 and ISIC 2018. Do not use the Synapse testing set for training, hyperparameter tuning, or checkpoint selection. Reserve all testing data exclusively for final evaluation.
  11. Use the following training parameters for reproducibility. Set the batch size to 32 for all datasets. Use AdamW with an initial learning rate of 3 × 10−5, β1 = 0.9, β2 = 0.999, ε = 1 × 10−8, and a weight decay of 1 × 10−2.
  12. Configure the cosine annealing learning-rate scheduler with Tmax = 50 and ηmin = 1×10−5 for ISIC 2017 and ISIC 2018. Configure the scheduler with Tmax = 100 and ηmin = 1×10−5 for Synapse. Keep the scheduler configuration unchanged for all repeated experiments.
  13. Train all models using full-precision FP32 arithmetic. Disable automatic mixed-precision training. Do not apply gradient clipping during optimization.
  14. Keep the precision settings, gradient update strategy, optimizer configuration, learning-rate schedule, and random-seed protocol unchanged across all comparison experiments, ablation studies, and reproducibility runs.
  15. Select the best model checkpoint
    1. Evaluate the model on the validation set after each training epoch for the ISIC 2017 and ISIC 2018 datasets.
    2. Calculate the Binary Cross-Entropy (BCE)-Dice loss for each validation batch and compute the mean validation loss across the entire validation set.
    3. Save the current model as the best checkpoint when the mean validation loss is lower than the previously recorded minimum validation loss.
    4. Record the mean Intersection over Union (mIoU), Dice Similarity Coefficient (DSC), accuracy (Acc), specificity (Spe), and sensitivity (Sen) during validation for performance monitoring only. Do not use these metrics as the checkpoint-selection criterion.

7. Model evaluation

  1. Evaluate the trained model using the official testing set for each dataset. Use the testing set only for final performance assessment.
  2. For ISIC 2017 and ISIC 2018, calculate the mIoU, DSC, Acc, Sen, and Spe. Use pixel-level true positives (TP), false positives (FP), true negatives (TN), and false negatives (FN) for all calculations.
  3. Apply a sigmoid activation function to the model output for ISIC 2017 and ISIC 2018. Convert the probability map into a binary segmentation mask using a threshold of 0.5. Calculate the evaluation metrics using Equations 2–6:
    Segmentation metric equation, mIoU=TP/(TP+FP+FN), formula for accuracy assessment. (2)
    Dice coefficient formula, 2TP/(2TP+FP+FN), used for similarity measurement analysis. (3)
    Accuracy formula diagram, equation: Accuracy=(TP+TN)/(TP+TN+FP+FN), statistical analysis. (4)
    Sensitivity equation for diagnostic test accuracy analysis, formula: TP/(TP+FN). (5)
    Specificity formula: Specificity = TN / (TN + FP), statistical concept, used in data analysis. (6)
  4. For Synapse, apply the softmax activation function to the model output. Assign each pixel or voxel to the class with the highest probability using the argmax operation. Calculate the DSC and the 95th-percentile Hausdorff distance (HD95) for each foreground organ and report the average values across all testing cases.
  5. Compare MVM-UNet with representative CNN-based, Transformer-based, and state-space model (SSM)-based segmentation methods. Use identical dataset partitions, preprocessing procedures, input resolutions, and evaluation metrics for all methods.
  6. Use the official training, validation, and testing partitions for ISIC 2017 and ISIC 2018. Use the standard split of 18 training cases and 12 testing cases for Synapse. Set the input resolution to for ISIC datasets and for Synapse.
  7. Reproduce baseline methods using their official implementations whenever available. Report reproduced results as mean ± SD across repeated runs. Retain literature-reported values as originally published and distinguish them in the corresponding table notes.
  8. Conduct ablation studies using the fixed random seed of 100 unless otherwise specified. Keep the dataset partitions, preprocessing procedure, input resolution, optimizer, learning-rate schedule, batch size, number of epochs, loss function, and evaluation metrics unchanged across all ablation experiments.
  9. Evaluate the contributions of MV4D, SFusion Mamba, the Up-Down Projection branch in the MVV Block, MFusion Mamba, input image size, dropout value, and encoder-decoder layer configuration. Modify only the target component or parameter in each ablation experiment.
  10. Perform the Wilcoxon signed-rank test using paired per-image results for ISIC 2017 and ISIC 2018 and paired per-case results for Synapse. Consider a p-value smaller than 0.05 to indicate statistical significance.
  11. Evaluate computational efficiency using the same hardware environment and input resolution for all methods. Measure the training time per epoch, inference time per image, peak GPU memory usage during training, number of model parameters, and floating-point operations (FLOPs). Calculate FLOPs using a single forward pass.
  12. Select representative qualitative examples only from the testing set after completing model evaluation. Compare the original image, ground-truth mask, and predicted mask using identical test cases across all methods. Select representative examples that include small targets, irregular boundaries, ambiguous boundaries, and representative multiorgan structures.
  13. Calculate evaluation metrics and perform statistical analysis
    1. Calculate the segmentation metrics for the ISIC 2017 and ISIC 2018 datasets in Python using NumPy and sklearn.metrics.confusion_matrix. Threshold the predicted probability map at 0.5, obtain the pixel-level TP, FP, TN, and FN, and calculate the mIoU, DSC, Acc, Sen, and Spe from these values.
    2. Calculate the DSC and the HD95 for the Synapse dataset using medpy.metric.binary.dc and medpy.metric.binary.hd95, respectively. Apply softmax followed by argmax to the model output before computing the evaluation metrics.
    3. Calculate the number of FLOPs and trainable parameters using thop.profile with a single forward pass.
    4. Perform the Wilcoxon signed-rank test in Python using scipy.stats.wilcoxon. Use paired per-image metric values for the ISIC 2017 and ISIC 2018 datasets and paired per-case metric values for the Synapse dataset.

8. Loss function definition

  1. Use the standard Cross-Entropy (CE) loss for multiclass segmentation and the standard BCE loss for binary segmentation. Use the standard Dice loss formulation for segmentation. Equations 7–11 define the loss functions used in this protocol.
    Cross-entropy loss equation L_CE in classification algorithm, mathematical formula. (7)
    Dice loss formula, \(L_{Dice}(X, Y)\), equation, used in image segmentation tasks, optimization. (8)
    Binary cross-entropy loss equation, L_BCE(x,y), used in logistic regression model analysis. (9)
    Loss function equation for combining BCE and Dice loss; formula: L_BCE-Dice=ϕ₁L_BCE+ϕ₂L_Dice. (10)
    Equation for combined cross-entropy and Dice loss: \(L_{CE-Dice} = \phi_1 L_{CE} + \phi_2 L_{Dice}\). (11)
  2. Set the BCE and Dice loss weights to 1.0 for ISIC 2017 and ISIC 2018, such that Static equilibrium, ΣFx=0 formula, equations diagram, educational physics concept, force balance.1 = 1.0 and Static equilibrium, ΣFx=0 formula, equations diagram, educational physics concept, force balance.2 = 1.0. Set the CE and Dice loss weights to 1.0 for Synapse, such φ1 = 1.0 that and φ2 = 1.0.
  3. Implement the loss functions in utils.py. Use nn.BCELoss for the BCE term and nn.CrossEntropyLoss for the CE term. Compute the binary Dice loss by flattening each predicted mask and ground-truth mask, calculating the Dice loss for each sample, and averaging the loss across the batch. Compute the multiclass Dice loss by converting the target label map into one-hot format, applying softmax to the model output, calculating the Dice loss for each class, and averaging the loss across all classes.
  4. Set the smoothing constant to 1 for the binary Dice loss and to 1×10−5 for the multiclass Dice loss. Implement the BCE-Dice loss using the BceDiceLoss class with wb = 1 and wd = 1. Implement the CE-Dice loss using the CeDiceLoss class with loss_weight = [1, 1]. Keep the smoothing constants, reduction strategy, and software implementation unchanged for all datasets, random seeds, and experiments.
  5. Configure the loss reduction
    1. Instantiate nn.BCELoss() and nn.CrossEntropyLoss() without explicitly specifying the reduction argument.
    2. Use the default PyTorch loss reduction setting (reduction = "mean") for both loss functions. Do not use reduction = "sum" or an unreduced loss output.

9. Reproducibility settings and execution

  1. Download the released implementation from https://github.com/LIXUEGUANG002/MVM-UNet. Use the repository together with the software packages, datasets, hardware specifications, and computational resources listed in the Table of Materials.
  2. Clone the repository and enter the project directory by running git clone https://github.com/LIXUEGUANG002/MVM-UNet.git, followed by cd MVM-Unet.
  3. Configure the ISIC 2017 or ISIC 2018 experiment by setting the dataset name, dataset path, input size, batch size, number of epochs, loss function, optimizer, learning-rate scheduler, and random seed in configs/config_setting.py. Run the training script from the repository root using python train.py.
  4. Configure the Synapse experiment by setting the dataset name, training data path, testing volume path, list directory, input size, number of classes, batch size, number of epochs, loss function, optimizer, learning-rate scheduler, and random seed in configs/config_setting_synapse.py. Run the training script from the repository root using python train_synapse.py.
  5. Perform inference-only evaluation by setting only_test_and_save_figs = True, best_ckpt_path to the trained checkpoint, and img_save_path to the output directory in the corresponding configuration file. Run python train.py for ISIC 2017 or ISIC 2018, or run python train_synapse.py for Synapse to generate prediction results and qualitative figures.
  6. Use the released source code version
    1. Clone the released GitHub repository and check out commit ee891b42c2f083c4990eed72f1d4463adc5e103e on the master branch before configuring the datasets, training scripts, and evaluation settings.
    2. Use this commit to reproduce the experiments reported in this study. No tagged release version was available for the repository at the time of manuscript revision.

Access restricted. Please log in or start a trial to view this content.

Results

Expected outcomes and interpretation
When this protocol is implemented correctly, the trained MVM-UNet model is expected to produce stable segmentation performance across repeated runs, with only small variations among different random seeds for most evaluation metrics. For ISIC 2017 and ISIC 2018, successful outcomes are reflected by high DSC, mIoU, Acc, Sen, and Spe values, together with predicted lesion masks that closely follow the ground-truth lesion boundaries (Figures 6 and 7)...

Access restricted. Please log in or start a trial to view this content.

Discussion

This protocol describes MVM-UNet, a Mamba-based medical image segmentation framework. The method was designed to address two limitations of existing segmentation models. First, conventional CNN-based methods have limited ability to model long-range dependencies and hierarchical contextual information in complex medical images43. Second, Transformer-based methods can model global context but usually require higher computational cost23,25. M...

Access restricted. Please log in or start a trial to view this content.

Disclosures

The authors declare that they have no competing financial interests.

Acknowledgements

This research received no external funding.

Access restricted. Please log in or start a trial to view this content.

Materials

List of materials used in this article
NameCompanyCatalog NumberComments
Hardware - GPU workstation or GPU serverInstitutional computing platform / local workstationCustom-built local GPU workstation; Ubuntu 22.04.1 with Linux kernel 6.8.0; Intel Core i9-13900K CPU; NVIDIA A800 GPU; 128 GB RAM; 512 GB local storage.Computational platform for training, validation, testing, ablation, and inference-only experiments.
Hardware - Graphics processing unit (GPU)NVIDIA CorporationNVIDIA A800 GPU (80 GB memory).GPU-accelerated model training and inference.
Hardware - Central processing unit (CPU)Intel Corporation / AMD13th Gen Intel Core i9-13900K CPU.Host processor for data loading, preprocessing, and experiment execution.
Hardware - System memory (RAM)Institutional computing platform / local workstation128 GB system RAMMemory for dataset loading, preprocessing, and training.
Hardware - StorageInstitutional computing platform / local workstation2 TB NVMe solid-state drive.Storage for datasets, checkpoints, logs, and generated prediction figures.
Software environment - Operating systemCanonical Ltd.Recommended: Ubuntu 22.04.1 LTSOperating system for the computational environment.
Software environment - Conda environmentAnaconda, Inc. / MinicondaEnvironment name: mvmunetPython environment used to install and isolate dependencies.
Software environment - PythonPython Software FoundationPython 3.8Programming language used for implementation and experiment execution.
Software environment - CUDA toolkitNVIDIA CorporationCUDA Toolkit 11.8GPU computing backend required by PyTorch and Mamba-related packages.
Software environment - cuDNNNVIDIA CorporationcuDNN 8.7.0.GPU-accelerated deep-learning primitives used through PyTorch.
Python package - PyTorchPyTorchtorch == 2.0.1Deep-learning framework for model training, loss calculation, optimization, and inference.
Python package - TorchvisionPyTorchtorchvision == 0.14.0Image transform utilities used in preprocessing and augmentation.
Python package - TorchaudioPyTorchtorchaudio == 0.13.0Installed with the recommended PyTorch environment.
Python package - timmtimm developerstimm == 0.4.12Model-component or utility dependency listed in the repository environment instructions.
Python package - tritonOpenAI / Triton developerstriton == 2.0.0Dependency used by GPU-accelerated sequence modeling components.
Python package - causal-conv1dcausal-conv1d developerscausal_conv1d == 1.0.0Efficient causal convolution dependency required by the Mamba implementation.
Python package - mamba-ssmMamba SSM developersmamba_ssm == 1.0.1State-space sequence modeling package used for Mamba/S6-related components.
Python package - NumPyNumPy developersNumPy version 1.24.3.Numerical computation and array operations.
Python package - SciPySciPy developersSciPy version 1.10.1.Scientific computation; scipy.ndimage.zoom is imported in utils.py.
Python package - SimpleITKInsight Software ConsortiumSimpleITK version 2.2.1.Medical image input/output and preprocessing utility imported in utils.py.
Python package - MedPyMedPy developersMedPy version 0.4.0.Medical image metric calculation package imported in utils.py.
Python package - scikit-imagescikit-image developersscikit-image version 0.21.0.Image-processing dependency listed in README.
Python package - scikit-learnscikit-learn developersscikit-learn version 1.3.2.Machine-learning utility package listed in README.
Python package - matplotlibMatplotlib developersMatplotlib version 3.7.2.Used for saving qualitative visualization figures.
Python package - h5pyh5py developersh5py version 3.9.0.HDF5 file support for Synapse test volumes.
Python package - thopTHOP developersTHOP version 0.1.1.post2209072238.Used when calculating FLOPs and parameter-related computational cost.
Python package - packagingPython Packaging Authoritypackaging version 23.1.Dependency listed in README.
Python package - pytestpytest developerspytest version 7.4.0.Dependency listed in README.
Python package - chardetchardet developerschardet version 5.2.0.Dependency listed in README.
Python package - yacsYACS developersyacs version 0.1.8.Configuration utility dependency listed in README.
Python package - termcolortermcolor developerstermcolor version 2.3.0.Logging/terminal utility dependency listed in README.
Python package - submititsubmitit developerssubmitit version 1.4.5.Experiment/job utility dependency listed in README.
Python package - tensorboardXtensorboardX developerstensorboardX version 2.6.2.2.Training log visualization utility listed in README.
Python package - ml-collectionsml_collections developersml-collections version 0.1.1.Imported by configs/config_setting_synapse.py.
Dataset - ISIC 2017 Challenge datasetInternational Skin Imaging CollaborationISIC 2017 skin lesion segmentation datasetPublic de-identified dermoscopic skin lesion images and masks used for binary segmentation.
Dataset - ISIC 2018 Challenge Task 1 datasetInternational Skin Imaging CollaborationISIC 2018 Task 1: Lesion Boundary SegmentationPublic de-identified dermoscopic skin lesion images and masks used for binary segmentation.
Dataset - Synapse Multi-Atlas Labeling Beyond the Cranial Vault datasetSynapse / Sage BionetworksAccession identifier: syn3193805Public abdominal CT multi-organ segmentation dataset.
Data organization - ISIC 2017 data folderAuthors / repository layoutdata/isic2017/Expected local folder containing train and validation images/masks.
Data organization - ISIC 2018 data folderAuthors / repository layoutdata/isic2018/Expected local folder containing train and validation images/masks.
Data organization - Synapse data folderAuthors / repository layoutdata/Synapse/Expected local folder for Synapse lists, train_npz, and test_vol_h5.
Source code - MVM-UNet source-code repositoryAuthors / GitHubBranch: master;Git commit hash: ee891b42c2f083c4990eed72f1d4463adc5e103e.Complete source-code implementation of the protocol.
Source code - ISIC configuration fileAuthorsconfigs/config_setting.pyConfiguration file for ISIC-style binary segmentation.
Source code - Synapse configuration fileAuthorsconfigs/config_setting_synapse.pyConfiguration file for Synapse multi-organ segmentation.
Source code - ISIC training scriptAuthorstrain.pyTraining and validation entry point for ISIC-style binary segmentation.
Source code - Synapse training scriptAuthorstrain_synapse.pyTraining and validation entry point for Synapse multi-class segmentation.
Source code - ISIC engine fileAuthorsengine.pyTraining/validation engine for ISIC-style experiments.
Source code - Synapse engine fileAuthorsengine_synapse.pyTraining/validation engine for Synapse experiments.
Source code - Losses and utility functionsAuthorsutils.pyImplements seed setting, optimizer/scheduler utilities, BCE-DICE loss, CE-DICE loss, Dice loss, data transforms, and qualitative image saving.
Source code - MVM-UNet architecture implementationAuthorsmodels/mvmunet/mvmunet.pyMain MVM-UNet network definition.
Source code - Custom module implementationAuthorsmodels/mvmunet/core.pyImplements MV4D, MVV Block, SFusion Mamba, MFusion Mamba, S6/Mamba-related components, and scan-index generators.
Training configuration - ISIC loss functionAuthors / PyTorchBceDiceLoss(wb=1, wd=1)Combined BCE-DICE loss for binary skin lesion segmentation.
Training configuration - Synapse loss functionAuthors / PyTorchCeDiceLoss(num_classes=9, loss_weight=[1,1])Combined CE-DICE loss for multi-class organ segmentation.
Training configuration - OptimizerPyTorchAdamWOptimizer used in default configuration files.
Training configuration - Learning-rate scheduler for ISICPyTorchCosineAnnealingLRLearning-rate scheduler in default ISIC configuration.
Training configuration - Learning-rate scheduler for SynapsePyTorchCosineAnnealingLRLearning-rate scheduler in default Synapse configuration.
Training configuration - Random seed controlAuthors / PyTorch / NumPyset_seed(seed) in utils.pyFunction used to set Python, NumPy, PyTorch CPU, PyTorch CUDA, and cuDNN deterministic behavior.
Training configuration - Mixed-precision settingAuthors / PyTorchamp = FalseAutomatic mixed-precision training flag.
Output - Training result directoryAuthors / repository layoutresults/mvmunet_*Directory used to store checkpoints, logs, and generated outputs.
Output - Inference-only output pathAuthors / configuration filesimg_save_pathDirectory for saved qualitative prediction figures during inference-only evaluation.
Output - Best checkpoint pathAuthors / configuration filesbest_ckpt_pathCheckpoint path used for inference-only evaluation.

References

  1. Zhang F, et al. Cross co-teaching for semi-supervised medical image segmentation. Pattern Recognit. 2024;152:110485.
  2. Gu Y, et al. Dual-scale enhanced and cross-generative consistency learning for semi-supervised medical image segmentation. Pattern Recognit. 2025;158:111140.
  3. Zhu X, Wang W, Zhang C, Wang H. Polyp-Mamba: A hybrid multi-frequency perception gated selection network for polyp segmentation. Inf Fusion. 2025;115:103161.
  4. Iqbal S, et al. TBConvL-Net: A hybrid deep learning architecture for robust medical image segmentation. Pattern Recognit. 2025;158:111147.
  5. Zhao Z, et al. Balanced feature fusion collaborative training for semi-supervised medical image segmentation. Pattern Recognit. 2025;157:110986.
  6. Zhou T, et al. MambaYOLACT: You only look at Mamba prediction head for head-neck lymph nodes. Artif Intell Rev. 2025;58(6).
  7. Zhao Y, et al. MGF-GCN: Multimodal interaction Mamba-aided graph convolutional fusion network for semantic segmentation of remote sensing images. Inf Fusion. 2025;122:103268.
  8. Ronneberger O, Fischer P, Brox T. U-Net: Convolutional networks for biomedical image segmentation. In: Medical Image Computing and Computer-Assisted Intervention (MICCAI). Springer; 2015.
  9. Zhou Z, Siddiquee MMR, Tajbakhsh N, Liang J. UNet++: Redesigning skip connections to exploit multiscale features in image segmentation. IEEE Trans Med Imaging. 2019;39(6):1856-1867.
  10. Shaker A, et al. UNETR++: Delving into efficient and accurate 3D medical image segmentation. IEEE Trans Med Imaging. 2024;43(9):3377-3390.
  11. Zhou HY, et al. nnFormer: Volumetric medical image segmentation via a 3D Transformer. IEEE Trans Image Process. 2023;32:4036-4045.
  12. He A, et al. H2Former: An efficient hierarchical hybrid Transformer for medical image segmentation. IEEE Trans Med Imaging. 2023;42(9):2763-2775.
  13. Zhu L, et al. Vision Mamba: Efficient visual representation learning with bidirectional state space model. In: Proceedings of the 41st International Conference on Machine Learning (ICML). 2024.
  14. Liu Y, et al. VMamba: Visual state space model. Adv Neural Inf Process Syst. 2024;37:103031-103063.
  15. Ma J, Li F, Wang B. U-Mamba: Enhancing long-range dependency for biomedical image segmentation. arXiv. 2024;arXiv:2401.04722.
  16. Wang Z, et al. Mamba-UNet: UNet-like pure visual Mamba for medical image segmentation. arXiv. 2024;arXiv:2402.05079.
  17. Huang T, et al. LocalMamba: Visual state space model with windowed selective scan. In: European Conference on Computer Vision (ECCV). Springer; 2024.
  18. Zhang Z, et al. Motion Mamba: Efficient and long sequence motion generation. In: European Conference on Computer Vision (ECCV). Springer; 2024.
  19. Hu VT, et al. Zigma: A DiT-style zigzag Mamba diffusion model. In: European Conference on Computer Vision (ECCV). Springer; 2024.
  20. Rahman MM, et al. Mamba in vision: A comprehensive survey of techniques and applications. arXiv. 2024;arXiv:2410.03105.
  21. Falk T, et al. U-Net: Deep learning for cell counting, detection, and morphometry. Nat Methods. 2019;16(1):67-70.
  22. Gu R, et al. CA-Net: Comprehensive attention convolutional neural networks for explainable medical image segmentation. IEEE Trans Med Imaging. 2020;40(2):699-711.
  23. Chen J, et al. TransUNet: Rethinking the U-Net architecture design for medical image segmentation through the lens of Transformers. Med Image Anal. 2024;97:103280.
  24. Zhang Z, Zhang W. Pyramid medical Transformer for medical image segmentation. arXiv. 2021;arXiv:2104.14702.
  25. Cao H, et al. Swin-Unet: UNet-like pure Transformer for medical image segmentation. In: European Conference on Computer Vision (ECCV). Springer; 2022.
  26. Chen B, et al. TransAttUNet: Multi-level attention-guided U-Net with Transformer for medical image segmentation. IEEE Trans Emerg Top Comput Intell. 2023.
  27. Jiang S, Li J. TransCUNet: UNet cross-fused Transformer for medical image segmentation. Comput Biol Med. 2022;150:106207.
  28. Wu R, Liu Y, Liang P, Chang Q. H-vmunet: High-order Vision Mamba UNet for medical image segmentation. Neurocomputing. 2025;624:129447.
  29. Liu J, et al. Swin-UMamba: Adapting Mamba-based vision foundation models for medical image segmentation. IEEE Trans Med Imaging. 2024.
  30. Huang X, et al. MISSFormer: An effective Transformer for 2D medical image segmentation. IEEE Trans Med Imaging. 2023;42(5):1484-1494.
  31. Ruan J, et al. MALUNet: A multi-attention and lightweight U-Net for skin lesion segmentation. In: 2022 IEEE International Conference on Bioinformatics and Biomedicine (BIBM). IEEE; 2022.
  32. Ruan J, Xiang S. VM-UNet: Vision Mamba UNet for medical image segmentation. arXiv. 2024;arXiv:2402.02491.
  33. Valanarasu JMJ, Patel VM. UNeXt: MLP-based rapid medical image segmentation network. In: Medical Image Computing and Computer-Assisted Intervention (MICCAI). Springer; 2022.
  34. Ren S, Li X. HResFormer: Hybrid residual Transformer for volumetric medical image segmentation. IEEE Trans Neural Netw Learn Syst. 2025;36(6):10558-10566.
  35. Karimijafarbigloo S, Azad R, Kazerouni A, Merhof D. MedScale-Former: Self-guided multiscale Transformer for medical image segmentation. Med Image Anal. 2025;103.
  36. Yan S, et al. Multi-scale convolutional attention frequency-enhanced Transformer network for medical image segmentation. Inf Fusion. 2025;119.
  37. Gao Y, Zhou M, Metaxas DN. UTNet: A hybrid Transformer architecture for medical image segmentation. In: Medical Image Computing and Computer-Assisted Intervention (MICCAI). Springer; 2021.
  38. Mei J, et al. SANet: A slice-aware network for pulmonary nodule detection. IEEE Trans Pattern Anal Mach Intell. 2021;44(8):4374-4387.
  39. Hu XZ, Jeon WS, Rhee SY. ATT-UNet: Pixel-wise staircase attention for weed and crop detection. In: 2023 International Conference on Fuzzy Theory and Its Applications (iFUZZY). IEEE; 2023.
  40. Wang X, et al. Transferable normalization: Towards improving transferability of deep neural networks. Adv Neural Inf Process Syst. 2019;32.
  41. Azad R, et al. TransDeepLab: Convolution-free Transformer-based DeepLabV3+ for medical image segmentation. In: International Workshop on Predictive Intelligence in Medicine (PRIME). Springer; 2022.
  42. Ruan J, Gao J, Xie M, Xiang S. Learning multi-axis representation in frequency domain for medical image segmentation. Mach Learn. 2025;114(1):10.
  43. Goodfellow I, Bengio Y, Courville A. Deep Learning. MIT Press; Cambridge, MA; 2016.
  44. Milletari F, Navab N, Ahmadi SA. V-Net: Fully convolutional neural networks for volumetric medical image segmentation. In: 2016 Fourth International Conference on 3D Vision (3DV). IEEE; 2016.

Access restricted. Please log in or start a trial to view this content.

Reprints and Permissions

Tags

Feature FusionEncoder DecoderDeep Learning SegmentationSkin Lesion SegmentationAbdominal Organ SegmentationModel TrainingPerformance Evaluation