Paddle3D
Paddle3D copied to clipboard
smoke tensorRT 编译 OK, CPP部署报错 (libdnnl.so.2)
根据smoke算法部署CPP代码,编译正常使用以下代码部署时,
./build/infer --model_file ./inference.pdmodel --params_file ./inference.pdiparams --image_file ./kitti_smoke.png
遇到以下错误:
./build/infer: error while loading shared libraries: libdnnl.so.2: cannot open shared object file: No such file or directory
我参考了问题解决:libdnnl.so.2来修复这个问题. 目前还有得到解决 ,麻烦问下有什么办法吗? 还有libdnnl.so.2 应该是 WITH_MKL 的dependency, 关闭WITH_MKL后编译报错。请问一下是为什么?
具体环境配置如下:
环境:Ubuntu18.04
CUDA:10.2
cudnn:8.1
TensorRT:7.2.3
Paddle inference:2.1.1预测库(编译好的)
GIT COMMIT ID: 4596b9a22540fb0ea5d369c3c804544de61d03d0
WITH_MKL: ON
WITH_MKLDNN: ON
WITH_GPU: ON
WITH_ROCM: OFF
WITH_ASCEND_CL: OFF
WITH_ASCEND_CXX11: OFF
WITH_IPU: OFF
CUDA version: 10.2
CUDNN version: v8.1
CXX compiler version: 5.4.0
WITH_TENSORRT: ON
TensorRT version: v7.2.3.4
在下载的Paddle推理库里面,找到这个libdnnl.so.2, 拷贝到infer的同级目录下即可
在下载的Paddle推理库里面,找到这个libdnnl.so.2, 拷贝到infer的同级目录下即可
按照您的方法,将libdnnl.so.2, 拷贝到infer的同级目录下还是遇到了一样的问题
./build/infer --model_file ./inference.pdmodel --params_file ./inference.pdiparams --image_file ./kitti_smoke.png
./build/infer: error while loading shared libraries: libdnnl.so.2: cannot open shared object file: No such file or directory
export LD_LIBRARY_PATH=/DIR/PATH/:$LD_LIBRARY_PATH 可以解决吗, 其中/DIR/PATH是dnnl.so所在的目录绝对路径
export LD_LIBRARY_PATH=/DIR/PATH/:$LD_LIBRARY_PATH 可以解决吗, 其中/DIR/PATH是dnnl.so所在的目录绝对路径
你好,我直接手动拷贝的libdnnl.so.2 是一个快捷方式 dangling symlink
最后使用 sudo cp libdnnl.so.2 拷贝至infer的同级目录下解决问题。
后面还遇到了
./build/infer: error while loading shared libraries: libonnxruntime.so.1.11.1: cannot open shared object file: No such file or directory
./build/infer: error while loading shared libraries: libpaddle2onnx.so.1.0.0rc2: cannot open shared object file: No such file or directory
PreconditionNotMetError: The third-party dynamic library (libmklml_intel.so) that Paddle depends on is not configured correctly. (error code is libmklml_intel.so: cannot open shared object file: No such file or directory)
将缺少的文件逐一拷贝至infer的同级目录下成功
最后的至infer的同级目录截图如下:
输入图片为kitti 数据集图片
最后成功结果:
0 -1.844 1498.25 297.203 2085.75 742.797 2.00083 2.04294 4.35182 1.49708e+07 4.16715e+06 11.9543 -0.2732 0.818206
0 -1.6649 1382.59 381.36 1561.41 514.64 1.61101 2.18139 4.9397 3.24516e+07 9.84206e+06 30.5854 -0.0941052 0.635728
0 -1.65626 1360.07 359.154 1503.93 472.846 1.88813 2.186 4.89573 3.97351e+07 1.15936e+07 38.452 -0.0854694 0.589193
0 -1.64134 1335.66 352.127 1432.34 431.873 1.97667 2.12321 4.72679 5.45999e+07 1.5549e+07 54.5277 -0.0705445 0.581598
0 -1.6357 1326.4 357.831 1409.6 426.169 1.86686 2.12136 4.78431 6.11784e+07 1.75736e+07 61.8343 -0.0649012 0.412093
0 -1.64987 1351.51 362.874 1464.49 453.126 1.78822 2.11655 4.76287 4.74737e+07 1.37843e+07 46.6576 -0.0790782 0.384622
我总结的apollo smoke 模型输出为下:
Model output:
0 label (0 is car, 1 is cyclist, 2 is pedestrian and 3 is unknown)
1 # not used ?
2,3,4,5 2D bounding box corners (x min, y min, x max, y max) [pixel]
6,7,8 size (h, w, l) [m]
9,10,11 3D bounding box local center (x, y, z) [m]
12 alpha (yaw angle)
13 confidence score (0~1)
如果模型输出没错的话,这里看 9,10,11 3D bounding box local center (x, y, z) [m]
输出结果有问题~
麻烦请教一下我的理解是否有误~谢谢
同样得到错误结果
可视化结果如下,2DboundingBOX 已经超出图片大小了
@mikasazgx 请问使用的是paddle3d官方提供的预训练模型吗?
是的,用的 backbone是DLA34这个
@mikasazgx 感谢反馈,这里确实存在问题,已经通过 PR 72 修复,您可以参照PR中的修改先在本地验证下
该issue较长时间无反馈,先关闭,如有问题请重新打开或者建立新的issue