rv1126_rv1109EVB在环境配置后进行程序编译遇到问题汇总
在环境配置结束后,在ubuntu16.04的终端执行adb devices后,进入SDK包的/rv1126_rv1109/external/rknn-toolkit/examples/tflite进行test的编译.
source activate rk_env
python3 test.py
Ubuntu16.04对应的torch1.4.0,torchvision0.5.0
在PC端无问题,进行RV1126开发板的NPU编译。
gedit test.py或者vim test.py
# 找到脚本里调用模型配置接口 config 的地方,如下:
rknn.config(mean_values=[[127.5, 127.5, 127.5]], std_values=[[127.5, 127.5, 127.5]], reorder_channel='0 1 2')
# 注意,channel_mean_value的值默认初始值,不需要修改
# 修改该接口的参数
rknn.config(mean_values=[[127.5, 127.5, 127.5]], std_values=[[127.5, 127.5, 127.5]], reorder_channel='0 1 2',target_platform=['rv1126'])
# 找到脚本里初始化环境变量的方法 init_runtime,如下:
ret = rknn.init_runtime()
# 修改该方法的参数
ret = rknn.init_runtime(target='rv1126', device_id='xxx') # 这里的xxx填之前找到的设备编号
# 保存修改并退出
adb shell
cd userdata
mkdir -p examples/rknn_mobilenet_demo
adb devices#退出shell模式重新ADB
adb push install/rknn_mobilenet_demo /userdata/examples/rknn_mobilenet_demo/
# 执行test.py脚本
python3 test.py
在运行Darknet的yolov3的程序时一直出现
yolov3.weight exist.
--> Loading model
done
--> Building model
W The target_platform is not set in config, using default target platform rk1808.
已杀死
直接从github上进行darknet后进行运行无问题,为什么出现这个问题暂时没有找到解决方法,希望大佬们可以给予提示,后续找到解决方法会及时更新。