Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
drnikolaev committed Feb 28, 2019
1 parent dd29826 commit 587d488
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions python/caffe/layers/detectnet/clustering.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,14 +187,14 @@ def vote_boxes(propose_boxes, propose_cvgs, mask, self):
# GROUP RECTANGLES Clustering
######################################################################
nboxes, weights = cv.groupRectangles(
np.array(propose_boxes).tolist(),
[[e[0],e[1],e[2]-e[0],e[3]-e[1]] for e in np.array(propose_boxes).tolist()],
self.gridbox_rect_thresh,
self.gridbox_rect_eps)
if len(nboxes):
for rect, weight in zip(nboxes, weights):
if (rect[3] - rect[1]) >= self.min_height:
if rect[3] >= self.min_height:
confidence = math.log(weight[0])
detection = [rect[0], rect[1], rect[2], rect[3], confidence]
detection = [rect[0], rect[1], rect[0]+rect[2], rect[1]+rect[3], confidence]
detections_per_image.append(detection)

return detections_per_image
Expand Down

0 comments on commit 587d488

Please sign in to comment.