SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2104.03888 · 2021

Enhancing Object Detection for Autonomous Driving by Optimizing Anchor Generation and Addressing Class Imbalance

arXiv · PDF · Open in the Atlas

Code that ran

2 of 7 samples (functions and classes) lifted from this paper's linked repositories executed on a synthesized input in Syntology's jail (0 of them constructed an object rather than computing a result; 0 honoured the contract we drafted, 0 violated it and 0 have no contract verdict; 2 failures of our instrument; 5 no recorded run), measured 2026-11-23; 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/2104.03888.json · badge: /api/ran/2104.03888.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
carranza96/waymo-detection-optimization canonical (classifier label)
classifier basis: census
2 ran · 5 no recorded run
FunctionStatusWhere it lives
AvgEnsemble Ran
ran; the contract check could not run (RAISES, DEP_MISSING or TIMEOUT)
carranza96/waymo-detection-optimization/src/ensemble_predictions.py
code served (permissive licence) · get_code("014a09b5b6d17768")
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 2, 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

# Create valid detection boxes
# Format: [ymin, xmin, ymax, xmax, class, score]
# Class 0 detections
det1_class0 = [10.0, 20.0, 50.0, 60.0, 0, 0.9]
det2_class0 = [12.0, 22.0, 52.0, 62.0, 0, 0.85]
det3_class0 = [100.0, 150.0, 200.0, 250.0, 0, 0.75]

# Class 1 detections
det1_class1 = [30.0, 40.0, 80.0, 120.0, 1, 0.88]
det2_class1 = [32.0, 42.0, 82.0, 122.0, 1, 0.80]

# Create list of detections
dets = [
    det1_class0,
    det2_class0,
    det3_class0,
    det1_class1,
    det2_class1
]

# Define ARGS dictionary with all parameters
ARGS = {
    "dets": dets,
    "iou_threshold": 0.5
}
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 2, 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
open_sharded_output_tfrecords Ran
ran; our contract draft was wrong, not the code
carranza96/waymo-detection-optimization/src/preprocessing/convert_waymo_tfrecord.py
code served (permissive licence) · get_code("243e9afed772b17f")
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 contextlib
import tempfile
import tensorflow.compat.v1 as tf

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

# Create an ExitStack to manage the TFRecordWriter contexts
exit_stack = contextlib.ExitStack()

# Base path for the sharded output files
base_path = f"{temp_dir}/output"

# Number of shards
num_shards = 3

ARGS = {
    "exit_stack": exit_stack,
    "base_path": base_path,
    "num_shards": num_shards,
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
tensorflow — 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_frame_shared_features Not yet run
unverified (harvested, no recorded run)
carranza96/waymo-detection-optimization/src/write_predictions_file.py
code served (permissive licence) · get_code("cb667e854454b5e6")
How it ran

no invocation recorded.

load_detection_graph Not yet run
unverified (harvested, no recorded run)
carranza96/waymo-detection-optimization/src/average_inference_time.py
code served (permissive licence) · get_code("d89091133611f15a")
How it ran

no invocation recorded.

read_encoded_image Not yet run
unverified (harvested, no recorded run)
carranza96/waymo-detection-optimization/src/average_inference_time.py
code served (permissive licence) · get_code("dc402a25d142a52a")
How it ran

no invocation recorded.

run_inference_for_single_image Not yet run
unverified (harvested, no recorded run)
carranza96/waymo-detection-optimization/src/average_inference_time.py
code served (permissive licence) · get_code("0a27b291ed31fa28")
How it ran

no invocation recorded.

to_numpy Not yet run
unverified (harvested, no recorded run)
carranza96/waymo-detection-optimization/src/ensemble_predictions.py
code served (permissive licence) · get_code("9d5c7acb0bb7838c")
How it ran

no invocation recorded.

Also present in other papers' code

Of 7 samples lifted from this paper's linked repositories, 7 carry a function identity and 0 do not. Of the 7 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 7 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-23.

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 one of the most active topics in computer vision for the past years. Recent works have mainly focused on pushing the state-of-the-art in the general-purpose COCO benchmark. However, the use of such detection frameworks in specific applications such as autonomous driving is yet an area to be addressed. This study presents an enhanced 2D object detector based on Faster R-CNN that is better suited for the context of autonomous vehicles. Two main aspects are improved: the anchor generation procedure and the performance drop in minority classes. The default uniform anchor configuration is not suitable in this scenario due to the perspective projection of the vehicle cameras. Therefore, we propose a perspective-aware methodology that divides the image into key regions via clustering and uses evolutionary algorithms to optimize the base anchors for each of them. Furthermore, we add a module that enhances the precision of the second-stage header network by including the spatial information of the candidate regions proposed in the first stage. We also explore different re-weighting strategies to address the foreground-foreground class imbalance, showing that the use of a reduced version of focal loss can significantly improve the detection of difficult and underrepresented objects in two-stage detectors. Finally, we design an ensemble model to combine the strengths of the different learning strategies. Our proposal is evaluated with the Waymo Open Dataset, which is the most extensive and diverse up to date. The results demonstrate an average accuracy improvement of 6.13% mAP when using the best single model, and of 9.69% mAP with the ensemble. The proposed modifications over the Faster R-CNN do not increase computational cost and can easily be extended to optimize other anchor-based detection frameworks.

For agents

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

get_harvested_code_for_paper("2104.03888")
get_code_for_paper("2104.03888")
have("2104.03888")

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

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

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

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

Connect an agent — have() is free.