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

头部姿态估计模型FSANet部署问题 #4345

Closed
mawj111 opened this issue Nov 12, 2022 · 5 comments · Fixed by #4346
Closed

头部姿态估计模型FSANet部署问题 #4345

mawj111 opened this issue Nov 12, 2022 · 5 comments · Fixed by #4346
Labels

Comments

@mawj111
Copy link

mawj111 commented Nov 12, 2022

使用Pytorch->onnx->ncnn步骤对FSANet进行模型转换并进行ncnn部署推理,结果一直报错"段错误(核心已转储)"。
检查onnx模型后,发现其中存在div、pow、mul等node,是否ncnn不支持这些node的op?我需要自定义相应的ncnn layer吗?
相应的模型文件如下,麻烦各位大佬帮忙解答一下,感谢!
model.zip

@mawj111
Copy link
Author

mawj111 commented Nov 12, 2022

input = [1, 3, 64, 64]
mean = [127.5, 127.5, 127.5]
norm = [1/128.f, 1/128.f, 1/128.f]

@nihui
Copy link
Member

nihui commented Nov 12, 2022

尝试使用 pnnx 转换 pytorch 模型到 ncnn
https://github.com/pnnx/pnnx

@mawj111
Copy link
Author

mawj111 commented Nov 12, 2022

@nihui 非常感谢您的快速回复,今天刚开始尝试使用最新的windows版本的pnnx.exe转换工具,在转换如retinaface等简单的模型时,转换成功并且成功使用ncnn部署。但在使用pnnx转换FSANet模型时遇到如下图一些问题。
ORC38V63_(O$Z~84R{Z_~9I
P25FNQ``PL~K3)_TNGF9$7V

@mawj111
Copy link
Author

mawj111 commented Nov 12, 2022

使用的pt文件如下
FSANet_Conv.zip

@nihui nihui added the bug label Nov 12, 2022
@nihui nihui linked a pull request Nov 12, 2022 that will close this issue
@nihui
Copy link
Member

nihui commented Aug 5, 2024

针对onnx模型转换的各种问题,推荐使用最新的pnnx工具转换到ncnn
In view of various problems in onnx model conversion, it is recommended to use the latest pnnx tool to convert your model to ncnn

pip install pnnx
pnnx model.onnx inputshape=[1,3,224,224]

详细参考文档
Detailed reference documentation
https://github.com/pnnx/pnnx
https://github.com/Tencent/ncnn/wiki/use-ncnn-with-pytorch-or-onnx#how-to-use-pnnx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants