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):
|
||||
enabled: bool = Field(default=True, title="Enable running the model.")
|
||||
model_path: str = Field(title="Path to teachable machine tflite model.")
|
||||
labelmap_path: str = Field(title="Path to teachable machine labelmap.")
|
||||
model_path: str = Field(title="Path to custom classification tflite model.")
|
||||
labelmap_path: str = Field(title="Path to custom classification model labelmap.")
|
||||
object_config: CustomClassificationObjectConfig | 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."
|
||||
)
|
||||
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
|
||||
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(
|
||||
CustomStateClassificationProcessor(self.config, model, self.metrics)
|
||||
if model.state_config != None
|
||||
@ -482,7 +482,7 @@ class EmbeddingMaintainer(threading.Thread):
|
||||
if (
|
||||
camera_config.type != CameraTypeEnum.lpr
|
||||
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
|
||||
return
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user