mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Cleanup
This commit is contained in:
parent
5df1cf6d1d
commit
dd8085993d
@ -52,8 +52,8 @@ class CustomClassificationObjectConfig(FrigateBaseModel):
|
|||||||
|
|
||||||
class CustomClassificationConfig(FrigateBaseModel):
|
class CustomClassificationConfig(FrigateBaseModel):
|
||||||
enabled: bool = Field(default=True, title="Enable running the model.")
|
enabled: bool = Field(default=True, title="Enable running the model.")
|
||||||
model_path: str = Field(title="Path to teachable machine tflite model.")
|
model_path: str = Field(title="Path to custom classification tflite model.")
|
||||||
labelmap_path: str = Field(title="Path to teachable machine labelmap.")
|
labelmap_path: str = Field(title="Path to custom classification model labelmap.")
|
||||||
object_config: CustomClassificationObjectConfig | None = Field(default=None)
|
object_config: CustomClassificationObjectConfig | None = Field(default=None)
|
||||||
state_config: CustomClassificationStateConfig | None = Field(default=None)
|
state_config: CustomClassificationStateConfig | None = Field(default=None)
|
||||||
|
|
||||||
@ -63,7 +63,7 @@ class ClassificationConfig(FrigateBaseModel):
|
|||||||
default_factory=BirdClassificationConfig, title="Bird classification config."
|
default_factory=BirdClassificationConfig, title="Bird classification config."
|
||||||
)
|
)
|
||||||
custom: Dict[str, CustomClassificationConfig] = Field(
|
custom: Dict[str, CustomClassificationConfig] = Field(
|
||||||
default={}, title="Teachable Machine Model Configs."
|
default={}, title="Custom Classification Model Configs."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
"""Real time processor that works with teachable machine tflite models."""
|
"""Real time processor that works with classification tflite models."""
|
||||||
|
|
||||||
import logging
|
import logging
|
||||||
from typing import Any
|
from typing import Any
|
||||||
|
|||||||
@ -147,7 +147,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
for model in self.config.classification.teachable_machine.values():
|
for model in self.config.classification.custom.values():
|
||||||
self.realtime_processors.append(
|
self.realtime_processors.append(
|
||||||
CustomStateClassificationProcessor(self.config, model, self.metrics)
|
CustomStateClassificationProcessor(self.config, model, self.metrics)
|
||||||
if model.state_config != None
|
if model.state_config != None
|
||||||
@ -482,7 +482,7 @@ class EmbeddingMaintainer(threading.Thread):
|
|||||||
if (
|
if (
|
||||||
camera_config.type != CameraTypeEnum.lpr
|
camera_config.type != CameraTypeEnum.lpr
|
||||||
or "license_plate" in camera_config.objects.track
|
or "license_plate" in camera_config.objects.track
|
||||||
) and len(self.config.classification.teachable_machine) == 0:
|
) and len(self.config.classification.custom) == 0:
|
||||||
# no active features that use this data
|
# no active features that use this data
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user