mirror of
				https://github.com/blakeblackshear/frigate.git
				synced 2025-10-27 10:52:11 +01:00 
			
		
		
		
	UI Fixes (#17762)
* Fix handling of non existing cameras in groups * Update docs * Improve typing
This commit is contained in:
		
							parent
							
								
									1abd3c68ec
								
							
						
					
					
						commit
						8270967cdc
					
				@ -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:
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
      });
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user