yolov4_p7
A YOLOv4-family detector: CSPDarknet53 backbone, SPP and PAN neck, anchor-based YOLO head.
Detection and tracking · 254 operations Checked
Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.
At a glance
- Parameters
- 6.3M
- Operations
- 254
- Framework
- PyTorch
- Recurrent
- No
- Published
- arXiv 2020
- Cited by
- 10,304 (as of 29 October 2026)
- Authors
- Alexey Bochkovskiy, Chien-Yao Wang, Hong-Yuan Mark Liao
- Checked
- Passed: the trace was replayed operation by operation and matched the model's own output for this input.
Files
The file opened in a new tab. Use your browser's Save command there to keep it.
The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.
Details
- Stable ID
- m12248
- Graph hash
- 07511104d402e5c0bbca2fe9981b16800f8c03e895d99541778d19eb44ea8659
- Skeleton hash
- 063ca964484c8dc0d1117625938b37bfd12299870db65cc59bfd90e533506c1c
- Architecture hash
- 9550c7d51167df2a3d2b4f5912314e6107ab172d56103ef2de3ed097604cf788
- Diagram SHA-256
- 37a197cbaf52161d4dee2d5d2ee9ba03c807f3f929a5d90193408cebb1b24f1c
- TorchLens version
- 2.36.0
- Renderer
- graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
- Check
- Forward pass replayed in PyTorch
How this diagram was made
menagerie.classics.yolov4_family:build_yolov4_p7: build({}) What it is
This family holds a YOLOv4-style detector, and the saved paper is the YOLOv4 paper itself, whose goal was a real-time detector that anyone can train on a single conventional GPU. The authors frame the goal as building a CNN that runs in real time on a conventional GPU and whose training needs only one such GPU. The headline number is 43.5% AP (65.7% AP50) on MS COCO at roughly 65 FPS on a Tesla V100. Against its predecessor, the paper reports a 10% improvement in AP and 12% in FPS over YOLOv3.
The architecture itself is a deliberate assembly of existing parts: a CSPDarknet53 backbone, an SPP block, a PANet path-aggregation neck and the anchor-based YOLOv3 head. CSPDarknet53 was chosen over CSPResNeXt50 because, although the latter classifies better on ImageNet, CSPDarknet53 detects better on MS COCO. The detector requires more layers than a classifier would, for a larger receptive field to cover the increased input size. The SPP block sits on top of the backbone because it enlarges the receptive field at almost no cost in speed. Two of the borrowed modules were altered along the way: SAM was changed from spatial-wise to point-wise attention, and the shortcut connection in PAN was replaced by concatenation.
The paper's lasting vocabulary is its split between a bag of freebies and a bag of specials. Freebies are training-side methods that raise accuracy without increasing inference cost, and specials are plug-in modules and post-processing steps that cost a little inference time for a significant accuracy gain. New freebies include Mosaic augmentation, which mixes four training images, and Self-Adversarial Training, where the network first alters the input image rather than its own weights. After adding these training strategies, the authors found that mini-batch size had almost no effect on detector performance.
Key idea. YOLOv4 combines a CSPDarknet53 backbone, SPP, PANet and a YOLOv3 head with a verified set of training-time freebies and low-cost specials to reach 43.5% AP on MS COCO at real-time speed on one conventional GPU.
- yolov4-p7
- yolov4 p7
- yolov4
- yolo
- cspdarknet53
- real-time object detector
- object detection
- bag of freebies
- bag of specials
- coco
AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.
Cite the paper
@article{yolov4p72020,
title = {YOLOv4: Optimal Speed and Accuracy of Object Detection},
author = {Alexey Bochkovskiy and Chien-Yao Wang and Hong-Yuan Mark Liao},
year = {2020},
journal = {arXiv (Cornell University)},
eprint = {2004.10934}
}