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

167 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 (PE....

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....

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-supervi....

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

Reprints and Permissions

Explore More Articles

Feature FusionEncoder DecoderDeep Learning SegmentationSkin Lesion SegmentationAbdominal Organ SegmentationModel TrainingPerformance Evaluation