-
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
db_det推理后效果损失严重 #214
Comments
提供下你转换inference模型的命令和 用inference模型预测的代码吧。 另外,你在训练中有没有加一些特殊的数据处理或者改了超参数? |
inference指令: |
方便提供一下你训练好的模型和一张测试图样本吗?我们测试下,排查下问题 |
det_db_mv3.zip |
测试rec推理后的模型结果精度损失也很大 推理指令python3 tools/infer/predict_rec.py --image_dir=output/det_east/det_results/ --rec_model_dir="./inference/rec_crnn/" --rec_image_shape "3, 24, 94" --rec_char_type ch --rec_char_dict_path ./ppocr/utils/ccpd_dict.txt resultinfer_img:output/det_east/det_results/0001_.jpg word : 皖A82A48 score : 0.9999848 原始modelpython3 tools/infer_rec.py -c configs/rec/rec_ccpd_train.yml -o Global.checkpoints=output/rec_CRNN/best_accuracy Global.infer_img=output/det_east/det_results/ resultPredicts of output/det_east/det_results/0001_.jpg:['皖A82A48', 0.92690617] |
识别模型使用 predict_rec.py 时,默认在 rec_char_type= "ch" 模式下根据图片长宽比resize,你指定的shape可能没有生效,可以试着注释掉这两行,看下结果会不会一致: PaddleOCR/tools/infer/predict_rec.py Lines 54 to 55 in ed4313d
如果还有diff的话,麻烦发一下识别模型的配置文件、字典、训练参数,我这边复现一下问题 |
@tink2123 识别模型按照您的指导,注释掉以后效果和原始model已经很接近了,那det模型的损失是什么原因呢? |
初步定位出问题可能是resize造成的,我的理解:
|
det inference 模型后处理的参数,若不在运行推理的命令中指定,会由 tools/infer/utility.py 中 parse_args 函数设定为默认值,可能与训练所用的 config 文件中的参数不同,特别是 db 模型的 PostProcess 的相关参数。是否是因此导致 inference 模型的结果变化呢 |
请问:自己训练的 文本识别 rec 模型,同一批测试集,inference模型与eval模型最后的准确率差距很大,为什么? |
* exit1 in travis failed
自己训练的mv3_db_det模型,利用原始模型的检测效果可以接受,然而推理后得到的模型测试效果差距很大![0160](https://user-images.githubusercontent.com/23338843/84744096-5f550380-afe5-11ea-96b5-198263aa3536.jpg)
![det_res_0160](https://user-images.githubusercontent.com/23338843/84744164-785db480-afe5-11ea-9d76-105cb2de4b87.jpg)
这是什么原因呢?怎么解决?
原始模型:
推理模型:
The text was updated successfully, but these errors were encountered: