mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-02 17:25:22 +03:00
parent
fd6db32b38
commit
dd3bfa9e64
@ -346,7 +346,7 @@ def zone_filtered(obj: TrackedObject, object_config):
|
|||||||
if obj_settings.min_ratio > obj.obj_data["ratio"]:
|
if obj_settings.min_ratio > obj.obj_data["ratio"]:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
# if the object is not proportionally narrow enough
|
# if the object is proportionally too wide
|
||||||
if obj_settings.max_ratio < obj.obj_data["ratio"]:
|
if obj_settings.max_ratio < obj.obj_data["ratio"]:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
|||||||
@ -41,6 +41,7 @@ def filtered(obj, objects_to_track, object_filters):
|
|||||||
object_score = obj[1]
|
object_score = obj[1]
|
||||||
object_box = obj[2]
|
object_box = obj[2]
|
||||||
object_area = obj[3]
|
object_area = obj[3]
|
||||||
|
object_ratio = obj[4]
|
||||||
|
|
||||||
if not object_name in objects_to_track:
|
if not object_name in objects_to_track:
|
||||||
return True
|
return True
|
||||||
@ -62,6 +63,14 @@ def filtered(obj, objects_to_track, object_filters):
|
|||||||
if obj_settings.min_score > object_score:
|
if obj_settings.min_score > object_score:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
|
# if the object is not proportionally wide enough
|
||||||
|
if obj_settings.min_ratio > object_ratio:
|
||||||
|
return True
|
||||||
|
|
||||||
|
# if the object is proportionally too wide
|
||||||
|
if obj_settings.max_ratio < object_ratio:
|
||||||
|
return True
|
||||||
|
|
||||||
if not obj_settings.mask is None:
|
if not obj_settings.mask is None:
|
||||||
# compute the coordinates of the object and make sure
|
# compute the coordinates of the object and make sure
|
||||||
# the location isn't outside the bounds of the image (can happen from rounding)
|
# the location isn't outside the bounds of the image (can happen from rounding)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user