From b54aaad382487d853779508c02485fa018441ee0 Mon Sep 17 00:00:00 2001 From: Marc Altmann Date: Fri, 3 Nov 2023 01:12:54 +0100 Subject: [PATCH] fix rknn.py (#8434) Co-authored-by: MarcA711 <> --- frigate/detectors/plugins/rknn.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frigate/detectors/plugins/rknn.py b/frigate/detectors/plugins/rknn.py index 687e968e6..dcbd0cd3b 100644 --- a/frigate/detectors/plugins/rknn.py +++ b/frigate/detectors/plugins/rknn.py @@ -6,7 +6,6 @@ import cv2.dnn import numpy as np from hide_warnings import hide_warnings from pydantic import Field -from rknnlite.api import RKNNLite from frigate.detectors.detection_api import DetectionApi from frigate.detectors.detector_config import BaseDetectorConfig @@ -37,6 +36,8 @@ class Rknn(DetectionApi): self.model_path = config.model.path or "/models/yolov8n-320x320.rknn" + from rknnlite.api import RKNNLite + self.rknn = RKNNLite(verbose=False) if self.rknn.load_rknn(self.model_path) != 0: logger.error("Error initializing rknn model.")