SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2408.00714 · 2024

SAM 2: Segment Anything in Images and Videos

Chaitanya Ryali, Tengyu Ma, Chao-Yuan Wu, Eric Mintun, Piotr Dollár, Ross Girshick, Nicolas Carion, Junting Pan, Christoph Feichtenhofer, Yuan-Ting Hu, Kalyan Alwala, Nikhila Ravi, and 6 more

arXiv · PDF · Open in the Atlas

Code that ran

40 of 49 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (9 of them constructed an object rather than computing a result; 3 honoured the contract we drafted, 0 violated it and 18 have no contract verdict; 19 failures of our instrument; 9 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/2408.00714.json · badge: /api/ran/2408.00714.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
louisfinner/him2sam community (classifier label)
classifier basis not recorded on the link
15 ran · 0 no recorded run
bowang-lab/medsam2 community (classifier label)
classifier basis not recorded on the link
12 ran · 3 no recorded run
idea-research/grounded-sam-2 community
Papers with Code archive
8 ran · 3 no recorded run
facebookresearch/sam2 marked official in Papers with Code
Papers with Code archive
3 ran · 2 no recorded run
ibaiGorordo/ONNX-SAM2-Segment-Anything community (classifier label)
classifier basis not recorded on the link
2 ran · 0 no recorded run
dcnieho/segment-anything-2 community
Papers with Code archive
0 ran · 1 no recorded run
FunctionStatusWhere it lives
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("d47d7ea80c6eb2e1")
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, Attention: 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)

ARGS = {
    "embedding_dim": 8,
    "num_heads": 2,
    "downsample_rate": 1,
    "dropout": 0.1,
    "kv_in_dim": 8,
}
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 Attention — 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 Attention 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
Attention Ran
ran on a synthesized input · constructed an object; no result was computed
facebookresearch/sam2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("d505eb599e148d6a")
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, Attention: 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
from torch import Tensor

torch.manual_seed(0)

ARGS = {
    "embedding_dim": 8,
    "num_heads": 2,
    "downsample_rate": 1,
    "dropout": 0.1,
    "kv_in_dim": 8,
}
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 Attention — 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 Attention 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
MLP Ran
ran on a synthesized input · constructed an object; no result was computed
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("b2caccbe8a2ad968")
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, MLP: 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)

ARGS = {
    "input_dim": 4,
    "hidden_dim": 8,
    "output_dim": 3,
    "num_layers": 3,
    "activation": nn.ReLU,
    "sigmoid_output": 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 MLP — 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 MLP 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
MaskDecoder Ran
ran on a synthesized input · constructed an object; no result was computed
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("2ec3b3adb254bc95")
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, MaskDecoder: 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
from typing import List, Optional

torch.manual_seed(0)

# Create a minimal transformer module that satisfies the interface
class MinimalTransformer(nn.Module):
    def __init__(self, transformer_dim: int):
        super().__init__()
        self.transformer_dim = transformer_dim
        self.linear = nn.Linear(transformer_dim, transformer_dim)
    
    def forward(self, x):
        return self.linear(x)

# Build the transformer
transformer_dim = 256
transformer = MinimalTransformer(transformer_dim)

# Build high_res_features as a list of tensors
high_res_features = [
    torch.randn(2, transformer_dim, 8, 8),
    torch.randn(2, transformer_dim, 16, 16)
]

ARGS = {
    'transformer_dim': transformer_dim,
    'transformer': transformer,
    'num_multimask_outputs': 3,
    'activation': nn.GELU,
    'iou_head_depth': 3,
    'iou_head_hidden_dim': 256,
    'use_high_res_features': False,
    'iou_prediction_use_sigmoid': False,
    'dynamic_multimask_via_stability': False,
    'dynamic_multimask_stability_delta': 0.05,
    'dynamic_multimask_stability_thresh': 0.98,
    'pred_obj_scores': False,
    'pred_obj_scores_mlp': False,
    'use_multimask_token_for_obj_ptr': 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 MaskDecoder — 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 MaskDecoder 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
PositionEmbeddingRandom Ran
ran on a synthesized input · constructed an object; no result was computed
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("2d44a88dd1788d01")
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, PositionEmbeddingRandom: 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 numpy as np
from torch import nn

torch.manual_seed(0)

ARGS = {
    'num_pos_feats': 64,
    'scale': 1.0,
}
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 PositionEmbeddingRandom — 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 PositionEmbeddingRandom 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
PromptEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("0d0005d3af5adb47")
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, PromptEncoder: 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
from torch import nn

torch.manual_seed(0)

ARGS = {
    "embed_dim": 128,
    "image_embedding_size": (16, 16),
    "input_image_size": (1024, 1024),
    "mask_in_chans": 16,
    "activation": nn.GELU,
}
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 PromptEncoder — 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 PromptEncoder 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
PromptEncoder Ran
ran on a synthesized input · constructed an object; no result was computed
facebookresearch/sam2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("57e7b89d7eb0f4a7")
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, PromptEncoder: 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
from torch import nn

torch.manual_seed(0)

class DummyActivation(nn.Module):
    def forward(self, x):
        return x

ARGS = {
    'embed_dim': 64,
    'image_embedding_size': (8, 8),
    'input_image_size': (32, 32),
    'mask_in_chans': 16,
    'activation': nn.GELU
}
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 PromptEncoder — 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 PromptEncoder 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
TwoWayAttentionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("ea24008f11c4c7ec")
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, TwoWayAttentionBlock: 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)

# Global variables needed by sdp_kernel_context
USE_FLASH_ATTN = True
OLD_GPU = False
MATH_KERNEL_ON = False

ARGS = {
    "embedding_dim": 64,
    "num_heads": 4,
    "mlp_dim": 128,
    "activation": nn.ReLU,
    "attention_downsample_rate": 2,
    "skip_first_layer_pe": 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 TwoWayAttentionBlock — 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 TwoWayAttentionBlock 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
TwoWayAttentionBlock Ran
ran on a synthesized input · constructed an object; no result was computed
facebookresearch/sam2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("f7f9295761cf41cf")
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, TwoWayAttentionBlock: 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
from torch import Tensor

torch.manual_seed(0)

# Build the ARGS dict for TwoWayAttentionBlock
ARGS = {
    "embedding_dim": 4,
    "num_heads": 2,
    "mlp_dim": 8,
    "activation": nn.ReLU,
    "attention_downsample_rate": 2,
    "skip_first_layer_pe": 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 TwoWayAttentionBlock — 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 TwoWayAttentionBlock 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
adjust_keep_rate Ran
ran, honoured the contract we drafted
louisfinner/him2sam/lib/utils/ce_utils.py
code served (permissive licence) · get_code("305742bafecf04f8")
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 math

ARGS = {
    "epoch": 5,
    "warmup_epochs": 2,
    "total_epochs": 10,
    "ITERS_PER_EPOCH": 100,
    "base_keep_rate": 0.5,
    "max_keep_rate": 1.0,
    "iters": -1
}
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 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
all_gather Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/misc.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from kellyiss/situformer, is pointer only (licence: NONE) · get_code("aa6da43d05cfaf65")
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 kellyiss/situformer, 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.

box_cxcywh_to_xyxy Ran
ran, honoured the contract we drafted
louisfinner/him2sam/lib/utils/box_ops.py
code served (permissive licence) · get_code("e0a06ded5d4f6c3c")
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) 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

torch.manual_seed(0)

# The function expects a tensor x with shape (..., 4) where the last dimension
# contains [center_x, center_y, width, height] values
# It unbinds the last dimension and converts to [x_min, y_min, x_max, y_max]

x = torch.tensor([
    [10.0, 20.0, 4.0, 6.0],
    [30.0, 40.0, 8.0, 10.0]
])

ARGS = {
    "x": x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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
box_xywh_to_xyxy Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/box_ops.py
code served (permissive licence) · get_code("40c655a7fe309e49")
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

torch.manual_seed(0)

# The function box_xywh_to_xyxy expects a tensor x with shape (..., 4)
# where the last dimension contains [x, y, width, height] values.
# It unbinds the last dimension into 4 components and stacks them back
# in the order [x1, y1, x1+w, y1+h] to convert to xyxy format.

x = torch.tensor([
    [10.0, 20.0, 30.0, 40.0],
    [5.0, 15.0, 25.0, 35.0]
])

ARGS = {
    "x": x
}
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
box_xyxy_to_xywh Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/box_ops.py
code served (permissive licence) · get_code("b48a27604b9574e0")
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

torch.manual_seed(0)

# The function box_xyxy_to_xywh takes a tensor x, unbinds it along the last dimension
# (expecting 4 elements: x1, y1, x2, y2), and converts to xywh format.
# It returns a stacked tensor with the same shape as input.

# Create a small tensor with shape (2, 4) representing 2 bounding boxes in xyxy format
x = torch.tensor([
    [10.0, 20.0, 30.0, 40.0],
    [5.0, 15.0, 25.0, 35.0]
])

ARGS = {
    "x": x
}
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
collate_fn Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/misc.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from pinxueguo/x-prompt, is pointer only (licence: NONE) · get_code("3f82133185c8bcb4")
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 pinxueguo/x-prompt, 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.

compute_grids Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/heapmap_utils.py
code served (permissive licence) · get_code("f0de0cc660ea9823")
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 list. 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 features: list of tensors with different spatial dimensions
# Each tensor should have shape (batch, channels, height, width)
features = [
    torch.randn(2, 4, 8, 8),      # Level 0: 8x8 spatial
    torch.randn(2, 4, 4, 4),      # Level 1: 4x4 spatial
    torch.randn(2, 4, 2, 2),      # Level 2: 2x2 spatial
]

# Strides corresponding to each feature level
strides = [8, 16, 32]

ARGS = {
    "features": features,
    "strides": strides,
}
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 list — a list 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
dice_loss Ran
ran; our contract draft was wrong, not the code
bowang-lab/medsam2/training/loss_fns.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from juneyeeHu/LM-EEC, is pointer only (licence: NONE) · get_code("e473e66fedc883c7")
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 juneyeeHu/LM-EEC, 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_multi_class Ran
ran on a synthesized input
bowang-lab/medsam2/medsam2_infer_3D_CT.py
code served (permissive licence) · get_code("d982bf60cc066b9a")
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 float64, ndim 0, 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

# Create small prediction and target arrays for multi-class segmentation
# The function expects numpy arrays of the same shape
# Using shape (2, 4) for a small batch with 4 spatial/feature dimensions
np.random.seed(0)

# Create predictions: random class labels (0, 1, 2, 3)
preds = np.random.randint(0, 4, size=(2, 4))

# Create targets: random class labels (0, 1, 2, 3)
# Ensure they have the same shape as preds
targets = np.random.randint(0, 4, size=(2, 4))

ARGS = {
    "preds": preds,
    "targets": targets,
}
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 float64, ndim 0, dtype family float — no output shape is stated: observe_signature.py recorded float ndim 0, which disagrees with the fixture run
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 Ran
ran on a synthesized input
ibaiGorordo/ONNX-SAM2-Segment-Anything/sam2/utils.py
code served (permissive licence) · get_code("8922173c3fa12488")
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 (100, 120, 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 cv2
import numpy as np

# Create a simple test image (height=100, width=120, channels=3)
image = np.random.randint(0, 256, (100, 120, 3), dtype=np.uint8)

# Create a binary mask (same spatial dimensions as image)
mask = np.zeros((100, 120), dtype=np.uint8)
mask[20:80, 30:100] = 255  # Set a rectangular region to 255

# Define color as RGB tuple
color = (0, 255, 0)

# Define alpha blending factor
alpha = 0.5

# Whether to draw border contours
draw_border = True

ARGS = {
    "image": image,
    "mask": mask,
    "color": color,
    "alpha": alpha,
    "draw_border": draw_border
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 (100, 120, 3) — shape (100, 120, 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
draw_masks Ran
ran on a synthesized input
ibaiGorordo/ONNX-SAM2-Segment-Anything/sam2/utils.py
code served (permissive licence) · get_code("23e01949c7f7b63f")
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 (4, 3, 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 cv2
import numpy as np

rng = np.random.default_rng(2)
colors = rng.uniform(0, 255, size=(100, 3))

# Create a small test image (height=4, width=3, channels=3)
image = np.random.randint(0, 256, size=(4, 3, 3), dtype=np.uint8)

# Create masks dict with a couple of label IDs
# Each mask should be 2D (height, width) with binary values
mask1 = np.zeros((4, 3), dtype=np.uint8)
mask1[1:3, 1:2] = 255  # Set some pixels to indicate the mask region

mask2 = np.zeros((4, 3), dtype=np.uint8)
mask2[0:2, 0:2] = 255  # Set some pixels to indicate the mask region

masks = {
    0: mask1,
    1: mask2,
}

ARGS = {
    "image": image,
    "masks": masks,
    "alpha": 0.5,
    "draw_border": True,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
cv2, 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 (4, 3, 3) — shape (4, 3, 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
generate_bbox_mask Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
louisfinner/him2sam/lib/utils/ce_utils.py
code served (permissive licence) · get_code("d8da96a9ed23308f")
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, 10, 12) 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)

# The function expects:
# - bbox_mask: a tensor of shape (b, h, w) that will be modified in-place
# - bbox: a tensor of shape (b, 4) where each row is [x, y, width, height]

b, h, w = 2, 10, 12
bbox_mask = torch.zeros(b, h, w)

# Create bounding boxes: [x, y, width, height]
# bbox[0] = [2, 3, 4, 5] means x=2, y=3, width=4, height=5
# bbox[1] = [1, 1, 3, 4] means x=1, y=1, width=3, height=4
bbox = torch.tensor([
    [2, 3, 4, 5],
    [1, 1, 3, 4]
], dtype=torch.float32)

ARGS = {
    "bbox_mask": bbox_mask,
    "bbox": bbox,
}
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, 10, 12) — shape (2, 10, 12) 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
generate_heatmap Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/heapmap_utils.py
code served (permissive licence) · get_code("02f602286c531143")
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 list, ndim 4, 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 torch
import numpy as np

torch.manual_seed(0)

# Create sample bounding boxes
# Shape: [num_search, bs, 4] where 4 represents [x1, y1, x2, y2] or similar bbox format
# num_search=2, bs=3, 4 coordinates
bboxes = torch.tensor([
    [[10.0, 10.0, 50.0, 50.0],
     [60.0, 60.0, 100.0, 100.0],
     [20.0, 20.0, 80.0, 80.0]],
    [[15.0, 15.0, 55.0, 55.0],
     [65.0, 65.0, 105.0, 105.0],
     [25.0, 25.0, 85.0, 85.0]]
], dtype=torch.float32)

ARGS = {
    "bboxes": bboxes,
    "patch_size": 320,
    "stride": 16
}
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 list, ndim 4, dtype family float — a list 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
generate_mask_cond Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/ce_utils.py
code served (permissive licence) · get_code("90e571943800f79c")
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, 64) 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)

class MockConfig:
    def __init__(self):
        self.DATA = type('obj', (object,), {
            'TEMPLATE': type('obj', (object,), {'SIZE': 128})()
        })()
        self.MODEL = type('obj', (object,), {
            'BACKBONE': type('obj', (object,), {
                'STRIDE': 16,
                'CE_TEMPLATE_RANGE': 'GT_BOX'
            })()
        })()

cfg = MockConfig()
bs = 2
device = torch.device('cpu')
gt_bbox = torch.tensor([
    [0.1, 0.2, 0.3, 0.4],
    [0.2, 0.3, 0.25, 0.35]
], device=device)

ARGS = {
    'cfg': cfg,
    'bs': bs,
    'device': device,
    'gt_bbox': gt_bbox
}
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, 64) — shape (2, 64) 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
getLargestCC Ran
ran on a synthesized input
bowang-lab/medsam2/medsam2_infer_3D_CT.py
code served (permissive licence) · get_code("78368949ab5a1fd4")
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, 5) 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
from skimage import measure, morphology

# Create a small binary segmentation mask
# The function uses measure.label() and np.bincount() on the flattened array
# So we need a numpy array with integer values (0s and 1s for binary segmentation)

# Create a simple 5x5 binary segmentation with a few connected components
segmentation = np.array([
    [0, 0, 1, 1, 0],
    [0, 0, 1, 1, 0],
    [0, 0, 0, 0, 0],
    [1, 0, 0, 1, 1],
    [1, 0, 0, 1, 1]
], dtype=np.uint8)

ARGS = {
    "segmentation": segmentation
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, skimage — 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, 5) — shape (5, 5) 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_1d_sine_pe Ran
ran; our contract draft was wrong, not the code
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("a6c3974188a5ffb0")
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

torch.manual_seed(0)

# pos_inds: a 1D tensor of position indices
pos_inds = torch.arange(2, dtype=torch.int64)

# dim: embedding dimension (should be even for sine/cosine split)
dim = 4

# temperature: temperature parameter for positional encoding (default 10000)
temperature = 10000

ARGS = {
    "pos_inds": pos_inds,
    "dim": dim,
    "temperature": temperature,
}
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
get_center3x3 Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/heapmap_utils.py
code served (permissive licence) · get_code("8ed1a71ee932713a")
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 (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

torch.manual_seed(0)

# locations: M x 2 - M points with x, y coordinates
locations = torch.randn(4, 2)

# centers: N x 2 - N center points with x, y coordinates
centers = torch.randn(3, 2)

# strides: M - stride value for each location
strides = torch.tensor([1.0, 2.0, 1.5, 2.5])

# range: controls the 3x3 neighborhood size (default is 3)
range_param = 3

ARGS = {
    "locations": locations,
    "centers": centers,
    "strides": strides,
    "range": range_param,
}
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 (4, 3) — shape (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_center_from_recist Ran
ran on a synthesized input
bowang-lab/medsam2/eff_medsam2_infer_CT_lesion_npz_recist.py
code served (permissive licence) · get_code("a7768a633e703a5d")
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 (1, 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 numpy as np

# Create a small 2D binary array representing RECIST measurements
# The function finds coordinates where values > 0, then computes center
recist_per_lab = np.zeros((10, 15), dtype=np.float32)

# Set some pixels to positive values to create a line/region
recist_per_lab[2, 3] = 1.0
recist_per_lab[2, 4] = 1.0
recist_per_lab[2, 5] = 1.0
recist_per_lab[5, 8] = 1.0

ARGS = {
    "recist_per_lab": recist_per_lab
}
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 2, dtype family float, shape (1, 2) — shape (1, 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_center_from_recist Ran
ran on a synthesized input
bowang-lab/medsam2/medsam2_infer_CT_lesion_npz_recist.py
code served (permissive licence) · get_code("11b8b72a8eb095ec")
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 (1, 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 numpy as np

# Create a small RECIST mask array
# The function expects a 2D array where values > 0 indicate points
# We'll create a simple 5x6 array with a diagonal line of positive values
recist_mask = np.zeros((5, 6), dtype=np.float32)
recist_mask[1, 1] = 1
recist_mask[2, 2] = 1
recist_mask[3, 3] = 1
recist_mask[4, 4] = 1

ARGS = {
    'recist_per_lab': recist_mask,
    'scale': 1
}
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 2, dtype family float, shape (1, 2) — shape (1, 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_per_obj_mask Ran
ran; our contract draft was wrong, not the code
bowang-lab/medsam2/medsam2_infer_video.py
code served (permissive licence) · get_code("259650ecd92aae93")
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) 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 numpy as np

# Create a small mask array with object IDs
# The mask should contain integer values where:
# - 0 represents background
# - positive integers represent different objects
mask = np.array([
    [0, 1, 1, 2],
    [0, 1, 2, 2],
    [3, 3, 0, 2],
    [3, 0, 0, 0]
], dtype=np.int32)

ARGS = {
    "mask": mask
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
numpy — 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
get_qkv Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/merge.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from event-ahu/mamba_fetrack, is pointer only (licence: NONE) · get_code("2e6c35cccbde1c71")
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 event-ahu/mamba_fetrack, 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.

iou_loss Ran
ran; our contract draft was wrong, not the code
bowang-lab/medsam2/training/loss_fns.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from juneyeeHu/LM-EEC, is pointer only (licence: NONE) · get_code("b8f501ca29e77f1a")
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 juneyeeHu/LM-EEC, 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.

load_ann_png Ran
ran; our contract draft was wrong, not the code
bowang-lab/medsam2/medsam2_infer_video.py
code served (permissive licence) · get_code("fecc11868aafba36")
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) 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
from PIL import Image
import tempfile
import os

# Create a temporary PNG file with a palette
temp_dir = tempfile.mkdtemp()
temp_path = os.path.join(temp_dir, "test_mask.png")

# Create a simple paletted image
mask_array = np.array([[0, 1, 2], [1, 2, 0]], dtype=np.uint8)
mask_img = Image.fromarray(mask_array, mode='P')

# Create and set a palette (256 colors * 3 channels for RGB)
palette = [i % 256 for i in range(768)]
mask_img.putpalette(palette)

# Save the image
mask_img.save(temp_path)

ARGS = {
    "path": temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
Imports
PIL, numpy — 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_template_search Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/merge.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from event-ahu/mamba_fetrack, is pointer only (licence: NONE) · get_code("c66db0b9eb9bb36a")
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 event-ahu/mamba_fetrack, 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.

put_per_obj_mask Ran
ran, honoured the contract we drafted
bowang-lab/medsam2/medsam2_infer_video.py
code served (permissive licence) · get_code("2e947f9cfdf99dc6")
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) and returned ndarray, ndim 2, dtype family int, shape (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 numpy as np

# Create a small per_obj_mask dictionary
# The function expects a dict where keys are object_ids and values are masks
# that can be reshaped to (height, width)

height = 4
width = 3

# Create masks for 2 objects
# Each mask should be a flat array of size height*width
per_obj_mask = {
    1: np.array([1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0], dtype=np.uint8),
    2: np.array([0, 1, 0, 1, 0, 1, 0, 1, 0, 1, 0, 1], dtype=np.uint8),
}

ARGS = {
    "per_obj_mask": per_obj_mask,
    "height": height,
    "width": width,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1
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 2, dtype family int, shape (4, 3) — shape (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
reduce_dict Ran
ran; our contract draft was wrong, not the code
louisfinner/him2sam/lib/utils/misc.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from kellyiss/situformer, is pointer only (licence: NONE) · get_code("05992505df9ef0cd")
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 kellyiss/situformer, 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.

resize_grayscale_to_rgb_and_resize Ran
ran on a synthesized input
bowang-lab/medsam2/eff_medsam2_infer_CT_lesion_npz_recist.py
code served (permissive licence) · get_code("99b787e2d3339598")
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 4, dtype family float, shape (2, 3, 4, 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
from PIL import Image

# Create a small 3D grayscale array with shape (d, h, w)
# d=2 depth slices, h=8 height, w=6 width
array = np.random.randint(0, 256, size=(2, 8, 6), dtype=np.uint8)

# Desired output size
image_size = 4

ARGS = {
    "array": array,
    "image_size": image_size,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
PIL, numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 4, dtype family float, shape (2, 3, 4, 4) — shape (2, 3, 4, 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
sample_points_in_bbox_grid Ran
ran on a synthesized input
bowang-lab/medsam2/eff_medsam2_infer_CT_lesion_npz_recist.py
code served (permissive licence) · get_code("621ef2b926968142")
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 int, shape (16, 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 numpy as np

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

# Define the bounding box: [x_min, y_min, x_max, y_max]
bbox = np.array([0, 0, 100, 100], dtype=float)

# Number of points to sample
n = 16

# Construct ARGS dictionary
ARGS = {
    "bbox": bbox,
    "n": n
}
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 2, dtype family int, shape (16, 2) — shape (16, 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
select_closest_cond_frames Ran
ran; our contract draft was wrong, not the code
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("4ee20f090e58c425")
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 torch
import numpy as np

torch.manual_seed(0)

# Construct cond_frame_outputs as a dictionary mapping frame indices to output values
# The function uses cond_frame_outputs as a dict with integer keys (frame indices)
# and arbitrary values. We'll use tensors as stand-in output values.
cond_frame_outputs = {
    0: torch.randn(2, 4),
    5: torch.randn(2, 4),
    10: torch.randn(2, 4),
    15: torch.randn(2, 4),
    20: torch.randn(2, 4),
    25: torch.randn(2, 4),
}

# frame_idx is the current frame index we're selecting conditioning frames for
frame_idx = 12

# max_cond_frame_num is the maximum number of conditioning frames to select
# Use a value that requires selection logic (not -1 and not >= len(cond_frame_outputs))
max_cond_frame_num = 3

ARGS = {
    "frame_idx": frame_idx,
    "cond_frame_outputs": cond_frame_outputs,
    "max_cond_frame_num": max_cond_frame_num,
}
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
sigmoid_focal_loss Ran
ran; our contract draft was wrong, not the code
bowang-lab/medsam2/training/loss_fns.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from juneyeeHu/LM-EEC, is pointer only (licence: NONE) · get_code("42fec6fdc1faf6f1")
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 juneyeeHu/LM-EEC, 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.

slt_collate Ran
ran on a synthesized input
louisfinner/him2sam/lib/train/train_script.py
code served (permissive licence) · get_code("954460c5c93e5dfe")
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
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - slt_collate takes a parameter 'batch'
# - It expects batch to be a list of dictionaries
# - It iterates over batch[0].keys() to get all keys
# - For each key, it collects values from all examples in the batch
# - It returns a dict where each key maps to a list of values

# Create sample batch data
# Each example is a dict with multiple keys
example1 = {
    'input_ids': torch.tensor([1, 2, 3, 4]),
    'attention_mask': torch.tensor([1, 1, 1, 0]),
    'labels': torch.tensor([0]),
    'text': "sample text 1"
}

example2 = {
    'input_ids': torch.tensor([5, 6, 7, 8]),
    'attention_mask': torch.tensor([1, 1, 0, 0]),
    'labels': torch.tensor([1]),
    'text': "sample text 2"
}

batch = [example1, example2]

ARGS = {
    'batch': batch
}
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 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
SAM2Base Not yet run
unverified (harvested, no recorded run)
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("21359b77bae173ac")
How it ran

no invocation recorded.

SAM2Base Not yet run
unverified (harvested, no recorded run)
facebookresearch/sam2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("e7f8982afcc2eeb8")
How it ran

no invocation recorded.

SAM2Base Not yet run
unverified (harvested, no recorded run)
dcnieho/segment-anything-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("784c0ac2dd86664c")
How it ran

no invocation recorded.

TwoWayTransformer Not yet run
unverified (harvested, no recorded run)
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("9a8c4da19cecdb81")
How it ran

no invocation recorded.

TwoWayTransformer Not yet run
unverified (harvested, no recorded run)
facebookresearch/sam2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("1337a6ec7dc01de3")
How it ran

no invocation recorded.

build_efficienttam Not yet run
unverified (harvested, no recorded run)
bowang-lab/medsam2/efficient_track_anything/build_efficienttam.py
code served (permissive licence) · get_code("a66342f2959074d2")
How it ran

no invocation recorded.

build_efficienttam_hf Not yet run
unverified (harvested, no recorded run)
bowang-lab/medsam2/efficient_track_anything/build_efficienttam.py
code served (permissive licence) · get_code("52aac67080d89311")
How it ran

no invocation recorded.

build_efficienttam_video_predictor Not yet run
unverified (harvested, no recorded run)
bowang-lab/medsam2/efficient_track_anything/build_efficienttam.py
code served (permissive licence) · get_code("1191ad63c426c255")
How it ran

no invocation recorded.

sdp_kernel_context Not yet run
unverified (harvested, no recorded run)
idea-research/grounded-sam-2/sam2/modeling/sam2_base.py
code served (permissive licence) · get_code("d5eb78117313126d")
How it ran

no invocation recorded.

Also present in other papers' code

Of 49 samples lifted from this paper's linked repositories, 49 carry a function identity and 0 do not. Of the 47 distinct functions with an identity, 30 are also present in other papers whose code we hold (22 with at least one paper dated earlier, 18 the same month, 26 later) and 17 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
box_cxcywh_to_xyxy 49 other papers
35 dated earlier, 3 the same month, 11 later · 11 only as an assembly brick
1811.07628 (2018-11)
ATOM: Accurate Tracking by Overlap Maximization
2011.10881 (2020-11)
Rethinking Transformer-based Set Prediction for Object Detection
2103.12115 (2021-03)
End-to-End Trainable Multi-Instance Pose Estimation with Transformers
and 46 more not named here
reduce_dict 33 other papers
28 dated earlier, 4 later, 1 same year, order not determinable
1811.07628 (2018-11)
ATOM: Accurate Tracking by Overlap Maximization
1811.10200 (2018-11)
IDD: A Dataset for Exploring Problems of Autonomous Navigation in Unconstrained Environments
2007.02419 (2020-07)
Attention-based Joint Detection of Object and Semantic Part
and 30 more not named here
all_gather 30 other papers
25 dated earlier, 4 later, 1 same year, order not determinable
1811.07628 (2018-11)
ATOM: Accurate Tracking by Overlap Maximization
1811.10200 (2018-11)
IDD: A Dataset for Exploring Problems of Autonomous Navigation in Unconstrained Environments
2007.02419 (2020-07)
Attention-based Joint Detection of Object and Semantic Part
and 27 more not named here
collate_fn 16 other papers
14 dated earlier, 2 later
1811.07628 (2018-11)
ATOM: Accurate Tracking by Overlap Maximization
2104.00969 (2021-04)
TubeR: Tubelet Transformer for Video Action Detection
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
and 13 more not named here
box_xywh_to_xyxy 9 other papers
6 dated earlier, 1 the same month, 2 later
1811.07628 (2018-11)
ATOM: Accurate Tracking by Overlap Maximization
2305.15896 (2023-05)
MixFormerV2: Efficient Fully Transformer Tracking
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
and 6 more not named here
get_1d_sine_pe
brick of this paper's assembly: helper
9 other papers
3 the same month, 6 later · 1 only as an assembly brick
2408.00874 (2024-08)
Medical SAM 2: Segment medical images as video via Segment Anything Model 2
2408.07931 (2024-08)
Surgical SAM 2: Real-time Segment Anything in Surgical Video by Efficient Frame Pruning
2408.08870 (2024-08)
SAM2-UNet: Segment Anything 2 Makes Strong Encoder for Natural and Medical Image Segmentation
and 6 more not named here
select_closest_cond_frames
brick of this paper's assembly: helper
9 other papers
3 the same month, 6 later · 1 only as an assembly brick
2408.00874 (2024-08)
Medical SAM 2: Segment medical images as video via Segment Anything Model 2
2408.07931 (2024-08)
Surgical SAM 2: Real-time Segment Anything in Surgical Video by Efficient Frame Pruning
2408.08870 (2024-08)
SAM2-UNet: Segment Anything 2 Makes Strong Encoder for Natural and Medical Image Segmentation
and 6 more not named here
PositionEmbeddingRandom
brick of this paper's assembly: helper
8 other papers
3 dated earlier, 5 later · 3 only as an assembly brick
2306.01567 (2023-06)
Segment Anything in High Quality
2401.08083 (2024-01)
UV-SAM: Adapting Segment Anything Model for Urban Village Identification
2404.15700 (2024-04)
MAS-SAM: Segment Any Marine Animal with Aggregated Features
and 5 more not named here
box_xyxy_to_xywh 8 other papers
5 dated earlier, 1 the same month, 2 later
1811.07628 (2018-11)
ATOM: Accurate Tracking by Overlap Maximization
2305.15896 (2023-05)
MixFormerV2: Efficient Fully Transformer Tracking
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
and 5 more not named here
compute_grids 6 other papers
4 dated earlier, 1 the same month, 1 later
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2309.14611 (2023-09)
Event Stream-based Visual Object Tracking: A High-Resolution Benchmark Dataset and A Novel Baseline
2310.10071 (2023-10)
ZoomTrack: Target-aware Non-uniform Resizing for Efficient Visual Tracking
and 3 more not named here
generate_bbox_mask 6 other papers
4 dated earlier, 1 the same month, 1 later
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2309.14611 (2023-09)
Event Stream-based Visual Object Tracking: A High-Resolution Benchmark Dataset and A Novel Baseline
2310.10071 (2023-10)
ZoomTrack: Target-aware Non-uniform Resizing for Efficient Visual Tracking
and 3 more not named here
generate_heatmap 6 other papers
4 dated earlier, 1 the same month, 1 later
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2309.14611 (2023-09)
Event Stream-based Visual Object Tracking: A High-Resolution Benchmark Dataset and A Novel Baseline
2310.10071 (2023-10)
ZoomTrack: Target-aware Non-uniform Resizing for Efficient Visual Tracking
and 3 more not named here
generate_mask_cond 6 other papers
4 dated earlier, 1 the same month, 1 later
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2309.14611 (2023-09)
Event Stream-based Visual Object Tracking: A High-Resolution Benchmark Dataset and A Novel Baseline
2310.10071 (2023-10)
ZoomTrack: Target-aware Non-uniform Resizing for Efficient Visual Tracking
and 3 more not named here
adjust_keep_rate 5 other papers
4 dated earlier, 1 the same month
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2309.14611 (2023-09)
Event Stream-based Visual Object Tracking: A High-Resolution Benchmark Dataset and A Novel Baseline
2310.10071 (2023-10)
ZoomTrack: Target-aware Non-uniform Resizing for Efficient Visual Tracking
and 2 more not named here
dice_loss 5 other papers
1 dated earlier, 1 the same month, 3 later
2302.01872 (2023-02)
MOSE: A New Dataset for Video Object Segmentation in Complex Scenes
2408.07931 (2024-08)
Surgical SAM 2: Real-time Segment Anything in Surgical Video by Efficient Frame Pruning
2411.17576 (2024-11)
A Distractor-Aware Memory for Visual Object Tracking with SAM2
and 2 more not named here
get_center3x3 5 other papers
3 dated earlier, 1 the same month, 1 later
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2309.14611 (2023-09)
Event Stream-based Visual Object Tracking: A High-Resolution Benchmark Dataset and A Novel Baseline
2404.18174 (2024-04)
Mamba-FETrack: Frame-Event Tracking via State Space Model
and 2 more not named here
get_qkv 5 other papers
4 dated earlier, 1 later
2305.15896 (2023-05)
MixFormerV2: Efficient Fully Transformer Tracking
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2310.10071 (2023-10)
ZoomTrack: Target-aware Non-uniform Resizing for Efficient Visual Tracking
and 2 more not named here
iou_loss 5 other papers
1 dated earlier, 1 the same month, 3 later
2302.01872 (2023-02)
MOSE: A New Dataset for Video Object Segmentation in Complex Scenes
2408.07931 (2024-08)
Surgical SAM 2: Real-time Segment Anything in Surgical Video by Efficient Frame Pruning
2411.17576 (2024-11)
A Distractor-Aware Memory for Visual Object Tracking with SAM2
and 2 more not named here
merge_template_search 5 other papers
4 dated earlier, 1 later
2305.15896 (2023-05)
MixFormerV2: Efficient Fully Transformer Tracking
2308.11322 (2023-08)
CiteTracker: Correlating Image and Text for Visual Tracking
2310.10071 (2023-10)
ZoomTrack: Target-aware Non-uniform Resizing for Efficient Visual Tracking
and 2 more not named here
sigmoid_focal_loss 5 other papers
1 dated earlier, 1 the same month, 3 later
2302.01872 (2023-02)
MOSE: A New Dataset for Video Object Segmentation in Complex Scenes
2408.07931 (2024-08)
Surgical SAM 2: Real-time Segment Anything in Surgical Video by Efficient Frame Pruning
2411.17576 (2024-11)
A Distractor-Aware Memory for Visual Object Tracking with SAM2
and 2 more not named here

Shown: the 20 functions present in the most other papers. 10 more shared functions are not listed 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

We present Segment Anything Model 2 (SAM 2), a foundation model towards solving promptable visual segmentation in images and videos. We build a data engine, which improves model and data via user interaction, to collect the largest video segmentation dataset to date. Our model is a simple transformer architecture with streaming memory for real-time video processing. SAM 2 trained on our data provides strong performance across a wide range of tasks. In video segmentation, we observe better accuracy, using 3× fewer interactions than prior approaches. In image segmentation, our model is more accurate and 6× faster than the Segment Anything Model (SAM). We believe that our data, model, and insights will serve as a significant milestone for video segmentation and related perception tasks. We are releasing our main model, dataset, as well as code for model training and our demo.

For agents

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

get_harvested_code_for_paper("2408.00714")
get_code_for_paper("2408.00714")
have("2408.00714")

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

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

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

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

Connect an agent — have() is free.