PaddlePaddle / Paddle2ONNX

ONNX Model Exporter for PaddlePaddle
Apache License 2.0
736 stars 173 forks source link

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

Closed 746891300-org closed 1 month ago

746891300-org commented 2 years ago

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

yeliang2258 commented 2 years ago

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

746891300-org commented 2 years ago

好的,谢谢!

mingo-doer commented 2 years ago

@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)

WenmuZhou commented 2 years ago

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

Zheng-Bicheng commented 4 months ago
Zheng-Bicheng commented 1 month ago

已经更新支持 while 算子,等待 CI 结束后 安装 Paddle2ONNX v1.2.10 使用: