mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-03 01:35:22 +03:00
Catch case of zero division
This commit is contained in:
parent
ae1899daf6
commit
45bda4ae47
@ -462,6 +462,11 @@ def detect(
|
|||||||
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],
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user