From da1478c0c14e491444a5c3b2307ee175af3b63dc Mon Sep 17 00:00:00 2001 From: Nicolas Mowen Date: Thu, 26 Sep 2024 17:58:58 -0600 Subject: [PATCH] Update object_detectors.md (#13994) * Update object_detectors.md * Use info * Move CPU detector to bottom * Moce CPU to bottom * Add missing detector keys --- docs/docs/configuration/object_detectors.md | 63 ++++++++++++--------- 1 file changed, 35 insertions(+), 28 deletions(-) diff --git a/docs/docs/configuration/object_detectors.md b/docs/docs/configuration/object_detectors.md index c500ff78e..3a7ec2f25 100644 --- a/docs/docs/configuration/object_detectors.md +++ b/docs/docs/configuration/object_detectors.md @@ -5,6 +5,8 @@ title: Object Detectors # Supported Hardware +:::info + Frigate supports multiple different detectors that work on different types of hardware: **Most Hardware** @@ -26,37 +28,14 @@ Frigate supports multiple different detectors that work on different types of ha **Rockchip** - [RKNN](#rockchip-platform): RKNN models can run on Rockchip devices with included NPUs. -# Officially Supported Detectors - -Frigate provides the following builtin detector types: `cpu`, `edgetpu`, `openvino`, `tensorrt`, `rknn`, and `hailo8l`. By default, Frigate will use a single CPU detector. Other detectors may require additional configuration as described below. When using multiple detectors they will run in dedicated processes, but pull from a common queue of detection requests from across all cameras. - -## CPU Detector (not recommended) - -The CPU detector type runs a TensorFlow Lite model utilizing the CPU without hardware acceleration. It is recommended to use a hardware accelerated detector type instead for better performance. To configure a CPU based detector, set the `"type"` attribute to `"cpu"`. - -:::tip - -If you do not have GPU or Edge TPU hardware, using the [OpenVINO Detector](#openvino-detector) is often more efficient than using the CPU detector. +**For Testing** +- [CPU Detector (not recommended for actual use](#cpu-detector-not-recommended): Use a CPU to run tflite model, this is not recommended and in most cases OpenVINO can be used in CPU mode with better results. ::: -The number of threads used by the interpreter can be specified using the `"num_threads"` attribute, and defaults to `3.` +# Officially Supported Detectors -A TensorFlow Lite model is provided in the container at `/cpu_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`. - -```yaml -detectors: - cpu1: - type: cpu - num_threads: 3 - model: - path: "/custom_model.tflite" - cpu2: - type: cpu - num_threads: 3 -``` - -When using CPU detectors, you can add one CPU detector per camera. Adding more detectors than the number of cameras should not improve performance. +Frigate provides the following builtin detector types: `cpu`, `edgetpu`, `hailo8l`, `onnx`, `openvino`, `rknn`, `rocm`, and `tensorrt`. By default, Frigate will use a single CPU detector. Other detectors may require additional configuration as described below. When using multiple detectors they will run in dedicated processes, but pull from a common queue of detection requests from across all cameras. ## Edge TPU Detector @@ -418,7 +397,7 @@ After placing the downloaded onnx model in your config folder, you can use the f ```yaml detectors: - onnx: + rocm: type: rocm model: @@ -484,6 +463,34 @@ model: Note that the labelmap uses a subset of the complete COCO label set that has only 80 objects. +## CPU Detector (not recommended) + +The CPU detector type runs a TensorFlow Lite model utilizing the CPU without hardware acceleration. It is recommended to use a hardware accelerated detector type instead for better performance. To configure a CPU based detector, set the `"type"` attribute to `"cpu"`. + +:::danger + +The CPU detector is not recommended for general use. If you do not have GPU or Edge TPU hardware, using the [OpenVINO Detector](#openvino-detector) in CPU mode is often more efficient than using the CPU detector. + +::: + +The number of threads used by the interpreter can be specified using the `"num_threads"` attribute, and defaults to `3.` + +A TensorFlow Lite model is provided in the container at `/cpu_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`. + +```yaml +detectors: + cpu1: + type: cpu + num_threads: 3 + model: + path: "/custom_model.tflite" + cpu2: + type: cpu + num_threads: 3 +``` + +When using CPU detectors, you can add one CPU detector per camera. Adding more detectors than the number of cameras should not improve performance. + ## Deepstack / CodeProject.AI Server Detector The Deepstack / CodeProject.AI Server detector for Frigate allows you to integrate Deepstack and CodeProject.AI object detection capabilities into Frigate. CodeProject.AI and DeepStack are open-source AI platforms that can be run on various devices such as the Raspberry Pi, Nvidia Jetson, and other compatible hardware. It is important to note that the integration is performed over the network, so the inference times may not be as fast as native Frigate detectors, but it still provides an efficient and reliable solution for object detection and tracking.