mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-05-03 12:07:40 +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):
|
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 custom classification tflite model.")
|
name: str | None = Field(default=None, title="Name of classification model.")
|
||||||
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)
|
||||||
|
|
||||||
|
|||||||
@ -706,6 +706,10 @@ class FrigateConfig(FrigateBaseModel):
|
|||||||
verify_objects_track(camera_config, labelmap_objects)
|
verify_objects_track(camera_config, labelmap_objects)
|
||||||
verify_lpr_and_face(self, camera_config)
|
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.objects.parse_all_objects(self.cameras)
|
||||||
self.model.create_colormap(sorted(self.objects.all_objects))
|
self.model.create_colormap(sorted(self.objects.all_objects))
|
||||||
self.model.check_and_load_plus_model(self.plus_api)
|
self.model.check_and_load_plus_model(self.plus_api)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user