SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2009.02967 · NeurIPS · 2020

Stochastic-YOLO: Efficient Probabilistic Object Detection under Dataset Shifts

Tiago Azevedo, Matthew Mattina, Partha Maji

arXiv · PDF · Open in the Atlas

Code that ran

8 of 12 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 5 have no contract verdict; 1 failure of our instrument; 4 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/2009.02967.json · badge: /api/ran/2009.02967.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
tjiagom/stochastic-yolo canonical (classifier label)
classifier basis: census
8 ran · 4 no recorded run
FunctionStatusWhere it lives
exif_size Ran
ran, honoured the contract we drafted
tjiagom/stochastic-yolo/utils/datasets.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from serkansulun/video-emotion, is pointer only (licence: NOASSERTION) · get_code("2ae73fdbbb2cb8ba")
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 serkansulun/video-emotion, and GitHub could not classify the licence of that repository (NOASSERTION). 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.

find_modules Ran
ran on a synthesized input
tjiagom/stochastic-yolo/utils/torch_utils.py
code served (permissive licence) · get_code("8739ca34adce7a6c")
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 torch
import torch.nn as nn

torch.manual_seed(0)

# Build a model with a module_list attribute containing various layer types
class SimpleModel(nn.Module):
    def __init__(self):
        super().__init__()
        self.module_list = nn.ModuleList([
            nn.Conv2d(3, 16, kernel_size=3),
            nn.BatchNorm2d(16),
            nn.Conv2d(16, 32, kernel_size=3),
            nn.ReLU(),
            nn.Conv2d(32, 64, kernel_size=3),
            nn.Linear(64, 10),
        ])
    
    def forward(self, x):
        return x

model = SimpleModel()

ARGS = {
    "model": model,
    "mclass": nn.Conv2d,
}
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 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
gdrive_download Ran
ran on a synthesized input
tjiagom/stochastic-yolo/utils/google_utils.py
code served (permissive licence) · get_code("aa2a7d97e3d5fc20")
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
import time

# This function downloads a file from Google Drive using curl
# It takes two string parameters: id (Google Drive file ID) and name (output filename)
# The function doesn't actually use these values in a way that requires special objects,
# just passes them to os.system() calls

ARGS = {
    'id': '1HaXkef9z6y5l4vUnCYgdmEAj61c6bfWO',
    'name': 'test_download.zip'
}
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
get_yolo_layers Ran
ran, honoured the contract we drafted
tjiagom/stochastic-yolo/models.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Raychou0830/Carplate, is pointer only (licence: GPL-3.0) · get_code("ec338718ed4c4fe1")
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 Raychou0830/Carplate, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

load_classes Ran
ran; our contract draft was wrong, not the code
tjiagom/stochastic-yolo/utils/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Zzh-tju/ultralytics-YOLOv3-Cluster-NMS, is pointer only (licence: GPL-3.0) · get_code("fa99a26b6ba8f205")
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 Zzh-tju/ultralytics-YOLOv3-Cluster-NMS, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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.

parse_data_cfg Ran
ran on a synthesized input
tjiagom/stochastic-yolo/utils/parse_config.py
code served (permissive licence) · get_code("249eabdf1135eba0")
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 os
import tempfile

# Create a temporary data configuration file
temp_dir = tempfile.mkdtemp()
config_file = os.path.join(temp_dir, 'test_data.cfg')

# Write a valid config file content
config_content = """# This is a comment
classes = 80
train = data/train.txt
valid = data/valid.txt
test = data/test.txt

# Another comment
names = data/coco.names
backup = backup/
"""

with open(config_file, 'w') as f:
    f.write(config_content)

ARGS = {
    'path': config_file
}
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
parse_model_cfg Ran
ran on a synthesized input
tjiagom/stochastic-yolo/utils/parse_config.py
code served (permissive licence) · get_code("cd7822fafa9df436")
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 os
import tempfile
import numpy as np

# Create a temporary directory and a valid .cfg file
temp_dir = tempfile.mkdtemp()
cfg_file = os.path.join(temp_dir, 'test.cfg')

# Write a valid YOLOv3 config file
cfg_content = """# Test 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

[convolutional]
batch_normalize=1
filters=64
size=3
stride=2
pad=1
activation=leaky
from=-1

[route]
layers=-1,-2

[yolo]
mask=0,1,2
anchors=10,13,16,30,33,23,30,61,62,45,59,119,116,90,156,198,373,326
classes=80
num=9
jitter=0.3
ignore_thresh=0.5
truth_thresh=1
random=1
"""

with open(cfg_file, 'w') as f:
    f.write(cfg_content)

ARGS = {
    'path': cfg_file
}
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 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
select_device Ran
ran on a synthesized input
tjiagom/stochastic-yolo/utils/torch_utils.py
code served (permissive licence) · get_code("884fa842c35a486d")
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 device. 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 os

torch.manual_seed(0)

# The function select_device takes:
# - device: str (default '')
# - apex: bool (default False)
# - batch_size: int or None (default None)

# Looking at the function body:
# - device is checked with .lower() and compared to 'cpu'
# - device is used as a string key for CUDA_VISIBLE_DEVICES
# - apex is used in a boolean context and string formatting
# - batch_size is used in modulo operation and compared with ng (number of GPUs)

# Since we're CPU-only, we should pass device='cpu' to avoid CUDA assertions
# We can also test with empty string (default CPU path)

ARGS = {
    'device': 'cpu',
    'apex': False,
    'batch_size': None
}
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 device — a device output has no array shape of its own; none is stated — the instrument coerces any output to an array; for a device 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
check_file Not yet run
unverified (harvested, no recorded run)
tjiagom/stochastic-yolo/utils/utils.py
code served (permissive licence) · get_code("d738d0725acd9466")
How it ran

no invocation recorded.

fuse_conv_and_bn Not yet run
unverified (harvested, no recorded run)
tjiagom/stochastic-yolo/utils/torch_utils.py
code served (permissive licence) · get_code("cb2cd3ae835b780a")
How it ran

no invocation recorded.

labels_to_class_weights Not yet run
unverified (harvested, no recorded run)
tjiagom/stochastic-yolo/utils/utils.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Zzh-tju/ultralytics-YOLOv3-Cluster-NMS, is pointer only (licence: GPL-3.0) · get_code("25f32f40bc0cba2f")
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 Zzh-tju/ultralytics-YOLOv3-Cluster-NMS, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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. No invocation recorded.

make_divisible Not yet run
unverified (harvested, no recorded run)
tjiagom/stochastic-yolo/utils/layers.py
pointer only (licence: Apache-2.0); the stored copy get_code serves, from Jiachenyin1/Yolov3-U-attention-permuting, is pointer only (licence: GPL-3.0) · get_code("5959383c642fb36b")
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 Jiachenyin1/Yolov3-U-attention-permuting, and GPL-3.0, as GitHub detects it on that repository, is not in the permissive set Syntology serves inline. 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. No invocation recorded.

Also present in other papers' code

Of 12 samples lifted from this paper's linked repositories, 12 carry a function identity and 0 do not. Of the 12 distinct functions with an identity, 7 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 3 later) and 5 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
load_classes 6 other papers
4 dated earlier, 2 later
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
1911.08287 (2019-11)
Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression
2004.10934 (2020-04)
YOLOv4: Optimal Speed and Accuracy of Object Detection
and 3 more not named here
make_divisible 4 other papers
3 dated earlier, 1 later
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
2004.10934 (2020-04)
YOLOv4: Optimal Speed and Accuracy of Object Detection
2004.11757 (2020-04)
Ultra Fast Structure-aware Deep Lane Detection
and 1 more not named here
exif_size 3 other papers
2 dated earlier, 1 later
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
2004.10934 (2020-04)
YOLOv4: Optimal Speed and Accuracy of Object Detection
2602.07063 (2026-02)
Video-based Music Generation
get_yolo_layers 3 other papers
3 dated earlier
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
2004.10934 (2020-04)
YOLOv4: Optimal Speed and Accuracy of Object Detection
2004.11757 (2020-04)
Ultra Fast Structure-aware Deep Lane Detection
labels_to_class_weights 3 other papers
3 dated earlier
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
1911.08287 (2019-11)
Distance-IoU Loss: Faster and Better Learning for Bounding Box Regression
2005.03572 (2020-05)
Enhancing Geometric Factors in Model Learning and Inference for Object Detection and Instance Segmentation
gdrive_download 1 other paper
1 dated earlier
1311.2524 (2013-11)
Rich feature hierarchies for accurate object detection and semantic segmentation
parse_data_cfg 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-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

In image classification tasks, the evaluation of models' robustness to increased dataset shifts with a probabilistic framework is very well studied. However, object detection (OD) tasks pose other challenges for uncertainty estimation and evaluation. For example, one needs to evaluate both the quality of the label uncertainty (i.e., what?) and spatial uncertainty (i.e., where?) for a given bounding box, but that evaluation cannot be performed with more traditional average precision metrics (e.g., mAP). In this paper, we adapt the well-established YOLOv3 architecture to generate uncertainty estimations by introducing stochasticity in the form of Monte Carlo Dropout (MC-Drop), and evaluate it across different levels of dataset shift. We call this novel architecture Stochastic-YOLO, and provide an efficient implementation to effectively reduce the burden of the MC-Drop sampling mechanism at inference time. Finally, we provide some sensitivity analyses, while arguing that Stochastic-YOLO is a sound approach that improves different components of uncertainty estimations, in particular spatial uncertainties.

For agents

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

get_harvested_code_for_paper("2009.02967")
get_code_for_paper("2009.02967")
have("2009.02967")

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

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

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

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

Connect an agent — have() is free.