Papers › MA-SAM: Modality-agnostic SAM Adaptation for 3D Medical Image Segmentation

MA-SAM: Modality-agnostic SAM Adaptation for 3D Medical Image Segmentation

16 Sep 2023arXiv:2309.08842archive 2025-07-28

Cheng Chen, Juzheng Miao, Dufan Wu, Zhiling Yan, Sekeun Kim, Jiang Hu, Aoxiao Zhong, Zhengliang Liu, Lichao Sun, Xiang Li, Tianming Liu, Pheng-Ann Heng, Quanzheng Li

The Segment Anything Model (SAM), a foundation model for general image segmentation, has demonstrated impressive zero-shot performance across numerous natural image segmentation tasks. However, SAM's performance significantly declines when applied to medical images, primarily due to the substantial disparity between natural and medical image domains. To effectively adapt SAM to medical images, it is important to incorporate critical third-dimensional information, i.e., volumetric or temporal knowledge, during fine-tuning. Simultaneously, we aim to harness SAM's pre-trained weights within its original 2D backbone to the fullest extent. In this paper, we introduce a modality-agnostic SAM adaptation framework, named as MA-SAM, that is applicable to various volumetric and video medical data. Our method roots in the parameter-efficient fine-tuning strategy to update only a small portion of weight increments while preserving the majority of SAM's pre-trained weights. By injecting a series of 3D adapters into the transformer blocks of the image encoder, our method enables the pre-trained 2D backbone to extract third-dimensional information from input data. The effectiveness of our method has been comprehensively evaluated on four medical image segmentation tasks, by using 10 public datasets across CT, MRI, and surgical video data. Remarkably, without using any prompt, our method consistently outperforms various state-of-the-art 3D approaches, surpassing nnU-Net by 0.9%, 2.6%, and 9.9% in Dice for CT multi-organ segmentation, MRI prostate segmentation, and surgical scene segmentation respectively. Our model also demonstrates strong generalization, and excels in challenging tumor segmentation when prompts are used. Our code is available at: https://github.com/cchen-cc/MA-SAM.

PaperPDFCodeCode Syntology ran

In Syntology View this paper on Syntology, its page in Syntology's graph. That page adds which of its functions are also present in other papers' code Syntology holds, with dates, and its dated run record as JSON and a README badge. It also lists the repositories linked to the paper, the abstract and the calls for agents.

Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, on Syntology's MCP service (how to connect):

Code

Syntology 13 code samples harvested from 1 repository linked to this paper: 10 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 3 where Syntology's instrument failed) · 3 unverified. Where Syntology's instrument failed: 3 where the contract check could not run; failures of Syntology's instrument, not of the code.

By repository: official repository: 13 samples from 1 repository, 10 ran (7 with no instrument failure; 3 where Syntology's instrument failed). The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

Levels written between 2026-09-22 and 2026-09-24 (UTC): the dates Syntology's graph wrote each sample's verification level, not when the code executed. 1 of the 10 samples that ran has no recorded date.

cchen-cc/ma-sam officialmentioned in papermentioned on GitHubpytorchApache-2.0Syntology: 13 samples, 10 ran (3 instrument-failed) · 3 unverified report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

13 samples harvested: 10 ran (of which 0 constructed an object rather than computing a result; 7 with no instrument failure: 0 honoured, 0 violated, 7 with no contract checked; 3 where Syntology's instrument failed) · 3 unverified. “Where Syntology's instrument failed” counts failures of Syntology's instrument, not of the code. Syntology's record for this page has not changed since , the first build that kept a record date for it; when this build read Syntology's graph is in the build record. That date is not when the samples ran.

3ran; the contract check could not run
7ran
3unverified

Licence: 2 of the 13 samples are pointer only, meaning Syntology does not serve that copy's text. For 2 of them, this paper's copy is under a permissive licence and cleared, but the stored copy of the same code that Syntology serves is not; the licence label's tooltip gives Syntology's recorded reason. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from cchen-cc/ma-sam. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. A line beginning “fixture:” under a sample that ran gives the arguments Syntology's fixture called the sample with, each as name:type/rank/element kind (? where none was recorded), and the type of what the fixture's run returned, exactly as the harness recorded them; the arguments and the returned type were recorded by two separate runs of the same fixture. No output value is shown, and a returned type says nothing about whether the output was right. “Level recorded” gives the UTC date when Syntology's graph wrote the sample's verification level, not when the code executed; where the level was written before Syntology's graph kept that date, the row says “level recorded, date not recorded”. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself. “Our draft was wrong” and “the contract check could not run” are failures of Syntology's instrument, not of the code: the sample ran on Syntology's synthesized input, and then the drafted contract did not describe it, or the check itself raised an error (RAISES), lacked a dependency (DEP_MISSING) or ran out of time (TIMEOUT); hover the label for which. A metamorphic tier, where shown, is evidence of the output's shape, not that the sample implements the method.

Each sample ends with its code_sha256. A sample's code_sha256 is Syntology's identity for that exact code. It is printed in full (16 hexadecimal characters for every sample in this build), and get_code(code_sha256="…") takes it exactly as printed. An agent calls it on Syntology's MCP service (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted. community: Not in the archive's code links for this paper; a community repository Syntology harvested. Samples are grouped by repository: a repository marked official first, then by how directly the repository is tied to the paper, then in the archive's order; never by how many ran. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of six reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar); this paper's copy was not located, so its licence is not recorded; or this paper's copy is cleared, but the stored copy of the same code that Syntology serves is not. Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

A function or class name links to its page when the name occurs in the harvested code of at least 5 papers; the name is a string, not an identity. A census tag appears when Syntology's census ran implementations with that name on one shared input per bucket: it gives how many were compared, from how many papers, and how many distinct outputs they produced, and names this sample's bucket when this sample was one of them.

cchen-cc/ma-sam official repository 13 samples, 10 ran (3 instrument-failed) · 3 unverified
calc_loss in 35 papers MA-SAM/trainer.py ran Apache-2.0 (permissive) · ad5471db7ab93cbf · report fixture: signature outputs:dict/0/?, low_res_label_batch:Tensor/3/int, ce_loss:callable/0/?, dice_loss:callable/0/?, dice_weight:float/0/float · returned tuple · level recorded 2026-09-24
get_rel_pos in 54 papers
census: 3 implementations from 6 papers, 3 distinct outputs on one shared input this sample: bucket 1 of 1, arg 1: rank 2, kind float, dtype float32
MA-SAM/sam_fact_tt_image_encoder.py ran; the contract check could not run (RAISES) · metamorphic tier: invariant Apache-2.0 (permissive) · 733d7f0bedcb74c2 · report fixture: signature q_size:int/0/int, k_size:int/0/int, rel_pos:Tensor/2/float · returned Tensor · level recorded, date not recorded
random_rot_flip in 12 papers MA-SAM/datasets/dataset.py ran fingerprinted Apache-2.0 (permissive) · e342c37accbba41e · report fixture: signature image:ndarray/2/float, label:ndarray/2/int · returned tuple · level recorded 2026-09-24
random_rotate in 18 papers MA-SAM/datasets/dataset.py ran fingerprinted Apache-2.0 (permissive) · 6e9c7d00f201c759 · report fixture: signature image:ndarray/2/float, label:ndarray/2/int · returned tuple · level recorded 2026-09-24
read_image in 73 papers MA-SAM/datasets/dataset.py ran Apache-2.0 (permissive) · e687b7f95896fbe2 · report fixture: signature path:str/0/str · returned ndarray · level recorded 2026-09-24
rotate_bounding_box MA-SAM/datasets/dataset_bbox.py ran Apache-2.0 (permissive) · f9c4eb53eae87cfc · report fixture: signature bbox:tuple/1/int, angle:int/0/int, shape:tuple/1/int · returned tuple · level recorded 2026-09-24
rotate_point in 6 papers MA-SAM/datasets/dataset_bbox.py ran Apache-2.0 (permissive) · 84e32807aefaffde · report fixture: signature x:float/0/float, y:float/0/float, angle:int/0/int, cx:float/0/float, cy:float/0/float · returned tuple · level recorded 2026-09-24
transform_bounding_box MA-SAM/datasets/dataset_bbox.py ran Apache-2.0 (permissive) · 00686008e1ddcfbb · report fixture: signature bbox:tuple/1/int, shape:tuple/1/int, k:int/0/int, axis:int/0/int · returned tuple · level recorded 2026-09-24
window_partition in 377 papers
census: 13 implementations from 17 papers, 5 distinct outputs across 3 buckets, one shared input per bucket
MA-SAM/sam_fact_tt_image_encoder.py ran; the contract check could not run (RAISES) · metamorphic tier: deterministic fingerprinted Apache-2.0 (permissive) here; the stored copy is pointer only · 105fa08885dc36cc · report fixture: signature x:Tensor/4/float, window_size:int/0/int · returned tuple · level recorded 2026-09-22
window_unpartition in 56 papers MA-SAM/sam_fact_tt_image_encoder.py ran; the contract check could not run (RAISES) Apache-2.0 (permissive) here; the stored copy is pointer only · 50f37d517e2be27f · report fixture: signature windows:Tensor/4/float, window_size:int/0/int, pad_hw:tuple/1/int, hw:tuple/1/int · returned Tensor · level recorded 2026-09-22
build_sam_vit_b in 53 papers MA-SAM/segment_anything/build_sam.py unverified Apache-2.0 (permissive) · 4182f118ae5496ec · report
build_sam_vit_h in 54 papers MA-SAM/segment_anything/build_sam.py unverified Apache-2.0 (permissive) · 35ae09d11793c334 · report
build_sam_vit_l in 53 papers MA-SAM/segment_anything/build_sam.py unverified Apache-2.0 (permissive) · 6c6888a7271fbc94 · report

Tasks

Image SegmentationMedical Image SegmentationOrgan SegmentationScene SegmentationSegmentationSemantic SegmentationTumor Segmentationparameter-efficient fine-tuning

Results from the paper archive 2025-07-28

No leaderboard rows for this paper in the archive.

Methods

SAM

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections