Replies: 3 comments
-
試試修改源代碼
為
或是直接拿掉 |
Beta Was this translation helpful? Give feedback.
0 replies
-
你是对的,不过我的版本是paddle2.6,他的这里有两行代码,只需要把第二行注释掉就可以了。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
if os.path.exists('./data/paddle.png'):
try:
result = self.ocr.ocr('./data/paddle.png', cls=True, det=True)
except:
result = self.table_ocr('./data/paddle.png', return_ocr_result_in_table=True) |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
[2024/01/03 18:21:39] ppocr WARNING: When args.layout is false, args.ocr is automatically set to false
Traceback (most recent call last):
File "PPOCRLabel.py", line 2842, in
sys.exit(main())
File "PPOCRLabel.py", line 2830, in main
app, _win = get_main_app(sys.argv)
File "PPOCRLabel.py", line 2820, in get_main_app
win = MainWindow(lang=args.lang,
File "PPOCRLabel.py", line 114, in init
result = self.table_ocr('./data/paddle.png', return_ocr_result_in_table=True)
File "D:\Program Files\anaconda3\envs\paddle_env\lib\site-packages\paddleocr\paddleocr.py", line 759, in call
res, _ = super().call(
File "D:\workspace\Python\PaddleOCR-release-2.7\PPOCRLabel..\ppstructure\predict_system.py", line 129, in call
res, table_time_dict = self.table_system(
File "D:\workspace\Python\PaddleOCR-release-2.7\PPOCRLabel..\ppstructure\table\predict_table.py", line 86, in call
structure_res, elapse = self._structure(copy.deepcopy(img))
File "D:\workspace\Python\PaddleOCR-release-2.7\PPOCRLabel..\ppstructure\table\predict_table.py", line 109, in structure
structure_res, elapse = self.table_structurer(copy.deepcopy(img))
File "D:\workspace\Python\PaddleOCR-release-2.7\PPOCRLabel..\ppstructure\table\predict_structure.py", line 120, in call
data = transform(data, self.preprocess_op)
File "D:\workspace\Python\PaddleOCR-release-2.7\PPOCRLabel..\ppocr\data\imaug_init.py", line 56, in transform
data = op(data)
File "D:\workspace\Python\PaddleOCR-release-2.7\PPOCRLabel..\ppocr\data\imaug\operators.py", line 92, in call
data['image'] = (img.astype('float32') * self.scale - self.mean) / self.std
ValueError: operands could not be broadcast together with shapes (213,488,4) (1,1,3)
Beta Was this translation helpful? Give feedback.
All reactions