From 676ab65cbacf3dae2c2b6f905bf4ef012b5400ae Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Wed, 28 Feb 2024 14:43:58 -0700 Subject: [PATCH] Formatting --- frigate/detectors/detector_config.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frigate/detectors/detector_config.py b/frigate/detectors/detector_config.py index 3d92d5b6e..4958827d1 100644 --- a/frigate/detectors/detector_config.py +++ b/frigate/detectors/detector_config.py @@ -36,7 +36,9 @@ class ModelTypeEnum(str, Enum): class ModelConfig(BaseModel): path: Optional[str] = Field(None, title="Custom Object detection model path.") - labelmap_path: Optional[str] = Field(None, title="Label map for custom object detector.") + labelmap_path: Optional[str] = Field( + None, title="Label map for custom object detector." + ) width: int = Field(default=320, title="Object detection model input width.") height: int = Field(default=320, title="Object detection model input height.") labelmap: Dict[int, str] = Field( @@ -131,6 +133,7 @@ class ModelConfig(BaseModel): for key, val in enumerate(enabled_labels): self._colormap[val] = tuple(int(round(255 * c)) for c in cmap(key)[:3]) + model_config = ConfigDict(extra="forbid")