mirror of
https://github.com/blakeblackshear/frigate.git
synced 2026-07-28 06:39:01 +03:00
Compare commits
5
Commits
dev
...
8f99733638
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8f99733638 | ||
|
|
6f18ea8fde | ||
|
|
a7042a7c0b | ||
|
|
dea03ea099 | ||
|
|
68877f51fb |
@@ -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"
|
||||||
@@ -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:
|
This is an example configuration file that you need to adjust to your specific onnx model:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
soc: ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588"]
|
soc: ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588", "rk3588s"]
|
||||||
quantization: false
|
quantization: false
|
||||||
|
|
||||||
output_name: "{input_basename}"
|
output_name: "{input_basename}"
|
||||||
|
|||||||
@@ -273,6 +273,7 @@ Frigate supports hardware video processing on all Rockchip boards. However, hard
|
|||||||
- RK3568
|
- RK3568
|
||||||
- RK3576
|
- RK3576
|
||||||
- RK3588
|
- RK3588
|
||||||
|
- RK3588S
|
||||||
|
|
||||||
| Name | YOLOv9 Inference Time | YOLO-NAS Inference Time | YOLOx Inference Time |
|
| Name | YOLOv9 Inference Time | YOLO-NAS Inference Time | YOLOx Inference Time |
|
||||||
| -------------- | --------------------- | --------------------------- | ----------------------- |
|
| -------------- | --------------------- | --------------------------- | ----------------------- |
|
||||||
|
|||||||
+1
-1
@@ -78,7 +78,7 @@ FFMPEG_HWACCEL_AMF = "preset-amd-amf"
|
|||||||
FFMPEG_HVC1_ARGS = ["-tag:v", "hvc1"]
|
FFMPEG_HVC1_ARGS = ["-tag:v", "hvc1"]
|
||||||
|
|
||||||
# RKNN constants
|
# RKNN constants
|
||||||
SUPPORTED_RK_SOCS = ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588"]
|
SUPPORTED_RK_SOCS = ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588", "rk3588s"]
|
||||||
|
|
||||||
# Regex constants
|
# Regex constants
|
||||||
|
|
||||||
|
|||||||
@@ -19,6 +19,8 @@ logger = logging.getLogger(__name__)
|
|||||||
|
|
||||||
DETECTOR_KEY = "rknn"
|
DETECTOR_KEY = "rknn"
|
||||||
|
|
||||||
|
supported_socs = ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588", "rk3588s"]
|
||||||
|
|
||||||
supported_models = {
|
supported_models = {
|
||||||
ModelTypeEnum.yologeneric: "^frigate-fp16-yolov9-[cemst]$",
|
ModelTypeEnum.yologeneric: "^frigate-fp16-yolov9-[cemst]$",
|
||||||
ModelTypeEnum.yolonas: "^deci-fp16-yolonas_[sml]$",
|
ModelTypeEnum.yolonas: "^deci-fp16-yolonas_[sml]$",
|
||||||
@@ -90,6 +92,9 @@ class Rknn(DetectionApi):
|
|||||||
def parse_model_input(self, model_path, soc):
|
def parse_model_input(self, model_path, soc):
|
||||||
model_props = {}
|
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
|
# find out if user provides his own model
|
||||||
# user provided models should be a path and contain a "/"
|
# user provided models should be a path and contain a "/"
|
||||||
if "/" in model_path:
|
if "/" in model_path:
|
||||||
@@ -146,7 +151,7 @@ class Rknn(DetectionApi):
|
|||||||
model_props["model_type"] = model_type
|
model_props["model_type"] = model_type
|
||||||
|
|
||||||
if model_matched:
|
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"]
|
model_props["path"] = model_cache_dir + model_props["filename"]
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user