Catch case of zero division

This commit is contained in:
Nicolas Mowen 2022-09-21 07:29:01 -06:00 committed by GitHub
parent ae1899daf6
commit 45bda4ae47
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -462,6 +462,11 @@ def detect(
width = x_max - x_min
height = y_max - y_min
area = width * height
# ignore objects that were detected outside the frame
if height == 0:
continue
ratio = width / height
det = (
d[0],