mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-01 19:17:41 +03:00
Include name as field
This commit is contained in:
parent
34a85b238b
commit
53b8b1335f
@ -85,8 +85,7 @@ class CustomClassificationObjectConfig(FrigateBaseModel):
|
||||
|
||||
class CustomClassificationConfig(FrigateBaseModel):
|
||||
enabled: bool = Field(default=True, title="Enable running the model.")
|
||||
model_path: str = Field(title="Path to custom classification tflite model.")
|
||||
labelmap_path: str = Field(title="Path to custom classification model labelmap.")
|
||||
name: str | None = Field(default=None, title="Name of classification model.")
|
||||
object_config: CustomClassificationObjectConfig | None = Field(default=None)
|
||||
state_config: CustomClassificationStateConfig | None = Field(default=None)
|
||||
|
||||
|
||||
@ -706,6 +706,10 @@ class FrigateConfig(FrigateBaseModel):
|
||||
verify_objects_track(camera_config, labelmap_objects)
|
||||
verify_lpr_and_face(self, camera_config)
|
||||
|
||||
# set names on classification configs
|
||||
for name, config in self.classification.custom.items():
|
||||
config.name = name
|
||||
|
||||
self.objects.parse_all_objects(self.cameras)
|
||||
self.model.create_colormap(sorted(self.objects.all_objects))
|
||||
self.model.check_and_load_plus_model(self.plus_api)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user