PaddleOCR改进识别推理效果对比【废弃】

本文分享了使用PaddlePaddle的PaddleOCR进行中英文文字识别的实验结果,包括模型参数配置、测试图片路径及识别准确率。通过对比原效果与改进后的效果,展示模型在不同场景下对中文和英文字符的识别能力。

代码地址:PaddlePaddle/PaddleOCR
这篇博客请忽略吧,忘了当时实验的具体前因后果了。

1 中文测试

python3 tools/infer/predict_rec.py \
    --image_dir doc/imgs_words/ch \
    --rec_model_dir inference/ch_rec_mv3_crnn \
    --rec_image_shaoe "3, 32, 320" \
    --rec_char_type ch \
    --rec_batch_num 30 \
    --rec_algorithm CRNN \
    --rec_char_dict_path ./ppocr/utils/ppocr_keys_v1.txt

原效果:

Predicts of doc/imgs_words/ch/word_5.jpg:['西湾监管', 0.9652789]
Predicts of doc/imgs_words/ch/word_4.jpg:['实力活力', 0.94463724]
Predicts of doc/imgs_words/ch/word_3.jpg:['电话:15952301928', 0.99584234]
Predicts of doc/imgs_words/ch/word_2.jpg:['汉阳鹦鹉家居建材市场E区25-26号', 0.95212066]
Predicts of doc/imgs_words/ch/word_1.jpg:['韩国小馆', 0.98803014]
Total predict time for 5 images:0.106

改进效果:

Predicts of d
"D:\python project\PythonProject\图像文本识别\.venv\Scripts\python.exe" "D:\python project\PythonProject\图像文本识别\.venv\识别路径.py" D:\python project\PythonProject\图像文本识别\.venv\识别路径.py:5: DeprecationWarning: The parameter `use_angle_cls` has been deprecated and will be removed in the future. Please use `use_textline_orientation` instead. ocr = PaddleOCR(use_angle_cls=True, lang='ch') # 设置语言为中文 ��Ϣ: ���ṩ��ģʽ�޷��ҵ��ļ��� D:\python project\PythonProject\图像文本识别\.venv\Lib\site-packages\paddle\utils\cpp_extension\extension_utils.py:715: UserWarning: No ccache found. Please be aware that recompiling all source files may be required. You can download and install ccache from: https://github.com/ccache/ccache/blob/master/doc/INSTALL.md warnings.warn(warning_message) Creating model: ('PP-LCNet_x1_0_doc_ori', None) Using official model (PP-LCNet_x1_0_doc_ori), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('UVDoc', None) The model(UVDoc) is not supported to run in MKLDNN mode! Using `paddle` instead! Using official model (UVDoc), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('PP-LCNet_x1_0_textline_ori', None) Using official model (PP-LCNet_x1_0_textline_ori), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('PP-OCRv5_server_det', None) Using official model (PP-OCRv5_server_det), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. Creating model: ('PP-OCRv5_server_rec', None) Using official model (PP-OCRv5_server_rec), the model files will be automatically downloaded and saved in C:\Users\25724\.paddlex\official_models. D:\python project\PythonProject\图像文本识别\.venv\识别路径.py:11: DeprecationWarning: Please use `predict` instead. result = ocr.ocr(image_path, cls=True) Traceback (most recent call last): File "D:\python project\PythonProject\图像文本识别\.venv\识别路径.py", line 11, in <module> result = ocr.ocr(image_path, cls=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\python project\PythonProject\图像文本识别\.venv\Lib\site-packages\typing_extensions.py", line 2956, in wrapper return arg(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^ File "D:\python project\PythonProject\图像文本识别\.venv\Lib\site-packages\paddleocr\_pipelines\ocr.py", line 225, in ocr return self.predict(img, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: PaddleOCR.predict() got an unexpected keyword argument 'cls' 进程已结束,退出代码为 1
07-10
评论 6
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

张欣-男

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值