PPOCRLabelv2 is a semi-automatic graphic annotation tool suitable for OCR field, with built-in PP-OCR model to automatically detect and re-recognize data.
1.2.1 通过whl包安装与运行
Windows
pip install PPOCRLabel # 安装
选择标签模式来启动
PPOCRLabel --lang ch # 启动【普通模式】,用于打【检测+识别】场景的标签
报错如下:
Traceback (most recent call last):
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\runpy.py", line 194, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "C:\ProgramData\miniconda3\envs\ppocrlabel\Scripts\PPOCRLabel.exe__main.py", line 7, in
sys.exit(main())
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 2828, in main
app, _win = get_main_app(sys.argv)
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 2818, in get_main_app
win = MainWindow(lang=args.lang,
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 112, in init
result = self.table_ocr('./data/paddle.png', return_ocr_result_in_table=True)
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\paddleocr\paddleocr.py", line 926, in call
res, _ = super().call(img, return_ocr_result_in_table, img_idx=img_idx)
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\predict_system.py", line 163, in call
res, table_time_dict = self.table_system(
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\table\predict_table.py", line 96, in call__
structure_res, elapse = self._structure(copy.deepcopy(img))
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\table\predict_table.py", line 118, in _structure
structure_res, elapse = self.table_structurer(copy.deepcopy(img))
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\table\predict_structure.py", line 140, in call
self.predictor.run()
ValueError: In user code:
InvalidArgumentError: The shape of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [], input[1]'s shape = [1].
[Hint: Expected inputs_dims[i].size() == out_dims.size(), but received inputs_dims[i].size():1 != out_dims.size():0.] (at C:\home\workspace\Paddle\paddle/phi/kernels/funcs/concat_funcs.h:55)
[operator < pd_kernel.phi_kernel > error]
python 3.8
1.1 安装PaddlePaddle paddlepaddle-gpu==3.0.0b2
1.2.1 通过whl包安装与运行 Windows pip install PPOCRLabel # 安装
选择标签模式来启动
PPOCRLabel --lang ch # 启动【普通模式】,用于打【检测+识别】场景的标签
报错如下:
Traceback (most recent call last): File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\runpy.py", line 194, in _run_module_as_main return _run_code(code, main_globals, None, File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\runpy.py", line 87, in _run_code exec(code, run_globals) File "C:\ProgramData\miniconda3\envs\ppocrlabel\Scripts\PPOCRLabel.exe__main.py", line 7, in
sys.exit(main())
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 2828, in main
app, _win = get_main_app(sys.argv)
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 2818, in get_main_app
win = MainWindow(lang=args.lang,
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PPOCRLabel\PPOCRLabel.py", line 112, in init
result = self.table_ocr('./data/paddle.png', return_ocr_result_in_table=True)
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\paddleocr\paddleocr.py", line 926, in call
res, _ = super().call(img, return_ocr_result_in_table, img_idx=img_idx)
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\predict_system.py", line 163, in call
res, table_time_dict = self.table_system(
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\table\predict_table.py", line 96, in call__
structure_res, elapse = self._structure(copy.deepcopy(img))
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\table\predict_table.py", line 118, in _structure
structure_res, elapse = self.table_structurer(copy.deepcopy(img))
File "C:\ProgramData\miniconda3\envs\ppocrlabel\lib\site-packages\PaddleOCR\ppstructure\table\predict_structure.py", line 140, in call
self.predictor.run()
ValueError: In user code:
InvalidArgumentError: The shape of input[0] and input[1] is expected to be equal.But received input[0]'s shape = [], input[1]'s shape = [1].
[Hint: Expected inputs_dims[i].size() == out_dims.size(), but received inputs_dims[i].size():1 != out_dims.size():0.] (at C:\home\workspace\Paddle\paddle/phi/kernels/funcs/concat_funcs.h:55)
[operator < pd_kernel.phi_kernel > error]
请帮忙指导安装环境,谢谢