This commit is contained in:
Nicolas Mowen 2025-05-23 07:01:10 -06:00
parent 5df1cf6d1d
commit dd8085993d
3 changed files with 6 additions and 6 deletions

View File

@ -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."
)

View File

@ -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

View File

@ -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