Skip to content

Commit

Permalink
Minor refactorings
Browse files Browse the repository at this point in the history
To make pylint happy
  • Loading branch information
kuba-conceptual committed Dec 4, 2024
1 parent 15cdad2 commit 6d04b6b
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions net/utilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -542,10 +542,7 @@ def get_detections_after_soft_non_maximum_suppression(detections, sigma, score_t
max_x = np.minimum(detections[0, 2], detections[1:, 2])
max_y = np.minimum(detections[0, 3], detections[1:, 3])

overlap_width = np.maximum(max_x - min_x + 1, 0.0)
overlap_height = np.maximum(max_y - min_y + 1, 0.0)

intersection_area = overlap_width * overlap_height
intersection_area = np.maximum(max_x - min_x + 1, 0.0) * np.maximum(max_y - min_y + 1, 0.0)
intersection_over_union = \
intersection_area / (detections[0, areas_index] + detections[1:, areas_index] - intersection_area)

Expand Down

0 comments on commit 6d04b6b

Please sign in to comment.