Skip to content

NVR with realtime local object detection for IP cameras

UI Fixes (#17762)

Nicolas Mowen8270967cdc1f
diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md
index 370fdb00a4..5b92c03d0b 100644
--- a/docs/docs/configuration/object_detectors.md
+++ b/docs/docs/configuration/object_detectors.md
@@ -882,7 +882,7 @@ output_name: "{input_basename}"
config:
mean_values: [[0, 0, 0]]
std_values: [[255, 255, 255]]
- quant_img_rgb2bgr: true
+ quant_img_RGB2BGR: true
```
Explanation of the paramters:
diff --git a/frigate/detectors/detection_api.py b/frigate/detectors/detection_api.py
index 403bce574b..ccccc1b65d 100644
--- a/frigate/detectors/detection_api.py
+++ b/frigate/detectors/detection_api.py
@@ -4,7 +4,7 @@ from typing import List
import numpy as np
-from frigate.detectors.detector_config import ModelTypeEnum
+from frigate.detectors.detector_config import BaseDetectorConfig, ModelTypeEnum
logger = logging.getLogger(__name__)
@@ -14,7 +14,7 @@ class DetectionApi(ABC):
supported_models: List[ModelTypeEnum]
@abstractmethod
- def __init__(self, detector_config):
+ def __init__(self, detector_config: BaseDetectorConfig):
self.detector_config = detector_config
self.thresh = 0.5
self.height = detector_config.model.height
diff --git a/web/src/components/filter/SearchFilterGroup.tsx b/web/src/components/filter/SearchFilterGroup.tsx
index 77cd95db0f..a35ca145e3 100644
--- a/web/src/components/filter/SearchFilterGroup.tsx
+++ b/web/src/components/filter/SearchFilterGroup.tsx
@@ -63,6 +63,11 @@ export default function SearchFilterGroup({
return;
}
const cameraConfig = config.cameras[camera];
+
+ if (!cameraConfig) {
+ return;
+ }
+
cameraConfig.objects.track.forEach((label) => {
if (!config.model.all_attributes.includes(label)) {
labels.add(label);
@@ -99,7 +104,13 @@ export default function SearchFilterGroup({
if (camera == "birdseye") {
return;
}
+
const cameraConfig = config.cameras[camera];
+
+ if (!cameraConfig) {
+ return;
+ }
+
Object.entries(cameraConfig.zones).map(([name, _]) => {
zones.add(name);
});
diff --git a/web/src/views/search/SearchView.tsx b/web/src/views/search/SearchView.tsx
index 96a7d7be62..7fadeccaa0 100644
--- a/web/src/views/search/SearchView.tsx
+++ b/web/src/views/search/SearchView.tsx
@@ -107,7 +107,13 @@ export default function SearchView({
if (camera == "birdseye") {
return;
}
+
const cameraConfig = config.cameras[camera];
+
+ if (!cameraConfig) {
+ return;
+ }
+
cameraConfig.objects.track.forEach((label) => {
labels.add(label);
});
@@ -139,7 +145,13 @@ export default function SearchView({
if (camera == "birdseye") {
return;
}
+
const cameraConfig = config.cameras[camera];
+
+ if (!cameraConfig) {
+ return;
+ }
+
Object.entries(cameraConfig.zones).map(([name, _]) => {
zones.add(name);
});