data
YOLOV4Config
extends
ModelConfigYOLOV4Config(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, 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.
Parameters
num_classesint= 80Number of foreground classes (COCO default = 80).
in_channelsint= 3Input image channels.
anchorstuple[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))9 (width, height) anchor pairs in pixels, 3 per scale.
Order: P3 (small), P4 (medium), P5 (large).
stridestuple[int, int, int]= (8, 16, 32)Feature-map strides for P3, P4, P5.
score_threshfloat= 0.5Minimum class score to keep a detection.
nms_threshfloat= 0.5IoU threshold for per-class NMS.
lambda_noobjfloat= 0.5Objectness loss weight for negative anchors.
Used by 1
Constructors
1dunder
__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, int, int] = (8, 16, 32), score_thresh: float = 0.5, nms_thresh: float = 0.5, lambda_noobj: float = 0.5)