PaddlePaddle / PaddlePaddle/FastDeploy

在jetsonnano上部属fastdeploy的python案例时,报错!!!!

Open
#2,219 37 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
3.7k
Forks
756
Avg merge
19h 28m
Merged PRs (30d)
4

Description


温馨提示:根据社区不完全统计,按照模板提问,可以加快回复和解决问题的速度


环境

  • 【FastDeploy版本】: 说明具体的版本,fastdeploy_gpu_python-0.0.0-cp36-cp36m-linux_aarch64.whl,在jetsonnano中编译的,下载最新的fastdeploy版本。
  • 【编译命令】git clone https://github.com/PaddlePaddle/FastDeploy.git
    cd FastDeploy/python
    export BUILD_ON_JETSON=ON
    export ENABLE_VISION=ON
    python setup.py build
    python setup.py bdist_wheel
  • 【系统平台】: Linux x64(Ubuntu 18.04)
  • 【硬件】: 说明具体硬件型号,jetsonnano
  • 【编译语言】:Python(3.6.9)

问题日志及出现问题的操作流程

  • 附上详细的问题日志有助于快速定位分析

  • 【模型跑不通】

  • -在案例使用ppyooe模型在cpu、GPU时可以跑通,但使用trt时报错(python infer_ppyoloe.py --model_dir ppyoloe_crn_l_300e_coco --image 000000014439.jpg --device gpu --use_trt True),错误信息如下:

  • [WARN][Paddle2ONNX] [multiclass_nms3: multiclass_nms3_0.tmp_1] Paramter nms_top_k:10000 is exceed limit in TensorRT BatchedNMS plugin, will force to 4096.
    [INFO] fastdeploy/runtime/backends/tensorrt/trt_backend.cc(572)::BuildTrtEngine Start to building TensorRT Engine...
    [INFO] fastdeploy/runtime/backends/tensorrt/trt_backend.cc(659)::BuildTrtEngine TensorRT Engine is built successfully.
    [INFO] fastdeploy/runtime/backends/tensorrt/trt_backend.cc(661)::BuildTrtEngine Serialize TensorRTEngine to local file ./tensorrt_cache/model.trt.
    [ERROR] fastdeploy/runtime/backends/tensorrt/trt_backend.cc(666)::BuildTrtEngine Failed to open ./tensorrt_cache/model.trt to write.
    [ERROR] fastdeploy/runtime/backends/tensorrt/trt_backend.cc(752)::CreateTrtEngineFromOnnx Failed to build tensorrt engine.
    [INFO] fastdeploy/runtime/runtime.cc(339)::CreateTrtBackend Runtime initialized with Backend::TRT in Device::GPU.
    [ERROR] fastdeploy/runtime/backends/tensorrt/trt_backend.cc(239)::log 2: [pluginV2DynamicExtRunner.cpp::execute::115] Error Code 2: Internal Error (Assertion status == kSTATUS_SUCCESS failed. )
    [ERROR] fastdeploy/runtime/backends/tensorrt/trt_backend.cc(348)::InferFailed to Infer with TensorRT.
    [ERROR] fastdeploy/vision/detection/ppdet/base.cc(73)::BatchPredict Failed to inference by runtime

  • 第二个问题是运行案例中的ppyolo模型报错(python infer_ppyolo.py),报错信息如下:

  • dlinano@jetson-nano:~/FastDeploy/examples/vision/detection/paddledetection/python$ python infer_ppyolo.py
    100%|█████████████████████████| 171084/171084 [00:20<00:00, 8417.70KB/s]
    Successfully download model at path: /home/dlinano/.fastdeploy/models/ppyolo_r50vd_dcn_1x_coco
    [INFO] fastdeploy/vision/common/processors/transform.cc(45)::FuseNormalizeCast Normalize and Cast are fused to Normalize in preprocessing pipeline.
    [INFO] fastdeploy/vision/common/processors/transform.cc(93)::FuseNormalizeHWC2CHW Normalize and HWC2CHW are fused to NormalizeAndPermute in preprocessing pipeline.
    [INFO] fastdeploy/vision/common/processors/transform.cc(159)::FuseNormalizeColorConvert BGR2RGB and NormalizeAndPermute are fused to NormalizeAndPermute with swap_rb=1
    [ERROR] fastdeploy/fastdeploy_model.cc(239)::CreateCpuBackend Found no valid backend for model: PaddleDetection/PP-YOLO
    [ERROR] fastdeploy/vision/detection/ppdet/base.cc(32)::Initialize Failed to initialize fastdeploy backend.
    Traceback (most recent call last):
    File "infer_ppyolo.py", line 62, in
    model_file, params_file, config_file, runtime_option=runtime_option)
    File "/usr/local/lib/python3.6/dist-packages/fastdeploy/vision/detection/ppdet/init.py", line 188, in init
    assert self.initialized, "PPYOLO model initialize failed."
    AssertionError: PPYOLO model initialize failed.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with examples/vision/detection/paddledetection/python/infer_ppyolo.py and reproduce both reported paths: CPU/GPU versus TensorRT, and the default PP-YOLO run. Read the logged TensorRT failure in runtime/backends/tensorrt/trt_backend.cc and the backend initialization failure, then verify that both inference paths initialize and complete successfully on the stated Jetson Nano setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
backend, machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.