SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2309.12969 · 2023

Detect Everything with Few Examples

arXiv · PDF · Open in the Atlas

Code that ran

17 of 20 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 17 failures of our instrument; 3 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/2309.12969.json · badge: /api/ran/2309.12969.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
mlzxy/devit canonical (classifier label)
classifier basis: census
17 ran · 3 no recorded run
FunctionStatusWhere it lives
box_cxcywh_to_xyxy Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/lib/regionprop.py
code served (permissive licence) · get_code("009912c75c8c77cf")
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)

# bbox parameter: expects a tensor with shape (..., 4) where last dim contains [cx, cy, w, h]
# The function calls unbind(-1) which splits the last dimension into 4 components
# Then stacks them back, so we need a tensor with last dimension = 4
bbox = torch.tensor([
    [0.5, 0.5, 0.2, 0.3],
    [0.7, 0.6, 0.4, 0.5]
], dtype=torch.float32)

ARGS = {
    "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 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_clamp Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/lib/regionprop.py
code served (permissive licence) · get_code("88d32e10c27e7a12")
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)

# bbox is a tensor with shape (batch_size, 4) where each row is [x1, y1, x2, y2]
# The function clamps x coordinates (columns 0, 2) to [0, w]
# and y coordinates (columns 1, 3) to [0, h]
bbox = torch.tensor([
    [10.0, 20.0, 100.0, 150.0],
    [-5.0, 200.0, 250.0, -10.0]
], dtype=torch.float32)

h = 180
w = 256

ARGS = {
    "bbox": bbox,
    "h": h,
    "w": w
}
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_cxcywh Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/lib/regionprop.py
code served (permissive licence) · get_code("db78cfc20095f3a8")
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 expects a bbox tensor with shape (..., 4)
# where the last dimension contains [x0, y0, x1, y1] coordinates
# It uses unbind(-1) to split into 4 tensors, then stacks them back
bbox = torch.tensor([
    [1.0, 2.0, 5.0, 6.0],
    [3.0, 4.0, 7.0, 8.0]
])

ARGS = {
    "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 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
convert_basic_c2_names Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/detectron2/checkpoint/c2_model_loading.py
code served (permissive licence) · get_code("e8526a516b4f9206")
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 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 copy
import re

# Analyze the function: it takes a list of strings (original_keys) and applies
# various string transformations to them. It doesn't use any complex objects,
# just list operations and string manipulations.

ARGS = {
    'original_keys': [
        'pred_b',
        'pred_w',
        'conv_b',
        'conv_w',
        'bn_s',
        'bn_bias',
        'bn_rm',
        'bn_riv',
        'bn_gamma',
        'bn_beta',
        'gn_s',
        'gn_bias',
        'res_conv1_norm_weight',
        'conv1_weight',
        'layer_branch1_weight',
        'layer_branch2a_bias',
        'layer_branch2b_weight',
        'layer_branch2c_bias',
        'body_conv_fcn_weight',
        'AnnIndex_lowres',
        'Index_UV_lowres',
        'U_lowres',
        'V_lowres',
    ]
}
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 list, ndim 1, 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
convert_basic_clip_names Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/detectron2/checkpoint/clip_model_loading.py
code served (permissive licence) · get_code("7b7f6e4aa28b1a69")
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 copy

torch_manual_seed = 0

# Analyze the function:
# - original_keys: list[str] - used to iterate and check if 'visual.transformer' in key, 
#   then apply string replacements
# - add_backbone_prefix: bool - controls conditional logic
# - use_whole_clip: bool - controls conditional logic
# - use_fpn_arch: bool - controls conditional logic
# - regionclip: bool - defined in signature but not used in function body

# The function processes lists of strings representing CLIP model weight keys
# It checks for 'visual.transformer' pattern and applies replacements

ARGS = {
    "original_keys": [
        "visual.layer1.0.conv1.weight",
        "visual.layer1.0.conv1.bias",
        "visual.layer2.1.conv2.weight",
        "visual.bn1.weight",
        "visual.bn1.bias"
    ],
    "add_backbone_prefix": True,
    "use_whole_clip": False,
    "use_fpn_arch": False,
    "regionclip": False
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple — a tuple output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
convert_c2_detectron_names Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/detectron2/checkpoint/c2_model_loading.py
code served (permissive licence) · get_code("e36f87059208bb7e")
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 copy
import logging
import re
import torch

torch.manual_seed(0)

# Create a small dictionary of weights simulating Caffe2 model weights
weights = {
    'conv1_w': torch.randn(3, 3, 3, 3),
    'conv1_b': torch.randn(3),
    'res_conv1_norm_s': torch.randn(3),
    'res_conv1_norm_bias': torch.randn(3),
    'res2_0_branch1_w': torch.randn(4, 3, 1, 1),
    'res2_0_branch1_b': torch.randn(4),
    'res2_0_branch2a_w': torch.randn(4, 3, 3, 3),
    'res2_0_branch2a_b': torch.randn(4),
    'res2_0_branch2b_w': torch.randn(4, 4, 3, 3),
    'res2_0_branch2b_b': torch.randn(4),
    'res2_0_branch2c_w': torch.randn(8, 4, 1, 1),
    'res2_0_branch2c_b': torch.randn(8),
    'bn_s': torch.randn(3),
    'bn_bias': torch.randn(3),
    'bn_rm': torch.randn(3),
    'bn_riv': torch.randn(3),
    'pred_w': torch.randn(10, 8),
    'pred_b': torch.randn(10),
    'fpn_inner_res2_2_sum_lateral_w': torch.randn(4, 8, 1, 1),
    'fpn_inner_res2_2_sum_lateral_b': torch.randn(4),
    'fpn_res2_2_sum_w': torch.randn(4, 4, 3, 3),
    'fpn_res2_2_sum_b': torch.randn(4),
    'rpn_cls_logits_w': torch.randn(3, 4, 3, 3),
    'rpn_cls_logits_b': torch.randn(3),
    'rpn_bbox_pred_w': torch.randn(12, 4, 3, 3),
    'rpn_bbox_pred_b': torch.randn(12),
    'fc6_w': torch.randn(16, 8),
    'fc6_b': torch.randn(16),
    'fc7_w': torch.randn(16, 16),
    'fc7_b': torch.randn(16),
}

ARGS = {
    'weights': weights,
}
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, 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
convert_clip_names Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/detectron2/checkpoint/clip_model_loading.py
code served (permissive licence) · get_code("376248f5d186a885")
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 copy

torch.manual_seed(0)

# Create a small weights dict with CLIP-style keys
# These keys follow the pattern that convert_clip_names expects
weights = {
    'visual.layer1.0.conv1.weight': torch.randn(4, 3, 3, 3),
    'visual.layer1.0.conv2.weight': torch.randn(4, 4, 3, 3),
    'visual.layer2.0.conv1.weight': torch.randn(8, 4, 3, 3),
    'visual.transformer.layer1.weight': torch.randn(4, 4),
    'fpn.inner.res2.2.sum.lateral.weight': torch.randn(4, 3),
    'fpn.res2.2.sum.weight': torch.randn(4, 4),
    'bbox_pred.weight': torch.randn(5, 4),  # 5 outputs (1 bg + 4 classes), will be sliced
    'mask_head.predictor.weight': torch.randn(2, 4),  # Will be sliced
    'fc6.weight': torch.randn(4, 8),
    'fc7.weight': torch.randn(4, 4),
}

ARGS = {
    'weights': weights,
    'add_backbone_prefix': False,
    'use_whole_clip': False,
    'use_fpn_arch': False,
    'regionclip': 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 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
dice_loss Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/detectron2/modeling/meta_arch/devit_update.py
code served (permissive licence) · get_code("89f75e54ff128be0")
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 should be arbitrary shape that can be flattened
inputs = torch.randn(2, 4, requires_grad=False)  # batch_size=2, features=4
targets = torch.randint(0, 2, (2, 4), dtype=torch.float32)  # same shape as inputs, binary labels

# num_masks is a float representing the number of masks 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
elementwise_box_iou Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/detectron2/modeling/meta_arch/devit.py
code served (permissive licence) · get_code("1bec3241f0f82f89")
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 3, 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
from torchvision.ops.boxes import box_area, box_iou

torch.manual_seed(0)

# Create two sets of bounding boxes in format [x1, y1, x2, y2]
# boxes1: 2 boxes
boxes1 = torch.tensor([
    [0.0, 0.0, 2.0, 3.0],
    [1.0, 1.0, 4.0, 5.0]
], dtype=torch.float32)

# boxes2: 3 boxes
boxes2 = torch.tensor([
    [0.5, 0.5, 2.5, 2.5],
    [1.5, 1.5, 3.5, 4.5],
    [2.0, 2.0, 5.0, 6.0]
], dtype=torch.float32)

ARGS = {
    "boxes1": boxes1,
    "boxes2": boxes2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type tuple, ndim 3, 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
generalized_box_iou Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mlzxy/devit/detectron2/modeling/meta_arch/devit_update.py
code served (permissive licence) · get_code("761e870ed51af37c")
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, 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
from torchvision.ops.boxes import box_area, box_iou

torch.manual_seed(0)

# Create valid bounding boxes in (x0, y0, x1, y1) format
# boxes1: shape [N, 4] where N=2
boxes1 = torch.tensor([
    [10.0, 20.0, 50.0, 60.0],
    [15.0, 25.0, 55.0, 65.0]
], dtype=torch.float32)

# boxes2: shape [M, 4] where M=3
boxes2 = torch.tensor([
    [12.0, 22.0, 48.0, 58.0],
    [20.0, 30.0, 60.0, 70.0],
    [5.0, 15.0, 40.0, 55.0]
], dtype=torch.float32)

# Ensure boxes satisfy the constraint that x1 >= x0 and y1 >= y0
assert (boxes1[:, 2:] >= boxes1[:, :2]).all()
assert (boxes2[:, 2:] >= boxes2[:, :2]).all()

ARGS = {
    "boxes1": boxes1,
    "boxes2": boxes2
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch, torchvision — 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, 3) — shape (2, 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
interpolate Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mlzxy/devit/detectron2/modeling/meta_arch/devit.py
code served (permissive licence) · get_code("a38f5f94b0a19b1b")
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, 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 torch
import torch.nn as nn
import torch.nn.functional as F

torch.manual_seed(0)

# Create a small 3D tensor: (batch=2, channels=4, length=3)
# The function expects seq to have a .shape[-1] attribute and support indexing
seq = torch.randn(2, 4, 3)

# T is the target length for interpolation
T = 5

# mode is the interpolation mode
mode = 'linear'

# force is a boolean flag to force interpolation even if seq is already long enough
force = False

ARGS = {
    'seq': seq,
    'T': T,
    'mode': mode,
    'force': force
}
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, 5) — shape (2, 4, 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
mask_sinkhorn Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/lib/prototype_learner.py
code served (permissive licence) · get_code("9d4bd1f443b65407")
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)

# Construct cost matrix C (4x3)
C = torch.randn(4, 3, requires_grad=False)

# Construct mask (4x3) - boolean tensor indicating valid positions
mask = torch.ones(4, 3, dtype=torch.bool)
mask[0, 1] = False  # mask out one position to test masking logic

# row_group_size - tensor of shape (4,) indicating group sizes for rows
row_group_size = torch.tensor([2.0, 2.0, 1.0, 1.0])

# col_group_size - tensor of shape (3,) indicating group sizes for columns
col_group_size = torch.tensor([2.0, 1.0, 1.0])

ARGS = {
    "C": C,
    "mask": mask,
    "row_group_size": row_group_size,
    "col_group_size": col_group_size,
    "iterations": 10,
    "epsilon": 0.01,
    "return_cost": 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 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
parse_rec Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/lib/voc_eval.py
code served (permissive licence) · get_code("2e81e6f4cd544f1b")
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 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 xml.etree.ElementTree as ET
import tempfile
import os

# Create a temporary PASCAL VOC XML file
xml_content = """<?xml version="1.0" encoding="UTF-8"?>
<annotation>
    <filename>test.jpg</filename>
    <size>
        <width>500</width>
        <height>400</height>
        <depth>3</depth>
    </size>
    <object>
        <name>cat</name>
        <pose>Unspecified</pose>
        <truncated>0</truncated>
        <difficult>0</difficult>
        <bndbox>
            <xmin>10</xmin>
            <ymin>20</ymin>
            <xmax>100</xmax>
            <ymax>150</ymax>
        </bndbox>
    </object>
    <object>
        <name>dog</name>
        <pose>Left</pose>
        <truncated>1</truncated>
        <difficult>1</difficult>
        <bndbox>
            <xmin>150</xmin>
            <ymin>200</ymin>
            <xmax>300</xmax>
            <ymax>350</ymax>
        </bndbox>
    </object>
</annotation>
"""

# Write to a temporary file
temp_fd, temp_path = tempfile.mkstemp(suffix='.xml')
os.write(temp_fd, xml_content.encode())
os.close(temp_fd)

ARGS = {
    'filename': temp_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
none outside the standard library — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 1, 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
sigmoid_ce_loss Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/detectron2/modeling/meta_arch/devit_update.py
code served (permissive licence) · get_code("847c0c0c48d84c9e")
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) for batch_size=2, num_masks=4
inputs = torch.randn(2, 4)

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

# 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
sinkhorn Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/lib/prototype_learner.py
code served (permissive licence) · get_code("f8c7f9605872c11b")
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 cost matrix C
# The function expects C to be a 2D tensor where:
# - C.shape[0] is the number of rows (for 'a')
# - C.shape[1] is the number of columns (for 'b')
# Using distinct dimensions: 4 rows, 3 columns
C = torch.randn(4, 3, requires_grad=False)

ARGS = {
    "C": C,
    "iterations": 10,
    "epsilon": 0.01,
}
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
voc_ap Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mlzxy/devit/lib/voc_eval.py
pointer only (licence: MIT); the stored copy get_code serves, from amajee11us/CROWD, is pointer only (licence: NONE) · get_code("611c47c44c424dba")
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 amajee11us/CROWD, 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.

voc_eval Ran
ran; our contract draft was wrong, not the code
mlzxy/devit/lib/voc_eval.py
code served (permissive licence) · get_code("a6d455c6f04f93d3")
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 tempfile
import os
import numpy as np
import xml.etree.ElementTree as ET

# Create temporary directories for test data
tmpdir = tempfile.mkdtemp()
anno_dir = os.path.join(tmpdir, "annotations")
det_dir = os.path.join(tmpdir, "detections")
os.makedirs(anno_dir, exist_ok=True)
os.makedirs(det_dir, exist_ok=True)

# Create sample annotation XML files
def create_annotation_file(imagename, filepath):
    """Create a sample VOC XML annotation file."""
    root = ET.Element("annotation")
    
    # Add first object
    obj1 = ET.SubElement(root, "object")
    ET.SubElement(obj1, "name").text = "cat"
    ET.SubElement(obj1, "pose").text = "Frontal"
    ET.SubElement(obj1, "truncated").text = "0"
    ET.SubElement(obj1, "difficult").text = "0"
    bndbox1 = ET.SubElement(obj1, "bndbox")
    ET.SubElement(bndbox1, "xmin").text = "10"
    ET.SubElement(bndbox1, "ymin").text = "20"
    ET.SubElement(bndbox1, "xmax").text = "100"
    ET.SubElement(bndbox1, "ymax").text = "150"
    
    # Add second object
    obj2 = ET.SubElement(root, "object")
    ET.SubElement(obj2, "name").text = "dog"
    ET.SubElement(obj2, "pose").text = "Left"
    ET.SubElement(obj2, "truncated").text = "0"
    ET.SubElement(obj2, "difficult").text = "0"
    bndbox2 = ET.SubElement(obj2, "bndbox")
    ET.SubElement(bndbox2, "xmin").text = "150"
    ET.SubElement(bndbox2, "ymin").text = "50"
    ET.SubElement(bndbox2, "xmax").text = "250"
    ET.SubElement(bndbox2, "ymax").text = "200"
    
    tree = ET.ElementTree(root)
    tree.write(filepath)

# Create annotation files for 2 images
image_names = ["image001", "image002"]
for img_name in image_names:
    anno_path = os.path.join(anno_dir, f"{img_name}.xml")
    create_annotation_file(img_name, anno_path)

# Create imageset file
imageset_file = os.path.join(tmpdir, "imageset.txt")
with open(imageset_file, "w") as f:
    for img_name in image_names:
        f.write(f"{img_name}\n")

# Create detection results file
det_file = os.path.join(det_dir, "comp3_det_test_cat.txt")
with open(det_file, "w") as f:
    # Format: image_id confidence x1 y1 x2 y2
    f.write("image001 0.9 15 25 95 145\n")
    f.write("image002 0.8 155 55 245 195\n")

# Paths with format strings
detpath = os.path.join(det_dir, "comp3_det_test_{}.txt")
annopath = os.path.join(anno_dir, "{}.xml")

ARGS = {
    "detpath": detpath,
    "annopath": annopath,
    "imagesetfile": imageset_file,
    "classname": "cat",
    "ovthresh": 0.5,
    "use_07_metric": False,
}
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 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
align_and_update_state_dicts Not yet run
unverified (harvested, no recorded run)
mlzxy/devit/detectron2/checkpoint/c2_model_loading.py
code served (permissive licence) · get_code("ac2638463572c152")
How it ran

no invocation recorded.

align_and_update_state_dicts_for_CLIP Not yet run
unverified (harvested, no recorded run)
mlzxy/devit/detectron2/checkpoint/clip_model_loading.py
code served (permissive licence) · get_code("0bd7b0a60b4069f9")
How it ran

no invocation recorded.

generalized_box_iou Not yet run
unverified (harvested, no recorded run)
mlzxy/devit/detectron2/modeling/meta_arch/devit.py
code served (permissive licence) · get_code("bfc4e32519b5ef25")
How it ran

no invocation recorded.

Also present in other papers' code

Of 20 samples lifted from this paper's linked repositories, 20 carry a function identity and 0 do not. Of the 19 distinct functions with an identity, 16 are also present in other papers whose code we hold (12 with at least one paper dated earlier, 2 the same month, 16 later) and 3 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
dice_loss 46 other papers
19 dated earlier, 1 the same month, 23 later, 3 same year, order not determinable
2112.01527 (2021-12)
Masked-attention Mask Transformer for Universal Image Segmentation
2112.10764 (2021-12)
Mask2Former for Video Instance Segmentation
2203.03605 (2022-03)
DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection
and 43 more not named here
convert_basic_c2_names 45 other papers
34 dated earlier, 9 later, 2 same year, order not determinable
1703.06870 (2017-03)
Mask R-CNN
1804.08864 (2018-04)
Learning to See the Invisible: End-to-End Trainable Amodal Instance Segmentation
1901.08164 (2019-01)
Decoupled Greedy Learning of CNNs
and 42 more not named here
sigmoid_ce_loss 45 other papers
18 dated earlier, 1 the same month, 23 later, 3 same year, order not determinable
2112.01527 (2021-12)
Masked-attention Mask Transformer for Universal Image Segmentation
2112.10764 (2021-12)
Mask2Former for Video Instance Segmentation
2203.03605 (2022-03)
DINO: DETR with Improved DeNoising Anchor Boxes for End-to-End Object Detection
and 42 more not named here
voc_ap 27 other papers
22 dated earlier, 5 later
1506.01497 (2015-06)
Faster R-CNN: Towards Real-Time Object Detection with Region Proposal Networks
1605.06409 (2016-05)
R-FCN: Object Detection via Region-based Fully Convolutional Networks
1609.03605 (2016-09)
Detecting Text in Natural Image with Connectionist Text Proposal Network
and 24 more not named here
align_and_update_state_dicts 13 other papers
6 dated earlier, 6 later, 1 same year, order not determinable
1912.08193 (2019-12)
PointRend: Image Segmentation as Rendering
2211.09808 (2022-11)
Uni-Perceiver v2: A Generalist Model for Large-Scale Vision and Vision-Language Tasks
and 10 more not named here
convert_c2_detectron_names 13 other papers
6 dated earlier, 6 later, 1 same year, order not determinable
1912.08193 (2019-12)
PointRend: Image Segmentation as Rendering
2211.09808 (2022-11)
Uni-Perceiver v2: A Generalist Model for Large-Scale Vision and Vision-Language Tasks
and 10 more not named here
align_and_update_state_dicts_for_CLIP 5 other papers
2 dated earlier, 3 later
Zhong_RegionCLIP_Region-Based_Language-Image_Pretraining_CVPR_2022_paper (2022 (year only))
RegionCLIP: Region-based Language-Image Pretraining
2306.05718 (2023-06)
Learning Domain-Aware Detection Head with Prompt Tuning
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
and 2 more not named here
box_cxcywh_to_xyxy 5 other papers
1 dated earlier, 4 later
2304.04742 (2023-04)
Detection Transformer with Stable Matching
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
Zhou_When_Pixel_Difference_Patterns_Meet_ViT_PiDiViT_for_Few-Shot_Object_ICCV_2025_paper (2025 (year only))
When Pixel Difference Patterns Meet ViT: PiDiViT for Few-Shot Object Detection
and 2 more not named here
convert_basic_clip_names 5 other papers
2 dated earlier, 3 later
Zhong_RegionCLIP_Region-Based_Language-Image_Pretraining_CVPR_2022_paper (2022 (year only))
RegionCLIP: Region-based Language-Image Pretraining
2306.05718 (2023-06)
Learning Domain-Aware Detection Head with Prompt Tuning
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
and 2 more not named here
convert_clip_names 5 other papers
2 dated earlier, 3 later
Zhong_RegionCLIP_Region-Based_Language-Image_Pretraining_CVPR_2022_paper (2022 (year only))
RegionCLIP: Region-based Language-Image Pretraining
2306.05718 (2023-06)
Learning Domain-Aware Detection Head with Prompt Tuning
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
and 2 more not named here
box_xyxy_to_cxcywh 4 other papers
4 later
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
Zhou_When_Pixel_Difference_Patterns_Meet_ViT_PiDiViT_for_Few-Shot_Object_ICCV_2025_paper (2025 (year only))
When Pixel Difference Patterns Meet ViT: PiDiViT for Few-Shot Object Detection
2501.06710 (2025-01)
Multi-task Visual Grounding with Coarse-to-Fine Consistency Constraints
and 1 more not named here
box_xyxy_clamp 2 other papers
2 later
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
Zhou_When_Pixel_Difference_Patterns_Meet_ViT_PiDiViT_for_Few-Shot_Object_ICCV_2025_paper (2025 (year only))
When Pixel Difference Patterns Meet ViT: PiDiViT for Few-Shot Object Detection
mask_sinkhorn 2 other papers
2 later
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
Zhou_When_Pixel_Difference_Patterns_Meet_ViT_PiDiViT_for_Few-Shot_Object_ICCV_2025_paper (2025 (year only))
When Pixel Difference Patterns Meet ViT: PiDiViT for Few-Shot Object Detection
parse_rec 2 other papers
1 dated earlier, 1 later
2303.09674 (2023-03)
DiGeo: Discriminative Geometry-Aware Learning for Generalized Few-Shot Object Detection
Zhou_When_Pixel_Difference_Patterns_Meet_ViT_PiDiViT_for_Few-Shot_Object_ICCV_2025_paper (2025 (year only))
When Pixel Difference Patterns Meet ViT: PiDiViT for Few-Shot Object Detection
sinkhorn 2 other papers
2 later
2402.03094 (2024-02)
Cross-Domain Few-Shot Object Detection via Enhanced Open-Set Object Detector
Zhou_When_Pixel_Difference_Patterns_Meet_ViT_PiDiViT_for_Few-Shot_Object_ICCV_2025_paper (2025 (year only))
When Pixel Difference Patterns Meet ViT: PiDiViT for Few-Shot Object Detection
voc_eval 2 other papers
1 dated earlier, 1 later
2303.09674 (2023-03)
DiGeo: Discriminative Geometry-Aware Learning for Generalized Few-Shot Object Detection
Zhou_When_Pixel_Difference_Patterns_Meet_ViT_PiDiViT_for_Few-Shot_Object_ICCV_2025_paper (2025 (year only))
When Pixel Difference Patterns Meet ViT: PiDiViT for Few-Shot Object Detection

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

Few-shot object detection aims at detecting novel categories given only a few example images. It is a basic skill for a robot to perform tasks in open environments. Recent methods focus on finetuning strategies, with complicated procedures that prohibit a wider application. In this paper, we introduce DE-ViT, a few-shot object detector without the need for finetuning. DE-ViT's novel architecture is based on a new region-propagation mechanism for localization. The propagated region masks are transformed into bounding boxes through a learnable spatial integral layer. Instead of training prototype classifiers, we propose to use prototypes to project ViT features into a subspace that is robust to overfitting on base classes. We evaluate DE-ViT on few-shot, and one-shot object detection benchmarks with Pascal VOC, COCO, and LVIS. DE-ViT establishes new state-of-the-art results on all benchmarks. Notably, for COCO, DE-ViT surpasses the few-shot SoTA by 15 mAP on 10-shot and 7.2 mAP on 30-shot and one-shot SoTA by 2.8 AP50. For LVIS, DE-ViT outperforms few-shot SoTA by 17 box APr. Further, we evaluate DE-ViT with a real robot by building a pick-and-place system for sorting novel objects based on example images. The videos of our robot demonstrations, the source code and the models of DE-ViT can be found at https://mlzxy.github.io/devit.

For agents

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

get_harvested_code_for_paper("2309.12969")
get_code_for_paper("2309.12969")
have("2309.12969")

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

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

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

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

Connect an agent — have() is free.