Skip to content

RT-DETR推理模型转换崩溃 #9311

@philp123

Description

@philp123

问题确认 Search before asking

  • 我已经查询历史issue,没有发现相似的bug。I have searched the issues and found no similar bug report.

Bug组件 Bug Component

No response

Bug描述 Describe the Bug

用configs/rtdetr/rtdetr_swin_L_384_3x_coco.yml训练的rtdetr_swin_L_384模型在用官网的推理导出,出现错误:

  1. onnx 1.13.0,paddle2onnx _1.0.5,PaddlePaddle-gpu 2.6.1,PaddleDetection 2024.8.7
    执行paddle2onnx,出现

(paddle) root@ys-ai-GPU-6:/workspace/Project/框架/PaddleDetection# paddle2onnx --model_dir output_inference/20250303_swin_L --model_filename model.pdmodel --params_filename model.pdiparams --opset_version 16 --save_file output_inference/20250303_swin_L/model.onnx

[Paddle2ONNX] Start to parse PaddlePaddle model...
[Paddle2ONNX] Model file path: output_inference/20250303_swin_L/model.pdmodel
[Paddle2ONNX] Paramters file path: output_inference/20250303_swin_L/model.pdiparams
[Paddle2ONNX] Start to parsing Paddle model...
[libprotobuf ERROR /workspace/Paddle2ONNX/protobuf/src/google/protobuf/message_lite.cc:133] Can't parse message of type "paddle2onnx.framework.proto.ProgramDesc" because it is missing required fields: blocks[0].ops[14].attrs[13].type, blocks[0].ops[15].attrs[13].type, blocks[0].ops[16].attrs[13].type, blocks
[0].ops[17].attrs[13].type, blocks[0].ops[18].attrs[13].type, blocks[0].ops[19].attrs[13].type, blocks[0].ops[20].attrs[13].type, blocks[0].ops[21].attrs[13].type, blocks[0].ops[22].attrs[13].type, blocks[0].ops[157].attrs[13].type, blocks[0].ops[158].attrs[13].type, blocks[0].ops[159].attrs[13].type, blocks
[0].ops[160].attrs[13].type, blocks[0].ops[161].attrs[13].type, blocks[0].ops[162].attrs[13].type, blocks[0].ops[163].attrs[13].type, blocks[0].ops[164].attrs[13].type, blocks[0].ops[165].attrs[13].type, blocks[0].ops[303].attrs[13].type, blocks[0].ops[304].attrs[13].type, blocks[0].ops[305].attrs[13].type,
blocks[0].ops[306].attrs[13].type, blocks[0].ops[307].attrs[13].type, blocks[0].ops[308].attrs[13].type, blocks[0].ops[309].attrs[13].type, blocks[0].ops[310].attrs[13].type, blocks[0].ops[311].attrs[13].type, blocks[0].ops[1337].attrs[13].type, blocks[0].ops[1338].attrs[13].type, blocks[0].ops[1339].attrs[1
3].type, blocks[0].ops[1340].attrs[13].type, blocks[0].ops[1341].attrs[13].type, blocks[0].ops[1342].attrs[13].type, blocks[0].ops[1343].attrs[13].type, blocks[0].ops[1344].attrs[13].type, blocks[0].ops[1345].attrs[13].type
[Paddle2ONNX] Failed to parse paddlepaddle model from read content.
[Paddle2ONNX] Failed to load program of PaddlePaddle model.
[Paddle2ONNX] Paddle model parsing failed.
[Paddle2ONNX] Paddle model convert failed.
2025-03-04 03:24:37 [INFO] ===============Make PaddlePaddle Better!================
2025-03-04 03:24:37 [INFO] A little survey: https://iwenjuan.baidu.com/?code=r8hu2s

2.升级版本onnx 1.17.0,paddle2onnx 1.3.1,PaddlePaddle-gpu 2.6.1,PaddleDetection 2024.8.7
执行后,出现

(paddle) root@ys-ai-GPU-6:/workspace/Project/框架/PaddleDetection# paddle2onnx --model_dir output_inference/20250303_swin_L --model_filename model.pdmodel --params_filename model.pdiparams --opset_version 16 --save_file output_inference/20250303_swin_L/model.onnx
[Paddle2ONNX] Start to parse PaddlePaddle model...
[Paddle2ONNX] Model file path: output_inference/20250303_swin_L/model.pdmodel
[Paddle2ONNX] Parameters file path: output_inference/20250303_swin_L/model.pdiparams
[Paddle2ONNX] Start to parsing Paddle model...
[ERROR] Cannot found attribute fp32_values in op: set_value


C++ Traceback (most recent call last):

0 paddle2onnx::Export(char const*, char const*, char**, int*, int, bool, bool, bool, bool, bool, paddle2onnx::CustomOp*, int, char const*, char**, int*, char const*, bool*, bool, char**, int)


Error Message Summary:

FatalError: Process abort signal is detected by the operating system.
[TimeInfo: *** Aborted at 1741073086 (unix time) try "date -d @1741073086" if you are using GNU date ***]

复现环境 Environment

  • OS: Ubuntu 22.04
  • Python: 3.10.14
  • PaddleDetection: 2024.8.7 (8cc4927)
  • PaddlePaddle-GPU: 2.6.1

Bug描述确认 Bug description confirmation

  • 我确认已经提供了Bug复现步骤、代码改动说明、以及环境信息,确认问题是可以复现的。I confirm that the bug replication steps, code change instructions, and environment information have been provided, and the problem can be reproduced.

是否愿意提交PR? Are you willing to submit a PR?

  • 我愿意提交PR!I'd like to help by submitting a PR!

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions