SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2401.17803 · 2024

SU-SAM: A Simple Unified Framework for Adapting Segment Anything Model in Underperformed Scenes

arXiv · PDF · Open in the Atlas

Code that ran

6 of 9 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, 0 violated it and 0 have no contract verdict; 4 failures of our instrument; 3 no recorded run), measured 2026-11-23; 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/2401.17803.json · badge: /api/ran/2401.17803.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
zongzi13545329/simada canonical (classifier label)
classifier basis: census
6 ran · 3 no recorded run
FunctionStatusWhere it lives
cka_loss Ran
ran; our contract draft was wrong, not the code
zongzi13545329/simada/utils.py
code served (permissive licence) · get_code("afaf39670f8c4e1a")
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 Tensor, ndim 0, dtype family float, 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 torch

torch.manual_seed(0)

# Create two small Gram matrices (2x2)
# Gram matrices are typically square and symmetric
gram_featureA = torch.randn(2, 2)
gram_featureB = torch.randn(2, 2)

ARGS = {
    "gram_featureA": gram_featureA,
    "gram_featureB": gram_featureB,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, 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
dice_loss Ran
ran; our contract draft was wrong, not the code
zongzi13545329/simada/function.py
code served (permissive licence) · get_code("e3af122bc0159d3b")
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 Tensor, ndim 0, dtype family float, 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 torch

torch.manual_seed(0)

# Create small binary prediction and ground truth tensors
# Using distinct sizes: batch=2, features=4
y_pred = torch.rand(2, 4)  # Predicted probabilities
y_true = torch.randint(0, 2, (2, 4)).float()  # Ground truth binary labels

ARGS = {
    "y_pred": y_pred,
    "y_true": y_true,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 0, dtype family float, 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
gram_matrix Ran
ran; our contract draft was wrong, not the code
zongzi13545329/simada/precpt.py
pointer only (licence: MIT); the stored copy get_code serves, from Oldpan/Deep-Painterly-Harmonization-Pytorch, is pointer only (licence: NONE) · get_code("1090950b58e9358b")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from Oldpan/Deep-Painterly-Harmonization-Pytorch, 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.

maybe_to_torch Ran
ran, honoured the contract we drafted
zongzi13545329/simada/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from zang0902/EM-Net, is pointer only (licence: NONE) · get_code("5a6c05e1f6861a50")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zang0902/EM-Net, 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.

round_filters Ran
ran, honoured the contract we drafted
zongzi13545329/simada/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from yoctta/multiple-attention, is pointer only (licence: NONE) · get_code("826e2e91d6a9ec09")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from yoctta/multiple-attention, 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.

to_cuda Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
zongzi13545329/simada/models/utils.py
pointer only (licence: MIT); the stored copy get_code serves, from zang0902/EM-Net, is pointer only (licence: NONE) · get_code("eb3650ce67c37e60")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from zang0902/EM-Net, 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.

build_sam_vit_b Not yet run
unverified (harvested, no recorded run)
zongzi13545329/simada/models/sam/build_sam.py
code served (permissive licence) · get_code("be5eb0940b95b0d7")
How it ran

no invocation recorded.

build_sam_vit_h Not yet run
unverified (harvested, no recorded run)
zongzi13545329/simada/models/sam/build_sam.py
code served (permissive licence) · get_code("d73006e738c8c623")
How it ran

no invocation recorded.

build_sam_vit_l Not yet run
unverified (harvested, no recorded run)
zongzi13545329/simada/models/sam/build_sam.py
code served (permissive licence) · get_code("7eba54a37e1cfb37")
How it ran

no invocation recorded.

Also present in other papers' code

Of 9 samples lifted from this paper's linked repositories, 9 carry a function identity and 0 do not. Of the 9 distinct functions with an identity, 4 are also present in other papers whose code we hold (4 with at least one paper dated earlier, 0 the same month, 4 later) and 5 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
round_filters 31 other papers
28 dated earlier, 3 later · 3 only as an assembly brick
1808.08127 (2018-08)
Recalibrating Fully Convolutional Networks with Spatial and Channel 'Squeeze & Excitation' Blocks
1905.11946 (2019-05)
EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks
1911.09070 (2019-11)
EfficientDet: Scalable and Efficient Object Detection
and 28 more not named here
gram_matrix 12 other papers
8 dated earlier, 4 later
1508.06576 (2015-08)
A Neural Algorithm of Artistic Style
1703.07511 (2017-03)
Deep Photo Style Transfer
1804.03189 (2018-04)
Deep Painterly Harmonization
and 9 more not named here
maybe_to_torch 2 other papers
1 dated earlier, 1 later
2305.10300 (2023-05)
One-Prompt to Segment All Medical Images
2409.17675 (2024-09)
EM-Net: Efficient Channel and Frequency Learning with Mamba for 3D Medical Image Segmentation
to_cuda 2 other papers
1 dated earlier, 1 later
2305.10300 (2023-05)
One-Prompt to Segment All Medical Images
2409.17675 (2024-09)
EM-Net: Efficient Channel and Frequency Learning with Mamba for 3D Medical Image Segmentation

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

Repositories linked to this paper

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

Abstract

Segment anything model (SAM) has demonstrated excellent generalizability in common vision scenarios, yet falling short of the ability to understand specialized data. Recently, several methods have combined parameter-efficient techniques with task-specific designs to fine-tune SAM on particular tasks. However, these methods heavily rely on handcraft, complicated, and task-specific designs, and pre/post-processing to achieve acceptable performances on downstream tasks. As a result, this severely restricts generalizability to other downstream tasks. To address this issue, we present a simple and unified framework, namely SU-SAM, that can easily and efficiently fine-tune the SAM model with parameter-efficient techniques while maintaining excellent generalizability toward various downstream tasks. SU-SAM does not require any task-specific designs and aims to improve the adaptability of SAM-like models significantly toward underperformed scenes. Concretely, we abstract parameter-efficient modules of different methods into basic design elements in our framework. Besides, we propose four variants of SU-SAM, i.e., series, parallel, mixed, and LoRA structures. Comprehensive experiments on nine datasets and six downstream tasks to verify the effectiveness of SU-SAM, including medical image segmentation, camouflage object detection, salient object segmentation, surface defect segmentation, complex object shapes, and shadow masking. Our experimental results demonstrate that SU-SAM achieves competitive or superior accuracy compared to state-of-the-art methods. Furthermore, we provide in-depth analyses highlighting the effectiveness of different parameter-efficient designs within SU-SAM. In addition, we propose a generalized model and benchmark, showcasing SU-SAM's generalizability across all diverse datasets simultaneously.

For agents

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

get_harvested_code_for_paper("2401.17803")
get_code_for_paper("2401.17803")
have("2401.17803")

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

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

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

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

Connect an agent — have() is free.