在运行飞桨的ocr的时候,提示加载模型参数时出错。请检查模型文件是否完整或损坏。 #12537
Unanswered
zhuimengren-a11u
asked this question in
Q&A
Replies: 1 comment
-
盲猜可能是paddpaddle安装的有问题。如果问题还存在,应运行一下代码,验证paddle正确安装: import paddle
paddle.utils.run_check()
# 如果出现PaddlePaddle is installed successfully!,说明您已成功安装。 详细安装文档,参见:docs |
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
-
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
我们提供了AceIssueSolver来帮助你解答问题,你是否想要它来解答(请填写yes/no)?/We provide AceIssueSolver to solve issues, do you want it? (Please write yes/no):yes
请尽量不要包含图片在问题中/Please try to not include the image in the issue.
飞桨的版本是2.5.2,cuda是11.2版本。我原本在11.6版本是能执行的。迁移到11.2版本的电脑上。就执行不了了。提示
Traceback (most recent call last):
File "ID_card.py", line 84, in
Net = Id_card(det_path = det_path,rec_path = rec_path,cls_path = cls_path,nlp_model = nlp_model)
File "ID_card.py", line 21, in init
self.ocr = PaddleOCR(use_angle_cls=True, lang="ch", use_gpu=use_gpu, det_model_dir=self.det_path,
File "/home/ubuntu/anaconda3/envs/ppocr/lib/python3.8/site-packages/paddleocr/paddleocr.py", line 616, in init
super().init(params)
File "/home/ubuntu/anaconda3/envs/ppocr/lib/python3.8/site-packages/paddleocr/tools/infer/predict_system.py", line 46, in init
self.text_detector = predict_det.TextDetector(args)
File "/home/ubuntu/anaconda3/envs/ppocr/lib/python3.8/site-packages/paddleocr/tools/infer/predict_det.py", line 141, in init
self.predictor, self.input_tensor, self.output_tensors, self.config = utility.create_predictor(
File "/home/ubuntu/anaconda3/envs/ppocr/lib/python3.8/site-packages/paddleocr/tools/infer/utility.py", line 280, in create_predictor
predictor = inference.create_predictor(config)
RuntimeError: (Unavailable) An error occurred while loading model parameters. Please check whether the model file is complete or damaged.
[Hint: Expected static_cast(*buffer) == true, but received static_cast(*buffer):0 != true:1.] (at ../paddle/fluid/operators/load_combine_op.h:93)
[operator < load_combine > error]
Beta Was this translation helpful? Give feedback.
All reactions