mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-08-02 17:12:16 +03:00
Add ability to configure when custom classification models run (#18380)
* Add config to control when classification models are run * Cleanup
This commit is contained in:
committed by
Blake Blackshear
parent
53ff33135b
commit
723553edb7
@@ -38,12 +38,24 @@ class CustomClassificationStateCameraConfig(FrigateBaseModel):
|
||||
crop: list[int, int, int, int] = Field(
|
||||
title="Crop of image frame on this camera to run classification on."
|
||||
)
|
||||
threshold: float = Field(
|
||||
default=0.8, title="Classification score threshold to change the state."
|
||||
)
|
||||
|
||||
|
||||
class CustomClassificationStateConfig(FrigateBaseModel):
|
||||
cameras: Dict[str, CustomClassificationStateCameraConfig] = Field(
|
||||
title="Cameras to run classification on."
|
||||
)
|
||||
motion: bool = Field(
|
||||
default=False,
|
||||
title="If classification should be run when motion is detected in the crop.",
|
||||
)
|
||||
interval: int | None = Field(
|
||||
default=None,
|
||||
title="Interval to run classification on in seconds.",
|
||||
gt=0,
|
||||
)
|
||||
|
||||
|
||||
class CustomClassificationObjectConfig(FrigateBaseModel):
|
||||
|
||||
Reference in New Issue
Block a user