RKNN-Toolkit2 is a software development kit for users to perform model conversion, inference and performance evaluation on PC and Rockchip NPU platforms (RK3566, RK3568, RK3588, RK3588S).
RKNN-Toolkit2 is a software development kit for users to perform model conversion, inference and performance evaluation on PC and Rockchip NPU platforms (RK3566, RK3568, RK3588, RK3588S, RV1103, RV1106).
RKNN-Toolkit-Lite2 provides Python programming interfaces for Rockchip NPU platform (RK3566, RK3568, RK3588, RK3588S) to help users deploy RKNN models and accelerate the implementation of AI applications.
# Download
- You can also download all packages, docker image, examples, docs and platform-tools from baidu cloud: [rknn-toolkit2-v1.2.0](https://eyun.baidu.com/s/3jJ4k51s), fetch code: rknn
- You can also download all packages, docker image, examples, docs and platform-tools from baidu cloud: [RK_NPU_SDK](https://eyun.baidu.com/s/3eTDMk6Y), fetch code: rknn
# Notes
- Currently rknn-toolkit2 is not compatible with [rknn-toolkit](https://github.com/rockchip-linux/rknn-toolkit)
- Currently only support on Ubuntu 18.04 python 3.6
- Currently only support on Ubuntu 18.04 python 3.6 / Ubuntu 20.04 python 3.8
- If you have problem about RKNN-Toolkit2, it is recommended to create a issue or get answers from [Issues](https://github.com/rockchip-linux/rknn-toolkit2/issues).
Assuming that input size is [N,H,W,C] (layout is NHWC)
- Case 1: the first layer is **Convolution**, whose kernel size is [kernel_height, kernel_width]
**W * kernel_height < 7168**
**kernel_height * kernel_width < 128**
- Case 2: first layer is not Convolution, and C == 1 or C == 3 or C == 4
**W <7168**
- others:
**No Restrictions**
## ONNX OPs supported by RKNN Toolkit2
@ -33,63 +57,65 @@ According to [ONNX official instructions](https://github.com/microsoft/onnxrunti
@@ -33,63 +57,65 @@ According to [ONNX official instructions](https://github.com/microsoft/onnxrunti
The list of ONNX OPs supported by RKNN Toolkit2 is as follows:
@ -100,13 +126,13 @@ The protocol based on the official revision of berkeley comes from [berkeley caf
@@ -100,13 +126,13 @@ The protocol based on the official revision of berkeley comes from [berkeley caf
Based on this protocol, the list of Caffe OPs supported by RKNN Toolkit2 is as follows:
| ConvolutionDepthwise | kernel height/width: [1, 8]<br/>kernels: 1<br/>others same as onnx Conv |
| Crop | |
| Deconvolution | same as ConvTranspose |
| Dropout | |
@ -130,7 +156,7 @@ Based on this protocol, the list of Caffe OPs supported by RKNN Toolkit2 is as f
@@ -130,7 +156,7 @@ Based on this protocol, the list of Caffe OPs supported by RKNN Toolkit2 is as f
| Resize | bilinear; nearest |
| Reverse | |
| ROIPooling | same as MaxRoiPool according to https://github.com/twmht/caffe-pva-faster-rcnn |
@ -147,7 +173,7 @@ The Pytorch version supported by RKNN Toolkit2 is >1.6.0, models generated by ot
@@ -147,7 +173,7 @@ The Pytorch version supported by RKNN Toolkit2 is >1.6.0, models generated by ot
The list of Pytorch OPs supported by RKNN Toolkit2 is as follows:
@ -159,7 +185,7 @@ The list of Pytorch OPs supported by RKNN Toolkit2 is as follows:
@@ -159,7 +185,7 @@ The list of Pytorch OPs supported by RKNN Toolkit2 is as follows:
| aten::flatten | |
| aten::hardswish | same as onnx HardSwish |
| aten::instance_norm | same as onnx InstanceNormalization |
| DepthwiseConv2d | kernel height/width: [1, 8]<br/>kernels: 1<br/>others same as onnx Conv |
| Div | same as onnx Div |
| Dropout | |
| Flatten | |
@ -212,7 +238,7 @@ The list of TensorFlow OPs supported by RKNN Toolkit2 is as follows:
@@ -212,7 +238,7 @@ The list of TensorFlow OPs supported by RKNN Toolkit2 is as follows:
@ -224,16 +250,16 @@ The list of TensorFlow OPs supported by RKNN Toolkit2 is as follows:
@@ -224,16 +250,16 @@ The list of TensorFlow OPs supported by RKNN Toolkit2 is as follows:
The list of Darknet OPs supported by RKNN Toolkit2 is as follows:
| pooling | **AveragePool**: same as onnx AveragePool <br/>**GlobalAveragePool**: same as onnx GlobalAveragePool<br/>**MaxPool/GlobalMaxPool**: same as onnx MaxPool/GlobalMaxPool |
1. 新功能: rk3588平台的支持; rknn模型加密支持; tensorflow/tflite/pytorch量化感知模型支持; 增加了一些新的 op 支持: InstanceNormalization, Swish, Conv1D等(详见 op support list);增加了参数量计算以及算力分析