![]() |
Labeler for Region Proposal Network.
Inherits From: AnchorLabeler
tfm.vision.anchor.RpnAnchorLabeler(
match_threshold=0.7,
unmatched_threshold=0.3,
rpn_batch_size_per_im=256,
rpn_fg_fraction=0.5
)
Methods
label_anchors
label_anchors(
anchor_boxes, gt_boxes, gt_labels
)
Labels anchors with ground truth inputs.
Args | |
---|---|
anchor_boxes
|
A float tensor with shape [N, 4] representing anchor boxes. For each row, it stores [y0, x0, y1, x1] for four corners of a box. |
gt_boxes
|
A float tensor with shape [N, 4] representing groundtruth boxes. For each row, it stores [y0, x0, y1, x1] for four corners of a box. |
gt_labels
|
A integer tensor with shape [N, 1] representing groundtruth classes. |
Returns | |
---|---|
score_targets_dict
|
ordered dictionary with keys [min_level, min_level+1, ..., max_level]. The values are tensor with shape [height_l, width_l, num_anchors]. The height_l and width_l represent the dimension of class logits at l-th level. |
box_targets_dict
|
ordered dictionary with keys [min_level, min_level+1, ..., max_level]. The values are tensor with shape [height_l, width_l, num_anchors * 4]. The height_l and width_l represent the dimension of bounding box regression output at l-th level. |