yolo(pretrained: bool = False, overrides: object = {})YOLOv1 with full Darknet backbone (Redmon et al., CVPR 2016).
Builds the paper-cited full YOLOv1 detector: 24-layer Darknet
backbone, 7x7 grid, 2 boxes per cell, and 80 COCO classes by
default (pass num_classes=20 for the paper's PASCAL VOC model,
whose 7x7x30 output tensor the paper describes). ~270M parameters
(most in the two 4096-dim FC layers) and 63.4% mAP on VOC 2007
test (paper Table 1) at 45 fps.
Model Size
Parameters
pretrainedbool= FalseNo YOLOv1 checkpoint ships;
True raises rather than
returning a randomly initialised model.**overridesobject= {}Keyword overrides forwarded into
YOLOConfig —
num_classes, split_size (S), num_boxes (B),
score_thresh, nms_thresh, and loss weights.Returns
YOLOForObjectDetectionDetector with the full YOLOv1 configuration applied (or with
overrides merged on top of it).
Notes
See Redmon et al., "You Only Look Once: Unified, Real-Time Object Detection", CVPR 2016 (arXiv:1506.02640).
Examples
>>> import lucid
>>> from lucid.models.vision.yolo._v1 import yolo
>>> model = yolo()
>>> x = lucid.randn(1, 3, 448, 448)
>>> out = model(x)
>>> out.logits.shape[0]
1