* Fix handling of non existing cameras in groups

* Update docs

* Improve typing
This commit is contained in:
Nicolas Mowen 2025-04-17 13:48:09 -06:00 committed by GitHub
parent 1abd3c68ec
commit 8270967cdc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 26 additions and 3 deletions

View File

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

View File

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

View File

@ -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);
});

View File

@ -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);
});