Skip to content

Commit

Permalink
fix a bug of pisa loss when there are no gts in some images within on…
Browse files Browse the repository at this point in the history
…e batch images (#2992)
  • Loading branch information
GT9505 authored Jun 12, 2020
1 parent 8951a8a commit a9c8c94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion mmdet/models/losses/pisa_loss.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,8 @@ def isr_p(cls_score,
for i in range(len(sampling_results)):
gt_i = sampling_results[i].pos_assigned_gt_inds
gts.append(gt_i + last_max_gt)
last_max_gt = gt_i.max() + 1
if len(gt_i) != 0:
last_max_gt = gt_i.max() + 1
gts = torch.cat(gts)
assert len(gts) == num_pos

Expand Down

0 comments on commit a9c8c94

Please sign in to comment.