VQA SER模型推理 #12468
Unanswered
StarSapph1re
asked this question in
Q&A
VQA SER模型推理
#12468
Replies: 0 comments
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.
-
请提供下述完整信息以便快速定位问题/Please provide the following information to quickly locate the problem
paddle-bfloat 0.1.7
paddle2onnx 1.0.6
paddlefsl 1.1.0
paddlenlp 2.5.2
paddleocr 2.7.0.2
paddlepaddle-gpu 2.5.1.post116
问题相关组件/Related components:postprocess\vqa_token_ser_layoutlm_postprocess.py
W0909 20:34:02.106488 26752 gpu_resources.cc:119] Please NOTE: device: 0, GPU Compute Capability: 7.5, Driver API Version: 12.0, Runtime API Version: 11.6
W0909 20:34:02.111487 26752 gpu_resources.cc:149] device: 0, cuDNN Version: 8.4.
[2023/09/09 20:34:06] ppocr INFO: resume from ser_LayoutXLM_xfun_zh/
[2023-09-09 20:34:08,903] [ INFO] - Already cached C:\Users\86152.paddlenlp\models\layoutxlm-base-uncased\sentencepiece.bpe.model
[2023-09-09 20:34:09,402] [ INFO] - tokenizer config file saved in C:\Users\86152.paddlenlp\models\layoutxlm-base-uncased\tokenizer_config.json
[2023-09-09 20:34:09,403] [ INFO] - Special tokens file saved in C:\Users\86152.paddlenlp\models\layoutxlm-base-uncased\special_tokens_map.json
[2023/09/09 20:34:09] ppocr INFO: process: [0/1], save result to ./output/ser\zh_val_42_ser.jpg
Corrupt JPEG data: premature end of data segment
Traceback (most recent call last):
File "E:\home\aistudio\PaddleOCR\tools\infer_vqa_token_ser.py", line 132, in
result, _ = ser_engine(img_path)
File "E:\home\aistudio\PaddleOCR\tools\infer_vqa_token_ser.py", line 105, in call
post_result = self.post_process_class(
File "E:\home\aistudio\PaddleOCR\ppocr\postprocess\vqa_token_ser_layoutlm_postprocess.py", line 50, in call
return self._infer(preds, **kwargs)
File "E:\home\aistudio\PaddleOCR\ppocr\postprocess\vqa_token_ser_layoutlm_postprocess.py", line 71, in _infer
pred = np.argmax(pred, axis=1)
File "<array_function internals>", line 180, in argmax
File "S:\Anaconda\envs\chat\lib\site-packages\numpy\core\fromnumeric.py", line 1216, in argmax
return _wrapfunc(a, 'argmax', axis=axis, out=out, **kwds)
File "S:\Anaconda\envs\chat\lib\site-packages\numpy\core\fromnumeric.py", line 57, in _wrapfunc
return bound(*args, **kwds)
numpy.AxisError: axis 1 is out of bounds for array of dimension 1
在一些类似的推理和评估过程有也遇到过这一问题,无法解决,模型和推理图片均是github原数据,枚举了可用的numpy版本也无法正常推理
Beta Was this translation helpful? Give feedback.
All reactions