SYNTOLOGY HomeExplorerAtlasCodeMethodologyAboutDevelopersFeedPricing
Paper · 2207.02696 · CVPR · 2022

YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors

arXiv · PDF · Open in the Atlas

Code that ran

10 of 11 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; 3 honoured the contract we drafted, 0 violated it and 5 have no contract verdict; 2 failures of our instrument; 1 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/2207.02696.json · badge: /api/ran/2207.02696.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
kadirnar/yolov7-pip community (classifier label)
classifier basis not recorded on the link
4 ran · 0 no recorded run
zhanghuiyao/yolov7_mindspore community (classifier label)
classifier basis not recorded on the link
3 ran · 1 no recorded run
ibaiGorordo/ONNX-YOLOv7-Object-Detection community (classifier label)
classifier basis not recorded on the link
3 ran · 0 no recorded run
FunctionStatusWhere it lives
DWConv Ran
ran; our contract draft was wrong, not the code
kadirnar/yolov7-pip/yolov7/models/common.py
pointer only (licence: MIT); the stored copy get_code serves, from SCUT-DLVCLab/AutoHDR, is pointer only (licence: NONE) · get_code("b9a38c519e71eeba")
How it ran

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

autopad Ran
ran, honoured the contract we drafted
kadirnar/yolov7-pip/yolov7/models/common.py
pointer only (licence: MIT); the stored copy get_code serves, from yang-0201/YOLOv6_pro, is pointer only (licence: GPL-3.0) · get_code("988a3c854b1b13d0")
How it ran

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

compare_version Ran
ran on a synthesized input
zhanghuiyao/yolov7_mindspore/utils/all_finite.py
code served (permissive licence) · get_code("d6ae8e6a9c267f7b")
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 torch
import torch.nn as nn

# The function compare_version takes two version strings and compares them
# It splits by '.', compares integer components, and returns -1, 0, or 1
# No complex objects needed - just strings

ARGS = {
    'v1': '1.8.1',
    'v2': '1.9.0'
}
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 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
compute_iou Ran
ran on a synthesized input
ibaiGorordo/ONNX-YOLOv7-Object-Detection/yolov7/utils.py
code served (permissive licence) · get_code("21a47905e98284b9")
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 valid arguments for compute_iou function
# The function takes:
# - box: a single bounding box [xmin, ymin, xmax, ymax]
# - boxes: multiple bounding boxes as a 2D array with shape (N, 4)

# Create a single reference box
box = np.array([1.0, 1.0, 5.0, 5.0])

# Create multiple boxes to compare against
boxes = np.array([
    [2.0, 2.0, 6.0, 6.0],
    [0.5, 0.5, 3.0, 3.0]
])

ARGS = {
    "box": box,
    "boxes": 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 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
make_divisible Ran
ran on a synthesized input
zhanghuiyao/yolov7_mindspore/network/common.py
code served (permissive licence) · get_code("c609b51715f9ac43")
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 math

def make_divisible(x, divisor):
    return math.ceil(x / divisor) * divisor

ARGS = {
    "x": 10,
    "divisor": 3
}
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
nms Ran
ran on a synthesized input
ibaiGorordo/ONNX-YOLOv7-Object-Detection/yolov7/utils.py
code served (permissive licence) · get_code("ac863afc480b7414")
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 [xmin, ymin, xmax, ymax]
boxes = np.array([
    [10.0, 10.0, 50.0, 50.0],
    [15.0, 15.0, 55.0, 55.0],
    [100.0, 100.0, 150.0, 150.0],
    [105.0, 105.0, 155.0, 155.0],
], dtype=np.float32)

# Create corresponding confidence scores
scores = np.array([0.9, 0.8, 0.85, 0.75], dtype=np.float32)

# Set IoU threshold
iou_threshold = 0.3

ARGS = {
    "boxes": boxes,
    "scores": scores,
    "iou_threshold": iou_threshold,
}
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
sigmoid Ran
ran, honoured the contract we drafted
zhanghuiyao/yolov7_mindspore/postprocess.py
code served (permissive licence) · get_code("e9b5f76a6fafe2ee")
How it ran

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

import numpy as np

# The sigmoid function takes a single parameter 'x' which should be a numpy array
# or array-like object that can be passed to np.exp()

# Create a small numpy array with distinct values
x_input = np.array([[-2.0, -1.0, 0.0, 1.0],
                     [2.0, -0.5, 0.5, 1.5]])

ARGS = {
    "x": x_input
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (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
smooth_BCE Ran
ran, honoured the contract we drafted
kadirnar/yolov7-pip/yolov7/utils/loss.py
pointer only (licence: MIT); the stored copy get_code serves, from Gandolfczjh/APDE, is pointer only (licence: NONE) · get_code("386a04c4b6c96c88")
How it ran

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

transI_fusebn Ran
ran; our contract draft was wrong, not the code
kadirnar/yolov7-pip/yolov7/models/common.py
pointer only (licence: MIT); the stored copy get_code serves, from SCUT-DLVCLab/AutoHDR, is pointer only (licence: NONE) · get_code("079d0a85a0bfbb47")
How it ran

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

xywh2xyxy Ran
ran on a synthesized input
ibaiGorordo/ONNX-YOLOv7-Object-Detection/yolov7/utils.py
code served (permissive licence) · get_code("2b72f89bf58c2228")
How it ran

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

import numpy as np

# The function xywh2xyxy converts bounding boxes from center format (x, y, width, height)
# to corner format (x1, y1, x2, y2).
# It takes a single parameter 'x' which should be a numpy array with shape (..., 4)
# where the last dimension contains [x_center, y_center, width, height]

# Create a small numpy array with shape (2, 4) for testing
# Each row represents a bounding box in xywh format
x = np.array([
    [100.0, 100.0, 50.0, 60.0],  # center_x=100, center_y=100, width=50, height=60
    [200.0, 150.0, 40.0, 80.0]   # center_x=200, center_y=150, width=40, height=80
], dtype=np.float32)

ARGS = {
    'x': x
}
Setup block drafted by
a language model, Claude Haiku 4.5, prompt python_fixture_v1, through the batch API
Imports
numpy — import names as written, not package names to install; a name the repository itself provides is not a package
Returned
type ndarray, ndim 2, dtype family float, shape (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
load_image Not yet run
unverified (harvested, no recorded run)
zhanghuiyao/yolov7_mindspore/utils/augumentations.py
pointer only (licence: MIT); the stored copy get_code serves, from tanmaypandey7/wheat-detection, is pointer only (licence: GPL-3.0) · get_code("96c97809b6f786f8")
How it ran

The body of this sample is withheld: this paper's link allows the body inline (MIT), but get_code serves the stored copy, first harvested from tanmaypandey7/wheat-detection, 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 11 samples lifted from this paper's linked repositories, 11 carry a function identity and 0 do not. Of the 11 distinct functions with an identity, 9 are also present in other papers whose code we hold (7 with at least one paper dated earlier, 0 the same month, 7 later) and 2 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
sigmoid 51 other papers
23 dated earlier, 27 later, 1 same year, order not determinable · 2 only as an assembly brick
1505.05770 (2015-05)
Variational Inference with Normalizing Flows
1804.00779 (2018-04)
Neural Autoregressive Flows
1809.10765 (2018-09)
Auto-Encoding Knockoff Generator for FDR Controlled Variable Selection
and 48 more not named here
autopad 23 other papers
9 dated earlier, 14 later · 1 only as an assembly brick
1311.2524 (2013-11)
Rich feature hierarchies for accurate object detection and semantic segmentation
1703.07402 (2017-03)
Simple Online and Realtime Tracking with a Deep Association Metric
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
and 20 more not named here
smooth_BCE 16 other papers
3 dated earlier, 13 later
1611.02644 (2016-11)
Multispectral Deep Neural Networks for Pedestrian Detection
2108.11250 (2021-08)
YOLOP: You Only Look Once for Panoptic Driving Perception
2202.01811 (2022-02)
ObjectSeeker: Certifiably Robust Object Detection against Patch Hiding Attacks via Patch-agnostic Masking
and 13 more not named here
DWConv 6 other papers
3 dated earlier, 3 later
1703.07402 (2017-03)
Simple Online and Realtime Tracking with a Deep Association Metric
2004.10934 (2020-04)
YOLOv4: Optimal Speed and Accuracy of Object Detection
2206.14651 (2022-06)
BoT-SORT: Robust Associations Multi-Pedestrian Tracking
and 3 more not named here
transI_fusebn 5 other papers
3 dated earlier, 2 later
2109.03508 (2021-09)
RepNAS: Searching for Efficient Re-parameterizing Blocks
2204.00826 (2022-04)
Online Convolutional Re-parameterization
2206.14651 (2022-06)
BoT-SORT: Robust Associations Multi-Pedestrian Tracking
and 2 more not named here
load_image 2 other papers
2 dated earlier
1710.09412 (2017-10)
mixup: BEYOND EMPIRICAL RISK MINIMIZATION
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
compare_version 1 other paper
1 dated earlier
1804.02767 (2018-04)
YOLOv3: An Incremental Improvement
compute_iou 1 other paper
1 later
2401.17270 (2024-01)
YOLO-World: Real-Time Open-Vocabulary Object Detection
nms 1 other paper
1 later
2401.17270 (2024-01)
YOLO-World: Real-Time Open-Vocabulary 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

YOLOv7 surpasses all known object detectors in both speed and accuracy in the range from 5 FPS to 160 FPS and has the highest accuracy 56.8% AP among all known real-time object detectors with 30 FPS or higher on GPU V100. YOLOv7-E6 object detector (56 FPS V100, 55.9% AP) outperforms both transformer-based detector SWIN-L Cascade-Mask R-CNN (9.2 FPS A100, 53.9% AP) by 509% in speed and 2% in accuracy, and convolutional-based detector ConvNeXt-XL Cascade-Mask R-CNN (8.6 FPS A100, 55.2% AP) by 551% in speed and 0.7% AP in accuracy, as well as YOLOv7 outperforms: YOLOR, YOLOX, Scaled-YOLOv4, YOLOv5, DETR, Deformable DETR, DINO-5scale-R50, ViT-Adapter-B and many other object detectors in speed and accuracy. Moreover, we train YOLOv7 only on MS COCO dataset from scratch without using any other datasets or pre-trained weights. Source code is released in https://github.com/WongKinYiu/yolov7.

For agents

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

get_harvested_code_for_paper("2207.02696")
get_code_for_paper("2207.02696")
have("2207.02696")

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

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

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

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

Connect an agent — have() is free.