mirror of
https://github.com/blakeblackshear/frigate.git
synced 2024-11-21 19:07:46 +01:00
4383b883c0
* Refactor EdgeTPU and CPU model handling to detector submodules. * Fix selecting the correct detection device type from the config * Remove detector type check when creating ObjectDetectProcess * Fixes after rebasing to 0.11 * Add init file to detector folder * Rename to detect_api Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com> * Add unit test for LocalObjectDetector class * Add configuration for model inputs Support transforming detection regions to RGB or BGR. Support specifying the input tensor shape. The tensor shape has a standard format ["BHWC"] when handed to the detector, but can be transformed in the detector to match the model shape using the model input_tensor config. * Add documentation for new model config parameters * Add input tensor transpose to LocalObjectDetector * Change the model input tensor config to use an enumeration * Updates for model config documentation Co-authored-by: Nicolas Mowen <nickmowen213@gmail.com>
32 lines
950 B
Python
32 lines
950 B
Python
from typing import Optional, TypedDict
|
|
from multiprocessing.queues import Queue
|
|
from multiprocessing.sharedctypes import Synchronized
|
|
from multiprocessing.context import Process
|
|
|
|
from frigate.object_detection import ObjectDetectProcess
|
|
|
|
|
|
class CameraMetricsTypes(TypedDict):
|
|
camera_fps: Synchronized
|
|
capture_process: Optional[Process]
|
|
detection_enabled: Synchronized
|
|
detection_fps: Synchronized
|
|
detection_frame: Synchronized
|
|
ffmpeg_pid: Synchronized
|
|
frame_queue: Queue
|
|
motion_enabled: Synchronized
|
|
improve_contrast_enabled: Synchronized
|
|
motion_threshold: Synchronized
|
|
motion_contour_area: Synchronized
|
|
process: Optional[Process]
|
|
process_fps: Synchronized
|
|
read_start: Synchronized
|
|
skipped_fps: Synchronized
|
|
|
|
|
|
class StatsTrackingTypes(TypedDict):
|
|
camera_metrics: dict[str, CameraMetricsTypes]
|
|
detectors: dict[str, ObjectDetectProcess]
|
|
started: int
|
|
latest_frigate_version: str
|