You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/docs/configuration/hardware_acceleration.md
+2-30Lines changed: 2 additions & 30 deletions
Original file line number
Diff line number
Diff line change
@@ -362,39 +362,11 @@ that NVDEC/NVDEC1 are in use.
362
362
363
363
## Rockchip platform
364
364
365
-
Hardware accelerated video de-/encoding is supported on all Rockchip SoCs using [Nyanmisaka's FFmpeg Fork](https://github.com/nyanmisaka/ffmpeg-rockchip) based on [Rockchip's mpp library](https://github.com/rockchip-linux/mpp).
365
+
Hardware accelerated video de-/encoding is supported on all Rockchip SoCs using [Nyanmisaka's FFmpeg 6.1 Fork](https://github.com/nyanmisaka/ffmpeg-rockchip) based on [Rockchip's mpp library](https://github.com/rockchip-linux/mpp).
366
366
367
367
### Prerequisites
368
368
369
-
Make sure that you use a linux distribution that comes with the rockchip BSP kernel 5.10 or 6.1 and rkvdec2 driver. To check, enter the following commands:
370
-
371
-
```
372
-
$ uname -r
373
-
5.10.xxx-rockchip # or 6.1.xxx; the -rockchip suffix is important
374
-
$ ls /dev/dri
375
-
by-path card0 card1 renderD128 renderD129 # should list renderD128
376
-
```
377
-
378
-
I recommend [Joshua Riek's Ubuntu for Rockchip](https://github.com/Joshua-Riek/ubuntu-rockchip), if your board is supported.
379
-
380
-
### Setup
381
-
382
-
Follow Frigate's default installation instructions, but use a docker image with `-rk` suffix for example `ghcr.io/blakeblackshear/frigate:stable-rk`.
383
-
384
-
Next, you need to grant docker permissions to access your hardware:
385
-
- During the configuration process, you should run docker in privileged mode to avoid any errors due to insufficient permissions. To do so, add `privileged: true` to your `docker-compose.yml` file or the `--privileged` flag to your docker run command.
386
-
- After everything works, you should only grant necessary permissions to increase security. Add the lines below to your `docker-compose.yml` file or the following options to your docker run command: `--security-opt systempaths=unconfined --security-opt apparmor=unconfined --device /dev/dri:/dev/dri --device /dev/dma_heap:/dev/dma_heap --device /dev/rga:/dev/rga --device /dev/mpp_service:/dev/mpp_service`:
387
-
388
-
```yaml
389
-
security_opt:
390
-
- apparmor=unconfined
391
-
- systempaths=unconfined
392
-
devices:
393
-
- /dev/dri:/dev/dri
394
-
- /dev/dma_heap:/dev/dma_heap
395
-
- /dev/rga:/dev/rga
396
-
- /dev/mpp_service:/dev/mpp_service
397
-
```
369
+
Make sure to follow the [Rockchip specific installation instructions](/frigate/installation#rockchip-platform).
Copy file name to clipboardExpand all lines: docs/docs/configuration/object_detectors.md
+4-33Lines changed: 4 additions & 33 deletions
Original file line number
Diff line number
Diff line change
@@ -313,39 +313,11 @@ Hardware accelerated object detection is supported on the following SoCs:
313
313
- RK3576
314
314
- RK3588
315
315
316
-
This implementation uses the [Rockchip's RKNN-Toolkit2](https://github.com/airockchip/rknn-toolkit2/) Currently, only [Yolo-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) is supported as object detection model.
316
+
This implementation uses the [Rockchip's RKNN-Toolkit2](https://github.com/airockchip/rknn-toolkit2/), version v2.0.0.beta0. Currently, only [Yolo-NAS](https://github.com/Deci-AI/super-gradients/blob/master/YOLONAS.md) is supported as object detection model.
317
317
318
318
### Prerequisites
319
319
320
-
Make sure that you use a linux distribution that comes with the rockchip BSP kernel 5.10 or 6.1 and rknpu driver. To check, enter the following commands:
321
-
322
-
```
323
-
$ uname -r
324
-
5.10.xxx-rockchip # or 6.1.xxx; the -rockchip suffix is important
325
-
$ ls /dev/dri
326
-
by-path card0 card1 renderD128 renderD129 # should list renderD129
327
-
$ sudo cat /sys/kernel/debug/rknpu/version
328
-
RKNPU driver: v0.9.2 # or later version
329
-
```
330
-
331
-
I recommend [Joshua Riek's Ubuntu for Rockchip](https://github.com/Joshua-Riek/ubuntu-rockchip), if your board is supported.
332
-
333
-
### Setup
334
-
335
-
Follow Frigate's default installation instructions, but use a docker image with `-rk` suffix for example `ghcr.io/blakeblackshear/frigate:stable-rk`.
336
-
337
-
Next, you need to grant docker permissions to access your hardware:
338
-
339
-
- During the configuration process, you should run docker in privileged mode to avoid any errors due to insufficient permissions. To do so, add `privileged: true` to your `docker-compose.yml` file or the `--privileged` flag to your docker run command.
340
-
- After everything works, you should only grant necessary permissions to increase security. Add the lines below to your `docker-compose.yml` file or the following options to your docker run command: `--security-opt systempaths=unconfined --security-opt apparmor=unconfined --device /dev/dri:/dev/dri`:
341
-
342
-
```yaml
343
-
security_opt:
344
-
- apparmor=unconfined
345
-
- systempaths=unconfined
346
-
devices:
347
-
- /dev/dri:/dev/dri
348
-
```
320
+
Make sure to follow the [Rockchip specific installation instrucitions](/frigate/installation#rockchip-platform).
- By default the rknn detector uses the yolonas_s model (`model: path: default-fp16-yolonas_s`). This model comes with the image, so no further steps than those mentioned above are necessary and no download happens.
409
-
- The other choices are automatically downloaded and stored in the folder `config/model_cache/rknn_cache`. After upgrading Frigate, you should remove older models to free up space.
410
-
- Finally, you can also provide your own `.rknn` model. You should not save your own models in the `rknn_cache` folder, store them directly in the `model_cache` folder or another subfolder. To convert a model to `.rknn` format see the `rknn-toolkit2` (requires a x86 machine). Note, that there is only post-processing for the supported models.
380
+
- All models are automatically downloaded and stored in the folder `config/model_cache/rknn_cache`. After upgrading Frigate, you should remove older models to free up space.
381
+
- You can also provide your own `.rknn` model. You should not save your own models in the `rknn_cache` folder, store them directly in the `model_cache` folder or another subfolder. To convert a model to `.rknn` format see the `rknn-toolkit2` (requires a x86 machine). Note, that there is only post-processing for the supported models.
Copy file name to clipboardExpand all lines: docs/docs/frigate/hardware.md
+12Lines changed: 12 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,18 @@ Frigate supports all Jetson boards, from the inexpensive Jetson Nano to the powe
95
95
96
96
Inference speed will vary depending on the YOLO model, jetson platform and jetson nvpmodel (GPU/DLA/EMC clock speed). It is typically 20-40 ms for most models. The DLA is more efficient than the GPU, but not faster, so using the DLA will reduce power consumption but will slightly increase inference time.
97
97
98
+
#### Rockchip platform
99
+
100
+
Frigate supports hardware video processing on all Rockchip boards. However, hardware object detection is only supported on these boards:
101
+
102
+
- RK3562
103
+
- RK3566
104
+
- RK3568
105
+
- RK3576
106
+
- RK3588
107
+
108
+
The inference time of a rk3588 with all 3 cores enabled is typically 25-30 ms for yolo-nas s.
109
+
98
110
## What does Frigate use the CPU for and what does it use a detector for? (ELI5 Version)
99
111
100
112
This is taken from a [user question on reddit](https://www.reddit.com/r/homeassistant/comments/q8mgau/comment/hgqbxh5/?utm_source=share&utm_medium=web2x&context=3). Modified slightly for clarity.
Copy file name to clipboardExpand all lines: docs/docs/frigate/installation.md
+50Lines changed: 50 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -95,6 +95,56 @@ By default, the Raspberry Pi limits the amount of memory available to the GPU. I
95
95
96
96
Additionally, the USB Coral draws a considerable amount of power. If using any other USB devices such as an SSD, you will experience instability due to the Pi not providing enough power to USB devices. You will need to purchase an external USB hub with it's own power supply. Some have reported success with <ahref="https://amzn.to/3a2mH0P"target="_blank"rel="nofollow noopener sponsored">this</a> (affiliate link).
97
97
98
+
### Rockchip platform
99
+
100
+
Make sure that you use a linux distribution that comes with the rockchip BSP kernel 5.10 or 6.1 and necessary drivers (especially rkvdec2 and rknpu). To check, enter the following commands:
101
+
102
+
```
103
+
$ uname -r
104
+
5.10.xxx-rockchip # or 6.1.xxx; the -rockchip suffix is important
105
+
$ ls /dev/dri
106
+
by-path card0 card1 renderD128 renderD129 # should list renderD128 (VPU) and renderD129 (NPU)
107
+
$ sudo cat /sys/kernel/debug/rknpu/version
108
+
RKNPU driver: v0.9.2 # or later version
109
+
```
110
+
111
+
I recommend [Joshua Riek's Ubuntu for Rockchip](https://github.com/Joshua-Riek/ubuntu-rockchip), if your board is supported.
112
+
113
+
#### Setup
114
+
115
+
Follow Frigate's default installation instructions, but use a docker image with `-rk` suffix for example `ghcr.io/blakeblackshear/frigate:stable-rk`.
116
+
117
+
Next, you need to grant docker permissions to access your hardware:
118
+
119
+
- During the configuration process, you should run docker in privileged mode to avoid any errors due to insufficient permissions. To do so, add `privileged: true` to your `docker-compose.yml` file or the `--privileged` flag to your docker run command.
120
+
- After everything works, you should only grant necessary permissions to increase security. Disable the privileged mode and add the lines below to your `docker-compose.yml` file:
121
+
122
+
```yaml
123
+
security_opt:
124
+
- apparmor=unconfined
125
+
- systempaths=unconfined
126
+
devices:
127
+
- /dev/dri
128
+
- /dev/dma_heap
129
+
- /dev/rga
130
+
- /dev/mpp_service
131
+
```
132
+
133
+
or add these options to your `docker run` command:
134
+
135
+
```
136
+
--security-opt systempaths=unconfined \
137
+
--security-opt apparmor=unconfined \
138
+
--device /dev/dri \
139
+
--device /dev/dma_heap \
140
+
--device /dev/rga \
141
+
--device /dev/mpp_service
142
+
```
143
+
144
+
#### Configuration
145
+
146
+
Next, you should configure [hardware object detection](/configuration/object_detectors#rockchip-platform) and [hardware video processing](/configuration/hardware_acceleration#rockchip-platform).
147
+
98
148
## Docker
99
149
100
150
Running in Docker with compose is the recommended install method.
0 commit comments