YOLOV3Config
ModelConfigYOLOV3Config(num_classes: int = 80, in_channels: int = 3, anchors: tuple[tuple[float, float], ...] = ((10.0, 13.0), (16.0, 30.0), (33.0, 23.0), (30.0, 61.0), (62.0, 45.0), (59.0, 119.0), (116.0, 90.0), (156.0, 198.0), (373.0, 326.0)), strides: tuple[int, ...] = (8, 16, 32), score_thresh: float = 0.5, nms_thresh: float = 0.5, lambda_coord: float = 5.0, lambda_noobj: float = 0.5, anchor_masks: tuple[tuple[int, ...], ...] = ((0, 1, 2), (3, 4, 5), (6, 7, 8)))Configuration for YOLOv3.
YOLOv3 (Redmon & Farhadi, 2018) uses a Darknet-53 backbone with three
detection scales at strides 8, 16, and 32 (P3/P4/P5). Each scale has 3
hand-picked COCO anchors for small, medium, and large objects respectively.
YOLOv3-Tiny shares this config with its own table — six anchors, strides
16 and 32 — which yolo_v3_tiny supplies.
Args:
num_classes: Number of foreground classes (COCO default = 80).
in_channels: Input image channels.
anchors: (width, height) anchor priors in pixels — every prior a
ground-truth box is matched against.
strides: Feature-map stride of each detection scale, fine to
coarse (P3, P4, P5 for the full model).
score_thresh: Minimum objectness × class score to keep a detection.
nms_thresh: IoU threshold for per-class NMS.
lambda_coord: Box regression loss weight.
lambda_noobj: Objectness loss weight for negative anchors.
anchor_masks: Indices into anchors predicted at each scale, in
strides order — the cfg's mask = per [yolo]
layer. Must hold one mask per stride.
Examples
>>> from lucid.models.vision.yolo import YOLOV3Config
>>> cfg = YOLOV3Config()
>>> cfg.num_classes
80
>>> cfg.model_type
'yolo_v3'Used by 1
Constructors
1__init__
→None__init__(num_classes: int = 80, in_channels: int = 3, anchors: tuple[tuple[float, float], ...] = ((10.0, 13.0), (16.0, 30.0), (33.0, 23.0), (30.0, 61.0), (62.0, 45.0), (59.0, 119.0), (116.0, 90.0), (156.0, 198.0), (373.0, 326.0)), strides: tuple[int, ...] = (8, 16, 32), score_thresh: float = 0.5, nms_thresh: float = 0.5, lambda_coord: float = 5.0, lambda_noobj: float = 0.5, anchor_masks: tuple[tuple[int, ...], ...] = ((0, 1, 2), (3, 4, 5), (6, 7, 8)))