PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
42.61k stars 7.67k forks source link

表格识别算法-SLANet-LCNetV2 推理报错,怎么解决? #13641

Open nissansz opened 1 month ago

nissansz commented 1 month ago

Search before asking

Bug

L: cd L:\paddle\PaddleOCR-2.8.1\ppstructure python table/predict_structure.py --table_model_dir=L:\paddle\models\ch_ppstructure_openatom_SLANetv2_infer/ --table_char_dict_path=../ppocr/utils/dict/table_structure_dict.txt --image_dir=docs/table/table.jpg --output=../output/table_slanet_lcnetv2 --use_gpu=False --benchmark=True --enable_mkldnn=True --table_max_len=512

[libprotobuf ERROR C:\cache_release\third_party\cuda102\3ad0da47b86006a7bf40b5685bc39f90\protobuf\src\extern_protobuf\src\google\protobuf\message_lite.cc:121] Can't parse message of type "paddle.framework.proto.ProgramDesc" because it is missing required fields: blocks[1].ops[40].attrs[13].type, blocks[1].ops[42].attrs[13].type, blocks[1].ops[44].attrs[13].type [libprotobuf ERROR C:\cache_release\third_party\cuda102\3ad0da47b86006a7bf40b5685bc39f90\protobuf\src\extern_protobuf\src\google\protobuf\message_lite.cc:121] Can't parse message of type "paddle.framework.proto.ProgramDesc" because it is missing required fields: blocks[1].ops[40].attrs[13].type, blocks[1].ops[42].attrs[13].type, blocks[1].ops[44].attrs[13].type Traceback (most recent call last): File "table/predict_structure.py", line 207, in main(parse_args()) File "table/predict_structure.py", line 171, in main table_structurer = TableStructurer(args) File "table/predict_structure.py", line 97, in init ) = utility.create_predictor(args, "table", logger) File "L:\paddle\PaddleOCR-2.8.1\tools\infer\utility.py", line 304, in create_predictor predictor = inference.create_predictor(config) ValueError: (InvalidArgument) Failed to parse programdesc from binary string. [Hint: Expected desc.ParseFromString(binarystr) == true, but received desc.ParseFromString(binary_str):0 != true:1.] (at ..\paddle\fluid\framework\program_desc.cc:103)

Environment

win10

Minimal Reproducible Example

[libprotobuf ERROR C:\cache_release\third_party\cuda102\3ad0da47b86006a7bf40b5685bc39f90\protobuf\src\extern_protobuf\src\google\protobuf\message_lite.cc:121] Can't parse message of type "paddle.framework.proto.ProgramDesc" because it is missing required fields: blocks[1].ops[40].attrs[13].type, blocks[1].ops[42].attrs[13].type, blocks[1].ops[44].attrs[13].type [libprotobuf ERROR C:\cache_release\third_party\cuda102\3ad0da47b86006a7bf40b5685bc39f90\protobuf\src\extern_protobuf\src\google\protobuf\message_lite.cc:121] Can't parse message of type "paddle.framework.proto.ProgramDesc" because it is missing required fields: blocks[1].ops[40].attrs[13].type, blocks[1].ops[42].attrs[13].type, blocks[1].ops[44].attrs[13].type Traceback (most recent call last): File "table/predict_structure.py", line 207, in main(parse_args()) File "table/predict_structure.py", line 171, in main table_structurer = TableStructurer(args) File "table/predict_structure.py", line 97, in init ) = utility.create_predictor(args, "table", logger) File "L:\paddle\PaddleOCR-2.8.1\tools\infer\utility.py", line 304, in create_predictor predictor = inference.create_predictor(config) ValueError: (InvalidArgument) Failed to parse programdesc from binary string. [Hint: Expected desc.ParseFromString(binarystr) == true, but received desc.ParseFromString(binary_str):0 != true:1.] (at ..\paddle\fluid\framework\program_desc.cc:103)

Additional

No response

Are you willing to submit a PR?

Topdu commented 3 weeks ago

试试其他模型有没有问题,如果都报错的话很可能是环境问题。