粘连字符验证码的识别算法研究

 2022-05-01 09:05

论文总字数:27485字

摘 要

学生姓名:杜宇 指导老师:罗琳

验证码(Completely Automated Public Turing test to tell Computers and Humans Apart), 是一种区分用户是人或机器伪装成的人的测试。验证码被广泛应用于网站账户注册,留言板,用以防止恶意程序大量进行操作,从而影响网站正常运作或大量发布非法信息。验证码识别算法研究对于提高网站抵御恶意攻击有重要意义,能够分析出现存验证码的缺点,从而改进验证码以保护网络安全。

粘连字符验证码其特点是字符间粘连,字符本身有扭曲和旋转,应对传统的识别算法(即预处理、分割、识别三步)时,有很强的防破解能力。尤其是在分割部分,至今为止很难实现准确度高的分割算法,这是由于粘连验证码本身的特点所导致的。

本文所研究的粘连验证码算法分为基于分割的算法,即传统方法,和不依赖分割的算法,主要是运用深度学习方法达到识别目的。

基于分割的算法由于单个字符的识别算法已经极其成熟,准确率基本上能达到95%以上,因此整体识别的准确率极大依赖于字符分割的准确度,但由于分割算法自身的缺陷无法达到较高的准确度,因此整体识别率较低。

不依赖于字符分割的识别算法主要通过卷积神经网络实现,不需要对验证码进行预处理,不需要对字符进行分割,因此其识别准确度上限决定于网络拓扑结构以及训练数据的质量。本文所实现的卷积神经网络识别准确率能达到96%,其中无法识别的验证码一部分对于人类来说都较难识别,因此本文研究的算法效果较好,有较高的准确度。

关键词:光学字符识别,粘连验证码,支持向量机,卷积神经网络

Abstract

Du Yu Adviser:Luo Lin

CAPTCHA(Completely Automated Public Turing test to tell Computers and Humans Apart) is applicated widely in websites registration and message board in order to prevent malicious program executing a great amount of operations at the same time, which does harm to the website server and normal users’ experience. Research on CAPTCHA recognition algorithm is significant to improve the ability of websites to defend malicious attacks, because this research could analyze the shortcomings of existing CAPTCHA and then overcome these shortcomings to protect the safety of the web.

Adhibited CAPTCHA with features of adhesion among characters and rotation and distortion to single character. These features are designed to prevent recognition from traditional algorithms, which include pre-procession, segmentation and recognition. Especially in segmentation part, there is no segmentation algorithm reaches high accuracy.

This paper has considered two methods to reach the goal, one is segmentation-based algorithm which is the traditional way, another is an algorithm not relying on characters segmentation, which mainly composed by deep-learning methods.

The recognition accuracy of single character reaches higher than 95% by machine learning methods. Thus, the accuracy of whole CAPTCHA recognition of the traditional way highly depends on the segmentation accuracy of characters which cannot reach high accuracy. This leads to a bad recognition result in CAPTCHA recognition.

Recognition algorithm not relying on characters segmentation is realized with CNN (convolutional neural network), in which pre-procession and segmentation are not needed. The accuracy highly depends on network topology and quality of test dataset. In this paper, the recognition accuracy reaches 96%, and some in the unrecognized CAPTCHA are hard to tell for human beings. Therefore, this algorithm achieves high accuracy.

KEY WORDS: OCR recognition, Adhibited CAPTCHA, SVM, CNN

目 录

摘要 Ⅰ

Abstract Ⅱ

第一章 绪论 1

1.1研究背景 1

1.1.1验证码概念 1

1.1.2验证码分类 1

1.1.3研究意义 3

1.2 国内外发展现状 3

1.3 本文研究内容 5

第二章 预处理和验证码字符分割 6

2.1传统识别算法的预处理方法 6

2.1.1彩色图像灰度化 6

2.1.2灰度图像二值化 6

2.1.3图像去噪 6

2.2常用字符分割算法 8

2.2.1竖直投影法 8

2.2.2连通域分割法 9

2.2.3基于目标检测的分割方法 10

2.3本章小结 10

第三章 支持向量机 11

3.1支持向量机简介 11

3.2数据集创建 13

3.3支持向量机实现 14

3.4支持向量机训练 15

3.4.1训练过程 15

3.4.2 主成分分析 16

3.4.3训练结果 17

3.5本章小结 18

第四章 卷积神经网络 20

4.1卷积神经网络简介 20

4.2网络结构 21

4.2.1卷积层 21

4.2.2激活函数 23

4.2.3池化层 24

4.2.4 全连接层 25

4.2.5 Dropout 26

4.3经典网络模型 26

4.4字符识别 27

4.4.1数据集创建 27

4.4.2创建卷积神经网络 27

4.4.3网络训练 29

4.4.4识别 30

4.5本章小结 30

第五章 总结与展望 32

5.1本文工作总结 32

5.2未来工作展望 32

参考文献 34

致谢 36

第一章 绪论

1.1研究背景

1.1.1验证码概念

验证码(CAPTCHA, Completely Automated Public Turing test to tell Computers and Humans Apart,),即全自动区分计算机和人类的公开图灵测试,这一概念最早是在2002年由卡内基梅隆大学的路易斯·冯·安、Manuel Blum、Nicholas J. Hopper等人所提出[1]

网络服务的匿名性常常导致计算机程序在单调的操作中取代人类的情况。自动化服务可以发送大量垃圾邮件、注册请求或者数据库访问。这些操作会使服务器处理远高预期的请求,对服务器的正常运作、普通用户的服务体验造成极大的影响。因此,需要一种有效的方法来区分普通用户和机器操作。验证码被定义为一种测试,这项测试对人类来说非常容易解决,但对机器来说,很难在有限计算资源和算法复杂度上通过这项测试。

1.1.2验证码分类

现在的验证码根据其内容形式主要包含字符验证码、基于图片的验证码,还有其他类型验证码。

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

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

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