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

paddle2onnx转换模型失败 #1107

Open
YangLiang2017 opened this issue May 24, 2023 · 6 comments
Open

paddle2onnx转换模型失败 #1107

YangLiang2017 opened this issue May 24, 2023 · 6 comments
Labels
Bug Something isn't working PaddleDetection stale

Comments

@YangLiang2017
Copy link

请将下面信息填写完整,便于我们快速解决问题,谢谢!

问题描述
请在此处详细的描述报错信息
我在paddle官网上下载了ppyolo的模型
使用的脚本如下:
python tools/export_model.py -c configs/ppyolo/ppyolo_r50vd_dcn_1x_coco.yml -o weights=https://paddledet.bj.bcebos.com/models/ppyolo_r50vd_dcn_1x_coco.pdparams
use_gpu=False
版本信息如下:
2023-05-24 15:02:08 [INFO] paddle2onnx-1.0.6 with python>=3.6, paddlepaddle>=2.0.0
paddlepaddle==2.4.2

下载完模型后
使用pip install paddle2onnx
执行如下语句时
paddle2onnx --model_dir ppyolo_r50vd_dcn_1x_coco/ --model_filename model.pdmodel --params_filename model.pdiparams --opset_version 11 --save_file ppyolo_r50vd_dcn_1x_coco.onnx
报错

[Paddle2ONNX] Start to parse PaddlePaddle model...
[Paddle2ONNX] Model file path: ppyolo_r50vd_dcn_1x_coco/model.pdmodel
[Paddle2ONNX] Paramters file path: ppyolo_r50vd_dcn_1x_coco/model.pdiparams
[Paddle2ONNX] Start to parsing Paddle model...
[Paddle2ONNX] Oops, there are some operators not supported yet, including deformable_conv,matrix_nms,
[ERROR] Due to the unsupported operators, the conversion is aborted.
Aborted (core dumped)

email: [email protected]

@1716932646
Copy link

你好,如果解决了,请告诉我如何解决的

@Zheng-Bicheng Zheng-Bicheng added Bug Something isn't working PaddleDetection labels Feb 29, 2024
@river666six
Copy link

我也遇到这个问题了,请告诉我如何解决的。哥

@river666six
Copy link

--enable_dev_version False加入这段命令就可以了

@pansinm
Copy link

pansinm commented Apr 8, 2024

--enable_dev_version False加入这段命令就可以了

感谢。我paddle 2.6.0转换失败,结合 这个issue 成功转换,思路就是降级版本。

conda create -n paddle_legacy python=3.10.13
conda activate paddle_legacy
pip install paddlepaddle==2.4.2
pip install paddle2onnx onnx
export PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python
paddle2onnx --model_dir ./inference  --model_filename inference.pdmodel --params_filename inference.pdiparams --save_file model.onnx --enable_dev_version False

@Homura852
Copy link

--enable_dev_version False加入这段命令就可以了

@river666six 你好,我加入上面这段命令后会弹出警告:[Deprecated] paddle2onnx.command.program2onnx will be deprecated in the future version, the recommended usage is paddle2onnx.export,虽然能将模型转换为onnx但是转换后的模型什么也检测不出来。能加个联系方式让我请教一下吗?我qq:2985778245

Copy link

This issue is stale because it has been open for 30 days with no activity.

@github-actions github-actions bot added the stale label Feb 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working PaddleDetection stale
Projects
None yet
Development

No branches or pull requests

6 participants