SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.03302 · 2024

Swin-UMamba: Mamba-based UNet with ImageNet-based pretraining

arXiv · PDF · Open in the Atlas

Code that ran

6 of 6 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 1 violated it and 0 have no contract verdict; 3 failures of our instrument; 0 no recorded run), measured 2026-11-22; repository links from the Papers with Code archive attributed under CC BY-SA, no affiliation; bodies inline only under a permissive licence as GitHub detects it. Not a reproduction of the paper's results.

"Ran" means the function executed on a synthesized input and returned a value. It is not a reproduction of the paper's results. This record, dated, as JSON: /api/ran/2402.03302.json · badge: /api/ran/2402.03302.svg

Each repository's role is a label: a classifier's output recorded on the link, or, where no role is recorded, what the Papers with Code archive marked. The line under it names its basis. Neither says who wrote the code.

RepositoryRoleRan
jiarunliu/swin-umamba canonical (classifier label)
classifier basis not recorded on the link
6 ran · 0 no recorded run
FunctionStatusWhere it lives
convert_labels_back_to_BraTS Ran
ran, violated the contract we drafted
jiarunliu/swin-umamba/swin_umamba/nnunetv2/dataset_conversion/Dataset137_BraTS21.py
code served (permissive licence) · get_code("a2c8b38ba9393780")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned ndarray, ndim 3, dtype family int, shape (2, 3, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create a small segmentation array for testing
# The array has values 0, 1, 2, 3 which will be converted
seg = np.array([
    [[0, 1, 2, 3],
     [1, 0, 3, 2],
     [2, 3, 0, 1]],
    [[3, 2, 1, 0],
     [0, 1, 2, 3],
     [1, 2, 3, 0]]
], dtype=np.uint8)

ARGS = {
    "seg": seg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 3, dtype family int, shape (2, 3, 4) — shape (2, 3, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
copy_files Ran
ran, honoured the contract we drafted
jiarunliu/swin-umamba/swin_umamba/nnunetv2/dataset_conversion/Dataset027_ACDC.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from luumsk/SmallLesionMRI, is pointer only (licence: NONE) · get_code("517ad51ee69e8a2d")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from luumsk/SmallLesionMRI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

copy_files Ran
ran, honoured the contract we drafted
jiarunliu/swin-umamba/swin_umamba/nnunetv2/dataset_conversion/Dataset115_EMIDEC.py
code served (permissive licence) · get_code("c66e8feb67225a1b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned int, ndim 0, dtype family int, shape () as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
from pathlib import Path
import shutil

# Create temporary directories and file structure for testing
temp_base = Path(tempfile.mkdtemp())

# Create source data directory structure
src_data_dir = temp_base / "src_data"
src_data_dir.mkdir(exist_ok=True)

# Create training patients with Images and Contours subdirectories
for i in range(2):
    patient_dir = src_data_dir / f"patient_train_{i:03d}"
    patient_dir.mkdir(exist_ok=True)
    
    images_dir = patient_dir / "Images"
    images_dir.mkdir(exist_ok=True)
    (images_dir / f"patient_train_{i:03d}.nii.gz").touch()
    
    contours_dir = patient_dir / "Contours"
    contours_dir.mkdir(exist_ok=True)
    (contours_dir / f"patient_train_{i:03d}.nii.gz").touch()

# Create source test directory structure
src_test_dir = temp_base / "src_test"
src_test_dir.mkdir(exist_ok=True)

for i in range(2):
    patient_dir = src_test_dir / f"patient_test_{i:03d}"
    patient_dir.mkdir(exist_ok=True)
    
    images_dir = patient_dir / "Images"
    images_dir.mkdir(exist_ok=True)
    (images_dir / f"patient_test_{i:03d}.nii.gz").touch()

# Create destination directories
train_dir = temp_base / "train"
train_dir.mkdir(exist_ok=True)

labels_dir = temp_base / "labels"
labels_dir.mkdir(exist_ok=True)

test_dir = temp_base / "test"
test_dir.mkdir(exist_ok=True)

ARGS = {
    "src_data_dir": src_data_dir,
    "src_test_dir": src_test_dir,
    "train_dir": train_dir,
    "labels_dir": labels_dir,
    "test_dir": test_dir,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type int, ndim 0, dtype family int, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_vendor_split Ran
ran; our contract draft was wrong, not the code
jiarunliu/swin-umamba/swin_umamba/nnunetv2/dataset_conversion/Dataset114_MNMs.py
code served (permissive licence) · get_code("2a83a2bc5120febe")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import random

# Set seed for reproducibility
random.seed(0)

# Create a list of patient identifiers
patients = [f"patient_{i}" for i in range(10)]

# Number of validation patients
num_val_patients = 3

# Construct the arguments dictionary
ARGS = {
    "patients": patients,
    "num_val_patients": num_val_patients,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
merge Ran
ran; our contract draft was wrong, not the code
jiarunliu/swin-umamba/swin_umamba/nnunetv2/batch_running/generate_lsf_runs_customDecathlon.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from luumsk/SmallLesionMRI, is pointer only (licence: NONE) · get_code("86ec2ccc2984b8bf")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (Apache-2.0), but get_code serves the stored copy, first harvested from luumsk/SmallLesionMRI, and GitHub detected no licence in that repository when it was checked. The setup block that called it is withheld with it, because it is written against that body. source_path and origin say where the code lives, to read under the repository's own terms. A run is recorded.

read_csv Ran
ran; our contract draft was wrong, not the code
jiarunliu/swin-umamba/swin_umamba/nnunetv2/dataset_conversion/Dataset114_MNMs.py
code served (permissive licence) · get_code("882441705cf75b1d")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned dict. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import tempfile
import csv
import os

# Create a temporary CSV file with the required headers and data
temp_dir = tempfile.mkdtemp()
csv_file_path = os.path.join(temp_dir, "patient_data.csv")

with open(csv_file_path, 'w', newline='') as f:
    writer = csv.writer(f)
    # Write headers
    writer.writerow(['External code', 'ED', 'ES', 'Vendor'])
    # Write sample data rows
    writer.writerow(['P001', '100', '50', 'VendorA'])
    writer.writerow(['P002', '120', '60', 'VendorB'])
    writer.writerow(['P003', '95', '45', 'VendorA'])

ARGS = {
    'csv_file': csv_file_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 6 samples lifted from this paper's linked repositories, 6 carry a function identity and 0 do not. Of the 6 distinct functions with an identity, 6 are also present in other papers whose code we hold (5 with at least one paper dated earlier, 0 the same month, 6 later) and 0 are only here among the 52,977 papers whose code Syntology holds (as of 2026-09-26).

Only here means: among the 52,977 papers whose code Syntology holds (51,887 with lifted samples, 1,090 through their assemblies only), as of 2026-09-26, no other paper's lifted samples or current assembly bricks contain an identical function body after normalisation.

FunctionAlso present inEarliest-datedOthers named
merge 11 other papers
2 dated earlier, 9 later
2303.14444 (2023-03)
MultiTalent: A Multi-Dataset Approach to Medical Image Segmentation
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
and 8 more not named here
copy_files 10 other papers
1 dated earlier, 9 later
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
2403.07332 (2024-03)
LKM-UNet: Large Kernel Vision Mamba UNet for Medical Image Segmentation
and 7 more not named here
convert_labels_back_to_BraTS 9 other papers
4 dated earlier, 5 later
2106.01226 (2021-06)
Semi-Supervised Semantic Segmentation with Cross Pseudo Supervision
2205.04846 (2022-05)
MNet: Rethinking 2D/3D Networks for Anisotropic Medical Image Segmentation
2303.09975 (2023-03)
MedNeXt: Transformer-driven Scaling of ConvNets for Medical Image Segmentation
and 6 more not named here
get_vendor_split 6 other papers
1 dated earlier, 5 later
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
2403.07332 (2024-03)
LKM-UNet: Large Kernel Vision Mamba UNet for Medical Image Segmentation
and 3 more not named here
read_csv 6 other papers
1 dated earlier, 5 later
2309.03906 (2023-09)
A-Eval: A Benchmark for Cross-Dataset Evaluation of Abdominal Multi-Organ Segmentation
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
2403.07332 (2024-03)
LKM-UNet: Large Kernel Vision Mamba UNet for Medical Image Segmentation
and 3 more not named here
copy_files 4 other papers
4 later
2403.05246 (2024-03)
LightM-UNet: Mamba Assists in Lightweight UNet for Medical Image Segmentation
2405.10246 (2024-05)
A Foundation Model for Brain Lesion Segmentation with Mixture of Modality Experts
2407.06468 (2024-07)
AnatoMask: Enhancing Medical Image Segmentation with Reconstruction-guided Self-masking
and 1 more not named here

Presence, not direction: an identical function body in two papers' repositories does not say who wrote it, which came from which, or that either paper's method rests on it. Matching is exact after normalisation, so a renamed or edited function is not matched. Dates are when papers appeared, not when code was written. Only .py files the harvester lifted are covered; notebooks are not read. A new-style arXiv id YYMM.NNNN dates a paper to the month 20YY-MM; otherwise Paper.year dates it to the year; otherwise it is undated. Dates are when the paper appeared, not when the code was written. Read 2026-11-22.

Repositories linked to this paper

Some links come from the archived Papers with Code dataset (CC BY-SA 4.0): attribution and licence.

Abstract

Accurate medical image segmentation demands the integration of multi-scale information, spanning from local features to global dependencies. However, it is challenging for existing methods to model long-range global information, where convolutional neural networks (CNNs) are constrained by their local receptive fields, and vision transformers (ViTs) suffer from high quadratic complexity of their attention mechanism. Recently, Mamba-based models have gained great attention for their impressive ability in long sequence modeling. Several studies have demonstrated that these models can outperform popular vision models in various tasks, offering higher accuracy, lower memory consumption, and less computational burden. However, existing Mamba-based models are mostly trained from scratch and do not explore the power of pretraining, which has been proven to be quite effective for data-efficient medical image analysis. This paper introduces a novel Mamba-based model, Swin-UMamba, designed specifically for medical image segmentation tasks, leveraging the advantages of ImageNet-based pretraining. Our experimental results reveal the vital role of ImageNet-based training in enhancing the performance of Mamba-based models. Swin-UMamba demonstrates superior performance with a large margin compared to CNNs, ViTs, and latest Mamba-based models. Notably, on AbdomenMRI, Encoscopy, and Microscopy datasets, Swin-UMamba outperforms its closest counterpart U-Mamba_Enc by an average score of 2.72%.

For agents

The same record, over MCP at https://syntology.ai/mcp:

get_harvested_code_for_paper("2402.03302")
get_code_for_paper("2402.03302")
have("2402.03302")

The run record, dated, one paper per request, free:

curl https://syntology.ai/api/ran/2402.03302.json

A badge for a README (the split and the date, never a ratio):

[![Syntology run record](https://syntology.ai/api/ran/2402.03302.svg)](https://syntology.ai/paper/2402.03302)

Connect an agent — have() is free.