在重新烧写Ubuntu固件后,更新rknn_server 和 librknnrt.so失败
本帖最后由 资深搬砖人 于 2022-4-15 11:51 编辑重新烧写Ubuntu固件ITX-3588J_Ubuntu20.04-Gnome-r211_v0.0.1c_220402.img
按照如下步骤更新rknn_server 和 librknnrt.so:
/rknpu2/runtime/RK3588/Linux/rknn_server/aarch64/usr/bin$: sudo cp ./* /usr/bin/
/rknpu2/runtime/RK3588/Linux/librknn_api/aarch64$ : sudo cp ./librknnrt.so /usr/bin/
chomd +x /usr/bin/rknn_server
chomd +x /usr/bin/start_rknn.sh
chmod +x /usr/bin/restart_rknn.sh
/usr/bin/restart_rknn.sh
报错:
start rknn server, version:1.2.0 (4c3573e build: 2022-01-14 11:09:48)
I NPUTransfer: Starting NPU Transfer Server, Transfer version 2.1.0 (b5861e7@2020-11-23T11:50:51)
E NPUTransfer: Cannot create server: Address already in use
E NPUTransfer: Cannot create server: Address already in use
E NPUTransfer: Cannot create server: Address already in use
E NPUTransfer: Cannot create server: Address already in use
E NPUTransfer: Cannot create server: Address already in use
E NPUTransfer: Cannot create server: Address already in use
E NPUTransfer: Cannot create server: Address already in use
......
”Address already in use“
rknn_server 只能被执行一次
ITX-3588J_Ubuntu20.04-Gnome-r211_v0.0.1c_220402.img 这个固件已经内置了 rknn_server 并且开机自启动,不需要再自己启动了,你开机后可以 ps -ef | grep rknn_server 看到。 本帖最后由 资深搬砖人 于 2022-4-15 15:33 编辑
板蓝根 发表于 2022-4-15 14:29
”Address already in use“
rknn_server 只能被执行一次
ITX-3588J_Ubuntu20.04-Gnome-r211_v0.0.1c_220 ...
原来是这样,不过我重新编译rknn_yolov5_demo,编译可以过,但是运行可执行文件不能成功检测。
为查看输出具体内容修改了main文件:
ret = rknn_run(ctx, NULL);
ret = rknn_outputs_get(ctx, io_num.n_output, outputs, NULL);
gettimeofday(&stop_time, NULL);
printf("once run use %f ms\n",
(__get_us(stop_time) - __get_us(start_time)) / 1000);
std::cout << *((int8_t *)outputs.buf) << std::endl;
std::cout << *((int8_t *)outputs.buf) << std::endl;
std::cout << *((int8_t *)outputs.buf) << std::endl;
运行可执行文件./rknn_yolov5_demo ./model/RK3588/yolov5s-640-640.rknn ./model/bus.jpg
firefly@firefly:~/workspace/rknpu2/examples/rknn_yolov5_demo/install/rknn_yolov5_demo_Linux$ ./rknn_yolov5_demo ./model/RK3588/yolov5s-640-640.rknn ./model/bus.jpg
post process config: box_conf_threshold = 0.50, nms_threshold = 0.60
Read ./model/bus.jpg ...
img width = 640, img height = 640
Loading mode...
sdk version: 1.2.0 (1867aec5b@2022-01-14T15:16:40) driver version: 0.6.4
model input num: 1, output num: 3
index=0, name=images, n_dims=4, dims=, n_elems=1228800, size=4915200, fmt=NHWC, type=FP32, qnt_type=AFFINE, zp=-128, scale=0.003922
index=0, name=output, n_dims=5, dims=, n_elems=1632000, size=1632000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=77, scale=0.080445
index=1, name=371, n_dims=5, dims=, n_elems=408000, size=408000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=56, scale=0.080794
index=2, name=390, n_dims=5, dims=, n_elems=102000, size=102000, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=69, scale=0.081305
model is NHWC input fmt
model input height=640, width=640, channel=3
rga_api version 1.7.0_
once run use 60.554000 ms
Q
;
N
loadLabelName ./model/coco_80_labels_list.txt
firefly@firefly:~/workspace/rknpu2/examples/rknn_yolov5_demo/install/rknn_yolov5_demo_Linux$
此外,虽然生成了resize_input.jpg和out.jpg但是resize_input.jpg里面没有任何内容(是黑的),out.jpg没有画框。
请问这是什么原因呢?
板蓝根 发表于 2022-4-15 14:29
”Address already in use“
rknn_server 只能被执行一次
ITX-3588J_Ubuntu20.04-Gnome-r211_v0.0.1c_220 ...
还想再请问一下,烧写最新的ubuntu20.04和debian11固件还需要更新rknn_server和librknnrt.so吗? ubuntu20.04 不需要,两边都验证过了,yolo5 的 demo 没有复现您的问题 板蓝根 发表于 2022-4-16 18:09
ubuntu20.04 不需要,两边都验证过了,yolo5 的 demo 没有复现您的问题
好的,谢谢!我再重新烧一遍试试{:5_232:} 板蓝根 发表于 2022-4-16 18:09
ubuntu20.04 不需要,两边都验证过了,yolo5 的 demo 没有复现您的问题
请问我能跑官方给的demo,但是自己的rknn模型一运行就出错,信息如下,如何解决呢
model input num: 1, output num: 1
index=0, name=images, n_dims=4, dims=, n_elems=1228800, size=1228800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922
index=0, name=output, n_dims=4, dims=, n_elems=151200, size=151200, fmt=NCHW, type=INT8, qnt_type=AFFINE, zp=-128, scale=2.558394
model is NHWC input fmt
model input height=640, width=640, channel=3
once run use 30.795000 ms
loadLabelName ./model/coco_80_labels_list.txt
段错误 (核心已转储)
页:
[1]