使用rec_r34_vd_tps_bilstm_ctc模型预测失败,请问如何解决?
Created by: RABACCA8855
开发环境: win10,conda安装paddlepaddle=1.8。 已经成功生成model和params文件,只是部署预测的时候出了错。
运行predict_system的时候报错如下: Traceback (most recent call last): File "E:/jiajun LUO/OCR/PaddleOCR-develop/tools/infer/predict_system.py", line 121, in dt_boxes, rec_res = text_sys(img) File "E:/jiajun LUO/OCR/PaddleOCR-develop/tools/infer/predict_system.py", line 81, in call rec_res, elapse = self.text_recognizer(img_crop_list) File "E:\jiajun LUO\OCR\PaddleOCR-develop\tools\infer\predict_rec.py", line 81, in call self.predictor.zero_copy_run() paddle.fluid.core_avx.EnforceNotMet:
C++ Call Stacks (More useful to developers):
Windows not support stack backtrace yet.
Python Call Stacks (More useful to users):
File "F:\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\framework.py", line 2610, in append_op attrs=kwargs.get("attrs", None)) File "F:\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\layer_helper.py", line 43, in append_op return self.main_program.current_block().append_op(*args, **kwargs) File "F:\Anaconda3\envs\paddle\lib\site-packages\paddle\fluid\layers\nn.py", line 13779, in grid_sampler helper.append_op(type='grid_sampler', inputs=ipts, outputs={'Output': out}) File "E:\jiajun LUO\OCR\PaddleOCR-develop\ppocr\modeling\stns\tps.py", line 259, in call batch_I_r = layers.grid_sampler(x=image, grid=batch_P_prime) File "E:\jiajun LUO\OCR\PaddleOCR-develop\ppocr\modeling\architectures\rec_model.py", line 98, in call inputs = self.tps(image) File "E:\jiajun LUO\OCR\PaddleOCR-develop\tools\program.py", line 198, in build_export image, outputs = model(mode='export') File "E:/jiajun LUO/OCR/PaddleOCR-develop/tools/export_model.py", line 68, in main config, eval_program, startup_prog) File "E:/jiajun LUO/OCR/PaddleOCR-develop/tools/export_model.py", line 94, in main()
Error Message Summary:
InvalidArgumentError: Input(X) dims[3] and Input(Grid) dims[2] should be equal, but received X dimension3 != Grid dimension2 [Hint: Expected grid_dims[2] == x_dims[3], but received grid_dims[2]:100 != x_dims[3]:382.] at (D:\1.8.0cpu2\paddle\paddle\fluid\operators\grid_sampler_op.cc:72) [operator < grid_sampler > error]