Skip to content

Commit 45ac520

Browse files
authored
Merge pull request #3486 from tropicbird/master
Fix coordinates range of the detected bounding boxes.
2 parents c380bdb + 435dafa commit 45ac520

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

demos/multi_camera_multi_target_tracking_demo/python/utils/network_wrappers.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,8 @@ def __decode_detections(self, out, frame_shape, only_target_class):
7979

8080
left = int(max(detection[3], 0) * frame_shape[1])
8181
top = int(max(detection[4], 0) * frame_shape[0])
82-
right = int(max(detection[5], 0) * frame_shape[1])
83-
bottom = int(max(detection[6], 0) * frame_shape[0])
82+
right = int(min(detection[5], 1) * frame_shape[1])
83+
bottom = int(min(detection[6], 1) * frame_shape[0])
8484
if self.expand_ratio != (1., 1.):
8585
w = (right - left)
8686
h = (bottom - top)

0 commit comments

Comments
 (0)