ncnn icon indicating copy to clipboard operation
ncnn copied to clipboard

paddleocr检测模型转换ncnn,转换成功,加载模型出现layer 65 not exists or registered

Open qihang720 opened this issue 3 years ago • 3 comments

error log | 日志或报错信息 | ログ

layer 65 not exists or registered

model | 模型 | モデル

  1. original model https://drive.google.com/file/d/1xDCdtGXDeARORHfQa5uQqoITU3fH-M5A/view?usp=sharing

how to reproduce | 复现步骤 | 再現方法

  1. python -m onnxsim model/ch_PP-OCRv3_det_infer.onnx model/ch_PP-OCRv3_det_infer_sim.onnx
  2. ./onnx2ncnn model/ch_PP-OCRv3_det_infer_sim.onnx model/ch_PP-OCRv3_det_infer_sim.param model/ch_PP-OCRv3_det_infer_sim.bin
  3. ./ncnnoptimize model/ch_PP-OCRv3_det_infer_sim.param model/ch_PP-OCRv3_det_infer_sim.bin model/ch_PP-OCRv3_det_infer_sim_opt.param model/ch_PP-OCRv3_det_infer_sim_opt.bin 1
  4. ./ncnn2mem model/ch_PP-OCRv3_det_infer_sim_opt.param model/ch_PP-OCRv3_det_infer_sim_opt.bin model/ch_PP-OCRv3_det_infer_sim_opt.id.h model/ch_PP-OCRv3_det_infer_sim_opt.mem.h

5.推理使用的是ch_PP-OCRv3_det_infer_sim_opt.param.bin和ch_PP-OCRv3_det_infer_sim_opt.bin

onnx版本: onnx 1.8.1 onnx-graphsurgeon 0.3.19 onnx-simplifier 0.4.2 onnxoptimizer 0.2.4 onnxruntime 1.7.0

qihang720 avatar Jul 28 '22 03:07 qihang720

v3版的目前推荐先转pytorch再用pnnx转ncnn v2版的可以直接走ONNX转过来

wzyforgit avatar Jul 29 '22 00:07 wzyforgit

v3版的目前推荐先转pytorch再用pnnx转ncnn v2版的可以直接走ONNX转过来

想问一下pnnx有没有比较详细的编译教程,或者转换脚本,还有pnnx转ncnn有没有教程。

qihang720 avatar Jul 29 '22 02:07 qihang720

v3版的目前推荐先转pytorch再用pnnx转ncnn v2版的可以直接走ONNX转过来

想问一下pnnx有没有比较详细的编译教程,或者转换脚本,还有pnnx转ncnn有没有教程。

去bing搜 nihui 知乎 pnnx

wzyforgit avatar Jul 29 '22 02:07 wzyforgit

@wzyforgit 你好,请问v3版本你使用pnnx转ncnn转换成功了吗?我使用nihui编译pnnx教程,进行转换,一直不成功,出现debug.param debug2.param

xjdx123 avatar Jan 16 '23 02:01 xjdx123

@wzyforgit 你好,请问v3版本你使用pnnx转ncnn转换成功了吗?我使用nihui编译pnnx教程,进行转换,一直不成功,出现debug.param debug2.param

啊这,我没折腾v3版本了,用原版的paddle代码都没达到我这边项目的要求,目前只用v2

wzyforgit avatar Jan 16 '23 02:01 wzyforgit

@wzyforgit 好的,多谢

xjdx123 avatar Jan 16 '23 03:01 xjdx123