mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
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:
parent
c916e9bf03
commit
75c5718c06
@ -459,14 +459,14 @@ def detect(
|
||||
y_min = int(max(0, (box[0] * size) + region[1]))
|
||||
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]))
|
||||
|
||||
# ignore objects that were detected outside the frame
|
||||
if y_min >= detect_config.height - 1:
|
||||
continue
|
||||
|
||||
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],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user