PaddleOCR
PaddleOCR copied to clipboard
版面分析picodet_lcnet_x1_0_fgd_layout_cdla训练问题
-
系统环境/System Environment: ubuntu 20.04
-
版本号/Version:Paddle: PaddleOCR: 问题相关组件/Related components: Paddle ==2.5.1 PaddleOCR==2.5.1 PaddleDetection==2.6.0
-
场景:训练模型 参考训练文档,因为没有找到对应的配置文件,沿用示例中的配置文件,更改CDLA数据集进行训练
configs/picodet/legacy_model/application/layout_analysis/picodet_lcnet_x1_0_layout.yml
训练后,导出训练后的模型,引用到PaddleOCR中,无法正常使用
python paddleocr.py --image_dir table.png \ --type structure \ --layout_model_dir models/picodet_lcnet_x1_0_layout/ \ --layout_dict_path ppocr/utils/dict/layout_dict/layout_cdla_dict.txt
错误信息:
File "/PaddleOCR/ppstructure/layout/predict_layout.py", line 86, in __call__ self.predictor.run() ValueError: (InvalidArgument) The size of Op(Conv) inputs should not be 0. [Hint: Expected in_dims[i] != 0, but received in_dims[i]:0 == 0:0.] (at /Users/paddle/xly/workspace/6985ca36-57e1-445a-9440-7ab536ead219/Paddle/paddle/phi/infermeta/binary.cc:465) [operator < conv2d > error]
以上问题是否因为配置文件不匹配导致,如何处理?谢谢!
PPStructure 预训练模型结构和 PaddleDetection 提供的配置文件模型结构不一样,需要使用 deploy/python/infer.py
进行推理,目前似乎没有提供代码方便的调用推理。