PaddlePaddle / PaddlePaddle/FastDeploy
RK3588s 上使用 PP-YOLOE-SOD 导出的 RKNN 模型输出结果始终为空,ONNX输出结果正常
Open
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 3.7k
- Forks
- 756
- Avg merge
- 19h 28m
- Merged PRs (30d)
- 4
Description
温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度
环境
- 【FastDeploy版本】:fastdeploy-develop
- 【系统平台】:Ubuntu 20.04.6 LTS
- 【硬件】: RK3588s
- 【模型转换环境】: rknn-toolkit2版本为1.5.1b13
- 【编译语言】: Python3.8.10
问题日志及出现问题的操作流程
-
【模型跑不通】
-
- 执行examples下/vision/detection/paddledetection/rknpu2中的代码,都能跑通,并且使用官方提供的ppyoloe_plus_crn_s_80e_coco模型,ONNX和RKNN都能跑通出结果;
-
- 但使用PP-YOLOE-SOD的官方模型,通过 rknn-toolkit2 1.5.1b13转换成RKNN后,RKNN模型能在NPU上运行,有运行时间的提示,但没有输出结果始终为空,整个过程中也没有任何报错,同时,使用转换RKNN模型前的ONNX在CPU上运行,能正常输出结果。
-
-
- 使用的代码是官方原版代码,模型未做任何改动,推理代码也是官方原版代码,只更改了模型名称
-
-
-
- ONNX模型运行log:
-
-
-
- -$ ./infer_ppyoloe_plus_sod_crn_s_80e_visdrone_w_nms ../models/ppyoloe_plus_sod_crn_s_80e_visdrone_w_nms ../images/20230420062143008.bmp 0
-
-
-
- -[INFO] fastdeploy/runtime/runtime.cc(326)::CreateOrtBackend Runtime initialized with Backend::ORT in Device::CPU.
-
-
-
- -[FastDeploy] PPDet in ONNX duration = 0.944609s.
-
-
-
- -DetectionResult: [xmin, ymin, xmax, ymax, score, label_id]
-
-
-
- -1764.440186,1963.194946, 1825.802490, 2014.900269, 0.874629, 3
-
-
-
- -1879.012207,1586.902832, 1924.154785, 1626.965576, 0.835925, 3
-
-
-
- -1617.314331,1601.050659, 1662.620850, 1645.246094, 0.815566, 3
-
-
-
- -1799.939575,2067.222168, 1870.940186, 2131.863281, 0.800500, 3
-
-
-
- -1609.115112,1834.134155, 1662.692627, 1878.682739, 0.793823, 3
-
-
-
- -1922.314819,1568.100830, 1969.835449, 1606.360718, 0.783511, 3
-
-
-
- -1734.748901,1883.613403, 1797.476196, 1938.679199, 0.781813, 3
-
-
-
- -1559.900391,1466.017700, 1604.416992, 1505.471924, 0.781790, 3
-
-
-
- -Visualized result saved in ./infer_onnx.jpg
-
-
- -RKNN模型运行log:
-
-
- -$ ./infer_ppyoloe_plus_sod_crn_s_80e_visdrone_w_nms ../models/ppyoloe_plus_sod_crn_s_80e_visdrone_w_nms ../images/20230420062143008.bmp 1
-
-
-
- -[INFO] fastdeploy/runtime/backends/rknpu2/rknpu2_backend.cc(81)::GetSDKAndDeviceVersion rknpu2 runtime version: 1.5.1b13 (4a7483d6e@2023-06-16T17:28:52)
-
-
-
- -[INFO] fastdeploy/runtime/backends/rknpu2/rknpu2_backend.cc(82)::GetSDKAndDeviceVersion rknpu2 driver version: 0.8.2
-
-
-
- -index=0, name=image, n_dims=4, dims=[1, 640, 640, 3], n_elems=1228800, size=1228800, fmt=NHWC, type=INT8, qnt_type=AFFINE, zp=-128, scale=0.003922, pass_through=0
-
-
-
- -index=0, name=p2o.Mul.195, n_dims=4, dims=[1, 8400, 4, 1], n_elems=33600, size=33600, fmt=NCHW, type=FP32, qnt_type=AFFINE, zp=-110, scale=2.873857, pass_through=0
-
-
-
- -index=1, name=p2o.Concat.32, n_dims=4, dims=[1, 10, 8400, 1], n_elems=84000, size=84000, fmt=NCHW, type=FP32, qnt_type=AFFINE, zp=-128, scale=0.000223, pass_through=0
-
-
-
- -[INFO] fastdeploy/runtime/runtime.cc(367)::CreateRKNPU2Backend Runtime initialized with Backend::RKNPU2 in Device::RKNPU.
-
-
-
- -[WARNING] fastdeploy/runtime/backends/rknpu2/rknpu2_backend.cc(420)::InitRKNNTensorMemory The input tensor type != model's inputs type.The input_type need INT8,but inputs[0].type is UINT8
-
-
-
- -[FastDeploy] PPDet in RKNPU2 duration = 0.645644s.
-
-
-
- -DetectionResult: [xmin, ymin, xmax, ymax, score, label_id]
-
-
-
- -Visualized result saved in ./infer_rknpu2.jpg
-
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with examples/vision/detection/paddledetection/rknpu2 and the infer_ppyoloe_plus_sod_crn_s_80e_visdrone_w_nms executable. Compare the ONNX and RKNN logs, including tensor types and output shapes, then reproduce on RK3588s with the stated RKNN Toolkit version. Done means the RKNN model produces detections like the ONNX model without empty output.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- linux, python
- Domain
- embedded-iot, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100