带tps的模型只能训练英文?
Created by: lfxx
用rec_r34_vd_tps_bilstm_attn.yml训练的日文ocr,训练好inference阶段报错:
Error: Input(X) dims[3] and Input(Grid) dims[2] should be equal.
[Hint: Expected grid_dims[2] == x_dims[3], but received grid_dims[2]:320 != x_dims[3]:100.] at (/paddle/paddle/fluid/operators/grid_sampler_op.cc:55)
[operator < grid_sampler > error]
2020-06-22 10:55:45,453-INFO: ERROR!!!!
Please read the FAQ:https://github.com/PaddlePaddle/PaddleOCR#faq
If your model has tps module: TPS does not support variable shape.
Please set --rec_image_shape='3,32,100' and --rec_char_type='en'
预测命令:
python tools/infer/predict_rec.py --image_dir="./word_254.png" --rec_model_dir="./inference/rare_72_rec_japan/" --rec_image_shape="3, 32, 100" --rec_char_type="ch" --rec_algorithm="RARE" --rec_char_dict_path="/data/OCR/japan_dict.txt"
我训练的时候输入分辨率是3,32,320,是不是想用带tps的模型,训练时输入分辨率只能设置为3,32,100?