Skip to main content

RKNN Quick Example

tip

This document is intended to demonstrate how to run the official example, for more information please see RKNN Toolkit2 doc directory.

Install dependencies

sudo apt install git python-is-python3 python3-pip libxslt1-dev zlib1g-dev libglib2.0-dev libsm6 libgl1-mesa-glx libprotobuf-dev build-essential adb

Download and installing RKNN Toolkit2

git clone https://github.com/rockchip-linux/rknn-toolkit2.git
cd rknn-toolkit2/
pip install ./packages/rknn_toolkit2-1.5.2+b642f30c-cp310-cp310-linux_x86_64.whl

Run the yolov5 example

cd examples/onnx/yolov5
python test.py
info

After the conversion model and inference script test.py is run successfully, the converted model is saved in examples/onnx/yolov5/yolov5s_relu.rknn by default, and the result of the inference image is saved in examples/onnx/yolov5/result.jpg

inference result