Skip to content

Commit

Permalink
Fix bug in NMS.
Browse files Browse the repository at this point in the history
  • Loading branch information
fmassa committed Sep 22, 2015
1 parent 5bb8368 commit abc4176
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions nms.lua
Expand Up @@ -39,13 +39,13 @@ local function nms(boxes, overlap)
I = I[{{1,last-1}}]

xx1:index(x1,1,I)
xx1:clamp(0,x1[i])
xx1:cmax(x1[i])
yy1:index(y1,1,I)
yy1:clamp(0,y1[i])
yy1:cmax(y1[i])
xx2:index(x2,1,I)
xx2:clamp(x2[i],math.huge)
xx2:cmin(x2[i])
yy2:index(y2,1,I)
yy2:clamp(y2[i],math.huge)
yy2:cmin(y2[i])

w:resizeAs(xx2):zero()
w:map2(xx2,xx1,function(xx,xxx2,xxx1) return math.max(xxx2-xxx1+1,0) end)
Expand Down

0 comments on commit abc4176

Please sign in to comment.