SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 1912.02424 · 2019

Bridging the Gap Between Anchor-based and Anchor-free Detection via Adaptive Training Sample Selection

arXiv · PDF · Open in the Atlas

Code that ran

4 of 4 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 4 have no contract verdict; 0 failures of our instrument; 0 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/1912.02424.json · badge: /api/ran/1912.02424.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
justimyhxu/Dense-RepPoints community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
TangShengqin/ATSS-Pytorch community (classifier label)
classifier basis not recorded on the link
1 ran · 0 no recorded run
FunctionStatusWhere it lives
images_to_levels Ran
ran on a synthesized input
justimyhxu/Dense-RepPoints/mmdet/core/mask/dense_reppoints_target.py
code served (permissive licence) · get_code("abd2ab591583348b")
How it ran

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

import torch

torch.manual_seed(0)

# Create target list - list of tensors, one per image
# Each tensor represents targets for that image
# The function will stack them, so they need compatible shapes
target = [
    torch.randn(7),  # Image 0: 7 targets
    torch.randn(7),  # Image 1: 7 targets
]

# num_level_grids specifies how many targets belong to each level
# Must sum to total number of targets per image (7 in this case)
num_level_grids = [3, 2, 2]

# keep_dim parameter
keep_dim = False

ARGS = {
    "target": target,
    "num_level_grids": num_level_grids,
    "keep_dim": keep_dim,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list — a list output has no array shape of its own; none is stated
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block
mask_to_levels Ran
ran on a synthesized input
justimyhxu/Dense-RepPoints/mmdet/core/mask/dense_reppoints_target.py
code served (permissive licence) · get_code("9109cf95d96cd527")
How it ran

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

import torch
import numpy as np

torch.manual_seed(0)

# Analyze the function:
# - target: indexed with [i][index - 1], so needs to be indexable (list or tensor)
# - mask_index_list: list of items, each has .shape[0] and can be indexed
#   Each element in mask_index_list is compared with > 0 and used as indices

# Create target: batch_size=2, needs to support target[i][index-1]
# Let's make it a list of tensors where each batch item has some values
target = [
    torch.tensor([10.0, 20.0, 30.0, 40.0]),  # batch 0: 4 elements
    torch.tensor([50.0, 60.0, 70.0, 80.0])   # batch 1: 4 elements
]

# Create mask_index_list: list of levels, each level is a tensor
# For batch_size=2, each mask should have shape (2, ...)
# Values should be 1-indexed (since we do index-1), and some can be 0 to filter
mask_index_list = [
    # Level 0: shape (2, 3) - batch 2, up to 3 indices per batch
    torch.tensor([
        [1, 2, 0],      # batch 0: use indices 1,2 (then -1 -> 0,1)
        [2, 3, 4]       # batch 1: use indices 2,3,4 (then -1 -> 1,2,3)
    ]),
    # Level 1: shape (2, 2) - fewer indices at this level
    torch.tensor([
        [1, 0],         # batch 0: use index 1 only (then -1 -> 0)
        [3, 4]          # batch 1: use indices 3,4 (then -1 -> 2,3)
    ])
]

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

import torch
import numpy as np

torch.manual_seed(0)

# Create small tensors for testing
# pts should be shape (n, pts_num) where n is number of detections
pts = torch.tensor([
    [1.0, 2.0, 3.0, 4.0],
    [5.0, 6.0, 7.0, 8.0]
], dtype=torch.float32)

# labels should be shape (n,) with class indices
labels = torch.tensor([0, 1], dtype=torch.long)

# num_classes includes background class
num_classes = 3

ARGS = {
    "pts": pts,
    "labels": labels,
    "num_classes": num_classes
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy, torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type list, ndim 3, 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
reduce_mean Ran
ran on a synthesized input
TangShengqin/ATSS-Pytorch/mmdet/models/anchor_heads/atss_head.py
code served (permissive licence) · get_code("74bdc4124307cc00")
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.distributed as dist

torch.manual_seed(0)

# The function reduce_mean takes a tensor and performs distributed reduction if available
# It uses: tensor.clone(), dist.all_reduce(), dist.div_(), dist.get_world_size(), dist.reduce_op.SUM
# For non-distributed execution (which is our case), it just returns the tensor

# Create a small tensor (batch_size=2, features=4)
tensor = torch.randn(2, 4)

ARGS = {
    "tensor": tensor
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
torch — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type Tensor, ndim 2, dtype family float, shape (2, 4) — shape (2, 4) as a later run recorded it
dtype family
int means an integer dtype; float means any other dtype the instrument saw, bool and complex included (fixture_check.py records only these two families)
Environment
image not recorded; re-verify against syntology-harvest-sandbox:v5-deps; not recorded for this sample: the harness installs a cuda-to-cpu shim (cuda_shim.py) before every sample and no run records whether a sample needed it; seed: none by the harness; any seed is in the setup block

Also present in other papers' code

Of 4 samples lifted from this paper's linked repositories, 4 carry a function identity and 0 do not. Of the 4 distinct functions with an identity, 0 are also present in other papers whose code we hold (0 with at least one paper dated earlier, 0 the same month, 0 later) and 4 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.

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

Object detection has been dominated by anchor-based detectors for several years. Recently, anchor-free detectors have become popular due to the proposal of FPN and Focal Loss. In this paper, we first point out that the essential difference between anchor-based and anchor-free detection is actually how to define positive and negative training samples, which leads to the performance gap between them. If they adopt the same definition of positive and negative samples during training, there is no obvious difference in the final performance, no matter regressing from a box or a point. This shows that how to select positive and negative training samples is important for current object detectors. Then, we propose an Adaptive Training Sample Selection (ATSS) to automatically select positive and negative samples according to statistical characteristics of object. It significantly improves the performance of anchor-based and anchor-free detectors and bridges the gap between them. Finally, we discuss the necessity of tiling multiple anchors per location on the image to detect objects. Extensive experiments conducted on MS COCO support our aforementioned analysis and conclusions. With the newly introduced ATSS, we improve state-of-the-art detectors by a large margin to $50.7\%$ AP without introducing any overhead. The code is available at https://github.com/sfzhang15/ATSS

For agents

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

get_harvested_code_for_paper("1912.02424")
get_code_for_paper("1912.02424")
have("1912.02424")

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

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

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

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

Connect an agent — have() is free.