Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Linux 运行 CPU 运行 YOLOv3 图像检测样例,使用 OnnxRuntime 运行样例报错 #348

Open
EmmonsCurse opened this issue Aug 19, 2022 · 2 comments

Comments

@EmmonsCurse
Copy link
Contributor

Hi:

  1. infer_yolov3.py 代码部分并无 OnnxRuntime 支持
  2. 执行 `python infer_yolov3.py --model_file=./yolov3_r50vd_dcn_270e_coco/model.pdmodel --params_file=./yolov3_r50vd_dcn_270e_coco/model.pdiparams --use_onnxruntime=1
    [ERROR] Cannot found attribute iou_aware in op: yolo_box

C++ Traceback (most recent call last):

0 paddle_infer::Predictor::Predictor(paddle::AnalysisConfig const&)
1 paddle::CheckConvertToONNX(paddle::AnalysisConfig const&)


Error Message Summary:

FatalError: Process abort signal is detected by the operating system.
[TimeInfo: *** Aborted at 1660880571 (unix time) try "date -d @1660880571" if you are using GNU date ***]
[SignalInfo: *** SIGABRT (@0x65b0) received by PID 26032 (TID 0x7fdd24cc5740) from PID 26032 ***]

Aborted (core dumped)`
添加完善后报错,是否为 yolov3 模型并不支持 OnnxRuntime 后端推理?

@funny000
Copy link

你好,请问你编译用的哪个版本的paddleinference,我在ubuntu20环境下g++9.4编译了2.3和2.6,用的resnet50 demo,编译通过,但是缺少so文件,把这些文件加入到环境变量也不行。

@EmmonsCurse
Copy link
Contributor Author

你好,请问你编译用的哪个版本的paddleinference,我在ubuntu20环境下g++9.4编译了2.3和2.6,用的resnet50 demo,编译通过,但是缺少so文件,把这些文件加入到环境变量也不行。

develop 分支与 release 分支都可以编,2.6 以后的 C++ 预测库是默认开启 WITH_SHARED_PHI 编译的,其次官网的 C++ 预测库 是基于 gcc8.2 编的。可以试着编译 c++ 的resnet50推理代码时将 compile.sh 中 WITH_SHARED_PHI=ON 改为 WITH_SHARED_PHI=OFF

也可以 ldd path/to/paddle_inference/paddle/lib/libpaddle_inference.so 查找一下动态库 libphi.so 或者指定 LD_LIBRARY_PATH

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants