SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2008.01059 · 2020

Improving One-stage Visual Grounding by Recursive Sub-query Construction

arXiv · PDF · Open in the Atlas

Code that ran

20 of 22 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; 1 honoured the contract we drafted, 0 violated it and 16 have no contract verdict; 3 failures of our instrument; 2 no recorded run), measured 2026-11-21; 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/2008.01059.json · badge: /api/ran/2008.01059.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
zyang-ur/ReSC canonical (classifier label)
classifier basis: census
20 ran · 2 no recorded run
FunctionStatusWhere it lives
bbox_iou_numpy Ran
ran on a synthesized input
zyang-ur/ReSC/utils/utils.py
code served (permissive licence) · get_code("ec48fe4bebce9e11")
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 (3, 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 sample bounding boxes in format (x_min, y_min, x_max, y_max)
# box1: 3 bboxes
box1 = np.array([
    [10, 20, 50, 80],
    [15, 25, 60, 90],
    [5, 10, 40, 70]
], dtype=np.float32)

# box2: 2 bboxes
box2 = np.array([
    [20, 30, 70, 100],
    [8, 15, 45, 75]
], dtype=np.float32)

ARGS = {
    "box1": box1,
    "box2": box2
}
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 (3, 2) — shape (3, 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
body_region_confusion_matrix Ran
ran on a synthesized input
zyang-ur/ReSC/utils/parsing_metrics.py
code served (permissive licence) · get_code("419a432ce9a6b3ad")
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 float, shape (3, 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 torch
import numpy as np

torch.manual_seed(0)

# Analyze the function signature and body:
# - label_trues: torch tensor, .data.cpu().numpy() called on it
#   Used as: label_trues.shape[0], label_trues.shape[1]
#   Indexed as: label_trues[bb, body_i, :, :]
#   So shape should be (batch, body_parts, height, width)
# - label_preds: torch tensor, .data.cpu().numpy() called on it
#   Used as: label_preds[bb, body_i, :, :, :]
#   np.argmax called with axis=0, so shape (batch, body_parts, n_class, height, width)
# - n_class: int, used in label_confusion_matrix
# - boxes: torch tensor, indexed as boxes[bb, body_i, :]
#   Compared with torch.Tensor([0.0, 0.0, 1.0, 1.0])
#   So shape (batch, body_parts, 4)
# - counter: int, used with += 1

batch_size = 2
n_body_parts = 3
n_class = 5
height = 4
width = 4

# Create label_trues: (batch, body_parts, height, width)
label_trues = torch.randint(0, n_class, (batch_size, n_body_parts, height, width)).float()

# Create label_preds: (batch, body_parts, n_class, height, width)
label_preds = torch.randn(batch_size, n_body_parts, n_class, height, width)

# Create boxes: (batch, body_parts, 4)
boxes = torch.zeros(batch_size, n_body_parts, 4)
# Set some boxes to the default [0.0, 0.0, 1.0, 1.0] to test that branch
boxes[0, 0, :] = torch.Tensor([0.0, 0.0, 1.0, 1.0])
# Set other boxes to non-default values
boxes[0, 1, :] = torch.Tensor([0.1, 0.2, 0.8, 0.9])
boxes[1, 0, :] = torch.Tensor([0.05, 0.15, 0.75, 0.85])
boxes[1, 1, :] = torch.Tensor([0.2, 0.3, 0.7, 0.8])
boxes[1, 2, :] = torch.Tensor([0.0, 0.0, 1.0, 1.0])

counter = 0

ARGS = {
    "label_trues": label_trues,
    "label_preds": label_preds,
    "n_class": n_class,
    "boxes": boxes,
    "counter": counter,
}
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 ndarray, ndim 3, dtype family float, shape (3, 5, 5) — shape (3, 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
convert_examples_to_features Ran
ran; our contract draft was wrong, not the code
zyang-ur/ReSC/dataset/data_loader.py
pointer only (licence: MIT); the stored copy get_code serves, from Marloweeee/BARE, is pointer only (licence: NONE) · get_code("694e413f977737ba")
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 Marloweeee/BARE, 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.

gelu Ran
ran; our contract draft was wrong, not the code
zyang-ur/ReSC/model/modulation.py
code served (permissive licence) · get_code("8d23fbe2b99b840b")
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
import math

torch.manual_seed(0)

# Create a small tensor for testing
x = torch.randn(2, 4)

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
generate_coord Ran
ran on a synthesized input
zyang-ur/ReSC/model/grounding_model.py
code served (permissive licence) · get_code("0336cb59d505cda3")
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 4, dtype family float, shape (2, 8, 4, 3) as a later run recorded it. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, 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)

ARGS = {
    "batch": 2,
    "height": 4,
    "width": 3,
}
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 4, dtype family float, shape (2, 8, 4, 3) — shape (2, 8, 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
label_accuracy_score Ran
ran on a synthesized input
zyang-ur/ReSC/utils/parsing_metrics.py
code served (permissive licence) · get_code("47314d0f58b9e44b")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple, ndim 1, dtype family float; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Analyze the function signature and usage:
# - label_trues: list of arrays, each flattened and filtered by bg_thre condition
# - label_preds: list of arrays, parallel to label_trues
# - n_class: integer, number of classes
# - bg_thre: integer, threshold value (default 200)

# Create small sample data for semantic segmentation
# Each array represents a segmentation mask

n_class = 5
batch_size = 2

# Create label_trues: list of 2D arrays with class indices < n_class and some < bg_thre
label_true_1 = np.array([
    [0, 1, 2, 3],
    [1, 2, 3, 4],
    [0, 1, 150, 100]
])

label_true_2 = np.array([
    [2, 3, 4, 0],
    [1, 1, 2, 3],
    [4, 0, 50, 199]
])

label_trues = [label_true_1, label_true_2]

# Create label_preds: list of 2D arrays with predicted class indices
label_pred_1 = np.array([
    [0, 1, 2, 3],
    [1, 2, 3, 4],
    [0, 1, 2, 0]
])

label_pred_2 = np.array([
    [2, 3, 4, 0],
    [1, 1, 2, 3],
    [4, 0, 2, 1]
])

label_preds = [label_pred_1, label_pred_2]

ARGS = {
    'label_trues': label_trues,
    'label_preds': label_preds,
    'n_class': n_class,
    'bg_thre': 200
}
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, 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
label_confusion_matrix Ran
ran on a synthesized input
zyang-ur/ReSC/utils/parsing_metrics.py
code served (permissive licence) · get_code("c7ccdc37dfee61f7")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned tuple. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Analyze the function:
# - label_trues: iterable of arrays with shape (height, width), values < bg_thre (200)
# - label_preds: iterable of arrays with shape (height, width), class indices
# - n_class: number of classes (int)
# - bg_thre: threshold value (int, default 200)

# Create small test data
np.random.seed(0)

# Generate 2 label_true samples: shape (8, 6) each with values < 200
label_trues = [
    np.random.randint(0, 4, size=(8, 6)),  # values in range [0, 4)
    np.random.randint(0, 4, size=(8, 6))   # values in range [0, 4)
]

# Generate 2 label_pred samples: shape (8, 6) each with class indices
label_preds = [
    np.random.randint(0, 4, size=(8, 6)),  # values in range [0, 4)
    np.random.randint(0, 4, size=(8, 6))   # values in range [0, 4)
]

# Number of classes
n_class = 4

# Background threshold
bg_thre = 200

ARGS = {
    "label_trues": label_trues,
    "label_preds": label_preds,
    "n_class": n_class,
    "bg_thre": bg_thre
}
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
letterbox Ran
ran on a synthesized input
zyang-ur/ReSC/utils/transforms.py
code served (permissive licence) · get_code("7d95e42ef6cbd96a")
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 cv2
import numpy as np

# Create a small test image (height=100, width=80, channels=3)
img = np.random.randint(0, 255, size=(100, 80, 3), dtype=np.uint8)

# Create a small test mask (height=100, width=80, single channel)
mask = np.random.randint(0, 255, size=(100, 80), dtype=np.uint8)

# Define height parameter
height = 128

# Define color parameter (default ImageNet mean)
color = (123.7, 116.3, 103.5)

ARGS = {
    "img": img,
    "mask": mask,
    "height": height,
    "color": color
}
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 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
load_pretrain Ran
ran on a synthesized input
zyang-ur/ReSC/utils/checkpoint.py
code served (permissive licence) · get_code("8dc1056f0f6f5443")
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 MinimalModel. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn as nn
import logging
import tempfile
import os

torch.manual_seed(0)

# Create a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create model instance
model = MinimalModel()

# Create a temporary pretrain checkpoint file
temp_dir = tempfile.gettempdir()
pretrain_path = os.path.join(temp_dir, 'pretrain_checkpoint.pt')

# Save a checkpoint with matching state_dict keys
checkpoint = {
    'state_dict': model.state_dict().copy()
}
torch.save(checkpoint, pretrain_path)

# Create args object with pretrain attribute
class Args:
    def __init__(self, pretrain_path):
        self.pretrain = pretrain_path

args = Args(pretrain_path)

# Create a logger
logger = logging.getLogger('test_logger')
logger.setLevel(logging.INFO)
handler = logging.StreamHandler()
logger.addHandler(handler)

ARGS = {
    'model': model,
    'args': args,
    'logging': logger
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
load_resume Ran
ran on a synthesized input
zyang-ur/ReSC/utils/checkpoint.py
code served (permissive licence) · get_code("44ac945d7427e3cc")
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 MinimalModel. The image it ran in was not recorded. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import os
import torch
import torch.nn as nn
import logging
import tempfile

torch.manual_seed(0)

# Create a minimal model
class MinimalModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.linear = nn.Linear(4, 3)
    
    def forward(self, x):
        return self.linear(x)

# Create a minimal args object
class Args:
    def __init__(self, resume_path):
        self.resume = resume_path
        self.start_epoch = 0

# Create a temporary checkpoint file
model = MinimalModel()
state_dict = model.state_dict()

# Create temporary directory and checkpoint file
temp_dir = tempfile.gettempdir()
checkpoint_path = os.path.join(temp_dir, 'test_checkpoint.pth')

checkpoint = {
    'epoch': 5,
    'best_loss': 0.42,
    'state_dict': state_dict
}

torch.save(checkpoint, checkpoint_path)

# Set up logging
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)

# Create args
args = Args(checkpoint_path)

# Create model instance for loading
model_for_loading = MinimalModel()

ARGS = {
    'model': model_for_loading,
    'args': args,
    'logging': logger
}
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 MinimalModel — a MinimalModel output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a MinimalModel 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
lr_cos Ran
ran on a synthesized input
zyang-ur/ReSC/model/loss.py
code served (permissive licence) · get_code("1d7c6e0cc5b3dcf9")
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

def lr_cos(base_lr, iter, max_iter, warm_up=0.05):
    warm_up_epoch = int(max_iter * warm_up)
    if iter <= warm_up_epoch:
        lr = base_lr * (0.8 * iter / warm_up_epoch + 0.2)
    else:
        lr = 0.5 * base_lr * (1 + math.cos(math.pi * (iter - warm_up_epoch) / (max_iter - warm_up_epoch)))
    return lr

ARGS = {
    "base_lr": 0.1,
    "iter": 50,
    "max_iter": 1000,
    "warm_up": 0.05
}
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
lr_poly Ran
ran, honoured the contract we drafted
zyang-ur/ReSC/model/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from lym29/DASeg, is pointer only (licence: NONE) · get_code("b3b7c1c716f4ca66")
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 lym29/DASeg, 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.

mask_softmax Ran
ran on a synthesized input
zyang-ur/ReSC/model/modulation.py
code served (permissive licence) · get_code("ff4a9912ba457edd")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import torch.nn.functional as F

torch.manual_seed(0)

# attn_score: tensor of shape (batch_size, seq_len) or (batch_size, seq_len, 1, 1)
# The function squeezes it to 2D if needed
attn_score = torch.randn(2, 4)

# word_mask: binary mask tensor of shape (batch_size, max_seq_len)
# Must be at least as long as attn_score.shape[1]
# The function uses word_mask[:, :attn_score.shape[1]]
# It needs to support .sum() on rows to find padding positions
word_mask = torch.tensor([
    [1, 1, 1, 1],
    [1, 1, 1, 0]
], dtype=torch.long)

# tempuature (temperature): float parameter for scaling
tempuature = 10.0

# clssep: boolean flag to control masking behavior
clssep = False

# lstm: boolean flag to control which positions get masked
lstm = False

ARGS = {
    "attn_score": attn_score,
    "word_mask": word_mask,
    "tempuature": tempuature,
    "clssep": clssep,
    "lstm": lstm
}
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
parse_model_config Ran
ran on a synthesized input
zyang-ur/ReSC/model/darknet.py
code served (permissive licence) · get_code("7541c25367bf48c2")
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 tempfile
import os

# Create a temporary config file for YOLO-v3
config_content = """# Test YOLO config file
[net]
batch=64
subdivisions=16
width=416
height=416
channels=3

[convolutional]
batch_normalize=1
filters=32
size=3
stride=1
pad=1
activation=leaky

# Another convolutional layer
[convolutional]
batch_normalize=1
filters=64
size=3
stride=2
pad=1
activation=leaky

[yoloconvolutional]
filters=128
size=1
stride=1
pad=0
activation=leaky

[yolo]
mask=0,1,2
anchors=10,13,16,30,33,23
classes=80
num=9
jitter=.3
"""

# Write config to a temporary file
temp_dir = tempfile.gettempdir()
config_path = os.path.join(temp_dir, "test_yolo_config.cfg")
with open(config_path, 'w') as f:
    f.write(config_content)

ARGS = {
    'path': config_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
random_affine Ran
ran on a synthesized input
zyang-ur/ReSC/utils/transforms.py
code served (permissive licence) · get_code("408bfee1417b817e")
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 cv2
import numpy as np
import random
import math

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

# Create a small test image (height=100, width=100, 3 channels)
img = np.random.randint(0, 255, (100, 100, 3), dtype=np.uint8)

# Create a small test mask (same size as image)
mask = np.random.randint(0, 2, (100, 100), dtype=np.uint8) * 255

# Create a bounding box target as a 1D array [x1, y1, x2, y2]
targets = np.array([10.0, 10.0, 50.0, 60.0], dtype=np.float32)

# Alternative: create a list of bounding boxes for testing the list case
targets_list = [
    np.array([10.0, 10.0, 50.0, 60.0], dtype=np.float32),
    np.array([20.0, 20.0, 70.0, 80.0], dtype=np.float32)
]

# Create all_bbox array (multiple bounding boxes)
all_bbox = np.array([
    [15.0, 15.0, 55.0, 65.0],
    [25.0, 25.0, 75.0, 85.0]
], dtype=np.float32)

ARGS = {
    'img': img,
    'mask': mask,
    'targets': targets,
    'degrees': (-10, 10),
    'translate': (0.1, 0.1),
    'scale': (0.9, 1.1),
    'shear': (-2, 2),
    'borderValue': (123.7, 116.3, 103.5),
    'all_bbox': None
}
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 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
read_examples Ran
ran; our contract draft was wrong, not the code
zyang-ur/ReSC/dataset/data_loader.py
pointer only (licence: MIT); the stored copy get_code serves, from Marloweeee/BARE, is pointer only (licence: NONE) · get_code("e4f50d4eeb6144e9")
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 Marloweeee/BARE, 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.

wrap_points Ran
ran on a synthesized input
zyang-ur/ReSC/utils/transforms.py
code served (permissive licence) · get_code("cb5d2317201b6913")
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 1, dtype family float, shape (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
import math

# Create valid arguments for wrap_points function

# targets: array of 4 bounding box coordinates [x1, y1, x2, y2]
targets = np.array([10.0, 20.0, 100.0, 150.0])

# M: 3x3 transformation matrix (for affine transformation)
# The function uses M.T to transform points, so it needs to be a proper matrix
M = np.array([
    [1.0, 0.0, 0.0],
    [0.0, 1.0, 0.0],
    [5.0, 10.0, 1.0]
], dtype=np.float32)

# height: scalar value representing image height (used for clipping)
height = 200

# a: angle in degrees (used for rotation and area reduction calculation)
a = 30

ARGS = {
    'targets': targets,
    'M': M,
    'height': height,
    'a': a
}
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 1, dtype family float, shape (4,) — shape (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
xywh2xyxy Ran
ran on a synthesized input
zyang-ur/ReSC/utils/utils.py
code served (permissive licence) · get_code("39509f649c31ad13")
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 numpy as np
import torch

torch.manual_seed(0)

# The function xywh2xyxy expects an input x that:
# - Can be a torch tensor (float32) or numpy array
# - Has shape (batch_size, 4) where each row is [x_center, y_center, width, height]
# - Supports indexing with [:, i] notation

# Create a small torch tensor example (float32)
x_torch = torch.tensor([
    [10.0, 20.0, 4.0, 6.0],
    [30.0, 40.0, 8.0, 10.0]
], dtype=torch.float32)

ARGS = {
    "x": x_torch
}
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 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
xyxy2xywh Ran
ran on a synthesized input
zyang-ur/ReSC/utils/utils.py
code served (permissive licence) · get_code("a43bd5ac31eb7191")
How it ran

Ran in Syntology's sandbox on this synthesized input (drafted by a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API) and returned Tensor, ndim 2, dtype family float, shape (2, 4) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np

torch.manual_seed(0)

# The function xyxy2xywh takes a single parameter 'x'
# It expects x to be either a torch tensor or numpy array with shape (batch_size, 4)
# where each row contains [x1, y1, x2, y2] coordinates

# Create a torch tensor input (xyxy format: x1, y1, x2, y2)
x_torch = torch.tensor([
    [10.0, 20.0, 50.0, 80.0],
    [5.0, 15.0, 45.0, 75.0]
], dtype=torch.float32)

ARGS = {
    'x': x_torch
}
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 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
yolo_loss Ran
ran on a synthesized input
zyang-ur/ReSC/model/loss.py
code served (permissive licence) · get_code("659cdef76298b02f")
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. The code mentions cuda, and the harness aliases cuda to the CPU for every sample; whether this run needed that is not recorded. If your copy returns the same type, 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.functional as F
from torch.autograd import Variable

torch.manual_seed(0)

# Analyze function requirements:
# - input: 5D tensor accessed as input[ii, best_n_list[ii], :, gj[ii], gi[ii]]
#   Structure: (batch, num_anchors, channels, height, width)
# - target: same structure as input
# - gi, gj: lists/arrays of indices with length = batch
# - best_n_list: list of anchor indices with length = batch
# - w_coord, w_neg, size_average: scalar parameters

batch_size = 2
num_anchors = 3
channels = 5
height = 4
width = 4

# Create input tensor (batch, num_anchors, channels, height, width)
input_tensor = torch.randn(batch_size, num_anchors, channels, height, width)

# Create target tensor with same shape
target_tensor = torch.randn(batch_size, num_anchors, channels, height, width)

# Create gi (width indices) - should be valid indices in range [0, width)
gi = [2, 3]

# Create gj (height indices) - should be valid indices in range [0, height)
gj = [1, 2]

# Create best_n_list (anchor indices) - should be valid indices in range [0, num_anchors)
best_n_list = [0, 1]

# Scalar parameters
w_coord = 5.0
w_neg = 1.0 / 5
size_average = True

ARGS = {
    'input': input_tensor,
    'target': target_tensor,
    'gi': gi,
    'gj': gj,
    'best_n_list': best_n_list,
    'w_coord': w_coord,
    'w_neg': w_neg,
    'size_average': size_average
}
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
build_object_targets Not yet run
unverified (harvested, no recorded run)
zyang-ur/ReSC/model/darknet.py
code served (permissive licence) · get_code("94ef5f8ebf328450")
How it ran

no invocation recorded.

create_modules Not yet run
unverified (harvested, no recorded run)
zyang-ur/ReSC/model/darknet.py
code served (permissive licence) · get_code("a57e101603c7a691")
How it ran

no invocation recorded.

Also present in other papers' code

Of 22 samples lifted from this paper's linked repositories, 22 carry a function identity and 0 do not. Of the 22 distinct functions with an identity, 19 are also present in other papers whose code we hold (17 with at least one paper dated earlier, 0 the same month, 10 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
gelu 51 other papers
19 dated earlier, 32 later · 8 only as an assembly brick
1706.03762 (2017-06)
Attention Is All You Need
1810.04805 (2018-10)
BERT: Pre-training of Deep Bidirectional Transformers for Language Understanding
1901.02860 (2019-01)
Transformer-XL: Attentive Language Models Beyond a Fixed-Length Context
and 48 more not named here
lr_poly 21 other papers
16 dated earlier, 5 later
1612.02646 (2016-12)
Learning Video Object Segmentation from Static Images
1702.01105 (2017-02)
Joint 2D-3D-Semantic Data for Indoor Scene Understanding
1703.01780 (2017-03)
Mean teachers are better role models: Weight-averaged consistency targets improve semi-supervised deep learning results
and 18 more not named here
read_examples 7 other papers
1 dated earlier, 6 later
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
2106.03089 (2021-06)
Referring Transformer: A One-step Approach to Multi-task Visual Grounding
and 4 more not named here
convert_examples_to_features 6 other papers
1 dated earlier, 5 later
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
2106.03089 (2021-06)
Referring Transformer: A One-step Approach to Multi-task Visual Grounding
and 3 more not named here
bbox_iou_numpy 2 other papers
1 dated earlier, 1 later
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
generate_coord 2 other papers
1 dated earlier, 1 later
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
random_affine 2 other papers
1 dated earlier, 1 later
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
wrap_points 2 other papers
1 dated earlier, 1 later
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
xyxy2xywh 2 other papers
2 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
2004.01888 (2020-04)
FairMOT: On the Fairness of Detection and Re-Identification in Multiple Object Tracking
body_region_confusion_matrix 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
build_object_targets 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
create_modules 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
label_accuracy_score 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
label_confusion_matrix 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
letterbox 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
load_pretrain 1 other paper
1 later
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
load_resume 1 other paper
1 later
2104.08541 (2021-04)
TransVG: End-to-End Visual Grounding with Transformers
parse_model_config 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding
xywh2xyxy 1 other paper
1 dated earlier
1908.06354 (2019-08)
A Fast and Accurate One-Stage Approach to Visual Grounding

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

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 improve one-stage visual grounding by addressing current limitations on grounding long and complex queries. Existing one-stage methods encode the entire language query as a single sentence embedding vector, e.g., taking the embedding from BERT or the hidden state from LSTM. This single vector representation is prone to overlooking the detailed descriptions in the query. To address this query modeling deficiency, we propose a recursive sub-query construction framework, which reasons between image and query for multiple rounds and reduces the referring ambiguity step by step. We show our new one-stage method obtains 5.0%, 4.5%, 7.5%, 12.8% absolute improvements over the state-of-the-art one-stage baseline on ReferItGame, RefCOCO, RefCOCO+, and RefCOCOg, respectively. In particular, superior performances on longer and more complex queries validates the effectiveness of our query modeling.

For agents

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

get_harvested_code_for_paper("2008.01059")
get_code_for_paper("2008.01059")
have("2008.01059")

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

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

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

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

Connect an agent — have() is free.