PaddleOCR
PaddleOCR copied to clipboard
同一个推理模型,文字识别predict_rec.py和predict_system.py结果不一样
🔎 Search before asking
- [X] I have searched the PaddleOCR Docs and found no similar bug report.
- [X] I have searched the PaddleOCR Issues and found no similar bug report.
- [X] I have searched the PaddleOCR Discussions and found no similar bug report.
🐛 Bug (问题描述)
同一个推理模型
我将某部分的图片送到predict_rec.py,文字识别结果如下:
当我将完整图片送到predict_system.py,进行文字检测+识别时,结果如下:
生成的可视化图是这样的,det是将“发票代码”那块检测出来的,但发票代码数字识别是错误的,中间少了0:
我把predict_system.py里经过det检测后剪切的文字图片保存下来看了
这是det检测后剪切的图片:
将这张图片送到predict_rec.py,识别出来的结果就是错的了,就是上图system.py出来的错结果
下面是我经过PPOCRLabel制作数据集的切片图像,也是第一张图送到predict_rec.py里面的图像:
这张出来的结果如图1,是正确的
这两张图看起来一样,但识别结果不同,为什么呢?
🏃♂️ Environment (运行环境)
Paddleocr2.8
🌰 Minimal Reproducible Example (最小可复现问题的Demo)
python tools/infer/predict_rec.py --image_dir=./err_imgs/dzfp_3_crop.jpg --rec_model_dir=./inference_model/chushi_rec/
python tools/infer/predict_system.py --image_dir="./err_imgs/dzfp_3.jpg" --det_model_dir="./inference_model/full-dzfp_det/" --rec_model_dir="./inference_model/chushi_rec/"