这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » 国产MCU » 重新烧写Ubuntu固件后更新rknnserver和librknnrt.so失败

共8条 1/1 1 跳转至

重新烧写Ubuntu固件后更新rknnserver和librknnrt.so失败咋办?

工程师
2023-06-29 21:38:42     打赏

问题描述及复现步骤:

重新烧写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
......





关键词: Ubuntu     librknnrt.so     rknn_    

助工
2023-06-29 21:39:10     打赏
2楼

”Address already in use“
rknn_server 只能被执行一次
ITX-3588J_Ubuntu20.04-Gnome-r211_v0.0.1c_220402.img 这个固件已经内置了 rknn_server 并且开机自启动,不需要再自己启动了,你开机后可以 ps -ef | grep rknn_server 看到。 


工程师
2023-06-29 21:42:00     打赏
3楼

原来是这样,不过我重新编译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[0].buf) << std::endl;
    std::cout << *((int8_t *)outputs[1].buf) << std::endl;
    std::cout << *((int8_t *)outputs[2].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=[1, 640, 640, 3], 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=[1, 3, 85, 80], 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=[1, 3, 85, 40], 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=[1, 3, 85, 20], 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_[1]
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没有画框。


助工
2023-06-29 21:42:34     打赏
4楼

还想再请问一下,烧写最新的ubuntu20.04和debian11固件还需要更新rknn_server和librknnrt.so吗?


工程师
2023-06-29 21:43:06     打赏
5楼

ubuntu20.04 不需要


专家
2023-06-30 01:33:56     打赏
6楼

感谢楼主的分享,很实用了。


专家
2023-06-30 01:34:13     打赏
7楼

感谢楼主的分享,很实用了。


专家
2023-06-30 07:16:30     打赏
8楼

感谢分享


共8条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]