Skip to content

Commit

Permalink
Only run when boxes present
Browse files Browse the repository at this point in the history
  • Loading branch information
mattdawkins committed Aug 18, 2023
1 parent 526b14d commit aa0325f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugins/core/merge_detections_nms_fusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,11 @@ def merge( self, det_sets ):
scores_list.append( score_list )
labels_list.append( label_list )

if self._width == 1:
if self._width == 1 and len( box_list ) > 0:
norm_width = max( [ x[2] for x in box_list ] ) + 1
box_list[:] = [ [ x[0] / norm_width, x[1], x[2] / norm_width, x[3] ]
for x in box_list ]
if self._height == 1:
if self._height == 1 and len( box_list ) > 0:
norm_height = max( [ x[3] for x in box_list ] ) + 1
box_list[:] = [ [ x[0], x[1] / norm_height, x[2], x[3] / norm_height ]
for x in box_list ]
Expand Down

0 comments on commit aa0325f

Please sign in to comment.