|
本帖最后由 Stuart 于 2021-9-13 09:56 编辑
yolov5使用的训练代码取自ultralytics/yolov5 master分支。
环境:PC ubuntu18.04 x86_64
rknn_tool v1.7.0
python3.6.9环境
tensorflow-gpu==1.14.0
torch==1.2.0
onnx==1.6
torchvision == 0.4.0
插入TB-RK1808S0
lsusb => Bus 001 Device 003: ID 2207:0018
npu_transfer_proxy devices=>
TS018082190800193 b2668d97 USB_DEVICE
使用下面code 進行onnx轉rknn 並測試圖片,都沒有問題, 可以產生rknn 並 預測圖片
https://github.com/rockchip-linu ... xamples/onnx/yolov5
使用https://github.com/soloIife/yolo ... rknn_detect_yolov5. 測試需要時間
1.設定ret = rknn.init_runtime()
pred_onx = self._rknn.inference(inputs=[_img])
時間需要253s
2.設定ret = rknn.init_runtime(device_id='TB-RK1808S0')
pred_onx = self._rknn.inference(inputs=[_img])
時間還是需要253s
3.設定ret = rknn.init_runtime(device_id='TS018082190800193')
pred_onx = self._rknn.inference(inputs=[_img])
時間還是需要253s
4.設定ret = rknn.init_runtime(target='rk1808', device_id='TS018082190800193')
出現錯誤訊息
I NPUTransfer: Starting NPU Transfer Client, Transfer version 2.1.0 (b5861e7@2020-11-23T11:50:36)
E RKNNAPI: rknn_init, msg_load_ack fail, ack = 1(ACK_FAIL), expect 0(ACK_SUCC)!
E RKNNAPI: ==============================================
E RKNNAPI: RKNN VERSION:
E RKNNAPI: API: 1.7.0 (f75fb8e build: 2021-07-20 16:23:11)
E RKNNAPI: DRV: 1.3.2 (f113d64 build: 2020-04-23 09:35:26)
E RKNNAPI: ==============================================
E Catch exception when init runtime!
E Traceback (most recent call last):
E File "rknn/api/rknn_base.py", line 884, in rknn.api.rknn_base.RKNNBase.init_runtime
E File "rknn/api/rknn_runtime.py", line 341, in rknn.api.rknn_runtime.RKNNRuntime.build_graph
E Exception: RKNN init failed. error code: RKNN_ERR_MODEL_INVALID
E Current device id is: TS018082190800193
E Devices connected:
E ['TS018082190800193']
nit runtime environment failed
請問要如何使用RK1808進行加速?
或是怎麼驗證RK1808已經掛載?
謝謝 |
|
|
|
|