mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-02-07 03:35:26 +03:00
Cleanup
This commit is contained in:
parent
b72d9a49b2
commit
7265848f94
@ -154,7 +154,7 @@ def get_region_from_grid(
|
|||||||
return new
|
return new
|
||||||
|
|
||||||
|
|
||||||
def filtered(obj, objects_to_track, object_filters):
|
def is_object_filtered(obj, objects_to_track, object_filters):
|
||||||
object_name = obj[0]
|
object_name = obj[0]
|
||||||
object_score = obj[1]
|
object_score = obj[1]
|
||||||
object_box = obj[2]
|
object_box = obj[2]
|
||||||
|
|||||||
@ -33,7 +33,12 @@ from frigate.util.image import (
|
|||||||
intersection,
|
intersection,
|
||||||
intersection_over_union,
|
intersection_over_union,
|
||||||
)
|
)
|
||||||
from frigate.util.object import get_cluster_region_from_grid
|
from frigate.util.object import (
|
||||||
|
create_tensor_input,
|
||||||
|
get_cluster_region_from_grid,
|
||||||
|
get_min_region_size,
|
||||||
|
is_object_filtered,
|
||||||
|
)
|
||||||
from frigate.util.services import listen
|
from frigate.util.services import listen
|
||||||
|
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
@ -525,7 +530,7 @@ def detect(
|
|||||||
region,
|
region,
|
||||||
)
|
)
|
||||||
# apply object filters
|
# apply object filters
|
||||||
if filtered(det, objects_to_track, object_filters):
|
if is_object_filtered(det, objects_to_track, object_filters):
|
||||||
continue
|
continue
|
||||||
detections.append(det)
|
detections.append(det)
|
||||||
return detections
|
return detections
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user