没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
“泰迪杯”优秀作品
第四届“泰迪杯”
全 国 数 据 挖 掘 挑 战 赛
优
秀
作
品
作品名称:基于深度学习和语言模型的印刷文字 OCR 系统
荣获奖项:特等并获企业冠名奖
作品单位:华南师范大学
作品成员:苏剑林 曾玉婷
泰迪杯全国数据挖掘挑战赛
www.tipdm.org
“泰迪杯”优秀作品
基于深度学习和语言模型的印刷文字 OCR 系统
苏剑林 华南师范大学数学科学学院
曾玉婷 华南师范大学数学科学学院
2016 年 5 月 15 日
中文摘要
我们设计了一系列的算法,完成了文字特征提取、文字定位等工作,并基于卷积神经网络 (CNN) 建立了字符
识别模型,最后结合统计语言模型来提升效果,成功构建了一个完整的 OCR(光学字符识别) 系统.
在特征提取方面,我们抛弃了传统的“边缘检测 + 腐蚀膨胀”的方法,基于一些基本假设,通过灰度聚类、图层
分解、去噪等步骤,得到了良好的文字特征. 这部分文字特征既可以用于第二步做文字定位,又可以直接输入到第
三步的模型中进行识别,而不用做额外的特征提取工作.
在文字定位方面,我们通过邻近搜索的方法先整合特征碎片,得到了单行的文字特征,然后通过前后统计的方
法将单行的文字切割为单个字符. 测试表明,这种切割思路能够很好地应对中英文混排的文字切割.
在光学识别方面,我们基于 CNN 的深度学习模型建立了单字识别模型,自行生成了 140 万的样本进行训练,
最终得到了一个良好的单字识别模型,训练正确率为 99.7%,测试正确率为 92.1%,即便增大图片噪音到 15%,也
能有 90% 左右的正确率.
最后,为了在前面的工作的基础上再次提升效果,我们结合了语言模型,通过微信的数十万文本计算了常见汉
字的转移概率矩阵,由 Viterbi 算法动态规划,得到最优的识别组合.
将以上四部分工作结合起来,就是一个完整的 OCR 系统. 经过测试,我们的系统对印刷文字的识别有着不错
的效果,可以作为电商、微信等平台的图片文字识别工具.
关键词: 光学字符识别, 特征提取, 文本定位, 卷积神经网络, 深度学习, 语言模型
泰迪杯全国数据挖掘挑战赛
www.tipdm.org
“泰迪杯”优秀作品
Abstract
In this article, we design a series of algorithm to extract features and position text. Next we use convolutional
neural network to train a character recognition system. And then we use language model to improve recognition
eect. Based to the above steps, we achieve a complete OCR (Optical Character Recognition) system.
For feature extraction, we discover a new approach better than traditional way which is based on boundary
detection and dilation-erosion. According to some fundamental assumptions, we gain excellent text features via
grey clustering, layer decomposition, noise reduction, and so on. The features we gain can not only be use for
text poistioning at step II , but also text recognition at step III.
For text positioning, we integrate the feature patches via neighbor searching, and gain the features of single
line texts. Then we use a statistic way to cut the single line into single character. Our result show that this
way can work well even if Chinese and English mixed in the one line.
And for optical recognition, we use convolutional neural network to build up our model for single character
and train it with 1.4 milion samples produced by ourselves. Fortunately, we gain a good model which has a
99.7% train accurary, 92.7% test accurary, even a 90% accurary for the samples who has 15% noise.
Finally, for the better result, we use language model to improve our work. We calculate the probability
transition matrix from hundreds of thousands wechat articles, and use Viterbi algorithm to dynamicly produce
the optimal result.
Combined the above works, we gain a complete OCR system. And the result show that our system work
well for the printed text recognition.
Keywords: OCR, feature extraction, text positioning, CNN, deep learning, language model
泰迪杯全国数据挖掘挑战赛
www.tipdm.org
“泰迪杯”优秀作品
目录 目录
目录
1 研究背景 1
2 建模说明 1
2.1 研究假设 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.2 分析流程 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
2.3 实验平台 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
3 特征提取 2
3.1 图像预处理 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2 灰度聚类 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
3.2.1 核密度估计 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3.2.2 极大极小值分割 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3 逐层识别 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
3.3.1 连通性 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3.2 抗腐蚀能力 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
3.3.3 池化操作 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3.4 密度排除 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
3.3.5 孤立区排除 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
4 文字定位 9
4.1 邻近搜索 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.1 目的 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.2 距离 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
4.1.3 结果 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2 文本切割 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
4.2.1 均匀切割 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2.2 统计切割 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
4.2.3 前后比较 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5 光学识别 12
5.1 模型选择 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
5.2 训练数据 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.3 模型结构 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
5.4 模型实现 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
5.5 模型检验 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.5.1 训练集检验 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
5.5.2 测试集检验 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3 页
“泰迪杯”优秀作品
6 语言模型 16
6.1 转移概率 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
6.2 动态规划 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
6.2.1 转移概率矩阵 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.2.2 Viterbi 算法 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
6.3 提升效果 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7 综合评估 19
7.1 数据验证 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.2 模型综述 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
7.3 结果反思 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
参考文献 21
剩余25页未读,继续阅读
资源评论
matlab科研助手
- 粉丝: 1w+
- 资源: 1994
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功