Skip to content

Commit

Permalink
fix a bug in mns_cpu
Browse files Browse the repository at this point in the history
  • Loading branch information
Jianwei Yang committed Sep 13, 2018
1 parent 7f07adf commit 1c827d0
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions lib/model/nms/nms_cpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@ def nms_cpu(dets, thresh):
keep.append(i)
xx1 = np.maximum(x1[i], x1[order[1:]])
yy1 = np.maximum(y1[i], y1[order[1:]])
xx2 = np.maximum(x2[i], x2[order[1:]])
yy2 = np.maximum(y2[i], y2[order[1:]])
xx2 = np.minimum(x2[i], x2[order[1:]])
yy2 = np.minimum(y2[i], y2[order[1:]])

w = np.maximum(0.0, xx2 - xx1 + 1)
h = np.maximum(0.0, yy2 - yy1 + 1)
Expand All @@ -32,5 +32,3 @@ def nms_cpu(dets, thresh):
order = order[inds + 1]

return torch.IntTensor(keep)


0 comments on commit 1c827d0

Please sign in to comment.