Khadas Docs

Amazing Khadas, always amazes you!

User Tools

Site Tools


Sidebar

products:sbc:edge-2l:npu:rknn-sdk-quick-start

This is an old revision of the document!


RKNN SDK Quick Start

Introduction

This document provides a detailed introduction for beginners on how to quickly use RKNN-Toolkit2 on a computer to perform model conversion and deploy it to a edg2l board using RKNPU2. The examples used in this document are integrated into the RKNN Model Zoo.

Prepare Development Environment

The version information we are using is as follows:
python: 3.8
rknn-toolkit2: 2.3.2
rknn model zoo: 2.3.2

It is recommended to create a new directory to store the RKNN repositories. For example, create a folder named “Projects” and place the RKNN-Toolkit2 and RKNN Model Zoo repositories in that directory. Refer to the following commands

$ mkdir Projects && cd Projects 

Download the RKNN-Toolkit2 repository

$ git clone -b v2.3.2 https://github.com/airockchip/rknn-toolkit2.git --depth 1

Download the RKNN Model Zoo repository

$ git clone -b v2.3.2 https://github.com/airockchip/rknn_model_zoo.git --depth 1

Install the RKNN-Toolkit2 Environment on the Computer

Install Python

If the Python 3.8 environment is not installed on your system, or if there are multiple versions of Python installed, it is recommended to use Miniforge Conda to create a new Python 3.8 environment.

Install Miniforge Conda

Download the Miniforge Conda installer from the following link:

$ wget -c https://github.com/conda-forge/miniforge/releases/latest/download/Miniforge3-Linux-x86_64.sh

Then, install Miniforge Conda using the following command:

$ chmod 777 Miniforge3-Linux-x86_64.sh 
$ bash Miniforge3-Linux-x86_64.sh

Create Python Environment Using Miniforge Conda

$ source ~/miniforge3/bin/activate
$ conda create -n py38Toolkit2.3.2 python=3.8
$ conda activate py38Toolkit2.3.2

Install Compilation Tools on the Computer

Install RKNPU2 Environment on the Board

Run Example Programs

Important Note

Last modified: 2025/10/21 23:21 by william