SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2006.04388 · 2020

Generalized Focal Loss: Learning Qualified and Distributed Bounding Boxes for Dense Object Detection

arXiv · PDF · Open in the Atlas

Code that ran

22 of 24 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 2 honoured the contract we drafted, 0 violated it and 12 have no contract verdict; 8 failures of our instrument; 2 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/2006.04388.json · badge: /api/ran/2006.04388.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
mszpc/nanodet community (classifier label)
classifier basis not recorded on the link
10 ran · 1 no recorded run
gau-nernst/CenterNet community (classifier label)
classifier basis not recorded on the link
7 ran · 0 no recorded run
Yuxiang1995/ICDAR2021_MFD community (classifier label)
classifier basis not recorded on the link
5 ran · 1 no recorded run
FunctionStatusWhere it lives
IoU Ran
ran on a synthesized input
Yuxiang1995/ICDAR2021_MFD/evaluate.py
code served (permissive licence) · get_code("b91d549254b2a59b")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Bounding boxes are represented as [xLeft, yTop, xRight, yBottom]
# boxA and boxB should be sequences (list, tuple, or tensor) of 4 numeric values

boxA = [10, 20, 50, 60]
boxB = [30, 40, 70, 80]

ARGS = {
    "boxA": boxA,
    "boxB": boxB,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type float, ndim 0, dtype family float, shape () — shape () as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
apply_nms Ran
ran on a synthesized input
mszpc/nanodet/nanodet/evaluator.py
code served (permissive licence) · get_code("9009230480b50bc0")
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 int; no output shape is stated. The image it ran in was not recorded. If your copy returns the same type and ndim on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np

# Create sample bounding boxes in format [y1, x1, y2, x2]
all_boxes = np.array([
    [10.0, 20.0, 50.0, 80.0],
    [15.0, 25.0, 55.0, 85.0],
    [100.0, 120.0, 150.0, 180.0],
    [105.0, 125.0, 155.0, 185.0],
], dtype=np.float32)

# Create corresponding confidence scores
all_scores = np.array([0.9, 0.8, 0.7, 0.6], dtype=np.float32)

# NMS threshold - boxes with IoU above this are suppressed
thres = 0.3

# Maximum number of boxes to keep
max_boxes = 3

ARGS = {
    "all_boxes": all_boxes,
    "all_scores": all_scores,
    "thres": thres,
    "max_boxes": max_boxes,
}
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 list, ndim 1, dtype family int — 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
coco_detection_collate_fn Ran
ran on a synthesized input
gau-nernst/CenterNet/centernet_lightning/datasets/coco.py
code served (permissive licence) · get_code("1c502073f07e4cee")
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)

# Construct a batch of COCO detection data
# Each item should be (image_tensor, target_dict)
# The function stacks images and collects targets into a tuple

batch = [
    (
        torch.randn(3, 4, 5),  # image: 3 channels, 4x5 spatial dims
        {
            "boxes": torch.tensor([[10.0, 20.0, 30.0, 40.0]]),
            "labels": torch.tensor([1]),
        }
    ),
    (
        torch.randn(3, 4, 5),  # same shape as first image
        {
            "boxes": torch.tensor([[5.0, 15.0, 25.0, 35.0], [50.0, 60.0, 70.0, 80.0]]),
            "labels": torch.tensor([2, 3]),
        }
    ),
]

ARGS = {
    "batch": batch,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
gather_and_merge Ran
ran on a synthesized input
gau-nernst/CenterNet/centernet_lightning/eval/coco.py
code served (permissive licence) · get_code("e96a127893eaee62")
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 torch
import torch.distributed as dist

torch.manual_seed(0)

# The function expects:
# - data: list
# The function calls:
# - dist.get_world_size() (returns world_size)
# - dist.is_initialized() (returns bool)
# - dist.all_gather_object(data_list, data) (gathers data across processes)
# - iterates over data_list and unpacks each element

# Since we're not in a distributed setting, dist.is_initialized() will return False
# and world_size will be 1, so the function will just return the input data as-is.
# The data parameter should be a list of items that can be iterated over.

# Create a simple list of data items
data_input = [
    {'id': 0, 'value': 1.5},
    {'id': 1, 'value': 2.5},
    {'id': 2, 'value': 3.5}
]

ARGS = {
    'data': data_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, 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
get_default_detection_transforms Ran
ran on a synthesized input
gau-nernst/CenterNet/centernet_lightning/datasets/utils.py
code served (permissive licence) · get_code("848d74abab4b027b")
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 Compose. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
import albumentations as A
from albumentations.pytorch import ToTensorV2

torch.manual_seed(0)

ARGS = {
    'box_format': 'yolo'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
albumentations, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_default_tracking_transforms Ran
ran on a synthesized input
gau-nernst/CenterNet/centernet_lightning/datasets/utils.py
code served (permissive licence) · get_code("f93dd0c8fe12d34e")
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 Compose. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
import albumentations as A
from albumentations.pytorch import ToTensorV2

torch.manual_seed(0)

ARGS = {
    'box_format': 'yolo'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
albumentations, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_default_transforms Ran
ran on a synthesized input
gau-nernst/CenterNet/centernet_lightning/datasets/utils.py
code served (permissive licence) · get_code("897e22a6f6e6b5f3")
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 Compose. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import albumentations as A
from albumentations.pytorch import ToTensorV2

torch.manual_seed(0)

IMAGENET_MEAN = [0.485, 0.456, 0.406]
IMAGENET_STD = [0.229, 0.224, 0.225]

def get_default_transforms(resize_height=512, resize_width=512, box_format='yolo', label_fields=['labels']):
    transforms = [A.Normalize(mean=IMAGENET_MEAN, std=IMAGENET_STD), A.Resize(resize_height, resize_width), ToTensorV2()]
    bbox_params = A.BboxParams(format=box_format, label_fields=label_fields, min_area=1)
    transforms = A.Compose(transforms, bbox_params=bbox_params)
    return transforms

ARGS = {
    'resize_height': 256,
    'resize_width': 384,
    'box_format': 'yolo',
    'label_fields': ['labels', 'class_ids']
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
albumentations, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
get_final_epoch Ran
ran, honoured the contract we drafted
Yuxiang1995/ICDAR2021_MFD/.dev_scripts/gather_models.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from mickeykang16/Ev-Stereo3D, is pointer only (licence: NONE) · get_code("e86ae414e2afc197")
How it ran

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

get_final_results Ran
ran; our contract draft was wrong, not the code
Yuxiang1995/ICDAR2021_MFD/.dev_scripts/gather_models.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from mickeykang16/Ev-Stereo3D, is pointer only (licence: NONE) · get_code("fee6fb3d147348e3")
How it ran

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

get_imageId_from_fileName Ran
ran on a synthesized input
mszpc/nanodet/nanodet/src/dataset.py
code served (permissive licence) · get_code("923d5e079649e00c")
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 int, ndim 0, dtype family int, 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 os

def get_imageId_from_fileName(filename):
    """Get imageID from fileName"""
    filename = os.path.splitext(filename)[0]
    if filename.isdigit():
        return int(filename)
    return id_iter

# Setup code
id_iter = 42

ARGS = {
    "filename": "12345.jpg"
}
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 int, ndim 0, dtype family int, 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
intersect Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mszpc/nanodet/nanodet/src/box_utils.py
code served (permissive licence) · get_code("320960c2db6c2963")
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 (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

# Construct box_a: shape (2, 4) - 2 boxes with 4 coordinates each (y_min, x_min, y_max, x_max)
box_a = np.array([
    [1.0, 2.0, 5.0, 6.0],
    [2.0, 3.0, 7.0, 8.0]
], dtype=np.float32)

# Construct box_b: shape (4,) - single box with 4 coordinates (y_min, x_min, y_max, x_max)
box_b = np.array([2.0, 3.0, 6.0, 7.0], dtype=np.float32)

ARGS = {
    "box_a": box_a,
    "box_b": box_b
}
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 (2,) — shape (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
jaccard_numpy Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
mszpc/nanodet/nanodet/src/box_utils.py
code served (permissive licence) · get_code("3fe3b77a594bbd68")
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 (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

# Analyze the function signature and usage:
# jaccard_numpy(box_a, box_b)
# - box_a: used with indexing [:, 2:4], [:, :2], [:, 2], [:, 0], [:, 3], [:, 1]
#   This suggests box_a is a 2D array with shape (N, 4) where N is number of boxes
# - box_b: used with indexing [2:4], [:2], [2], [0], [3], [1]
#   This suggests box_b is a 1D array with shape (4,) representing a single box

# Create box_a: multiple boxes in format [y_min, x_min, y_max, x_max]
box_a = np.array([
    [10.0, 20.0, 50.0, 80.0],  # box 1
    [15.0, 25.0, 60.0, 90.0]   # box 2
], dtype=np.float32)

# Create box_b: single box in format [y_min, x_min, y_max, x_max]
box_b = np.array([12.0, 22.0, 55.0, 85.0], dtype=np.float32)

ARGS = {
    "box_a": box_a,
    "box_b": box_b
}
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 (2,) — shape (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
linear_warmup_lr Ran
ran, honoured the contract we drafted
mszpc/nanodet/nanodet/src/lr_schedule.py
code served (permissive licence) · get_code("56d39004d57cb3a2")
How it ran

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

import torch
import numpy as np

# Analyze the function:
# - current_step: int, used in arithmetic
# - warmup_steps: int/float, used in division
# - base_lr: float, used in arithmetic
# - init_lr: float, used in arithmetic

ARGS = {
    "current_step": 500,
    "warmup_steps": 1000,
    "base_lr": 0.1,
    "init_lr": 0.0
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type 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
load_predicted Ran
ran on a synthesized input
Yuxiang1995/ICDAR2021_MFD/evaluate.py
code served (permissive licence) · get_code("2b8f4c5e5fe0ce7e")
How it ran

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

import numpy as np
import pandas as pd
import tempfile
import os

# Create a temporary CSV file with sample bounding box data
temp_dir = tempfile.mkdtemp()
csv_path = os.path.join(temp_dir, "test_bboxes.csv")

# Create sample data: page_name, x1, y1, x2, y2, confidence, class_id
data = [
    ["page_0", 10, 20, 100, 150, 0.9, 0],
    ["page_0", 50, 60, 120, 180, 0.85, 1],
    ["page_1", 30, 40, 110, 170, 0.95, 0],
    ["page_1", 5, 10, 50, 80, 0.1, 1],  # Below threshold (0.05)
    ["page_0", 15, 25, 105, 155, 0.92, 0],
]

df = pd.DataFrame(data)
df.to_csv(csv_path, header=False, index=False)

ARGS = {
    "path": csv_path
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, pandas, tqdm — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
merge Ran
ran; our contract draft was wrong, not the code
mszpc/nanodet/nanodet/src/model_utils/config.py
code served (permissive licence) · get_code("b2108b927c53418b")
How it ran

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

import torch
import argparse

torch.manual_seed(0)

class SimpleArgs:
    def __init__(self):
        self.learning_rate = 0.001
        self.batch_size = 32
        self.epochs = 10
        self.model_name = "resnet50"
        self.seed = 42
        self.debug = True

args = SimpleArgs()

cfg = {
    "task": "classification",
    "dataset": "cifar10",
    "num_classes": 10,
    "hidden_dim": 128
}

ARGS = {
    "args": args,
    "cfg": cfg
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
multi_step_lr Ran
ran on a synthesized input
mszpc/nanodet/nanodet/src/lr_schedule.py
code served (permissive licence) · get_code("574e3947b96f2084")
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 (50,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from collections import Counter

def linear_warmup_lr(current_step, warmup_steps, base_lr, init_lr):
    """Linear learning rate."""
    lr_inc = (float(base_lr) - float(init_lr)) / float(warmup_steps)
    lr = float(init_lr) + lr_inc * current_step
    return lr

def warmup_step_lr(lr, lr_epochs, steps_per_epoch, warmup_epochs, max_epoch, gamma=0.1):
    """Warmup step learning rate."""
    base_lr = lr
    warmup_init_lr = 0
    total_steps = int(max_epoch * steps_per_epoch)
    warmup_steps = int(warmup_epochs * steps_per_epoch)
    milestones = lr_epochs
    milestones_steps = []
    for milestone in milestones:
        milestones_step = milestone * steps_per_epoch
        milestones_steps.append(milestones_step)
    lr_each_step = []
    lr = base_lr
    milestones_steps_counter = Counter(milestones_steps)
    for i in range(total_steps):
        if i < warmup_steps:
            lr = linear_warmup_lr(i + 1, warmup_steps, base_lr, warmup_init_lr)
        else:
            lr = lr * gamma ** milestones_steps_counter[i]
        lr_each_step.append(lr)
    return np.array(lr_each_step).astype(np.float32)

def multi_step_lr(lr, milestones, steps_per_epoch, warmup_epochs, max_epoch, gamma=0.1):
    return warmup_step_lr(lr, milestones, steps_per_epoch, warmup_epochs, max_epoch, gamma=gamma)

ARGS = {
    "lr": 0.1,
    "milestones": [2, 4],
    "steps_per_epoch": 10,
    "warmup_epochs": 1,
    "max_epoch": 5,
    "gamma": 0.1,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (50,) — shape (50,) 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_cli_to_yaml Ran
ran; our contract draft was wrong, not the code
mszpc/nanodet/nanodet/src/model_utils/config.py
code served (permissive licence) · get_code("3498f707d22460cd")
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 Namespace. 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 argparse
import ast

# Create minimal test arguments for parse_cli_to_yaml

# Base configuration dict with various types
cfg = {
    'learning_rate': 0.001,
    'batch_size': 32,
    'epochs': 100,
    'use_cuda': False,
    'model_name': 'resnet50',
    'dropout': 0.5,
    'nested_list': [1, 2, 3],  # Should be skipped (list type)
    'nested_dict': {'key': 'value'},  # Should be skipped (dict type)
}

# Helper descriptions for some parameters
helper = {
    'learning_rate': 'Learning rate for optimizer',
    'batch_size': 'Batch size for training',
    'use_cuda': 'Whether to use CUDA',
    'model_name': 'Name of the model to use',
}

# Choices for some parameters
choices = {
    'model_name': ['resnet50', 'resnet101', 'vgg16'],
}

# Parent parser (empty in this case)
parser = argparse.ArgumentParser(add_help=False)

# Path to config file
cfg_path = 'default_config.yaml'

ARGS = {
    'parser': parser,
    'cfg': cfg,
    'helper': helper,
    'choices': choices,
    'cfg_path': cfg_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 Namespace — a Namespace output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Namespace 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
parse_transforms Ran
ran on a synthesized input
gau-nernst/CenterNet/centernet_lightning/datasets/builder.py
code served (permissive licence) · get_code("9c971c77b77a1514")
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 Compose. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import numpy as np
import albumentations as A
from albumentations.pytorch import ToTensorV2

torch.manual_seed(0)

# Create a minimal config for transforms
config = [
    {
        'name': 'HorizontalFlip',
        'params': {'p': 0.5}
    },
    {
        'name': 'VerticalFlip',
        'params': {'p': 0.5}
    }
]

ARGS = {
    'config': config,
    'format': 'yolo',
    'task': 'detection'
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
albumentations, numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Compose — a Compose output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a Compose output the recorded ndim 1 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
parse_yaml Ran
ran; our contract draft was wrong, not the code
mszpc/nanodet/nanodet/src/model_utils/config.py
code served (permissive licence) · get_code("c8d98ae32946f6f0")
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 tempfile
import os
import yaml

# Create a temporary YAML file with valid config structure
temp_dir = tempfile.mkdtemp()
yaml_file = os.path.join(temp_dir, "test_config.yaml")

# Write a valid YAML file with 3 documents (config, helper, choices)
yaml_content = """
model: resnet50
learning_rate: 0.001
batch_size: 32
---
model: "The model architecture to use"
learning_rate: "Learning rate for training"
batch_size: "Batch size for training"
---
model: [resnet50, vgg16, mobilenet]
learning_rate: [0.0001, 0.001, 0.01]
batch_size: [16, 32, 64]
"""

with open(yaml_file, 'w') as f:
    f.write(yaml_content)

ARGS = {
    "yaml_path": yaml_file
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
yaml — 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
process_checkpoint Ran
ran; our contract draft was wrong, not the code
Yuxiang1995/ICDAR2021_MFD/.dev_scripts/gather_models.py
code served (permissive licence) · get_code("e76a491553cf9fcf")
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 str. The image it ran in was not recorded. If your copy returns the same type on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import torch
import tempfile
import os

torch.manual_seed(0)

# Create a temporary directory for checkpoint files
temp_dir = tempfile.mkdtemp()

# Create a minimal checkpoint dict with a model state and optimizer
checkpoint = {
    'model': {
        'layer1.weight': torch.randn(4, 3),
        'layer1.bias': torch.randn(4),
    },
    'optimizer': {
        'state': {},
        'param_groups': [],
    },
    'epoch': 1,
}

# Save the checkpoint to a temporary file
in_file = os.path.join(temp_dir, 'checkpoint.pth')
torch.save(checkpoint, in_file)

# Define output file path
out_file = os.path.join(temp_dir, 'checkpoint_processed.pth')

ARGS = {
    'in_file': in_file,
    'out_file': out_file,
}
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 str — a str output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a str 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
process_voc_xml Ran
ran on a synthesized input
gau-nernst/CenterNet/centernet_lightning/datasets/voc.py
code served (permissive licence) · get_code("75b6eb0293a69f4e")
How it ran

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

import xml.etree.ElementTree as ET
import tempfile
import os

# Create a temporary VOC XML file
xml_content = '''<?xml version="1.0" encoding="UTF-8"?>
<annotation>
    <size>
        <width>640</width>
        <height>480</height>
    </size>
    <object>
        <name>dog</name>
        <bndbox>
            <xmin>10.5</xmin>
            <ymin>20.3</ymin>
            <xmax>100.2</xmax>
            <ymax>150.7</ymax>
        </bndbox>
    </object>
    <object>
        <name>cat</name>
        <bndbox>
            <xmin>150.0</xmin>
            <ymin>50.0</ymin>
            <xmax>300.5</xmax>
            <ymax>200.0</ymax>
        </bndbox>
    </object>
</annotation>
'''

# Write to a temporary file
temp_file = tempfile.NamedTemporaryFile(mode='w', suffix='.xml', delete=False)
temp_file.write(xml_content)
temp_file.close()

ARGS = {
    'ann_file': temp_file.name,
    'original_bboxes': 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 dict — a dict output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a dict output the recorded ndim 0 and dtype family float describe that coercion, not the output, and are not stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
warmup_step_lr Ran
ran; our contract draft was wrong, not the code
mszpc/nanodet/nanodet/src/lr_schedule.py
code served (permissive licence) · get_code("830fa82177642209")
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 (9000,) as a later run recorded it. The image it ran in was not recorded. If your copy returns the same type, ndim and shape on these inputs, it matched what we observed; nothing here checks that. It does NOT mean the output is correct: nothing has compared it to the paper.

import numpy as np
from collections import Counter

# Define ARGS dictionary with all required parameters for warmup_step_lr
ARGS = {
    "lr": 0.1,
    "lr_epochs": [30, 60],
    "steps_per_epoch": 100,
    "warmup_epochs": 5,
    "max_epoch": 90,
    "gamma": 0.1
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 1, dtype family float, shape (9000,) — shape (9000,) 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
load_gt Not yet run
unverified (harvested, no recorded run)
Yuxiang1995/ICDAR2021_MFD/evaluate.py
code served (permissive licence) · get_code("eecbba9b0cb09860")
How it ran

no invocation recorded.

random_sample_crop Not yet run
unverified (harvested, no recorded run)
mszpc/nanodet/nanodet/src/dataset.py
code served (permissive licence) · get_code("de3d6c82feeafe6b")
How it ran

no invocation recorded.

Also present in other papers' code

Of 24 samples lifted from this paper's linked repositories, 24 carry a function identity and 0 do not. Of the 24 distinct functions with an identity, 11 are also present in other papers whose code we hold (11 with at least one paper dated earlier, 0 the same month, 8 later) and 13 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
process_checkpoint 45 other papers
6 dated earlier, 38 later, 1 undated
1904.11490 (2019-04)
RepPoints: Point Set Representation for Object Detection
1906.07155 (2019-06)
MMDetection: Open MMLab Detection Toolbox and Benchmark
1908.05612 (2019-08)
R3Det: Refined Single-Stage Detector with Feature Refinement for Rotating Object
and 42 more not named here
get_final_epoch 35 other papers
5 dated earlier, 29 later, 1 undated
1904.11490 (2019-04)
RepPoints: Point Set Representation for Object Detection
1906.07155 (2019-06)
MMDetection: Open MMLab Detection Toolbox and Benchmark
1908.05612 (2019-08)
R3Det: Refined Single-Stage Detector with Feature Refinement for Rotating Object
and 32 more not named here
merge 28 other papers
21 dated earlier, 7 later
1406.1078 (2014-06)
Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation
1409.3215 (2014-09)
Sequence to Sequence Learning with Neural Networks
1512.00567 (2015-12)
Rethinking the Inception Architecture for Computer Vision
and 25 more not named here
parse_cli_to_yaml 20 other papers
16 dated earlier, 4 later
1406.1078 (2014-06)
Learning Phrase Representations using RNN Encoder-Decoder for Statistical Machine Translation
1409.3215 (2014-09)
Sequence to Sequence Learning with Neural Networks
1512.00567 (2015-12)
Rethinking the Inception Architecture for Computer Vision
and 17 more not named here
get_final_results 8 other papers
5 dated earlier, 3 later
1904.11490 (2019-04)
RepPoints: Point Set Representation for Object Detection
1906.07155 (2019-06)
MMDetection: Open MMLab Detection Toolbox and Benchmark
1908.05612 (2019-08)
R3Det: Refined Single-Stage Detector with Feature Refinement for Rotating Object
and 5 more not named here
linear_warmup_lr 8 other papers
7 dated earlier, 1 later
1611.06612 (2016-11)
RefineNet: Multi-Path Refinement Networks for High-Resolution Semantic Segmentation
1811.12814 (2018-11)
Graph-Based Global Reasoning Networks
1907.03222 (2019-07)
IRNet: A General Purpose Deep Residual Regression Framework for Materials Discovery
and 5 more not named here
jaccard_numpy 6 other papers
5 dated earlier, 1 later
1409.1556 (2014-09)
Very Deep Convolutional Networks for Large-Scale Image Recognition
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
and 3 more not named here
parse_yaml 4 other papers
2 dated earlier, 2 later
1804.06300 (2018-04)
PredRNN++: Towards A Resolution of the Deep-in-Time Dilemma in Spatiotemporal Predictive Learning
1904.01906 (2019-04)
What Is Wrong With Scene Text Recognition Model Comparisons? Dataset and Model Analysis
2103.13413 (2021-03)
Vision Transformers for Dense Prediction
and 1 more not named here
intersect 2 other papers
2 dated earlier
1502.03167 (2015-02)
Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
random_sample_crop 2 other papers
2 dated earlier
1502.03167 (2015-02)
Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift
1512.02325 (2015-12)
SSD: Single Shot MultiBox Detector
warmup_step_lr 1 other paper
1 dated earlier
2004.10934 (2020-04)
YOLOv4: Optimal Speed and Accuracy of 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

One-stage detector basically formulates object detection as dense classification and localization. The classification is usually optimized by Focal Loss and the box location is commonly learned under Dirac delta distribution. A recent trend for one-stage detectors is to introduce an individual prediction branch to estimate the quality of localization, where the predicted quality facilitates the classification to improve detection performance. This paper delves into the representations of the above three fundamental elements: quality estimation, classification and localization. Two problems are discovered in existing practices, including (1) the inconsistent usage of the quality estimation and classification between training and inference and (2) the inflexible Dirac delta distribution for localization when there is ambiguity and uncertainty in complex scenes. To address the problems, we design new representations for these elements. Specifically, we merge the quality estimation into the class prediction vector to form a joint representation of localization quality and classification, and use a vector to represent arbitrary distribution of box locations. The improved representations eliminate the inconsistency risk and accurately depict the flexible distribution in real data, but contain continuous labels, which is beyond the scope of Focal Loss. We then propose Generalized Focal Loss (GFL) that generalizes Focal Loss from its discrete form to the continuous version for successful optimization. On COCO test-dev, GFL achieves 45.0\% AP using ResNet-101 backbone, surpassing state-of-the-art SAPD (43.5\%) and ATSS (43.6\%) with higher or comparable inference speed, under the same backbone and training settings. Notably, our best model can achieve a single-model single-scale AP of 48.2\%, at 10 FPS on a single 2080Ti GPU. Code and models are available at https://github.com/implus/GFocal.

For agents

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

get_harvested_code_for_paper("2006.04388")
get_code_for_paper("2006.04388")
have("2006.04388")

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

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

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

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

Connect an agent — have() is free.