Skip to content

Commit

Permalink
Update otx/algorithms/detection/adapters/mmdet/models/assigners/custo…
Browse files Browse the repository at this point in the history
…m_max_iou_assigner.py

Co-authored-by: Songki Choi <[email protected]>
  • Loading branch information
jaegukhyun and goodsong81 authored Jun 8, 2023
1 parent 6afbd03 commit be39736
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,14 +73,11 @@ def assign(self, bboxes, gt_bboxes, gt_bboxes_ignore=None, gt_labels=None):

if assign_on_cpu and gt_bboxes.shape[0] > self.cpu_assign_thr:
split_length = gt_bboxes.shape[0] // self.cpu_assign_thr + 1
overlaps = None
overlaps = []
for i in range(split_length):
gt_bboxes_split = gt_bboxes[i * self.cpu_assign_thr : (i + 1) * self.cpu_assign_thr]
if overlaps is None:
overlaps = self.iou_calculator(gt_bboxes_split, bboxes)
else:
overlaps = torch.concat((overlaps, self.iou_calculator(gt_bboxes_split, bboxes)), dim=0)

overlaps.append(self.iou_calculator(gt_bboxes_split, bboxes))
overlaps = torch.concat(overlaps, dim=0)
else:
overlaps = self.iou_calculator(gt_bboxes, bboxes)

Expand Down

0 comments on commit be39736

Please sign in to comment.