data
EfficientDetConfig
extends
ModelConfigEfficientDetConfig(num_classes: int = 80, in_channels: int = 3, phi: int = 0, backbone_in_channels: tuple[int, int, int] = (40, 112, 320), fpn_channels: int = 64, fpn_repeats: int = 3, head_repeats: int = 3, anchor_scales: tuple[float, ...] = (1.0, 2.0 ** (1.0 / 3.0), 2.0 ** (2.0 / 3.0)), anchor_ratios: tuple[float, ...] = (0.5, 1.0, 2.0), anchor_base_sizes: tuple[int, ...] = (32, 64, 128, 256, 512), score_thresh: float = 0.05, nms_thresh: float = 0.5, max_detections: int = 100)Configuration for EfficientDet.
EfficientDet (Tan et al., CVPR 2020) applies compound scaling to object detection. Each compound coefficient φ jointly scales the backbone (EfficientNet-Bφ), the BiFPN width/depth, and the prediction head depth/resolution.
Parameters
num_classesint= 80Foreground classes (background not counted separately
— EfficientDet uses sigmoid + focal loss).
in_channelsint= 3Input image channels.
phiint= 0Compound coefficient index. Default 0 (EfficientDet-D0).
backbone_width_coeffWidth multiplier (EfficientNet channel scaling).
backbone_depth_coeffDepth multiplier (EfficientNet block repeat).
backbone_drop_rateStochastic depth / dropout.
fpn_channelsint= 64BiFPN channel width (W_bifpn).
fpn_repeatsint= 3Number of BiFPN stacking repetitions (D_bifpn).
head_repeatsint= 3Depth of class/box conv heads (D_head).
anchor_scalestuple[float, ...]= (1.0, 2.0 ** (1.0 / 3.0), 2.0 ** (2.0 / 3.0))Per-level anchor size multipliers.
anchor_ratiostuple[float, ...]= (0.5, 1.0, 2.0)Anchor aspect ratios.
anchor_num_scalesOctave subdivisions per scale.
score_threshfloat= 0.05Minimum sigmoid class score.
nms_threshfloat= 0.5Per-class NMS threshold.
max_detectionsint= 100Maximum detections per image.
Notes
Image → EfficientNet backbone (P3–P7 feature maps) → BiFPN (D_bifpn repeats, W_bifpn channels, fast normalised fusion) BiFPN outputs (P3–P7) → Class prediction head (shared conv) → Box prediction head (shared conv)
weight_i / (ε + Σ weight_j) — learnable positive weights (ε=1e-4)
Used by 3
Constructors
1dunder
__init__
→None__init__(num_classes: int = 80, in_channels: int = 3, phi: int = 0, backbone_in_channels: tuple[int, int, int] = (40, 112, 320), fpn_channels: int = 64, fpn_repeats: int = 3, head_repeats: int = 3, anchor_scales: tuple[float, ...] = (1.0, 2.0 ** (1.0 / 3.0), 2.0 ** (2.0 / 3.0)), anchor_ratios: tuple[float, ...] = (0.5, 1.0, 2.0), anchor_base_sizes: tuple[int, ...] = (32, 64, 128, 256, 512), score_thresh: float = 0.05, nms_thresh: float = 0.5, max_detections: int = 100)