Skip to content

AnchorDecoupledHead

Decoupled detection head with anchors based on Focal Loss for Dense Object Detection

We have named the detection head of RetinaNet as AnchorDecoupledHead to represent it in a more general term. AnchorDecoupledHead consists of a box regression head and a classification head for the given intermediate features, predicting detection boxes for the anchors at each feature's pixel location. Additionally, we provide the option to adjust the number of convolution layers used in the heads through the num_layers value, it is equivalent with RetinaNet when set to 4.

Field list

Field Description
name (str) Name must be "retinanet_head" to use RetinaNetHead head.
params.anchor_sizes (list[list[int]]) Default anchor sizes for each intermediate feature.
params.aspect_ratios (list[float]) List of aspect ratio for each anchor.
params.num_layers (int) The number of convolution layers of regression and classification head.
params.norm_layer (str) Normalization type for the head.
params.topk_candidates (int) The number of boxes to retain based on score during the decoding step.
params.score_thresh (float) Score thresholding value applied during the decoding step.
params.nms_thresh (float) IoU threshold for non-maximum suppression.
params.class_agnostic (bool) Whether to process class-agnostic non-maximum suppression.

Model configuration example

Anchor-based decoupled detection head
model:
  architecture:
    head:
      name: anchor_decoupled_head
      params:
        anchor_sizes: [[32,], [64,], [128,], [256,]]
        aspect_ratios: [0.5, 1.0, 2.0]
        num_layers: 1
        norm_type: batch_norm
        # postprocessor - decode
        topk_candidates: 1000
        score_thresh: 0.05
        # postprocessor - nms
        nms_thresh: 0.45
        class_agnostic: False