Ignore source of error

The error is occurring due to a detections bounding box starting beyond the frame, this should be immediately ignored
This commit is contained in:
Nicolas Mowen 2022-09-21 07:47:20 -06:00 committed by GitHub
parent c916e9bf03
commit 75c5718c06
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -459,14 +459,14 @@ def detect(
y_min = int(max(0, (box[0] * size) + region[1])) y_min = int(max(0, (box[0] * size) + region[1]))
x_max = int(min(detect_config.width - 1, (box[3] * size) + region[0])) x_max = int(min(detect_config.width - 1, (box[3] * size) + region[0]))
y_max = int(min(detect_config.height - 1, (box[2] * size) + region[1])) y_max = int(min(detect_config.height - 1, (box[2] * size) + region[1]))
# ignore objects that were detected outside the frame
if y_min >= detect_config.height - 1:
continue
width = x_max - x_min width = x_max - x_min
height = y_max - y_min height = y_max - y_min
area = width * height area = width * height
# ignore objects that were detected outside the frame
if height <= 0:
continue
ratio = width / height ratio = width / height
det = ( det = (
d[0], d[0],