SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2402.17726 · CVPR · 2024

VRP-SAM: SAM with Visual Reference Prompt

Errui Ding, Jingdong Wang, Yanpeng Sun, Qiang Chen, Zechao Li, Gang Zhang, Xinyu Zhang, Shan Zhang, Jiahui Chen

arXiv · PDF · Open in the Atlas

Code that ran

25 of 38 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (4 of them constructed an object rather than computing a result; 1 honoured the contract we drafted, 1 violated it and 4 have no contract verdict; 19 failures of our instrument; 13 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.17726.json · badge: /api/ran/2402.17726.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
syp2ysy/vrp-sam canonical (classifier label)
classifier basis: census
8 ran · 4 no recorded run
syp2ysy/VRP-SAM community
Papers with Code archive
17 ran · 9 no recorded run
FunctionStatusWhere it lives
CrossAttentionLayer Ran
ran on a synthesized input · constructed an object; no result was computed
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("91b06471ea047993")
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 an instance of its own class, CrossAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn
import torch.nn.functional as F
from torch import Tensor
from typing import Optional

torch.manual_seed(0)

# Define the activation function helper
def _get_activation_fn(activation):
    """Return an activation function given a string"""
    if activation == 'relu':
        return F.relu
    if activation == 'gelu':
        return F.gelu
    if activation == 'glu':
        return F.glu
    raise RuntimeError(f'activation should be relu/gelu, not {activation}.')

# Define the CrossAttentionLayer class
class CrossAttentionLayer(nn.Module):

    def __init__(self, d_model, nhead, dropout=0.0, activation='relu', normalize_before=False):
        super().__init__()
        self.multihead_attn = nn.MultiheadAttention(d_model, nhead, dropout=dropout)
        self.norm = nn.LayerNorm(d_model)
        self.dropout = nn.Dropout(dropout)
        self.activation = _get_activation_fn(activation)
        self.normalize_before = normalize_before
        self._reset_parameters()

    def _reset_parameters(self):
        for p in self.parameters():
            if p.dim() > 1:
                nn.init.xavier_uniform_(p)

    def with_pos_embed(self, tensor, pos: Optional[Tensor]):
        return tensor if pos is None else tensor + pos

    def forward_post(self, tgt, memory_key, memory_value, memory_mask: Optional[Tensor]=None, memory_key_padding_mask: Optional[Tensor]=None, pos: Optional[Tensor]=None, query_pos: Optional[Tensor]=None, value_pos: Optional[Tensor]=None):
        tgt2 = self.multihead_attn(query=self.with_pos_embed(tgt, query_pos), key=self.with_pos_embed(memory_key, pos), value=self.with_pos_embed(memory_value, value_pos), attn_mask=memory_mask, key_padding_mask=memory_key_padding_mask)[0]
        tgt = tgt + self.dropout(tgt2)
        tgt = self.norm(tgt)
        return tgt

    def forward_pre(self, tgt, memory_key, memory_value, memory_mask: Optional[Tensor]=None, memory_key_padding_mask: Optional[Tensor]=None, pos: Optional[Tensor]=None, query_pos: Optional[Tensor]=None, value_pos: Optional[Tensor]=None):
        tgt2 = self.norm(tgt)
        tgt2 = self.multihead_attn(query=self.with_pos_embed(tgt2, query_pos), key=self.with_pos_embed(memory_key, pos), value=self.with_pos_embed(memory_value, value_pos), attn_mask=memory_mask, key_padding_mask=memory_key_padding_mask)[0]
        tgt = tgt + self.dropout(tgt2)
        return tgt

    def forward(self, tgt, memory_key, memory_value, memory_mask: Optional[Tensor]=None, memory_key_padding_mask: Optional[Tensor]=None, pos: Optional[Tensor]=None, query_pos: Optional[Tensor]=None, value_pos: Optional[Tensor]=None):
        if self.normalize_before:
            return self.forward_pre(tgt, memory_key, memory_value, memory_mask, memory_key_padding_mask, pos, query_pos, value_pos)
        return self.forward_post(tgt, memory_key, memory_value, memory_mask, memory_key_padding_mask, pos, query_pos, value_pos)

# Set up arguments
d_model = 4
nhead = 2
dropout = 0.1
activation = 'relu'
normalize_before = False

# Create instance
layer = CrossAttentionLayer(
    d_model=d_model,
    nhead=nhead,
    dropout=dropout,
    activation=activation,
    normalize_before=normalize_before
)

# Create tensors for forward pass
seq_len_tgt = 3
seq_len_memory = 5
batch_size = 2

tgt = torch.randn(seq_len_tgt, batch_size, d_model)
memory_key = torch.randn(seq_len_memory, batch_size, d_model)
memory_value = torch.randn(seq_len_memory, batch_size, d_model)
query_pos = torch.randn(seq_len_tgt, batch_size, d_model)
pos = torch.randn(seq_len_memory, batch_size, d_model)
value_pos = torch.randn(seq_len_memory, batch_size, d_model)
memory_mask = None
memory_key_padding_mask = None

ARGS = {
    'd_model': d_model,
    'nhead': nhead,
    'dropout': dropout,
    'activation': activation,
    'normalize_before': normalize_before,
}
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 CrossAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a CrossAttentionLayer 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
PositionEmbeddingSine Ran
ran on a synthesized input · constructed an object; no result was computed
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("865b58f1322f66eb")
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 an instance of its own class, PositionEmbeddingSine: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn
import math

torch.manual_seed(0)

# Create a minimal input tensor for the forward pass
# Shape: (batch_size, channels, height, width)
x = torch.randn(2, 4, 3, 5)

# Create an optional mask tensor
# Shape: (batch_size, height, width)
mask = torch.zeros((2, 3, 5), dtype=torch.bool)

ARGS = {
    'num_pos_feats': 64,
    'temperature': 10000,
    'normalize': False,
    'scale': None,
}
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 PositionEmbeddingSine — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a PositionEmbeddingSine 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
SelfAttentionLayer Ran
ran on a synthesized input · constructed an object; no result was computed
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("dd243c837e229569")
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 an instance of its own class, SelfAttentionLayer: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Construct arguments for SelfAttentionLayer
d_model = 4
nhead = 2
dropout = 0.1
activation = 'relu'
normalize_before = False

ARGS = {
    'd_model': d_model,
    'nhead': nhead,
    'dropout': dropout,
    'activation': activation,
    'normalize_before': normalize_before,
}
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 SelfAttentionLayer — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a SelfAttentionLayer 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
VGG Ran
ran on a synthesized input · constructed an object; no result was computed
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("125a7d0d81f132b1")
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 an instance of its own class, VGG: the run constructed the object and did not call it, so no result was computed. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a minimal features module that outputs tensors compatible with the classifier
# The classifier expects input of shape (batch, 512*7*7) after avgpool
# So features should output (batch, 512, H, W) where avgpool reduces to (batch, 512, 7, 7)
features = nn.Sequential(
    nn.Conv2d(3, 64, kernel_size=3, padding=1),
    nn.ReLU(inplace=True),
    nn.MaxPool2d(kernel_size=2, stride=2),
    nn.Conv2d(64, 128, kernel_size=3, padding=1),
    nn.ReLU(inplace=True),
    nn.MaxPool2d(kernel_size=2, stride=2),
    nn.Conv2d(128, 256, kernel_size=3, padding=1),
    nn.ReLU(inplace=True),
    nn.MaxPool2d(kernel_size=2, stride=2),
    nn.Conv2d(256, 512, kernel_size=3, padding=1),
    nn.ReLU(inplace=True),
    nn.MaxPool2d(kernel_size=2, stride=2),
    nn.Conv2d(512, 512, kernel_size=3, padding=1),
    nn.ReLU(inplace=True),
    nn.MaxPool2d(kernel_size=2, stride=2),
)

ARGS = {
    'features': features,
    'num_classes': 10,
    'init_weights': 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 VGG — the run constructed an instance of its own class and did not call it; no shape is stated — the instrument coerces any output to an array; for a VGG 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
conv1x1 Ran
ran; our contract draft was wrong, not the code
syp2ysy/vrp-sam/model/base/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from medaitech/scrd4ad, is pointer only (licence: NONE) · get_code("2a80220dabcb742a")
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 medaitech/scrd4ad, 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.

conv3x3 Ran
ran; our contract draft was wrong, not the code
syp2ysy/vrp-sam/model/base/resnet.py
pointer only (licence: MIT); the stored copy get_code serves, from medaitech/scrd4ad, is pointer only (licence: NONE) · get_code("600ff2c45e0de056")
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 medaitech/scrd4ad, 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.

dice_loss Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("d0e1858cb2c37a0a")
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 tensors for inputs and targets
# inputs: predictions (logits), shape (2, 4) - batch size 2, 4 elements per sample
inputs = torch.randn(2, 4, dtype=torch.float32)

# targets: binary labels (0 or 1), shape (2, 4) - same shape as inputs
targets = torch.randint(0, 2, (2, 4), dtype=torch.float32)

# num_masks: number of masks (used for normalization)
num_masks = 2.0

ARGS = {
    "inputs": inputs,
    "targets": targets,
    "num_masks": num_masks,
}
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
draw_mask_by_control_points Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("90869aaabb17c767")
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 Image. 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.

from PIL import Image, ImageDraw

# Create a PIL Image to use as the mask
mask = Image.new('L', (100, 100), color=0)

# Create control points for drawing
Xs = [10, 30, 50, 70]
Ys = [20, 40, 60, 80]

# Brush width parameter
brushWidth = 8

# Fill value (grayscale intensity)
fill = 255

ARGS = {
    'mask': mask,
    'Xs': Xs,
    'Ys': Ys,
    'brushWidth': brushWidth,
    'fill': fill
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Image — a Image output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Image output the recorded ndim 2 and dtype family int 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
get_bounding_boxes Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("bec711098a9d7ac7")
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 torch

torch.manual_seed(0)

# Create a small batch of binary masks
# Shape: (batch_size, height, width)
# batch_size=2, height=4, width=3 for distinct dimensions
mask = torch.zeros(2, 4, 3, dtype=torch.bool)

# Add some true values to create bounding boxes
mask[0, 1:3, 1:3] = True  # First mask has a box
mask[1, 0:2, 0:2] = True  # Second mask has a box

ARGS = {
    "mask": mask
}
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 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
get_gauss Ran
ran; our contract draft was wrong, not the code
syp2ysy/vrp-sam/model/base/transformer_decoder.py
code served (permissive licence) · get_code("8444605f6b41e659")
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 function. 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 numpy as np

# Construct arguments for get_gauss function
# The function takes two scalar parameters: mu and sigma
# It returns a Gaussian probability density function

ARGS = {
    "mu": 0.0,
    "sigma": 1.0
}
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 function — a function output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a function 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
get_point_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("17041ace285c82c0")
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 3, dtype family float, shape (2, 4, 3) 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
import random

torch.manual_seed(0)

# Create a mask tensor with shape (batch=2, height=4, width=3)
# We need some non-zero values so the function can select points
mask = torch.zeros(2, 4, 3)
# Add some non-zero values to make valid masks
mask[0, 0, 0] = 1
mask[0, 1, 1] = 1
mask[0, 2, 2] = 1
mask[0, 3, 0] = 1
mask[1, 0, 1] = 1
mask[1, 1, 2] = 1
mask[1, 2, 0] = 1

ARGS = {
    "mask": mask,
    "training": True,
    "max_points": 20,
}
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 3, dtype family float, shape (2, 4, 3) — shape (2, 4, 3) 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_random_points_from_mask Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("5bd6ec912e92aa16")
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 2, dtype family float, shape (5, 2) 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 a small mask tensor with shape (h, w) = (4, 3)
# The mask should have some non-zero values to sample from
mask = torch.tensor([
    [0, 1, 0],
    [1, 1, 0],
    [0, 1, 1],
    [1, 0, 1]
], dtype=torch.float32)

ARGS = {
    "mask": mask,
    "n": 5
}
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 ndarray, ndim 2, dtype family float, shape (5, 2) — shape (5, 2) 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_random_stroke_control_points Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("b34e7b2fb42c75da")
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 numpy as np

ARGS = {
    'init_point': (150, 150),
    'imageWidth': 512,
    'imageHeight': 512,
    'nVertexBound': (10, 30),
    'maxHeadSpeed': 10,
    'maxHeadAcceleration': (5, 0.5),
    'boarderGap': 20,
    'maxInitSpeed': 10,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — 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
get_random_velocity Ran
ran, honoured the contract we drafted
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("1a515e2194aa7dde")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import torch.distributed as dist

np.random.seed(0)

ARGS = {
    'max_speed': 10.0,
    'dist': 'uniform'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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_stroke_preset Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("999684f4c3a945e0")
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 torch

ARGS = {
    'stroke_preset': 'rand_curve'
}
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 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
make_layers Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("e31250b969b51841")
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 Sequential. 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Define the cfg dict from the function
cfg_dict = {
    'A': [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],
    'B': [64, 64, 'M', 128, 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M'],
    'D': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 'M', 512, 512, 512, 'M', 512, 512, 512, 'M'],
    'E': [64, 64, 'M', 128, 128, 'M', 256, 256, 256, 256, 'M', 512, 512, 512, 512, 'M', 512, 512, 512, 512, 'M']
}

# Test with a simple configuration list
test_cfg = [64, 'M', 128, 'M', 256, 256, 'M', 512, 512, 'M', 512, 512, 'M']

ARGS = {
    'cfg': test_cfg,
    'batch_norm': False
}
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 Sequential — a Sequential output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Sequential output the recorded ndim 1 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
mean Ran
ran, violated the contract we drafted
syp2ysy/vrp-sam/common/utils.py
code served (permissive licence) · get_code("2fbd545597570f15")
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 float, 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
import numpy as np

torch.manual_seed(0)

# The function 'mean' takes parameter 'x' and:
# - calls sum(x)
# - calls len(x)
# - performs division and comparison operations
# So 'x' should be a collection (list, tuple, etc.) of numeric values

# Create a simple list of numbers
x = [1.0, 2.0, 3.0, 4.0, 5.0]

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, 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
random_accelerate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("d98f6e80e969ffbd")
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, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import torch

np.random.seed(0)

# Analyzing the function:
# - velocity: tuple of (speed, angle) - used as "speed, angle = velocity"
# - maxAcceleration: tuple of (d_speed, d_angle) - used as "d_speed, d_angle = maxAcceleration"
# - dist: string parameter with default 'uniform', can be 'uniform', 'guassian', or other

velocity = (5.0, 0.785)  # (speed in m/s, angle in radians)
maxAcceleration = (2.0, 0.1)  # (max speed change, max angle change)
dist_type = 'uniform'

ARGS = {
    'velocity': velocity,
    'maxAcceleration': maxAcceleration,
    'dist': dist_type
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 1, dtype family float — a tuple output has no array shape of its own; none is stated
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
random_move_control_points Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("6ce193fee41d5329")
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, ndim 2, dtype family int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim 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
import torch

# Set random seed for reproducibility
np.random.seed(0)

# Define arguments for random_move_control_points
Xs = np.array([10, 20, 30, 40])
Ys = np.array([15, 25, 35, 45])
lineVelocity = (5.0, 0.5)  # (speed, angle)
nMovePointRatio = 0.5  # Move 50% of points
maxPiontMove = 3  # Max movement per point
maxLineAcceleration = (0.5, 0.1)  # (d_speed, d_angle)
boarderGap = 15

ARGS = {
    'Xs': Xs,
    'Ys': Ys,
    'lineVelocity': lineVelocity,
    'nMovePointRatio': nMovePointRatio,
    'maxPiontMove': maxPiontMove,
    'maxLineAcceleration': maxLineAcceleration,
    'boarderGap': boarderGap
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 2, dtype family int — a tuple output has no array shape of its own; none is stated
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
to_cpu Ran
ran; our contract draft was wrong, not the code
syp2ysy/vrp-sam/common/utils.py
code served (permissive licence) · get_code("a3d18d17a48bf937")
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 2, dtype family float, shape (2, 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 torch
import torch.nn as nn

torch.manual_seed(0)

# Create a small tensor on CPU
tensor = torch.randn(2, 4, requires_grad=True)

ARGS = {
    "tensor": tensor
}
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 2, dtype family float, shape (2, 4) — shape (2, 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
to_cuda Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
syp2ysy/vrp-sam/common/utils.py
code served (permissive licence) · get_code("8c6947459806ae3b")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is 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 torch

torch.manual_seed(0)

batch = {
    "input_ids": torch.randint(0, 100, (2, 4)),
    "attention_mask": torch.ones(2, 4),
    "logits": torch.randn(2, 3),
    "loss": torch.tensor(0.5),
}

ARGS = {
    "batch": batch
}
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 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
vgg11 Ran
ran; our contract draft was wrong, not the code
syp2ysy/vrp-sam/model/base/vgg.py
pointer only (licence: MIT); the stored copy get_code serves, from sam1224/hmnet, is pointer only (licence: NOASSERTION) · get_code("2067e75510fbe85e")
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 sam1224/hmnet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

vgg11_bn Ran
ran; our contract draft was wrong, not the code
syp2ysy/vrp-sam/model/base/vgg.py
pointer only (licence: MIT); the stored copy get_code serves, from sam1224/hmnet, is pointer only (licence: NOASSERTION) · get_code("bf96fb236a6b1683")
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 sam1224/hmnet, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

vgg16 Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("bee97082c988542b")
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 VGG. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
vgg16_bn Ran
ran; our contract draft was wrong, not the code
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("af7ae822405c0966")
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 VGG. 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 torch
import torch.nn as nn

torch.manual_seed(0)

ARGS = {
    'pretrained': False,
}
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 VGG — a VGG output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a VGG 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
ResNet Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("f84316c0758d1988")
How it ran

no invocation recorded.

VRP_encoder Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("dccb2c6e0124c330")
How it ran

no invocation recorded.

build_sam_vit_b Not yet run
unverified (harvested, no recorded run)
syp2ysy/vrp-sam/segment-anything/segment_anything/build_sam.py
pointer only (licence: MIT); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("f9bc5f31ce61cee8")
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 yatengLG/ISAT_with_segment_anything, and GitHub could not classify the licence of that repository (NOASSERTION). 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. No invocation recorded.

build_sam_vit_h Not yet run
unverified (harvested, no recorded run)
syp2ysy/vrp-sam/segment-anything/segment_anything/build_sam.py
pointer only (licence: MIT); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("6b77c1f11fff3ed6")
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 yatengLG/ISAT_with_segment_anything, and GitHub could not classify the licence of that repository (NOASSERTION). 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. No invocation recorded.

build_sam_vit_l Not yet run
unverified (harvested, no recorded run)
syp2ysy/vrp-sam/segment-anything/segment_anything/build_sam.py
pointer only (licence: MIT); the stored copy get_code serves, from yatengLG/ISAT_with_segment_anything, is pointer only (licence: NOASSERTION) · get_code("3f8890e695469246")
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 yatengLG/ISAT_with_segment_anything, and GitHub could not classify the licence of that repository (NOASSERTION). 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. No invocation recorded.

fix_bn Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("95eec24a97f68828")
How it ran

no invocation recorded.

get_mask_by_input_strokes Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("b194906bc2cfe752")
How it ran

no invocation recorded.

get_scribble_mask Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("e7ce055d8adf68f5")
How it ran

no invocation recorded.

get_vgg16_layer Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("b43514b95d7af46c")
How it ran

no invocation recorded.

resnet101 Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("e2f6e006a0c3cd9f")
How it ran

no invocation recorded.

resnet18 Not yet run
unverified (harvested, no recorded run)
syp2ysy/vrp-sam/model/base/resnet.py
code served (permissive licence) · get_code("05d0b3b6e54293c0")
How it ran

no invocation recorded.

resnet50 Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("2eb5f791836669d0")
How it ran

no invocation recorded.

transformer_decoder Not yet run
unverified (harvested, no recorded run)
syp2ysy/VRP-SAM/model/VRP_encoder.py
code served (permissive licence) · get_code("99412e31d0dfed4d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 38 samples lifted from this paper's linked repositories, 38 carry a function identity and 0 do not. Of the 38 distinct functions with an identity, 20 are also present in other papers whose code we hold (15 with at least one paper dated earlier, 8 the same month, 19 later) and 18 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
conv1x1
brick of this paper's assembly: helper
112 other papers
67 dated earlier, 3 the same month, 38 later, 4 same year, order not determinable · 6 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1806.01531 (2018-06)
Deep Mixture of Experts via Shallow Embedding
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 109 more not named here
conv3x3
brick of this paper's assembly: helper
111 other papers
68 dated earlier, 3 the same month, 36 later, 4 same year, order not determinable · 6 only as an assembly brick
1512.03385 (2015-12)
Deep Residual Learning for Image Recognition
1806.01531 (2018-06)
Deep Mixture of Experts via Shallow Embedding
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
and 108 more not named here
build_sam_vit_h 37 other papers
18 dated earlier, 1 the same month, 16 later, 2 same year, order not determinable · 2 only as an assembly brick
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 34 more not named here
resnet18 36 other papers
29 dated earlier, 6 later, 1 same year, order not determinable
1905.12794 (2019-05)
Fashion IQ: A New Dataset Towards Retrieving Images by Natural Language Feedback
2002.09564 (2020-02)
Towards Robust and Reproducible Active Learning Using Neural Networks
2003.04297 (2020-03)
Improved Baselines with Momentum Contrastive Learning
and 33 more not named here
build_sam_vit_b 34 other papers
18 dated earlier, 1 the same month, 13 later, 2 same year, order not determinable
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 more not named here
build_sam_vit_l 34 other papers
18 dated earlier, 1 the same month, 13 later, 2 same year, order not determinable
2304.06790 (2023-04)
Inpaint Anything: Segment Anything Meets Image Inpainting
2304.12306 (2023-04)
Segment Anything in Medical Images
2305.01586 (2023-05)
An Alternative to WSSS? An Empirical Study of the Segment Anything Model (SAM) on Weakly-Supervised Semantic Segmentation Problems
and 31 more not named here
vgg11 10 other papers
8 dated earlier, 2 later
1610.02391 (2016-10)
Grad-CAM: Visual Explanations from Deep Networks via Gradient-based Localization
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
and 7 more not named here
vgg11_bn 9 other papers
7 dated earlier, 2 later
1904.03441 (2019-04)
Iterative Normalization: Beyond Standardization towards Efficient Whitening
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
136780474 (2022 (year only))
Hourglass Attention Network for Image Inpainting
and 6 more not named here
mean 7 other papers
3 dated earlier, 1 the same month, 3 later
2007.10587 (2020-07)
Learning to Compose Hypercolumns for Visual Correspondence
2308.13469 (2023-08)
RestNet: Boosting Cross-Domain Few-Shot Segmentation with Residual Transformation Network
2312.15731 (2023-12)
Adaptive FSS: A Novel Few-Shot Segmentation Framework via Prototype Enhancement
and 4 more not named here
get_vgg16_layer
brick of this paper's assembly: helper
6 other papers
4 dated earlier, 2 later
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2203.07615 (2022-03)
Learning What Not to Segment: A New Perspective on Few-Shot Segmentation
2204.09903 (2022-04)
Beyond the Prototype: Divide-and-conquer Proxies for Few-shot Segmentation
and 3 more not named here
to_cpu 6 other papers
2 dated earlier, 1 the same month, 3 later
2308.13469 (2023-08)
RestNet: Boosting Cross-Domain Few-Shot Segmentation with Residual Transformation Network
2312.15731 (2023-12)
Adaptive FSS: A Novel Few-Shot Segmentation Framework via Prototype Enhancement
2402.17614 (2024-02)
Adapt Before Comparison: A New Perspective on Cross-Domain Few-Shot Segmentation
and 3 more not named here
make_layers
brick of this paper's assembly: helper
5 other papers
3 dated earlier, 2 later
2108.05293 (2021-08)
Few-Shot Segmentation with Global and Local Contrastive Learning
2203.07615 (2022-03)
Learning What Not to Segment: A New Perspective on Few-Shot Segmentation
2204.09903 (2022-04)
Beyond the Prototype: Divide-and-conquer Proxies for Few-shot Segmentation
and 2 more not named here
to_cuda 5 other papers
2 dated earlier, 1 the same month, 2 later
2308.13469 (2023-08)
RestNet: Boosting Cross-Domain Few-Shot Segmentation with Residual Transformation Network
2312.15731 (2023-12)
Adaptive FSS: A Novel Few-Shot Segmentation Framework via Prototype Enhancement
2402.17614 (2024-02)
Adapt Before Comparison: A New Perspective on Cross-Domain Few-Shot Segmentation
and 2 more not named here
CrossAttentionLayer
brick of this paper's assembly: helper
2 other papers
2 later
2510.00495 (2025-10)
Normal-Abnormal Guided Generalist Anomaly Detection
2602.00635 (2026-02)
S 3 POT: Contrast-Driven Face Occlusion Segmentation via Self-Supervised Prompt Learning
random_accelerate
brick of this paper's assembly: helper
2 other papers
1 dated earlier, 1 later
2007.10247 (2020-07)
Learning Joint Spatial-Temporal Transformations for Video Inpainting
2404.05580 (2024-04)
Responsible Visual Editing
PositionEmbeddingSine
brick of this paper's assembly: helper
1 other paper
1 later
2602.00635 (2026-02)
S 3 POT: Contrast-Driven Face Occlusion Segmentation via Self-Supervised Prompt Learning
SelfAttentionLayer
brick of this paper's assembly: helper
1 other paper
1 later
2510.00495 (2025-10)
Normal-Abnormal Guided Generalist Anomaly Detection
VGG
brick of this paper's assembly: helper
1 other paper
1 dated earlier
2204.09903 (2022-04)
Beyond the Prototype: Divide-and-conquer Proxies for Few-shot Segmentation
get_mask_by_input_strokes
brick of this paper's assembly: helper
1 other paper
1 later
2404.05580 (2024-04)
Responsible Visual Editing
random_move_control_points
brick of this paper's assembly: helper
1 other paper
1 later
2404.05580 (2024-04)
Responsible Visual Editing

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

In this paper, we propose a novel Visual Reference Prompt (VRP) encoder that empowers the Segment Anything Model (SAM) to utilize annotated reference images as prompts for segmentation, creating the VRP-SAM model. In essence, VRP-SAM can utilize annotated reference images to comprehend specific objects and perform segmentation of specific objects in target image. It is note that the VRP encoder can support a variety of annotation formats for reference images, including point, box, scribble, and mask. VRP-SAM achieves a breakthrough within the SAM framework by extending its versatility and applicability while preserving SAM's inherent strengths, thus enhancing user-friendliness. To enhance the generalization ability of VRP-SAM, the VRP encoder adopts a meta-learning strategy. To validate the effectiveness of VRP-SAM, we conducted extensive empirical studies on the Pascal and COCO datasets. Remarkably, VRP-SAM achieved state-of-the-art performance in visual reference segmentation with minimal learnable parameters. Furthermore, VRP-SAM demonstrates strong generalization capabilities, allowing it to perform segmentation of unseen objects and enabling crossdomain segmentation. The source code and models will be available at https://github.com/syp2ysy/VRP-SAM

For agents

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

get_harvested_code_for_paper("2402.17726")
get_code_for_paper("2402.17726")
have("2402.17726")

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

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

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

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

Connect an agent — have() is free.