Paddle2ONNX icon indicating copy to clipboard operation
Paddle2ONNX copied to clipboard

PaddleOCR中文表格模型转onnx缺失算子支持

Open 746891300-org opened this issue 2 years ago • 5 comments

PaddleOCR新出的中文表格识别模型转onnx报错: NotImplementedError: There's 5 ops are not supported yet =========== tensor_array_to_tensor =========== =========== lod_array_length =========== =========== while =========== =========== write_to_array =========== =========== one_hot_v2 ===========

模型地址: https://paddleocr.bj.bcebos.com/ppstructure/models/slanet/ch_ppstructure_mobile_v2.0_SLANet_infer.tar

746891300-org avatar Aug 26 '22 14:08 746891300-org

你好,这个模型要转换成功,需要OCR模型去除控制流,建议去PaddleOCR repo下提issue,去除该模型的控制流之后再进行转换

yeliang2258 avatar Aug 29 '22 02:08 yeliang2258

好的,谢谢!

746891300-org avatar Aug 29 '22 05:08 746891300-org

@yeliang2258 你好 这个模型也是一样的问题吗?https://paddleocr.bj.bcebos.com/dygraph_v2.0/table/en_ppocr_mobile_v2.0_table_structure_infer.tar [Paddle2ONNX] Start to parse PaddlePaddle model... [Paddle2ONNX] Model file path: /root/ocr/inference/en_ppocr_mobile_v2.0_table_structure_infer/inference.pdmodel [Paddle2ONNX] Paramters file path: /root/ocr/inference/en_ppocr_mobile_v2.0_table_structure_infer/inference.pdiparams [Paddle2ONNX] Start to parsing Paddle model... [Paddle2ONNX] LodTensorArray is not supported. [Paddle2ONNX] Oops, there are some operators not supported yet, including conditional_block,lod_array_length,select_input,tensor_array_to_tensor,while,write_to_array, [ERROR] Due to the unsupported operators, the conversion is aborted. Aborted (core dumped)

mingo-doer avatar Sep 05 '22 05:09 mingo-doer

fixed in https://github.com/PaddlePaddle/PaddleOCR/pull/7485, the inference model has also been updated, you can re-download it for paddle2onnx

WenmuZhou avatar Sep 05 '22 07:09 WenmuZhou

  • https://github.com/PaddlePaddle/Paddle2ONNX/pull/1324

Zheng-Bicheng avatar Jul 13 '24 12:07 Zheng-Bicheng