PaddleOCR icon indicating copy to clipboard operation
PaddleOCR copied to clipboard

中文pdf转word报错

Open navidog8888 opened this issue 7 months ago • 2 comments

问题描述 / Problem Description

中文pdf转word报错。

运行环境 / Runtime Environment

  • OS: Linux jupyter-2046977-8171292 5.4.0-139-generic #156-Ubuntu SMP Fri Jan 20 17:27:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
  • Paddle: paddlepaddle-gpu 2.4.0.post112
  • PaddleOCR: 2.7.0.2
  • python:3.7.4

复现代码 / Reproduction Code

!python3 /home/aistudio/PaddleOCR/ppstructure/predict_system.py
--image_dir=/home/aistudio/1721202911238.png
--det_model_dir=/home/aistudio/PaddleOCR/ppstructure/inference/ch_PP-OCRv4_det_infer
--rec_model_dir=/home/aistudio/PaddleOCR/ppstructure/inference/ch_PP-OCRv4_rec_infer
--rec_char_dict_path=/home/aistudio/PaddleOCR/ppocr/utils/ppocr_keys_v1.txt
--table_model_dir=/home/aistudio/PaddleOCR/ppstructure/inference/ch_ppstructure_mobile_v2.0_SLANet_infer
--table_char_dict_path=/home/aistudio/PaddleOCR/ppocr/utils/dict/table_structure_dict.txt
--layout_model_dir=/home/aistudio/PaddleOCR/ppstructure/inference/picodet_lcnet_x1_0_fgd_layout_cdla_infer
--layout_dict_path=/home/aistudio/PaddleOCR/ppocr/utils/dict/layout_dict/layout_cdla_dict.txt
--vis_font_path=/home/aistudio/PaddleOCR/doc/fonts/chinese_cht.ttf
--recovery=True
--output=/home/aistudio/PaddleOCR/output/

完整报错 / Complete Error Message

Traceback (most recent call last): File "/home/aistudio/PaddleOCR/ppstructure/predict_system.py", line 394, in main(args) File "/home/aistudio/PaddleOCR/ppstructure/predict_system.py", line 329, in main res, time_dict = structure_sys(img, img_idx=index) File "/home/aistudio/PaddleOCR/ppstructure/predict_system.py", line 154, in call roi_img, return_ocr_result_in_table File "/home/aistudio/PaddleOCR/ppstructure/table/predict_table.py", line 96, in call structure_res, elapse = self._structure(copy.deepcopy(img)) File "/home/aistudio/PaddleOCR/ppstructure/table/predict_table.py", line 118, in _structure structure_res, elapse = self.table_structurer(copy.deepcopy(img)) File "/home/aistudio/PaddleOCR/ppstructure/table/predict_structure.py", line 153, in call post_result = self.postprocess_op(preds, [shape_list]) File "/home/aistudio/PaddleOCR/ppocr/postprocess/table_postprocess.py", line 53, in call result = self.decode(structure_probs, bbox_preds, shape_list) File "/home/aistudio/PaddleOCR/ppocr/postprocess/table_postprocess.py", line 81, in decode text = self.character[char_idx] IndexError: list index out of range

可能解决方案 / Possible solutions

附件 / Appendix

navidog8888 avatar Jul 18 '24 08:07 navidog8888