Skip to content

Commit

Permalink
RKNN Toolkit: update version to 1.7.5.
Browse files Browse the repository at this point in the history
Signed-off-by: raul.rao <raul.rao@rock-chips.com>
  • Loading branch information
raul.rao committed Aug 2, 2023
1 parent 2c9fc0c commit 7e767b0
Show file tree
Hide file tree
Showing 156 changed files with 2,988 additions and 1,377 deletions.
43 changes: 24 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,32 +11,37 @@ Note:
# Download
From version 1.3.0, some wheel packages are larger than 100MB, can not be uploaded directly. So, you need to go to the releases page to download.
You can download from releases page: https://github.com/rockchip-linux/rknn-toolkit/releases
- All wheel packages are in compressed file: [rknn-toolkit-v1.7.3-packages.tar.gz](https://github.com/rockchip-linux/rknn-toolkit/releases/download/v1.7.3/rknn-toolkit-v1.7.3-packages.tar.gz "rknn-toolkit-v1.7.3-packages.tar.gz") or [rknn-toolkit-v1.7.3-packages.zip](https://github.com/rockchip-linux/rknn-toolkit/releases/download/v1.7.3/rknn-toolkit-v1.7.3-packages.zip "rknn-toolkit-v1.7.3-packages.zip ")
- All examples, docs and platform-tools are in compressed file: [Source code(zip)](https://github.com/rockchip-linux/rknn-toolkit/archive/v1.7.3.zip "Source code(zip)") or [Source code(tar.gz)](https://github.com/rockchip-linux/rknn-toolkit/archive/v1.7.3.tar.gz "Source code(tar.gz)")
- All wheel packages are in compressed file: [rknn-toolkit-v1.7.5-packages.tar.gz](https://github.com/rockchip-linux/rknn-toolkit/releases/download/v1.7.5/rknn-toolkit-v1.7.5-packages.tar.gz "rknn-toolkit-v1.7.5-packages.tar.gz") or [rknn-toolkit-v1.7.5-packages.zip](https://github.com/rockchip-linux/rknn-toolkit/releases/download/v1.7.5/rknn-toolkit-v1.7.5-packages.zip "rknn-toolkit-v1.7.5-packages.zip ")
- All examples, docs and platform-tools are in compressed file: [Source code(zip)](https://github.com/rockchip-linux/rknn-toolkit/archive/v1.7.5.zip "Source code(zip)") or [Source code(tar.gz)](https://github.com/rockchip-linux/rknn-toolkit/archive/v1.7.5.tar.gz "Source code(tar.gz)")
- You can also download all packages, docker image, examples, docs and platform-tools from baidu cloud: [rknn-toolkit](https://eyun.baidu.com/s/3bqgIr0N "RKNN-Toolkit"), fetch code: rknn
- You can download RKNN Toolkit Lite packages and examples from [rknn-toolkit-lite](rknn-toolkit-lite)
# Checksums
## MD5
```
7d672e911c26af34112bbfcfed86aef7 rknn_toolkit-1.7.3-cp35-cp35m-linux_aarch64.whl
e751a1c2782879dedbe3904448e07105 rknn_toolkit-1.7.3-cp36-cp36m-linux_x86_64.whl
20db420731b4976b15b0fbddef9984e3 rknn_toolkit-1.7.3-cp36-cp36m-macosx_10_15_x86_64.whl
1ebba11b78766cd320a470bb397578cb rknn_toolkit-1.7.3-cp36-cp36m-win_amd64.whl
0cdd9c288a748bcef84848fd5dc12d80 rknn_toolkit-1.7.3-cp37-cp37m-linux_aarch64.whl
f06e1f88864c5a4759e4258cb536c38d rknn_toolkit-1.7.3-cp37-cp37m-macosx_10_15_x86_64.whl
8e5c63a241b809b78ca65d226344d0eb rknn_toolkit-1.7.3-cp38-cp38-linux_x86_64.whl
055ea6bc3b82cd437ebe645076c66960 rknn_toolkit-1.7.5-cp35-cp35m-linux_aarch64.whl
dec84a1226a22914e9912f1ce61cad64 rknn_toolkit-1.7.5-cp36-cp36m-linux_x86_64.whl
3a0f2d0cadb58e60f26fe039394205ab rknn_toolkit-1.7.5-cp36-cp36m-macosx_10_15_x86_64.whl
af96a8ab4cffa1037d41deb155e3d92e rknn_toolkit-1.7.5-cp36-cp36m-win_amd64.whl
4511b18f5a3127fb7375c2dddf597641 rknn_toolkit-1.7.5-cp37-cp37m-linux_aarch64.whl
8873a605594264125aa33bdaf2fc08b3 rknn_toolkit-1.7.5-cp37-cp37m-macosx_10_15_x86_64.whl
da4cd1a1968f9e9aa5414a67598f5374 rknn_toolkit-1.7.5-cp38-cp38-linux_x86_64.whl
a24f157407e16bc255fc387404eb2030 rknn-toolkit-v1.7.3-packages.tar.gz
8dbeeecb06b9201b9f464909ad8d9544 rknn-toolkit-v1.7.3-packages.zip
0818a331d3bba755036cfee296bdad31 rknn-toolkit-v1.7.5-packages.tar.gz
f5de735b9b733d74f97db5cce46c2c70 rknn-toolkit-v1.7.5-packages.zip
4b50d8966908e80567843c3623e33d46 rknn_toolkit_lite-1.7.3-cp36-cp36m-linux_aarch64.whl
dc669361506646104e823d569055b849 rknn_toolkit_lite-1.7.3-cp36-cp36m-linux_x86_64.whl
15a26aad303769f8f2f38f5888529a57 rknn_toolkit_lite-1.7.3-cp36-cp36m-macosx_10_15_x86_64.whl
cd490d13dc1e40e24ab76100a9b82ced rknn_toolkit_lite-1.7.3-cp36-cp36m-win_amd64.whl
17f10789ec42fdc687c3c02ef6dc1141 rknn_toolkit_lite-1.7.3-cp37-cp37m-linux_aarch64.whl
030a09ed522620aa6dfb4ccac578518b rknn_toolkit_lite-1.7.3-cp37-cp37m-linux_armv7l.whl
079aaf9c2c39b2c2a6858688ed733973 rknn_toolkit_lite-1.7.3-cp37-cp37m-macosx_10_15_x86_64.whl
b1b32a4e8803dd9303ab1a72ae8deccf rknn_toolkit_lite-1.7.3-cp38-cp38-linux_x86_64.whl
7adbd9698c7b528413d0ba73b591c83f rknn_toolkit_lite-1.7.5-cp310-cp310-linux_aarch64.whl
3457be77486bcd70c66213f46ce223e3 rknn_toolkit_lite-1.7.5-cp35-cp35m-linux_aarch64.whl
5d1ed1ac6dff669be03578ce39787eea rknn_toolkit_lite-1.7.5-cp36-cp36m-linux_aarch64.whl
2f15ccb2c4140a436d5dfbc8e9544630 rknn_toolkit_lite-1.7.5-cp36-cp36m-linux_armv7l.whl
210fe992928bd57ff638d346e394a5f2 rknn_toolkit_lite-1.7.5-cp36-cp36m-linux_x86_64.whl
16b13b9b710b90f2de10c820180f1c51 rknn_toolkit_lite-1.7.5-cp36-cp36m-macosx_10_15_x86_64.whl
27012b2aa02b78a3720bf9d34e5a42cf rknn_toolkit_lite-1.7.5-cp36-cp36m-win_amd64.whl
90d1f4c19552837a60e7d713c8b86e01 rknn_toolkit_lite-1.7.5-cp37-cp37m-linux_aarch64.whl
0dbfe4e8fc4a50c95d5f8114e379bce5 rknn_toolkit_lite-1.7.5-cp37-cp37m-linux_armv7l.whl
82e046302a2527bec6ebbd957446e8e6 rknn_toolkit_lite-1.7.5-cp37-cp37m-macosx_10_15_x86_64.whl
efe50cbb488c49f4953ff156caef6d07 rknn_toolkit_lite-1.7.5-cp38-cp38-linux_aarch64.whl
59f3f1df13bad289daadab276684c8df rknn_toolkit_lite-1.7.5-cp38-cp38-linux_x86_64.whl
63868f54eae2c98da69679abf4710881 rknn_toolkit_lite-1.7.5-cp39-cp39-linux_aarch64.whl
```
# Feedback and Community Support
- QQ Group Chat: 1025468710 (full, please join group 2)
Expand Down
Binary file modified doc/RKNN_OP_Support_And_Limit.xlsx
Binary file not shown.
Binary file modified doc/RKNN_OP_Support_And_Limit_CN.xlsx
Binary file not shown.
File renamed without changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file removed doc/Rockchip_User_Guide_RKNN_Toolkit_V1.7.3_EN.pdf
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
20 changes: 20 additions & 0 deletions doc/changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,23 @@
2023-07-31
版本:v1.7.5
1. 新增功能:
增加模型稀疏化功能;
增加量化参数导出功能;
量化模块增加离群点检测功能;
性能分析模块增加各类型算子耗时统计功能。
2. 功能优化:
完善对 PyTorch QAT 模型的支持;
重写 ONNX 模型优化器;
完善可视化功能;
优化 MMSE 功能;
完善图优化模块;
TFLite 转换器增加对不支持算子的检测。
3. 完善算子支持, 新增erf支持。
4. 移除对离线预编译 / 模拟器的支持。
5. 升级部分依赖模块。
6. 修复已知bug。


2022-08-20
版本:v1.7.3
1. 功能优化:
Expand Down
Binary file removed examples/caffe/caffe_upsample/cat.jpg
Binary file not shown.
1 change: 0 additions & 1 deletion examples/caffe/caffe_upsample/dataset.txt

This file was deleted.

21 changes: 0 additions & 21 deletions examples/caffe/caffe_upsample/deploy.prototxt

This file was deleted.

Binary file removed examples/caffe/caffe_upsample/solver_iter_45.caffemodel
Binary file not shown.
66 changes: 0 additions & 66 deletions examples/caffe/caffe_upsample/test.py

This file was deleted.

75 changes: 75 additions & 0 deletions examples/caffe/mobilenet_v2/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
# Example for Caffe mobilenet_v2


## Model Source
The model used in this example come from the following open source projects:
https://github.com/shicai/MobileNet-Caffe


## Usage for the script

*Usage:*
```
python test.py [target] [device_id]
```
*Parameter Description:*
- target: target platform. Optional parameter, the default value is `rv1126`, you can fill in `rk1806`, `rk1808`, `rk3399pro`, `rv1109`, `rv1126`.
- device_id: Device ID, when multiple devices are connected, this parameter is used to distinguish them. Optional parameter, default value is None.

If the target device is `RV1109` or `RV1126`, you can directly execute the following command to run the example:
```
python test.py
```
If the target device is RK1806, RK1808 or RK3399Pro, you can execute the following command to run the example:
```
python test.py rk1808
```
If you connect multiple devices, you need to specify the device ID, please refer to the following command to run the example:
```
python test.py rv1126 c3d9b8674f4b94f6
```


## Expected results

This example will print the TOP5 labels and corresponding scores of the test image classification results. For example, the inference results of this example are as follows:
```
[1]: 0.73388671875
[115 996]: 0.033447265625
[115 996]: 0.033447265625
[927]: 0.026214599609375
[794]: 0.024169921875
```

1. The label index with the highest score is 1, the corresponding label is `goldfish`.
2. The download link for labels file: https://github.com/HoldenCaulfieldRye/caffe/blob/master/data/ilsvrc12/synset_words.txt.
3. Different platforms, different versions of tools and drivers may have slightly different results.


## Notes

- The prototxt in the open source model uses the old version of Caffe, which has been modified in the actual example. The modified content is as follows
```
# Comment or remove the following content:
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
# Add the following content
layer {
name: "data"
type: "Input"
top: "data"
input_param {
shape {
dim: 1
dim: 3
dim: 224
dim: 224
}
}
}
```

35 changes: 32 additions & 3 deletions examples/caffe/mobilenet_v2/test.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import platform
import sys
import numpy as np
import cv2
from rknn.api import RKNN
Expand All @@ -22,16 +24,39 @@ def show_outputs(outputs):


if __name__ == '__main__':
# Default target and device_id
target = 'rv1126'
device_id = None

# Parameters check
if len(sys.argv) == 1:
print("Using default target rv1126")
elif len(sys.argv) == 2:
target = sys.argv[1]
print('Set target: {}'.format(target))
elif len(sys.argv) == 3:
target = sys.argv[1]
device_id = sys.argv[2]
print('Set target: {}, device_id: {}'.format(target, device_id))
elif len(sys.argv) > 3:
print('Too much arguments')
print('Usage: python {} [target] [device_id]'.format(sys.argv[0]))
print('Such as: python {} rv1126 c3d9b8674f4b94f6'.format(
sys.argv[0]))
exit(-1)

# Create RKNN object
rknn = RKNN()

# Set model config
print('--> Config model')
rknn.config(mean_values=[[103.94, 116.78, 123.68]], std_values=[[58.82, 58.82, 58.82]], reorder_channel='2 1 0')
rknn.config(mean_values=[[103.94, 116.78, 123.68]],
std_values=[[58.82, 58.82, 58.82]],
reorder_channel='2 1 0',
target_platform=[target])
print('done')

# Load caffe model
# Load model (from https://github.com/shicai/MobileNet-Caffe)
print('--> Loading model')
ret = rknn.load_caffe(model='./mobilenet_v2.prototxt',
proto='caffe',
Expand Down Expand Up @@ -62,7 +87,11 @@ def show_outputs(outputs):
img = cv2.cvtColor(img, cv2.COLOR_BGR2RGB)

print('--> Init runtime environment')
ret = rknn.init_runtime()
if target.lower() == 'rk3399pro' and platform.machine() == 'aarch64':
print('Run demo on RK3399Pro, using default NPU.')
target = None
device_id = None
ret = rknn.init_runtime(target=target, device_id=device_id)
if ret != 0:
print('Init runtime environment failed')
exit(ret)
Expand Down
3 changes: 0 additions & 3 deletions examples/caffe/vgg-ssd/README

This file was deleted.

70 changes: 70 additions & 0 deletions examples/caffe/vgg-ssd/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Example for Caffe VGG-SSD


## Model Source
The model used in this example come from the following open source projects:
https://github.com/weiliu89/caffe/tree/ssd
The download link provided by this project has expired, please download the model weight from the following network disk link(fetch code is `rknn`):
https://eyun.baidu.com/s/3jJhPRzo


## Usage for the script

*Usage:*
```
python test.py [target] [device_id]
```
*Parameter Description:*
- target: target platform. Optional parameter, the default value is `rv1126`, you can fill in `rk1806`, `rk1808`, `rk3399pro`, `rv1109`, `rv1126`.
- device_id: Device ID, when multiple devices are connected, this parameter is used to distinguish them. Optional parameter, default value is None.

If the target device is `RV1109` or `RV1126`, you can directly execute the following command to run the example:
```
python test.py
```
If the target device is RK1806, RK1808 or RK3399Pro, you can execute the following command to run the example:
```
python test.py rk1808
```
If you connect multiple devices, you need to specify the device ID, please refer to the following command to run the example:
```
python test.py rv1126 c3d9b8674f4b94f6
```


## Expected results

The test result should be similar to picutre `ref_detect_result.jpg`.

*Note: Different platforms, different versions of tools and drivers may have slightly different results.*


## Notes

- The prototxt in the open source model uses the old version of Caffe, which has been modified in the actual example. The modified content is as follows
```
# Comment or remove the following content:
input: "data"
input_shape {
dim: 1
dim: 3
dim: 300
dim: 300
}
# Add the following content:
layer {
name: "input"
type: "Input"
top: "data"
input_param {
shape {
dim: 1
dim: 3
dim: 300
dim: 300
}
}
}
```
- The DetectionOutput layer is also been removed.
Binary file added examples/caffe/vgg-ssd/ref_detect_results.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7e767b0

Please sign in to comment.