data
YOLOV4Config
extends
ModelConfigYOLOV4Config(num_classes: int = 80, in_channels: int = 3, anchors: tuple[tuple[float, float], ...] = ((12.0, 16.0), (19.0, 36.0), (40.0, 28.0), (36.0, 75.0), (76.0, 55.0), (72.0, 146.0), (142.0, 110.0), (192.0, 243.0), (459.0, 401.0)), strides: tuple[int, int, int] = (8, 16, 32), score_thresh: float = 0.5, nms_thresh: float = 0.5, lambda_noobj: float = 0.5)Configuration for YOLOv4.
YOLOv4 (Bochkovskiy et al., 2020) uses CSPDarknet-53 as backbone, SPP + PANet as neck, and three detection scales at strides 8/16/32.
Args: num_classes: Number of foreground classes (COCO default = 80). in_channels: Input image channels. anchors: 9 (width, height) anchor pairs in pixels, 3 per scale. Order: P3 (small), P4 (medium), P5 (large). strides: Feature-map strides for P3, P4, P5. score_thresh: Minimum class score to keep a detection. nms_thresh: IoU threshold for per-class NMS. lambda_noobj: Objectness loss weight for negative anchors.
Examples
>>> from lucid.models.vision.yolo import YOLOV4Config
>>> cfg = YOLOV4Config()
>>> cfg.num_classes
80
>>> cfg.model_type
'yolo_v4'Used by 1
Constructors
1dunder
__init__
→None__init__(num_classes: int = 80, in_channels: int = 3, anchors: tuple[tuple[float, float], ...] = ((12.0, 16.0), (19.0, 36.0), (40.0, 28.0), (36.0, 75.0), (76.0, 55.0), (72.0, 146.0), (142.0, 110.0), (192.0, 243.0), (459.0, 401.0)), strides: tuple[int, int, int] = (8, 16, 32), score_thresh: float = 0.5, nms_thresh: float = 0.5, lambda_noobj: float = 0.5)