当前位置:   article > 正文

服务器上paddleOCR的bug记录_paddleocr集成tablestructure

paddleocr集成tablestructure

bug1:

  1. [2023/12/07 10:35:48] ppocr INFO: [0/1] ./doc/doc_jc/MusculoskeletalRehabilitation2ndEditionUndergraduateRehabilitationTextbook_ZhangChangjie2013.pdf
  2. Traceback (most recent call last):
  3. File "ppstructure/predict_system.py", line 336, in <module>
  4. main(args)
  5. File "ppstructure/predict_system.py", line 274, in main
  6. res, time_dict = structure_sys(img, img_idx=index)
  7. File "ppstructure/predict_system.py", line 114, in __call__
  8. layout_res, elapse = self.layout_predictor(img)
  9. File "/home/llm/Projects/PaddleOCR/ppstructure/layout/predict_layout.py", line 85, in __call__
  10. self.input_tensor.copy_from_cpu(img)
  11. File "/home/llm/miniconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/inference/wrapper.py", line 46, in tensor_copy_from_cpu
  12. self._copy_from_cpu_bind(data)
  13. RuntimeError: (PreconditionNotMet) Cannot load cudnn shared library. Cannot invoke method cudnnGetVersion.
  14. [Hint: cudnn_dso_handle should not be null.] (at ../paddle/phi/backends/dynload/cudnn.cc:64)

问了同事发现他的窗口可以运行,我的不行,应该是修改了什么配置文件。我看网上说是libcudnn.solibcublas.so的问题。

看来服务器上面的screnn还有不同的性质啊!

export命令设置的环境变量在当前会话中是暂时的,因为它们只在当前会话中有效,并且在会话结束后将被清除。当你打开一个新的终端会话或重新登录时,之前使用export命令设置的环境变量将不再存在。--gpt 3.5

ref只需要一句

export LD_LIBRARY_PATH=xxx/lib:$LD_LIBRARY_PATH

就可以了!LD_LIBRARY_PATH是你的xxx/anaconda3/envs/env_name/lib 路径

不过后面还有一个小bug,

[2023/12/07 11:33:32] ppocr ERROR: error in layout recovery image:./doc/doc_jc/Musculo2013.pdf, err msg: [Errno 2] No such file or directory: 'output/structure/Musculo2013/[0, 211, 963, 1462]_1.jpg'

这个是因为没有保存图貌似。额,这个是自己写的,不算bug应该。

后面table居然出现了数组越界的错误,十分难受:

  1. Traceback (most recent call last):
  2. File "ppstructure/predict_system.py", line 336, in <module>
  3. main(args)
  4. File "ppstructure/predict_system.py", line 274, in main
  5. res, time_dict = structure_sys(img, img_idx=index)
  6. File "ppstructure/predict_system.py", line 131, in __call__
  7. res, table_time_dict = self.table_system(
  8. File "/home/llm/Projects/PaddleOCR/ppstructure/table/predict_table.py", line 86, in __call__
  9. structure_res, elapse = self._structure(copy.deepcopy(img))
  10. File "/home/llm/Projects/PaddleOCR/ppstructure/table/predict_table.py", line 109, in _structure
  11. structure_res, elapse = self.table_structurer(copy.deepcopy(img))
  12. File "/home/llm/Projects/PaddleOCR/ppstructure/table/predict_structure.py", line 147, in __call__
  13. post_result = self.postprocess_op(preds, [shape_list])
  14. File "/home/llm/Projects/PaddleOCR/ppocr/postprocess/table_postprocess.py", line 56, in __call__
  15. result = self.decode(structure_probs, bbox_preds, shape_list)
  16. File "/home/llm/Projects/PaddleOCR/ppocr/postprocess/table_postprocess.py", line 87, in decode
  17. text = self.character[char_idx]
  18. IndexError: list index out of range

不知道为什么。之前都没有这个问题。。。。

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Cpp五条/article/detail/670451
推荐阅读
相关标签
  

闽ICP备14008679号