mirror of https://github.com/open-mmlab/mmcv.git
[Fix] nms_rotated_npu accepts angle parameter (#2670)
parent
75290685b7
commit
a3e97360a9
|
@ -460,6 +460,9 @@ def nms_rotated(dets: Tensor,
|
|||
input_labels = labels
|
||||
if dets.device.type == 'npu':
|
||||
order = scores.new_empty(0, dtype=torch.long)
|
||||
coefficient = 57.29578 # 180 / PI
|
||||
for i in range(dets.size()[0]):
|
||||
dets_cw[i][4] *= coefficient # radians to angle
|
||||
keep_inds = ext_module.nms_rotated(dets_cw, scores, order, dets_cw,
|
||||
input_labels, iou_threshold,
|
||||
multi_label)
|
||||
|
|
Loading…
Reference in New Issue