mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-03-17 05:38:25 +03:00
Add handler for license plate which is not expected to be stationary (#22416)
This commit is contained in:
parent
544d3c6139
commit
f29ee53fb4
@ -55,6 +55,14 @@ DYNAMIC_OBJECT_THRESHOLDS = StationaryThresholds(
|
|||||||
motion_classifier_enabled=True,
|
motion_classifier_enabled=True,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Thresholds for objects that are not expected to be stationary
|
||||||
|
NON_STATIONARY_OBJECT_THRESHOLDS = StationaryThresholds(
|
||||||
|
objects=["license_plate"],
|
||||||
|
known_active_iou=0.9,
|
||||||
|
stationary_check_iou=0.9,
|
||||||
|
max_stationary_history=4,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
def get_stationary_threshold(label: str) -> StationaryThresholds:
|
def get_stationary_threshold(label: str) -> StationaryThresholds:
|
||||||
"""Get the stationary thresholds for a given object label."""
|
"""Get the stationary thresholds for a given object label."""
|
||||||
@ -65,6 +73,9 @@ def get_stationary_threshold(label: str) -> StationaryThresholds:
|
|||||||
if label in DYNAMIC_OBJECT_THRESHOLDS.objects:
|
if label in DYNAMIC_OBJECT_THRESHOLDS.objects:
|
||||||
return DYNAMIC_OBJECT_THRESHOLDS
|
return DYNAMIC_OBJECT_THRESHOLDS
|
||||||
|
|
||||||
|
if label in NON_STATIONARY_OBJECT_THRESHOLDS.objects:
|
||||||
|
return NON_STATIONARY_OBJECT_THRESHOLDS
|
||||||
|
|
||||||
return StationaryThresholds()
|
return StationaryThresholds()
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user