YOLOv4: Optimal Speed and Accuracy of Object Detection
Paper • 2004.10934 • Published
Bochkovskiy, Wang & Liao, 2020 — YOLOv4: Optimal Speed and Accuracy of Object Detection (arXiv:2004.10934)
Lucid port of darknet/yolov4.weights,
converted to Lucid-native safetensors.
| Tag | mAP@0.5 | Params | GFLOPs | Size | Source |
|---|---|---|---|---|---|
COCO_2017 (default) |
65.7 | 64.4M | — | 245.85 MB | darknet |
import lucid.models as models
from lucid.models.weights import YOLOV4Weights
# default tag
model = models.yolo_v4(pretrained=True)
# explicit tag (enum or string)
model = models.yolo_v4(weights=YOLOV4Weights.COCO_2017)
model = models.yolo_v4(pretrained="COCO_2017")
# preprocessing travels with the weights
weights = YOLOV4Weights.COCO_2017
preprocess = weights.transforms()
out = model(preprocess(image)[None])
# ObjectDetectionOutput: per-query/proposal class logits + boxes
logits, boxes = out.logits, out.pred_boxes
Converted from darknet/yolov4.weights via
python -m tools.convert_weights yolo_v4 --tag COCO_2017.
Key mapping + numerical parity verified against the source.
other — inherited from the original weights.
@article{bochkovskiy2020yolov4,
title={YOLOv4: Optimal Speed and Accuracy of Object Detection},
author={Bochkovskiy, Alexey and Wang, Chien-Yao and Liao, Hong-Yuan Mark},
journal={arXiv preprint arXiv:2004.10934},
year={2020}
}