-
Notifications
You must be signed in to change notification settings - Fork 8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
训练模型和inference模型预测结果相差比较大 #270
Comments
请求大佬这个是啥原因,难道还要用转换后的模型继续训练吗? |
识别模型使用 predict_rec.py 时,默认在 rec_char_type= "ch" 模式下根据图片长宽比resize,你指定的shape可能没有生效,可以试着注释掉这两行,看下结果会不会一致: PaddleOCR/tools/infer/predict_rec.py Lines 54 to 55 in ed4313d
这个issue与您的问题类似,可以参考一下 #214 |
@tink2123 非常感谢,试了一下,问题已经解决。 |
不客气~ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
训练的识别模型crnn+mv3+ctc,数据集是一些车牌的数据集,训练的文字dict也已经配置好,转换inference模型是,config文件是训练时候的config,执行预测时候,训练的best accuracy模型,预测结果全部正确,转换inference模型后,预测结果是英文部分是正确的,但是车牌前面的省份大部分有错误。测试了windows和百度aistudio平台,结果都是有错误。
python3 tools/infer_rec.py -c configs/rec/rec_icdar15_train.yml -o Global.checkpoints=output/rec_CRNN/best_accuracy Global.infer_img=test_img
2.inference模型预测代码
![inference预测](https://user-images.githubusercontent.com/53001871/85967813-e9de2f80-b9f5-11ea-92ac-bbb09fbd5a51.jpg)
![训练预测](https://user-images.githubusercontent.com/53001871/85967816-eb0f5c80-b9f5-11ea-88cb-14543b637d76.jpg)
‘python3 tools/infer/predict_rec.py --image_dir="test_img" --rec_model_dir="inference/rec_crnn" --rec_image_shape="3, 32, 100" --rec_char_type="ch" --rec_char_dict_path="ppocr/utils/plate_dict.txt"’
3.测试图片和配置文件,结果截图如下
plate_dict.txt
The text was updated successfully, but these errors were encountered: