PaddleOCR: Error [operator < conv2d_fusion > error] while use ppyolov2_r50vd_dcn_365e_publaynet model

Hi, i want to ask when using this model ppyolov2_r50vd_dcn_365e_publaynet i got this error

    InvalidArgumentError: The conv2d_fusion Op's Input Variable `Input` contains uninitialized Tensor.
      [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] (at /paddle/paddle/fluid/framework/operator.cc:2411)
      [operator < conv2d_fusion > error]

here is the code that i use. I’m using paddlepaddle-gpu 2.4.0.post117

import os
import cv2
from paddleocr import PPStructure, save_structure_res

table_engine = PPStructure(
    table=False,
    ocr=False,
    show_log=True,
    lang="en",
    layout_model_dir="model_zoo/ppyolov2_r50vd_dcn_365e_publaynet/",)

pls help, it’s works normal when i’m use picodet_lcnet_x1_0_fgd_layout model, it use the same dict path.

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Comments: 16

Most upvoted comments

我也是。使用picodet_lcnet_x1_0_fgd_layout_table_infer模型没问题。但使用ppyolov2_r50vd_dcn_365e_tableBank_word和自己在paddleDetection训练的模型就报这个错

Traceback (most recent call last):
  File "/snap/pycharm-community/329/plugins/python-ce/helpers/pydev/pydevd.py", line 1496, in _exec
    pydev_imports.execfile(file, globals, locals)  # execute the script
  File "/snap/pycharm-community/329/plugins/python-ce/helpers/pydev/_pydev_imps/_pydev_execfile.py", line 18, in execfile
    exec(compile(contents+"\n", file, 'exec'), glob, loc)
  File "/home/DiskA/PycharmProjects/PaddleOCR-release-2.6/ppstructure/predict_system_test.py", line 454, in <module>
    main(args)
  File "/home/DiskA/PycharmProjects/PaddleOCR-release-2.6/ppstructure/predict_system_test.py", line 388, in main
    res, time_dict = structure_sys(img, img_idx=index)
  File "/home/DiskA/PycharmProjects/PaddleOCR-release-2.6/ppstructure/predict_system_test.py", line 170, in __call__
    layout_res, elapse = self.layout_predictor(img)
  File "/home/DiskA/PycharmProjects/PaddleOCR-release-2.6/ppstructure/layout/predict_layout.py", line 86, in __call__
    self.predictor.run()
ValueError: (InvalidArgument) The conv2d_fusion Op's Input Variable `Input` contains uninitialized Tensor.
  [Hint: Expected t->IsInitialized() == true, but received t->IsInitialized():0 != true:1.] (at /paddle/paddle/fluid/framework/operator.cc:2411)
  [operator < conv2d_fusion > error]
python-BaseException