服务器上paddleOCR的bug记录

bug1:

[2023/12/07 10:35:48] ppocr INFO: [0/1] ./doc/doc_jc/MusculoskeletalRehabilitation2ndEditionUndergraduateRehabilitationTextbook_ZhangChangjie2013.pdf
Traceback (most recent call last):
  File "ppstructure/predict_system.py", line 336, in <module>
    main(args)
  File "ppstructure/predict_system.py", line 274, in main
    res, time_dict = structure_sys(img, img_idx=index)
  File "ppstructure/predict_system.py", line 114, in __call__
    layout_res, elapse = self.layout_predictor(img)
  File "/home/llm/Projects/PaddleOCR/ppstructure/layout/predict_layout.py", line 85, in __call__
    self.input_tensor.copy_from_cpu(img)
  File "/home/llm/miniconda3/envs/paddle_env/lib/python3.8/site-packages/paddle/inference/wrapper.py", line 46, in tensor_copy_from_cpu
    self._copy_from_cpu_bind(data)
RuntimeError: (PreconditionNotMet) Cannot load cudnn shared library. Cannot invoke method cudnnGetVersion.
  [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居然出现了数组越界的错误,十分难受:

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

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

  • 8
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值