From 68e001aa0d839330f98ed231512f987fe0f614a8 Mon Sep 17 00:00:00 2001 From: Dennis George Date: Sat, 10 Dec 2022 22:45:04 -0600 Subject: [PATCH] fix grammar, adjust device defaults --- docs/docs/configuration/detectors.md | 4 ++-- frigate/detectors/plugins/edgetpu_tfl.py | 2 +- frigate/detectors/plugins/openvino.py | 2 +- frigate/test/test_config.py | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/docs/docs/configuration/detectors.md b/docs/docs/configuration/detectors.md index cd26ecd26c..e87f264b5d 100644 --- a/docs/docs/configuration/detectors.md +++ b/docs/docs/configuration/detectors.md @@ -32,7 +32,7 @@ When using CPU detectors, you can add one CPU detector per camera. Adding more d The EdgeTPU detector type runs a TensorFlow Lite model utilizing the Google Coral delegate for hardware acceleration. To configure an EdgeTPU detector, set the `"type"` attribute to `"edgetpu"`. -The EdgeTPU device can specified using the `"device"` attribute according to the [Documentation for the TensorFlow Lite Python API](https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api). If not set, the delegate will use the first device it finds. +The EdgeTPU device can be specified using the `"device"` attribute according to the [Documentation for the TensorFlow Lite Python API](https://coral.ai/docs/edgetpu/multiple-edgetpu/#using-the-tensorflow-lite-python-api). If not set, the delegate will use the first device it finds. A TensorFlow Lite model is provided in the container at `/edgetpu_model.tflite` and is used by this detector type by default. To provide your own model, bind mount the file into the container and provide the path with `model.path`. @@ -97,7 +97,7 @@ detectors: The OpenVINO detector type runs an OpenVINO IR model on Intel CPU, GPU and VPU hardware. To configure an OpenVINO detector, set the `"type"` attribute to `"openvino"`. -The OpenVINO device plugin is specified using the `"device"` attribute according to naming conventions in the [Device Documentation](https://docs.openvino.ai/latest/openvino_docs_OV_UG_Working_with_devices.html). Other supported devices could be `AUTO`, `CPU`, `GPU`, `MYRIAD`, etc. If not specified, the default OpenVINO device will be selected by the `AUTO` plugin. +The OpenVINO device to be used is specified using the `"device"` attribute according to the naming conventions in the [Device Documentation](https://docs.openvino.ai/latest/openvino_docs_OV_UG_Working_with_devices.html). Other supported devices could be `AUTO`, `CPU`, `GPU`, `MYRIAD`, etc. If not specified, the default OpenVINO device will be selected by the `AUTO` plugin. OpenVINO is supported on 6th Gen Intel platforms (Skylake) and newer. A supported Intel platform is required to use the `GPU` device with OpenVINO. The `MYRIAD` device may be run on any platform, including Arm devices. For detailed system requirements, see [OpenVINO System Requirements](https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/system-requirements.html) diff --git a/frigate/detectors/plugins/edgetpu_tfl.py b/frigate/detectors/plugins/edgetpu_tfl.py index 49fd14e779..024e6574b0 100644 --- a/frigate/detectors/plugins/edgetpu_tfl.py +++ b/frigate/detectors/plugins/edgetpu_tfl.py @@ -16,7 +16,7 @@ class EdgeTpuDetectorConfig(BaseDetectorConfig): type: Literal[DETECTOR_KEY] - device: str = Field(default="usb", title="Device Type") + device: str = Field(default=None, title="Device Type") class EdgeTpuTfl(DetectionApi): diff --git a/frigate/detectors/plugins/openvino.py b/frigate/detectors/plugins/openvino.py index b4eb024a22..93f3cf6a6f 100644 --- a/frigate/detectors/plugins/openvino.py +++ b/frigate/detectors/plugins/openvino.py @@ -15,7 +15,7 @@ class OvDetectorConfig(BaseDetectorConfig): type: Literal[DETECTOR_KEY] - device: str = Field(default="AUTO", title="Device Type") + device: str = Field(default=None, title="Device Type") class OvDetector(DetectionApi): diff --git a/frigate/test/test_config.py b/frigate/test/test_config.py index 4d88f9af33..97e63cfc5d 100644 --- a/frigate/test/test_config.py +++ b/frigate/test/test_config.py @@ -69,8 +69,8 @@ def test_detector_custom_model_path(self): assert runtime_config.detectors["openvino"].type == DetectorTypeEnum.openvino assert runtime_config.detectors["cpu"].num_threads == 3 - assert runtime_config.detectors["edgetpu"].device == "usb" - assert runtime_config.detectors["openvino"].device == "AUTO" + assert runtime_config.detectors["edgetpu"].device is None + assert runtime_config.detectors["openvino"].device is None assert runtime_config.model.path == "/default.tflite" assert runtime_config.detectors["cpu"].model.path == "/cpu_model.tflite"