data
YOLOV3Config
extends
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, int, int] = (8, 16, 32), score_thresh: float = 0.5, nms_thresh: float = 0.5, lambda_coord: float = 5.0, lambda_noobj: float = 0.5)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.
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 objectness × class score to keep a detection.
nms_threshfloat= 0.5IoU threshold for per-class NMS.
lambda_coordfloat= 5.0Box regression loss weight.
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_coord: float = 5.0, lambda_noobj: float = 0.5)