Compare commits

...

9 Commits

Author SHA1 Message Date
Brian Horakh
1fa70d6eae
Merge ab59fdf570 into 5f2536dcd8 2026-02-19 10:42:44 -08:00
Shay Collings
5f2536dcd8
Added section for macOS installation including port conflict warning, example compose file and reference to Apple Silicon Detector (#22025)
Co-authored-by: Shay Collings <shay.collings@gmail.com>
2026-02-19 08:04:28 -06:00
Brian H
ab59fdf570 fix: clean up duplicate SoC list and fix RKNN converter for rk3588s
- Remove unused supported_socs variable in rknn.py that duplicated
  the SUPPORTED_RK_SOCS constant from frigate.const
- Add rk3588s to rk3588 mapping in rknn_converter.py to ensure custom
  ONNX model conversion works on RK3588S devices

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-02 20:49:46 +11:00
Brian Horakh
075ea3305c
Update frigate/detectors/plugins/rknn.py
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-02 19:49:58 +11:00
Brian H
8f99733638 ci: add Rockchip build workflow for fork
- Builds and publishes to ghcr.io/elasticdotventures/frigate
- Triggers on push to dev and fix-rk3588s-support branches
- Can be manually triggered via workflow_dispatch
- Tags: {sha}-rk and latest-rk
2026-02-01 18:21:47 +11:00
Brian H
6f18ea8fde fix: remove trailing whitespace for ruff format check 2026-02-01 18:15:04 +11:00
Brian H
a7042a7c0b fix: add rk3588s support with model mapping to rk3588
- Add rk3588s to SUPPORTED_RK_SOCS list
- Map rk3588s to rk3588 for model downloads (models are compatible)
- Update documentation to include rk3588s in supported SoCs
- Addresses feedback from blakeblackshear/frigate#20441
2026-02-01 17:38:21 +11:00
Brian Horakh
dea03ea099
Merge branch 'dev' into fix-rk3588s-support 2026-02-01 17:33:45 +11:00
b
68877f51fb fix: allow rk3588s in RKNN detector (#20440) 2025-10-12 16:25:45 +11:00
7 changed files with 116 additions and 4 deletions

66
.github/workflows/build-rk.yml vendored Normal file
View File

@ -0,0 +1,66 @@
name: Build Rockchip
on:
workflow_dispatch:
push:
branches:
- dev
- fix-rk3588s-support
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
rockchip_build:
runs-on: ubuntu-latest
name: Build Rockchip Image
permissions:
contents: read
packages: write
steps:
- name: Check out code
uses: actions/checkout@v4
- id: lowercaseRepo
uses: ASzc/change-string-case-action@v6
with:
string: ${{ github.repository }}
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Create version file
run: make version
- name: Create short sha
id: sha
run: echo "SHORT_SHA=${GITHUB_SHA::7}" >> $GITHUB_OUTPUT
- name: Build and push Rockchip image
uses: docker/bake-action@v5
with:
push: true
targets: rk
files: docker/rockchip/rk.hcl
set: |
rk.tags=ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ steps.sha.outputs.SHORT_SHA }}-rk
rk.tags=ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:latest-rk
*.cache-from=type=gha
*.cache-to=type=gha,mode=max
- name: Show image tags
run: |
echo "Images published:"
echo " ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:${{ steps.sha.outputs.SHORT_SHA }}-rk"
echo " ghcr.io/${{ steps.lowercaseRepo.outputs.lowercase }}:latest-rk"

View File

@ -1352,7 +1352,7 @@ To convert a onnx model to the rknn format using the [rknn-toolkit2](https://git
This is an example configuration file that you need to adjust to your specific onnx model:
```yaml
soc: ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588"]
soc: ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588", "rk3588s"]
quantization: false
output_name: "{input_basename}"

View File

@ -273,6 +273,7 @@ Frigate supports hardware video processing on all Rockchip boards. However, hard
- RK3568
- RK3576
- RK3588
- RK3588S
| Name | YOLOv9 Inference Time | YOLO-NAS Inference Time | YOLOx Inference Time |
| -------------- | --------------------- | --------------------------- | ----------------------- |

View File

@ -689,3 +689,42 @@ docker run \
```
Log into QNAP, open Container Station. Frigate docker container should be listed under 'Overview' and running. Visit Frigate Web UI by clicking Frigate docker, and then clicking the URL shown at the top of the detail page.
## macOS - Apple Silicon
:::warning
macOS uses port 5000 for its Airplay Receiver service. If you want to expose port 5000 in Frigate for local app and API access the port will need to be mapped to another port on the host e.g. 5001
Failure to remap port 5000 on the host will result in the WebUI and all API endpoints on port 5000 being unreachable, even if port 5000 is exposed correctly in Docker.
:::
Docker containers on macOS can be orchestrated by either [Docker Desktop](https://docs.docker.com/desktop/setup/install/mac-install/) or [OrbStack](https://orbstack.dev) (native swift app). The difference in inference speeds is negligable, however CPU, power consumption and container start times will be lower on OrbStack because it is a native Swift application.
To allow Frigate to use the Apple Silicon Neural Engine / Processing Unit (NPU) the host must be running [Apple Silicon Detector](../configuration/object_detectors.md#apple-silicon-detector) on the host (outside Docker)
#### Docker Compose example
```yaml
services:
frigate:
container_name: frigate
image: ghcr.io/blakeblackshear/frigate:stable-arm64
restart: unless-stopped
shm_size: "512mb" # update for your cameras based on calculation above
volumes:
- /etc/localtime:/etc/localtime:ro
- /path/to/your/config:/config
- /path/to/your/recordings:/recordings
ports:
- "8971:8971"
# If exposing on macOS map to a diffent host port like 5001 or any orher port with no conflicts
# - "5001:5000" # Internal unauthenticated access. Expose carefully.
- "8554:8554" # RTSP feeds
extra_hosts:
# This is very important
# It allows frigate access to the NPU on Apple Silicon via Apple Silicon Detector
- "host.docker.internal:host-gateway" # Required to talk to the NPU detector
environment:
- FRIGATE_RTSP_PASSWORD: "password"
```

View File

@ -78,7 +78,7 @@ FFMPEG_HWACCEL_AMF = "preset-amd-amf"
FFMPEG_HVC1_ARGS = ["-tag:v", "hvc1"]
# RKNN constants
SUPPORTED_RK_SOCS = ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588"]
SUPPORTED_RK_SOCS = ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588", "rk3588s"]
# Regex constants

View File

@ -90,6 +90,9 @@ class Rknn(DetectionApi):
def parse_model_input(self, model_path, soc):
model_props = {}
# Map rk3588s to rk3588 for model compatibility
model_soc = "rk3588" if soc == "rk3588s" else soc
# find out if user provides his own model
# user provided models should be a path and contain a "/"
if "/" in model_path:
@ -146,7 +149,7 @@ class Rknn(DetectionApi):
model_props["model_type"] = model_type
if model_matched:
model_props["filename"] = model_path + f"-{soc}-v2.3.2-2.rknn"
model_props["filename"] = model_path + f"-{model_soc}-v2.3.2-2.rknn"
model_props["path"] = model_cache_dir + model_props["filename"]

View File

@ -189,13 +189,16 @@ def convert_onnx_to_rknn(
logger.debug("Could not determine SoC type")
return False
# Map rk3588s to rk3588 for RKNN toolkit compatibility
target_soc = "rk3588" if soc == "rk3588s" else soc
# Get model config for the specified type
if model_type not in MODEL_TYPE_CONFIGS:
logger.debug(f"Unsupported model type: {model_type}")
return False
config = MODEL_TYPE_CONFIGS[model_type].copy()
config["target_platform"] = soc
config["target_platform"] = target_soc
# RKNN toolkit requires .onnx extension, create temporary copy if needed
temp_onnx_path = None