fix rtmdet-ins head (#1884)

pull/1888/head
hanrui1sensetime 2023-03-20 12:03:12 +08:00 committed by GitHub
parent dce6e6401e
commit 754c08012d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 0 deletions

View File

@ -170,6 +170,9 @@ def _nms_with_mask_static(self,
# pad
dets = torch.cat((dets, dets.new_zeros((1, 1, 5))), 1)
labels = torch.cat((labels, labels.new_zeros((1, 1))), 1)
kernels = torch.cat((kernels, kernels.new_zeros(1, 1, kernels.shape[2])),
1)
priors = torch.cat((priors, priors.new_zeros(1, 4)), 0)
# topk or sort
is_use_topk = keep_top_k > 0 and \