Check rknpu is installed (it should be on official Radxa images.
dmesg | grep -i rknpu
[ 5.130935] [drm] Initialized rknpu 0.8.2 20220829 for fdab0000.npu on minor 1
| VERBO[03-19|20:59:50.237300] <SN i8KtK2KwLi1o7WaVBbEKpRLPtAEYayfoptqAFYxfQgrus1g6m> /snow/engine/avalanche/polls.go#57: Poll: Waiting on 10 chits. requestID: 3 | |
| VERBO[03-19|20:59:50.263283] <SN i8KtK2KwLi1o7WaVBbEKpRLPtAEYayfoptqAFYxfQgrus1g6m> /snow/engine/avalanche/voter.go#63: Avalanche engine can't quiesce, requestID: 3 | |
| VERBO[03-19|20:59:50.269181] <SN i8KtK2KwLi1o7WaVBbEKpRLPtAEYayfoptqAFYxfQgrus1g6m> /snow/engine/avalanche/polls.go#57: Poll: Waiting on 10 chits. requestID: 4 | |
| VERBO[03-19|20:59:50.283433] <SN i8KtK2KwLi1o7WaVBbEKpRLPtAEYayfoptqAFYxfQgrus1g6m> /snow/engine/avalanche/voter.go#63: Avalanche engine can't quiesce, requestID: 4 | |
| VERBO[03-19|20:59:50.306207] <SN i8KtK2KwLi1o7WaVBbEKpRLPtAEYayfoptqAFYxfQgrus1g6m> /snow/engine/avalanche/polls.go#57: Poll: Waiting on 10 chits. requestID: 5 | |
| VERBO[03-19|20:59:50.323576] <SN i8KtK2KwLi1o7WaVBbEKpRLPtAEYayfoptqAFYxfQgrus1g6m> /snow/engine/avalanche/voter.go#63: Avalanche engine can't quiesce, requestID: 5 | |
| VERBO[03-19|20:59:50.325148] <SN i8KtK2KwLi1o7WaV |
| /dts-v1/; | |
| /plugin/; | |
| / { | |
| metadata { | |
| title = "My Custom Overlays"; | |
| category = "misc"; | |
| compatible = "radxa,rock-5b", "rockchip,rk3588"; | |
| description = "My Custom Overlays"; | |
| }; |
| FROM python:3.11-bookworm | |
| # Set the working directory | |
| WORKDIR /app | |
| # Set environment variable for the wheel filename | |
| ENV WHEEL_FILENAME=rknn_toolkit2-2.3.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl | |
| ENV REQ_FILENAME=requirements_cp311-2.3.0.txt | |
| # Install dependencies |
| sbc-bench v0.9.71 Thundercomm, Inc. Rubik Pi C6490P (Mon, 28 Apr 2025 22:47:17 +1200) | |
| Distributor ID: Debian | |
| Description: Debian GNU/Linux trixie/sid | |
| Release: 22.04 | |
| Codename: trixie | |
| /usr/bin/gcc (Debian 14.2.0-19) 14.2.0 | |
| Uptime: 22:47:18 up 2 min, 0 user, load average: 2.70, 1.35, 0.53, 42.6°C, 50039317 |
| sbc-bench v0.9.71 Radxa ROCK 5B (Mon, 28 Apr 2025 11:03:36 +0000) | |
| Distributor ID: Debian | |
| Description: Debian GNU/Linux 12 (bookworm) | |
| Release: 12 | |
| Codename: bookworm | |
| Build system: Radxa rbuild: build_date: '2024-08-08T04:17:32+00:00', edition: kde, product: rock-5b, suite: bookworm | |
| /usr/bin/gcc (Debian 12.2.0-14) 12.2.0 |
| sbc-bench v0.9.71 Thundercomm, Inc. Rubik Pi C6490P (Tue, 29 Apr 2025 15:47:43 +1200) | |
| Distributor ID: Debian | |
| Description: Debian GNU/Linux trixie/sid | |
| Release: 22.04 | |
| Codename: trixie | |
| /usr/bin/gcc (Debian 14.2.0-19) 14.2.0 | |
| Uptime: 15:47:43 up 5 min, 0 user, load average: 1.87, 2.61, 1.24, 45.3°C, 62092861 |
| sbc-bench v0.9.71 Thundercomm, Inc. Rubik Pi C6490P (Tue, 29 Apr 2025 20:51:28 +1200) | |
| Distributor ID: Debian | |
| Description: Debian GNU/Linux trixie/sid | |
| Release: 22.04 | |
| Codename: trixie | |
| /usr/bin/gcc (Debian 14.2.0-19) 14.2.0 | |
| Uptime: 20:51:28 up 1 min, 0 user, load average: 0.91, 0.59, 0.23, 31.8°C, 59676680 |
| # --------------------------------------------------------------------- | |
| # Copyright 2024 Cix Technology Group Co., Ltd. All rights reserved. | |
| # SPDX-License-Identifier: Apache-2.0 | |
| # --------------------------------------------------------------------- | |
| """ | |
| This is the script of cix noe umd api for inference over npu, | |
| with timing / benchmarking support, and textual detection logs. | |
| """ | |
| import cv2 | |
| import numpy as np |
| // yolov8 | |
| #include <iostream> | |
| #include <fstream> | |
| #include <vector> | |
| #include <algorithm> | |
| #include <iomanip> | |
| #include <numeric> | |
| #include <cstdint> | |
| #include <chrono> | |
| #include <fcntl.h> |