Skip to content
New issue

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

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

Already on GitHub? # to your account

Error about ppocrlabel, when start ppocrlabl #12522

Closed
nam157 opened this issue May 28, 2024 · 2 comments
Closed

Error about ppocrlabel, when start ppocrlabl #12522

nam157 opened this issue May 28, 2024 · 2 comments

Comments

@nam157
Copy link

nam157 commented May 28, 2024

问题描述 / Problem Description

Traceback (most recent call last):
  File "PPOCRLabel.py", line 3461, in <module>
    sys.exit(main())
  File "PPOCRLabel.py", line 3448, in main
    app, _win = get_main_app(sys.argv)
  File "PPOCRLabel.py", line 3436, in get_main_app
    win = MainWindow(
  File "PPOCRLabel.py", line 148, in __init__
    result = self.table_ocr(
  File "/home/namnguyen/miniconda3/envs/paddle/lib/python3.8/site-packages/paddleocr/paddleocr.py", line 766, in __call__
    res, _ = super().__call__(
  File "/home/namnguyen/miniconda3/envs/paddle/lib/python3.8/site-packages/paddleocr/ppstructure/predict_system.py", line 129, in __call__
    res, table_time_dict = self.table_system(
  File "/home/namnguyen/miniconda3/envs/paddle/lib/python3.8/site-packages/paddleocr/ppstructure/table/predict_table.py", line 86, in __call__
    structure_res, elapse = self._structure(copy.deepcopy(img))
  File "/home/namnguyen/miniconda3/envs/paddle/lib/python3.8/site-packages/paddleocr/ppstructure/table/predict_table.py", line 109, in _structure
    structure_res, elapse = self.table_structurer(copy.deepcopy(img))
  File "/home/namnguyen/miniconda3/envs/paddle/lib/python3.8/site-packages/paddleocr/ppstructure/table/predict_structure.py", line 120, in __call__
    data = transform(data, self.preprocess_op)
  File "/home/namnguyen/miniconda3/envs/paddle/lib/python3.8/site-packages/paddleocr/ppocr/data/imaug/__init__.py", line 56, in transform
    data = op(data)
  File "/home/namnguyen/miniconda3/envs/paddle/lib/python3.8/site-packages/paddleocr/ppocr/data/imaug/operators.py", line 94, in __call__
    img.astype('float32') * self.scale - self.mean) / self.std
ValueError: operands could not be broadcast together with shapes (213,488,4) (1,1,3)

运行环境 / Runtime Environment

ubuntu
paddleocr 2.7.3 pypi_0 pypi
paddlepaddle 2.6.1 pypi_0 pypi

复现代码 / Reproduction Code

完整报错 / Complete Error Message

可能解决方案 / Possible solutions

附件 / Appendix

@GreatV
Copy link
Collaborator

GreatV commented May 28, 2024

在main分支已经修复了这个问题,可以试试安装main分支

@GreatV
Copy link
Collaborator

GreatV commented May 28, 2024

Duplicate of #10748

@GreatV GreatV marked this as a duplicate of #10748 May 28, 2024
@GreatV GreatV closed this as completed May 29, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants