PaddlePaddle / PaddleOCR

Awesome multilingual OCR toolkits based on PaddlePaddle (practical ultra lightweight OCR system, support 80+ languages recognition, provide data annotation and synthesis tools, support training and deployment among server, mobile, embedded and IoT devices)
https://paddlepaddle.github.io/PaddleOCR/
Apache License 2.0
43.55k stars 7.77k forks source link

rec_svtrnet_ch.yml 配置训练的图片,识别报错 #12646

Open nissansz opened 4 months ago

nissansz commented 4 months ago

背景

经过需求征集https://github.com/PaddlePaddle/PaddleOCR/issues/10334 和每周技术研讨会 https://github.com/PaddlePaddle/PaddleOCR/issues/10223 讨论,我们确定了XXXX任务。

解决步骤

  1. 根据开源代码进行网络结构、评估指标转换。代码链接:XXXX
  2. 结合论文复现指南,进行前反向对齐等操作,达到论文Table.1中的指标。
  3. 参考PR提交规范提交代码PR到ppocr中。

python tools/infer/predict_rec.py --image_dir="F:/23.png" --rec_algorithm='SVTR' --rec_model_dir=C:\Users\Ni\Desktop\4lansvtr\best_accuracy --rec_image_shape=3,48,320 --rec_char_dict_path=C:\Users\Ni\Desktop\4lan5000fonts\japan_dict.txt --use_gpu=True

InvalidArgumentError: Broadcast dimension mismatch. Operands could not be broadcast together with the shape of X = [1, 1404, 64] and the shape of Y = [1, 960, 64]. Received [1404] in X is not equal to [960] in Y at i:1. [Hint: Expected x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1 == true, but received x_dims_array[i] == y_dims_array[i] || x_dims_array[i] <= 1 || y_dims_array[i] <= 1:0 != true:1.] (at ..\paddle/phi/kernels/funcs/common_shape.h:84) [operator < elementwise_add > error]

GreatV commented 4 months ago

这可能是一个bug,你愿意尝试修复修复一下吗?