mirror of
https://github.com/blakeblackshear/frigate.git
synced 2025-08-13 13:47:36 +02:00
Add 'device' key to semantic search and face recognition. Modify LPR device key.
This commit is contained in:
parent
c3410cd13e
commit
d60d605e69
@ -19,11 +19,6 @@ class SemanticSearchModelEnum(str, Enum):
|
|||||||
jinav2 = "jinav2"
|
jinav2 = "jinav2"
|
||||||
|
|
||||||
|
|
||||||
class LPRDeviceEnum(str, Enum):
|
|
||||||
GPU = "GPU"
|
|
||||||
CPU = "CPU"
|
|
||||||
|
|
||||||
|
|
||||||
class BirdClassificationConfig(FrigateBaseModel):
|
class BirdClassificationConfig(FrigateBaseModel):
|
||||||
enabled: bool = Field(default=False, title="Enable bird classification.")
|
enabled: bool = Field(default=False, title="Enable bird classification.")
|
||||||
threshold: float = Field(
|
threshold: float = Field(
|
||||||
@ -52,6 +47,11 @@ class SemanticSearchConfig(FrigateBaseModel):
|
|||||||
model_size: str = Field(
|
model_size: str = Field(
|
||||||
default="small", title="The size of the embeddings model used."
|
default="small", title="The size of the embeddings model used."
|
||||||
)
|
)
|
||||||
|
device: str = Field(
|
||||||
|
default="CPU",
|
||||||
|
title="The device to use for license plate recognition.",
|
||||||
|
description="Use 'cpu' or 'gpu', to target a specific gpu use: '0', '1', etc.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class FaceRecognitionConfig(FrigateBaseModel):
|
class FaceRecognitionConfig(FrigateBaseModel):
|
||||||
@ -92,6 +92,11 @@ class FaceRecognitionConfig(FrigateBaseModel):
|
|||||||
blur_confidence_filter: bool = Field(
|
blur_confidence_filter: bool = Field(
|
||||||
default=True, title="Apply blur quality filter to face confidence."
|
default=True, title="Apply blur quality filter to face confidence."
|
||||||
)
|
)
|
||||||
|
device: str = Field(
|
||||||
|
default="CPU",
|
||||||
|
title="The device to use for license plate recognition.",
|
||||||
|
description="Use 'cpu' or 'gpu', to target a specific gpu use: '0', '1', etc.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CameraFaceRecognitionConfig(FrigateBaseModel):
|
class CameraFaceRecognitionConfig(FrigateBaseModel):
|
||||||
@ -105,10 +110,6 @@ class CameraFaceRecognitionConfig(FrigateBaseModel):
|
|||||||
|
|
||||||
class LicensePlateRecognitionConfig(FrigateBaseModel):
|
class LicensePlateRecognitionConfig(FrigateBaseModel):
|
||||||
enabled: bool = Field(default=False, title="Enable license plate recognition.")
|
enabled: bool = Field(default=False, title="Enable license plate recognition.")
|
||||||
device: Optional[LPRDeviceEnum] = Field(
|
|
||||||
default=LPRDeviceEnum.CPU,
|
|
||||||
title="The device used for license plate recognition.",
|
|
||||||
)
|
|
||||||
model_size: str = Field(
|
model_size: str = Field(
|
||||||
default="small", title="The size of the embeddings model used."
|
default="small", title="The size of the embeddings model used."
|
||||||
)
|
)
|
||||||
@ -154,6 +155,11 @@ class LicensePlateRecognitionConfig(FrigateBaseModel):
|
|||||||
default=False,
|
default=False,
|
||||||
title="Save plates captured for LPR for debugging purposes.",
|
title="Save plates captured for LPR for debugging purposes.",
|
||||||
)
|
)
|
||||||
|
device: str = Field(
|
||||||
|
default="CPU",
|
||||||
|
title="The device to use for license plate recognition.",
|
||||||
|
description="Use 'cpu' or 'gpu', to target a specific gpu use: '0', '1', etc.",
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
class CameraLicensePlateRecognitionConfig(FrigateBaseModel):
|
class CameraLicensePlateRecognitionConfig(FrigateBaseModel):
|
||||||
@ -174,4 +180,4 @@ class CameraLicensePlateRecognitionConfig(FrigateBaseModel):
|
|||||||
le=10,
|
le=10,
|
||||||
)
|
)
|
||||||
|
|
||||||
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
model_config = ConfigDict(extra="forbid", protected_namespaces=())
|
Loading…
Reference in New Issue
Block a user