基于BP神经网络的字符识别方法研究

 2022-07-25 10:07

论文总字数:30445字

摘 要

钢铁产业是我国发展工业和制造业的基础之一,钢铁产量也是一个大国的发展计划的重中之重。在钢铁生产中,为了对钢坯进行统计和管理,需要对钢坯编号进行登记,而人工识别钢坯编号的方式需要花费大量人力物力且准确率无法得到保证,因此需要寻找一种能够采用计算机识别钢坯编号的方法来提高生产效率。

本文对钢坯编号字符的识别过程进行了研究。本文以钢坯编号为目标对字符识别的过程进行了探究。因为钢坯编号是印刷在钢材上的,因此原始图像存在光照不均匀、对比度低和图像质量低的问题,因此需要对图像进行预先处理来分割出钢坯编号的区域。本文中首先通过均值滤波来平滑图片中的噪声信息,然后将图片二值化并做开运算处理,接下来寻找图形的轮廓并绘制出包围轮廓的最小矩形,切割出字符区域。然后针对切割出的字符区域进行中值滤波、二值化、寻找轮廓并各自绘制包围轮廓的最小矩形分割出单个字符,最后根据收集到的字符建立钢坯编号字符的数据集。

在字符识别方面,先是采取了BP神经网络来识别字符,并针对在训练BP神经网络中遇到的问题进行了分析,探讨了一些解决方法。然后使用了卷积神经网络(Convolution neural network,CNN)进行字符识别,并比较了CNN在使用不同的激活函数和优化算法时性能的优劣。经过测试数据表明,CNN在字符识别的准确率和速度方面基本能够满足性能要求。

关键词:字符识别、BP神经网络、卷积神经网络

Abstract

The iron and steel industry is one of the basic industries of industrialization in China. Iron and steel production is an important criterion for measuring the economic power of a country. In the steel production, in order to count and manage the billet, it is necessary to register the billet number. However, the manual identification of the billet number requires a lot of manpower and material resources and the accuracy cannot be guaranteed. Therefore, the billet number needs to be automatically identified.

In this paper, the identification process of billet number characters was studied. Because the billet number is printed on the steel, the original image has problems of non-uniform illumination, low contrast, and low image quality. Therefore, the image needs to be pre-processed to extract a useful character information area. In this paper, we first use the average filter to smooth the noise in the image, then binarize the image and open the operation, then find the outline of the image and draw the smallest rectangle surrounding the outline, cut out the character area. Then median filtering, binarization, contour search and contour drawing are performed on the cut-out character regions to separate individual characters. Finally, the data set of the billet number character is established based on the collected characters.

In terms of character recognition, the BP neural network was first used to identify, and some problems encountered in training BP neural network were studied, and the solution was given. Then use convolutional neural network for character recognition, and analyze the performance of the network model under different activation functions and optimization methods. Sample tests show that convolutional neural networks can basically meet the performance requirements in terms of recognition rate.

KEY WORDS: character recognition, BP neural network, convolution neural network,

目 录

摘 要 I

Abstract II

第一章 绪论 1

1.1 研究意义与选题背景 1

1.2 字符识别技术概述 1

1.2.1 国内外研究现状 1

1.2.2 字符识别技术实现流程 2

1.3 本论文主要研究内容 3

第二章 钢坯编号字体数据集的建立 4

2.1 图像处理相关知识 4

2.1.1 位图文件 4

2.1.2 BMP文件组成 4

(1)文件头 4

(2)位图信息头 4

(3)颜色信息 5

(4)位图数据 5

2.2 图像预处理 5

2.2.1 均值滤波 5

2.2.2 二值化 6

2.2.3 字符区域定位 7

2.3 MSER算法 8

2.4 单个字符分割 9

2.5 建立数据集 10

2.6 本章小结 11

第三章 BP神经网络 12

3.1 神经网络的定义 12

3.1.1 感知器 12

3.1.2 神经元 12

3.1.3 神经网络 14

3.1.4 神经网络的输出 14

3.2 反向传播算法 15

3.3 随机梯度下降算法 16

3.4 改进神经网络的学习方法 18

3.4.1 交叉熵代价函数 18

3.4.2 如何避免学习缓慢 19

3.5 过度拟合和规范化 20

3.6 程序设计框架 23

3.7 识别结果 24

第四章 卷积神经网络 27

4.1 卷积神经网络简介 27

4.2 卷积神经网络结构 27

4.3 TensorFlow框架 29

4.3.1 计算模型——计算图 29

4.3.2 数据模型——张量 30

4.3.3 运行模型——会话 30

4.4 激活函数比较 30

4.4.1 sigmoid函数 30

4.4.2 ReLU函数 32

4.4.3 LeakyReLU函数 33

4.4.4 PReLU函数 34

4.5 不同优化算法的比较 34

4.5.1 梯度下降算法 34

4.5.2 自适应梯度算法 37

4.5.3 RMSProp算法 38

4.6 BP神经网络和卷积神经网络的比较 39

致 谢 40

参考文献 41

绪论

研究意义与选题背景

在社会经济与信息处理技术飞速发展的背景下,机器视觉(Machine vision)在社会生活的许多方面受到了人们的广泛运用。而机器视觉是一个多学科交叉的领域,其包含的知识极其广泛,处理各类问题的方法数目也是比较多,在日常生活中的应用也是随处可见[1]。例如,智能交通系统(IntelligentTransportSystem)中的高清视频监控系统、车牌识别技术(LicensePlateRecognition)以及工业生产应用等等。尤其是在工业生产中,机器视觉的应用及其广泛,比如钢材编号的定位识别、工件出厂前的尺寸检测、半导体封装检测位置信息等。而在工业生产现场,很多工厂作业的场地并不便于工人去辨认工件上的字符或人眼的识别速度无法满足生产要求,这些情况下采用机器视觉技术可以减少工人作业危险、节省人力物力并大幅提高生产率、产品质量、降低工作失误带来的影响,能够为生产和社会产生巨大价值[2]。

钢铁产业是我国发展工业和制造业的基础之一,钢铁产量也是一个大国的发展计划的重中之重。在钢铁生产中,每一个钢坯唯一的标识就是钢坯编号,为了对钢坯进行管理统计,需要在钢坯上喷印编号。对于产钢量较小的工厂,采用人工识别的方法可以基本满足生产需求。而产钢量大的单位要在短时间内统计大量钢坯编号,采用人工识别的方法需要花费很大的人力物力,并且在工厂生产环境下对钢坯编号进行识别容易产生识别失误,会严重降低生产效率,难以满足现代化生产的需要。因此,对钢铁字符进行自动、快速、准确识别的需求越来越迫切[3]。

剩余内容已隐藏,请支付后下载全文,论文总字数:30445字

您需要先支付 80元 才能查看全部内容!立即支付

该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;