PaddlePaddle / PaddleDetection

Object Detection toolkit based on PaddlePaddle. It supports object detection, instance segmentation, multiple object tracking and real-time multi-person keypoint detection.
Apache License 2.0
12.82k stars 2.89k forks source link

pp-yolo部署在jetson上失败 #1350

Closed thunder95 closed 3 years ago

thunder95 commented 4 years ago

命令: ./deploy/cpp/build/main --model_dir=myfiles/my_ppyolo --image_path=/d/hl_files/4_10_2_0003.jpg --use_gpu=True --run_mode fluid

在pc上运行正常 在xavier上运行paddledetection之前的yolo系列也正常

报错信息: WARNING: Logging before InitGoogleLogging() is written to STDERR I0903 14:34:09.529490 1351 analysis_predictor.cc:88] Profiler is deactivated, and no profiling report will be generated. I0903 14:34:09.581341 1351 analysis_predictor.cc:845] MODEL VERSION: 0.0.0 I0903 14:34:09.581487 1351 analysis_predictor.cc:847] PREDICTOR VERSION: 1.6.2


C++ Call Stacks (More useful to developers):

0 std::cxx11::basic_string<char, std::char_traits, std::allocator > paddle::platform::GetTraceBackString<std::cxx11::basic_string<char, std::char_traits, std::allocator > const&>(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, char const*, int) 1 paddle::framework::OpRegistry::CreateOp(std::cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > > > > const&, std::map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > >, std::less<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::char_traits, std::allocator > > > > > > const&, std::unordered_map<std::cxx11::basic_string<char, std::char_traits, std::allocator >, boost::variant<boost::blank, int, float, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<int, std::allocator >, std::vector<float, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::cxx11::basic_string<char, std::chartraits, std::allocator > > >, bool, std::vector<bool, std::allocator >, paddle::framework::BlockDesc, long, std::vector<paddle::framework::BlockDesc, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void>, std::hash<std::__cxx11::basic_string<char, std::char_traits, std::allocator > >, std::equal_to<std::cxx11::basic_string<char, std::char_traits, std::allocator > >, std::allocator<std::pair<std::cxx11::basic_string<char, std::char_traits, std::allocator > const, boost::variant<boost::blank, int, float, std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::vector<int, std::allocator >, std::vector<float, std::allocator >, std::vector<std::cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::chartraits, std::allocator > > >, bool, std::vector<bool, std::allocator >, paddle::framework::BlockDesc, long, std::vector<paddle::framework::BlockDesc, std::allocator<paddle::framework::BlockDesc*> >, std::vector<long, std::allocator >, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void, boost::detail::variant::void> > > >) 2 paddle::framework::OpRegistry::CreateOp(paddle::framework::OpDesc const&) 3 paddle::framework::NaiveExecutor::CreateOps(paddle::framework::ProgramDesc const&, int, bool) 4 paddle::framework::NaiveExecutor::Prepare(paddle::framework::Scope*, paddle::framework::ProgramDesc const&, int, bool) 5 paddle::AnalysisPredictor::PrepareExecutor() 6 paddle::AnalysisPredictor::Init(std::shared_ptr const&, std::shared_ptr const&) 7 std::unique_ptr<paddle::PaddlePredictor, std::default_delete > paddle::CreatePaddlePredictor<paddle::AnalysisConfig, (paddle::PaddleEngineKind)2>(paddle::AnalysisConfig const&) 8 std::unique_ptr<paddle::PaddlePredictor, std::default_delete > paddle::CreatePaddlePredictor(paddle::AnalysisConfig const&)


Error Message Summary:

Error: Operator matrix_nms has not been registered [Hint: op_info_ptr should not be null.] at (/home/paddle/hg/paddle/paddle/fluid/framework/op_info.h:113)

Aborted (core dumped)

thunder95 commented 4 years ago

直接从官网下载的fluid_inference包也不能解决 也尝试了从源码直接编译安装,也同样的错误

yghstill commented 4 years ago

@thunder95 请问下载的是1.8.4版本或develop版本的fluid_inference包吗?

thunder95 commented 4 years ago

@thunder95 请问下载的是1.8.4版本或develop版本的fluid_inference包吗?

fluid_inference我用的是这个nv-jetson-cuda10-cudnn7.5-trt5 paddle直接clone的最新版本然后编译安装的,clone下来之后没有切换分支 @still-wait

yghstill commented 4 years ago

@thunder95 感谢反馈,我们定位一下问题

chalsliu commented 4 years ago

有可能是因为nv-jetson-cuda10-cudnn7.5-trt5这个版本比较低,近期会发布新的版本

thunder95 commented 4 years ago

有可能是因为nv-jetson-cuda10-cudnn7.5-trt5这个版本比较低,近期会发布新的版本

@chalsliu 前面是用的nv-jetson-cuda10-cudnn7.5-trt5版本, 但是我后来也用了paddle的源码编译, 在build.sh把inference路径给改成这样:PADDLE_DIR=/d/hl_files/Paddle/build/fluid_inference_install_dir 然后报的同样的错,我编译源码时的参数不对吗难道?

cryoco commented 4 years ago

您好,这个问题是旧版本预测库尚不支持pp-yolo新增的算子matrix_nms导致的,您可以试一下2.0.0-beta版本的预测库哈

thunder95 commented 4 years ago

您好,这个问题是旧版本预测库尚不支持pp-yolo新增的算子matrix_nms导致的,您可以试一下2.0.0-beta版本的预测库哈

@cryoco 您好,感谢回复, 刚测试了下这个算子可以使用了,只是推理预测时间非常慢(fp32: 77ms, fp16: 81ms),比py慢了很多, 可以看我提的这个issue,非pp_yolo目前已经解决了。 https://github.com/PaddlePaddle/PaddleDetection/issues/1334

cryoco commented 4 years ago

您好,这个问题是旧版本预测库尚不支持pp-yolo新增的算子matrix_nms导致的,您可以试一下2.0.0-beta版本的预测库哈

@cryoco 您好,感谢回复, 刚测试了下这个算子可以使用了,只是推理预测时间非常慢(fp32: 77ms, fp16: 81ms),比py慢了很多, 可以看我提的这个issue,非pp_yolo目前已经解决了。

1334

您可以测试一下不开TRT的性能

thunder95 commented 4 years ago

您好,这个问题是旧版本预测库尚不支持pp-yolo新增的算子matrix_nms导致的,您可以试一下2.0.0-beta版本的预测库哈

@cryoco 您好,感谢回复, 刚测试了下这个算子可以使用了,只是推理预测时间非常慢(fp32: 77ms, fp16: 81ms),比py慢了很多, 可以看我提的这个issue,非pp_yolo目前已经解决了。

1334

您可以测试一下不开TRT的性能

@cryoco 不开trt在40ms左右, 预期开了trt不应该超过40, 在30左右应该算正常

jiweibo commented 3 years ago

使用2.0rc1的预测库

测试pp-yolo在xavier nx下的性能

./build/main --model_dir /output/ppyolo/ --image_path ../../demo/000000014439_640x640.jpg --use_gpu=True --run_mode trt_fp32 -run_benchmark trt_fp32 耗时为19.40ms

./build/main --model_dir /output/ppyolo/ --image_path ../../demo/000000014439_640x640.jpg --use_gpu=True --run_mode trt_fp16 -run_benchmark trt_fp16 耗时为18.32ms

./build/main --model_dir /output/ppyolo/ --image_path ../../demo/000000014439_640x640.jpg --use_gpu=True --run_mode fluid -run_benchmark fluid耗时为111.11ms

2.0rc1应该修复了问题