I have a radxa rock 5c lite SBC which I am running a yolov5s rknn model. I installed rock-5c_bookworm_cli_b1.output.img
OS to the board. I am using the example from the rknn_model_zoo to convert and test my models
from rknnlite.api import RKNNLite as RKNN
import logging
import numpy as np
logging.basicConfig(level=logging.INFO)
logger = logging.getLogger(__name__)
class RKNN_model_container():
def __init__(self, model_path, target='rk3588', device_id=None) -> None:
self.rknn = RKNN() # Create instance of RKNN
# Direct Load RKNN Model
ret = self.rknn.load_rknn(path=model_path) # Added 'path=' keyword argument
if ret != 0:
raise RuntimeError(f"Failed to load RKNN model, error code: {ret}")
ret = self.rknn.init_runtime()
if ret != 0:
raise RuntimeError(f"Failed to init runtime, error code: {ret}")
The board has been inferencing the model perfectly until recently it has been bring up issue with the rknpu driver.
W rknn-toolkit-lite2 version: 2.3.0
E RKNN: [21:14:26.243] failed to open rknpu module, need to insmod rknpu dirver!
E RKNN: [21:14:26.243] failed to open rknn device!
E Catch exception when init runtime!
E Traceback (most recent call last):
File "/home/radxa/Yolo_test/rknn/lib/python3.11/site-packages/rknnlite/api/rknn_lite.py", line 157, in init_runtime
self.rknn_runtime.build_graph(self.rknn_data, self.load_model_in_npu)
File "rknnlite/api/rknn_runtime.py", line 921, in rknnlite.api.rknn_runtime.RKNNRuntime.build_graph
Exception: RKNN init failed. error code: RKNN_ERR_FAIL
I have been trying to reinstall the OS, updating the kernel 6.1.84-7-rk2410
and even copying librknnrt.so
to '/usr/lib/
directory but still the issue is still showing up. How can I fix this issue?