MCPcopy Create free account
hub / github.com/YXB-NKU/Strip-R-CNN / decode

Method decode

mmrotate/core/bbox/coder/angle_coder.py:99–114  ·  view source on GitHub ↗

Circular Smooth Label Decoder. Args: angle_preds (Tensor): The csl encoding of angle offset for each scale level. Has shape (num_anchors * H * W, coding_len) Returns: list[Tensor]: Angle offset for each scale level.

(self, angle_preds)

Source from the content-addressed store, hash-verified

97 return smooth_label.scatter(1, radius_range, smooth_value)
98
99 def decode(self, angle_preds):
100 """Circular Smooth Label Decoder.
101
102 Args:
103 angle_preds (Tensor): The csl encoding of angle offset
104 for each scale level.
105 Has shape (num_anchors * H * W, coding_len)
106
107 Returns:
108 list[Tensor]: Angle offset for each scale level.
109 Has shape (num_anchors * H * W, 1)
110 """
111 angle_cls_inds = torch.argmax(angle_preds, dim=1)
112 angle_pred = ((angle_cls_inds + 0.5) *
113 self.omega) % self.angle_range - self.angle_offset
114 return angle_pred * (math.pi / 180)

Callers 15

process_checkpointFunction · 0.45
filter_bboxesMethod · 0.45
refine_bboxesMethod · 0.45
refine_bboxesMethod · 0.45
lossMethod · 0.45
_get_bboxes_singleMethod · 0.45
refine_bboxesMethod · 0.45
lossMethod · 0.45
_get_bboxes_singleMethod · 0.45
refine_bboxesMethod · 0.45
loss_singleMethod · 0.45
_get_bboxes_singleMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected