ocr识别问题请教,感谢
Created by: fisipro
各位老师:
我用/models/ocr_recognition训练了模型,并且可以正确识别任意文字(使用与训练数据相同尺寸的图片),但是当我使用任意尺寸的图片时,例如700x68,就无法正确识别。
我看到ctc_reader代码里有个DATA_SHAPE = [1, 48, 512],不知是否与此有关?我将其改成[1,68,700]运行: env CUDA_VISIBLE_DEVICE=0 python infer.py --model_path="models/model_330000" --input_images_list="/home/dataset/predict.list" --input_images_dir="/home/dataset/predict_images"
后直接报错:
paddle.fluid.core.EnforceNotMet: enforce x_mat_dims[1] == y_mat_dims[0] failed, 1152 != 768 First matrix's width must be equal with second matrix's height. at [/paddle/paddle/fluid/operators/mul_op.cc:59]
请问如何可以识别不定尺寸图片的文字?非常感谢!