NanoDet-Plus documentation

This commit is contained in:
knoffelcut 2026-06-03 21:02:59 +02:00
parent 6b80061cfd
commit 32d1c94b86

View File

@ -494,7 +494,8 @@ detectors:
| [YOLO-NAS](#yolo-nas) | ✅ | ✅ | |
| [MobileNet v2](#ssdlite-mobilenet-v2) | ✅ | ✅ | Fast and lightweight model, less accurate than larger models |
| [YOLOX](#yolox) | ✅ | ? | |
| [D-FINE / DEIMv2](#d-fine--deimv2) | ❌ | ❌ | |
| [D-FINE](#d-fine) | ❌ | ❌ | |
| [NanoDet-Plus](#nanodet-plus) | ? | ? | |
#### SSDLite MobileNet v2
@ -791,6 +792,44 @@ Note that the labelmap uses a subset of the complete COCO label set that has onl
</details>
#### NanoDet-Plus
[NanoDet-Plus](https://github.com/RangiLyu/nanodet) is a lightweight object detection model that achieves
good accuracy on CPUs given its small footprint.
Script to export an ONNX model for use in Frigate is provided in [the models section](#downloading-nanodet-plus-models).
:::warning
NanoDet-Plus has not been tested in GPU nor NPU modes.
:::
<details>
<summary>NanoDet-Plus Setup & Config</summary>
After placing the exported onnx model in your config/model_cache folder, you can use the following configuration:
```yaml
detectors:
ov:
type: openvino
device: CPU
model:
model_type: nanodet_plus
width: 320
height: 320
input_tensor: nchw
input_dtype: float
input_pixel_format: bgr
path: /config/model_cache/nanodet_plus.onnx
labelmap_path: /labelmap/coco-80.txt
```
Note that the labelmap uses a subset of the complete COCO label set that has only 80 objects.
</details>
## Apple Silicon detector
The NPU in Apple Silicon can't be accessed from within a container, so the [Apple Silicon detector client](https://github.com/frigate-nvr/apple-silicon-detector) must first be setup. It is recommended to use the Frigate docker image with `-standard-arm64` suffix, for example `ghcr.io/blakeblackshear/frigate:stable-standard-arm64`.
@ -1029,6 +1068,7 @@ detectors:
| [YOLO-NAS](#yolo-nas-1) | ⚠️ | ⚠️ | Not supported by CUDA Graphs |
| [YOLOX](#yolox-1) | ✅ | ✅ | Supports CUDA Graphs for optimal Nvidia performance |
| [D-FINE / DEIMv2](#d-fine--deimv2-1) | ⚠️ | ❌ | Not supported by CUDA Graphs |
| [NanoDet-Plus](#nanodet-plus-1) | ✅ | ? | Supports CUDA Graphs for optimal Nvidia performance |
There is no default model provided, the following formats are supported:
@ -1311,6 +1351,42 @@ model:
Note that the labelmap uses a subset of the complete COCO label set that has only 80 objects.
#### NanoDet-Plus
[NanoDet-Plus](https://github.com/RangiLyu/nanodet) is a lightweight object detection model that achieves
good accuracy on CPUs given its small footprint.
Script to export an ONNX model for use in Frigate is provided in [the models section](#downloading-nanodet-plus-models).
:::warning
NanoDet-Plus has not been tested on AMD GPUs.
:::
<details>
<summary>NanoDet-Plus Setup & Config</summary>
After placing the exported onnx model in your config/model_cache folder, you can use the following configuration:
```yaml
detectors:
onnx:
type: onnx
model:
model_type: nanodet_plus
width: 320
height: 320
input_tensor: nchw
input_dtype: float
input_pixel_format: bgr
path: /config/model_cache/nanodet_plus.onnx
labelmap_path: /labelmap/coco-80.txt
```
Note that the labelmap uses a subset of the complete COCO label set that has only 80 objects.
</details>
## 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"`.
@ -2462,6 +2538,16 @@ EOF
```
### Downloading NanoDet-Plus models
NanoDet-Plus can be downloaded using the command below. Copy and paste the complete command to your terminal to export
the model as `nanodet_plus.onnx` in the current working directory. The command builds the NanoDet-Plus environment,
downloads the specified model and converts it to ONNX.
The below command is configured to use the smallest model provided by the authors, NanoDet-Plus-m-320. Other models
can be specified by changing the `URL_WEIGHTS` link to the appropriate pretrained weights URL from
[NanoDet-Plus Model Zoo](https://github.com/RangiLyu/nanodet#model-zoo). Remember to change the `IMG_HEIGHT`,
`IMG_WIDTH` and `CFG_PATH` ([configuration files](https://github.com/RangiLyu/nanodet/tree/main/config)) parameters
accordingly.
Compatible with the `labelmap/coco-80.txt` labelmap
```sh