NVR with realtime local object detection for IP cameras
TypeScript aicameragoogle-coralhome-assistanthome-automationhomeautomationmqttnvrobject-detectionrealtimertsptensorflow
Update openvino to 2024.3 (#13861)
Nicolas Mowen61a4a4bc2f68
diff --git a/docker/main/requirements-wheels-post.txt b/docker/main/requirements-wheels-post.txtindex c4ed338444..a1686f091a 100644--- a/docker/main/requirements-wheels-post.txt+++ b/docker/main/requirements-wheels-post.txt@@ -1,3 +1,3 @@# ONNX-onnxruntime-openvino == 1.18.* ; platform_machine == 'x86_64'-onnxruntime == 1.18.* ; platform_machine == 'aarch64'\ No newline at end of file+onnxruntime-openvino == 1.19.* ; platform_machine == 'x86_64'+onnxruntime == 1.19.* ; platform_machine == 'aarch64'\ No newline at end of filediff --git a/docker/main/requirements-wheels.txt b/docker/main/requirements-wheels.txtindex 639d4b3c84..a704cde164 100644--- a/docker/main/requirements-wheels.txt+++ b/docker/main/requirements-wheels.txt@@ -28,8 +28,8 @@ norfair == 2.2.*setproctitle == 1.3.*ws4py == 0.5.*unidecode == 1.3.*-# OpenVino & ONNX-openvino == 2024.1.*+# OpenVino (ONNX installed in wheels-post)+openvino == 2024.3.*# Embeddingschromadb == 0.5.0onnx_clip == 4.0.*diff --git a/frigate/detectors/plugins/onnx.py b/frigate/detectors/plugins/onnx.pyindex f3e15422b2..f690a232f4 100644--- a/frigate/detectors/plugins/onnx.py+++ b/frigate/detectors/plugins/onnx.py@@ -2,6 +2,7 @@ import loggingimport osimport numpy as np+from pydantic import Fieldfrom typing_extensions import Literalfrom frigate.detectors.detection_api import DetectionApi@@ -17,6 +18,7 @@ DETECTOR_KEY = "onnx"class ONNXDetectorConfig(BaseDetectorConfig):type: Literal[DETECTOR_KEY]+ device: str = Field(default="AUTO", title="Device Type")class ONNXDetector(DetectionApi):@@ -36,7 +38,11 @@ class ONNXDetector(DetectionApi):path = detector_config.model.pathlogger.info(f"ONNX: loading {detector_config.model.path}")- providers = ort.get_available_providers()+ providers = (+ ["CPUExecutionProvider"]+ if detector_config.device == "CPU"+ else ort.get_available_providers()+ )options = []for provider in providers:@@ -59,7 +65,7 @@ class ONNXDetector(DetectionApi):options.append({"cache_dir": "/config/model_cache/openvino/ort",- "device_type": "GPU",+ "device_type": detector_config.device,})else:diff --git a/frigate/detectors/plugins/openvino.py b/frigate/detectors/plugins/openvino.pyindex 897b844304..5dc9984873 100644--- a/frigate/detectors/plugins/openvino.py+++ b/frigate/detectors/plugins/openvino.py@@ -30,12 +30,6 @@ class OvDetector(DetectionApi):self.h = detector_config.model.heightself.w = detector_config.model.width- if detector_config.device == "AUTO":- logger.warning(- "OpenVINO AUTO device type is not currently supported. Attempting to use GPU instead."- )- detector_config.device = "GPU"-if not os.path.isfile(detector_config.model.path):logger.error(f"OpenVino model file {detector_config.model.path} not found.")raise FileNotFoundError