Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

表格识别报错 #1822

Open
ChaoII opened this issue Jul 18, 2024 · 3 comments
Open

表格识别报错 #1822

ChaoII opened this issue Jul 18, 2024 · 3 comments
Assignees

Comments

@ChaoII
Copy link

ChaoII commented Jul 18, 2024

表格识别训练、评估没有问题(但是根据example中的数据训练完acc一直是0),但是在执行预测命令后报错

(paddle) D:\PaddleX>python main.py -c paddlex/configs/table_recognition/SLANet.yaml ^
More?     -o Global.mode=predict ^
More?     -o Predict.model_dir="./output/best_accuracy" ^
More?     -o Predict.input_path="./dataset/table_rec_dataset_examples/images/border_19_0TKFMWCF3STF5QF1BJ3N.jpg" ^
More?     -o Global.output="output"

报错信息:

The device id has been set to 0.
Traceback (most recent call last):
  File "D:\PaddleX\paddlex\utils\result_saver.py", line 30, in wrap
    result = func(self, *args, **kwargs)
  File "D:\PaddleX\paddlex\engine.py", line 49, in run
    predictor = build_predictor(self.config)
  File "D:\PaddleX\paddlex\modules\base\predictor\predictor.py", line 189, in build_predictor
    return PredictorBuilderByConfig(*args, **kwargs)
  File "D:\PaddleX\paddlex\modules\base\predictor\predictor.py", line 173, in __init__
    self.predictor = BasePredictor.get(model_name)(
  File "D:\PaddleX\paddlex\modules\base\predictor\utils\node.py", line 43, in _wrapper
    ret = init_func(self, *args, **kwargs)
  File "D:\PaddleX\paddlex\modules\table_recognition\predictor\predictor.py", line 41, in __init__
    super().__init__(
  File "D:\PaddleX\paddlex\modules\base\predictor\utils\node.py", line 43, in _wrapper
    ret = init_func(self, *args, **kwargs)
  File "D:\PaddleX\paddlex\modules\base\predictor\predictor.py", line 56, in __init__
    self.pre_tfs, self.post_tfs = self.build_transforms(pre_transforms,
  File "D:\PaddleX\paddlex\modules\base\predictor\predictor.py", line 67, in build_transforms
    pre_tfs = pre_transforms if pre_transforms is not None else self._get_pre_transforms_from_config(
  File "D:\PaddleX\paddlex\modules\table_recognition\predictor\predictor.py", line 84, in _get_pre_transforms_from_config
    image_common.ResizeByLong(target_long_edge=self.table_max_len),
AttributeError: 'TableRecPredictor' object has no attribute 'table_max_len'

windows11 x64
python3.10
paddle 3.0.0b1
感觉像是通过父类调子类的方法,是不是zaiwindows上和其他平台上有不同的表现?

@cuicheng01
Copy link
Collaborator

您好,问题我们已经收到,我们尝试复现下

@cuicheng01
Copy link
Collaborator

@ChaoII 您好,问题已经修复,可以使用最新的代码尝试下~

@TrioTea
Copy link

TrioTea commented Nov 6, 2024

@cuicheng01
【根据example中的数据训练完acc一直是0】

您好,请问这个问题有解决吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants