Compare commits

...

2 Commits

Author SHA1 Message Date
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
2 changed files with 4 additions and 3 deletions

View File

@ -19,8 +19,6 @@ logger = logging.getLogger(__name__)
DETECTOR_KEY = "rknn"
supported_socs = ["rk3562", "rk3566", "rk3568", "rk3576", "rk3588", "rk3588s"]
supported_models = {
ModelTypeEnum.yologeneric: "^frigate-fp16-yolov9-[cemst]$",
ModelTypeEnum.yolonas: "^deci-fp16-yolonas_[sml]$",

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