当前位置:网站首页>基于PaddleOCR解决文本检测训练模型与inference模型预测效果不一致的问题
基于PaddleOCR解决文本检测训练模型与inference模型预测效果不一致的问题
2022-07-17 05:06:00 【番茄小能手】
目的
此类问题出现较多,问题多是trained model预测时候的预处理、后处理参数和inference model预测的时候的预处理、后处理参数不一致导致的。官方DBnet检测模型提供的yml文件自行训练时候需要进行相应的修改才可以训练模型训练。
解决
一、根据官方说明进行调整
官方这块也有说明:PaddleOCR/detection.md at release/2.5 · PaddlePaddle/PaddleOCR (github.com)

根据官网部署预测模型代码推测,yml配置情况如下
- DetResizeForTest:
limit_side_len: 960
limit_type: max二、经过自己测试进行调整
在训练银行卡、车牌号、身份证等文本检测模型的时候,按上面的配置实际训练效果不好,通过固定图片大小的情况效果就非常好,如下修改:
1、修改yml文件
- DetResizeForTest:
resize_long: 9602、tools/infer/utility.py文件中添加如下参数

3、tools/infer/predict_det.py文件中修改如下

4、其他文件:修改部署预测文件,以hubserving部署为例:
deploy/hubserving/ocr_system/params.py

总结
以上修改效果,可以查看我之前的前几篇文章的银行卡、车牌号、身份证文本检测训练结果,在垂类效果上比通用的文本检测模型效果要好很多。
边栏推荐
- 交换机用户模式、特权模式、全局模式、端口模式
- MapBox 加载本地离线地形
- 微信小程序5-基础加强(没写完)
- uni-app 条件编译#ifdef #endif 兼容多个终端
- Submit the uniapp form (input, radio, picker) to get the parameter value
- 学习C语言的第五天
- 【C语言—零基础第十三课】字符串的奥秘
- 手把手教你复现Log4j2核弹级漏洞
- Interface parameters return encapsulated class result
- [ES6] explain in detail the common objects and other methods of set and array (full version)
猜你喜欢

Installation and fast use of Mongo DB stand-alone version

数据可视化

Mysql database experiment training 6, data view (detailed)

BUUCTF web WarmUp

Actual cases of data analysis and data mining local house price prediction (716):

【C语言—零基础第六课】输入输出语句格式与复合语句

微信小程序获取年月日周及早上、中午、晚上

Cesium geojson数据的添加与移除
![[2022 10th Teddy Cup Challenge] Title A: complete version of pest identification (general idea. Detailed process and code and results CSV in compressed package)](/img/e6/beea0bb0a9f4b41206c6fcb130fdfd.png)
[2022 10th Teddy Cup Challenge] Title A: complete version of pest identification (general idea. Detailed process and code and results CSV in compressed package)

实习项目3-更改所有者
随机推荐
H5页面使用js生成二维码
百度地图 实现 热力图
学习C语言的第五天
markdown笔记以及Typora相关快捷键
Wechat applet wx Setclipboarddata copy text
IDL 6S查找表
【C语言—零基础第十三课】字符串的奥秘
微信小程序状态栏
IDL 读取葵花8(Himawari-8)HSD数据
小程序云开发表单提交并在页面中获取数据
C语言 带你 手撕 通讯录
6S参数
es6新增-数组/对象的解构赋值
es6新增-Symbol数据类型
关于New_Online_Judge_1081_哥德巴赫猜想的思考
【C语言_复习_学习第二课】什么是进制?进制之间应该如何转换
[2022 10th Teddy Cup Challenge] Title A: complete version of pest identification (general idea. Detailed process and code and results CSV in compressed package)
SQL注入
Continue from the previous issue: the remaining two methods of the rotation chart
UML(用例图,类图,对象图,包图)