论文总字数:22704字
摘 要
随着经济的不断发展、科技的日益进步,交通安全成为了广大人名群众关心的话题,而行人是现代城市道路交通的重要部分,因此对于现代城市智能交通而言,图像中的自动行人检测算法的研究有着极其深远的意义和影响,同时也是机器学习中研究热门之一。行人相对于机动车和非机动车而言,虽然在速度上更加容易捕捉,但是由于其非刚性的特点,所在场景的复杂性和姿态形状等不断变化,使得行人检测颇具难度。
现有行人检测技术主要以运动检测为基础和以机器学习为基础的两大算法,行人检测初期使用的是前者,通过利用背景建模算法将运动目标与背景分离,得到一个完整的背景模型,并将前后两个背景进行比对,以此达到分离运动目标的目的,之后将运动目标放入分类器进行分类,来进一步筛选出目标中是否含有行人。此算法实现原理简单并且在速度上有相当卓越的表现,但是环境因素制约明显,很难有长远的发展。基于机器学习的方法是目前的主流,也是该领域的热点研究。人体虽然有非刚性的特点,但在复杂环境中依然有独特的特征,机器学习的方法是通过手工设计来提取行人特征,并用这些特征来训练分类器,使其具备将行人和背景分离的能力,行人特征范围广泛,包括但不仅限于纹理、颜色和边缘等,这些也是机器学习中被广泛认同的特征。本文也是采取此方法,主要进行的工作如下:从INRIA行人数据库中获取大小为64*128的行人图像作为基本训练集,再通过二次剪裁将基本训练集扩充为较大的数据库,此为本次实验的训练样本。本文使用HOG算法对训练样本图像进行特征提取,HOG特征向量是先分割为一个个较小的胞元区域,在这些胞元区域内提取特征并且计算其梯度,构成描述算子,对这些描述算子组合成一个大的区间进行对比度归一化,这样可以避免光照和几何变化的影响。最终将每一个大的区间进行合并组合成一个大的一维向量,这就是最终图像的HOG特征。将这些训练样本的特征保存,为下一步的分类工作做准备。受限于样本数量,本文采用SVM算法构建行人检测分类模型,在提取出的图像特征上执行基于监督学习的特征 标签的分类模式,并以此得到一个分类行人和非行人的训练模型。将图像金字塔中的hog特征导入分类器,分类器通过与已经训练好的模型进行比对,行人部分通过绿色矩形框圈出展示出来。最终所实现的程序在INRIA行人数据集上取得了非常不错的效果。
关键词: 行人检测; HOG; SVM; Python;
Automatic pedestrian detection algorithm in image
Abstract
With the continuous development of economy and the increasing progress of science and technology, traffic safety has become a topic of concern to the masses of people, and pedestrians are an important part of modern urban road traffic, so for modern urban intelligent traffic, the research of automatic pedestrian detection algorithm in the image has a profound significance and influence, and it is also one of the hottest research topics in machine learning. Compared with motor vehicles and non motor vehicles, pedestrian detection is more difficult because of its non rigid characteristics, the complexity of the scene and the changing attitude shape.
The existing pedestrian detection technology is mainly based on motion detection and machine learning. In the early stage of pedestrian detection, the former is used. By using the background modeling algorithm to separate the moving object from the background, a complete background model is obtained, and the two backgrounds are compared, so as to achieve the purpose of separating the moving object, and then the moving object is put into the sub-system Classifiers are used to further screen whether the target contains pedestrians. The principle of this algorithm is simple and it has excellent performance in speed, but it is difficult to have long-term development because of obvious environmental constraints. Machine learning based method is the current mainstream, but also a hot research in this field. Although human body has non rigid features, it still has unique features in complex environment. The method of machine learning is to extract pedestrian features by hand design, and use these features to train classifiers, so that they have the ability to separate pedestrian and background. The range of pedestrian features is wide, including but not limited to texture, color and edge, which are also widely used in machine learning The characteristics of universal identity. This paper also adopts this method, the main work is as follows:
The size of 64 * 128 pedestrian image is obtained from the INRIA pedestrian database as the basic training set, and then the basic training set is expanded to a larger database through secondary clipping, which is the training sample of this experiment. In this paper, the hog algorithm is used to extract the features of the training sample image. The hog feature vector is first divided into smaller cell areas. In these cell areas, the features are extracted and their gradients are calculated to form description operators, which are combined into a large area for contrast normalization, so as to avoid the influence of light and geometric changes. Finally, each large interval is combined into a large one-dimensional vector, which is the hog feature of the final image. Save the features of these training samples for the next classification work.
Limited by the number of samples, this paper uses SVM algorithm to build a pedestrian detection classification model, and implements the feature tag classification mode based on supervised learning on the extracted image features, and then obtains a training model for pedestrian and non pedestrian classification. The image pyramid's hog features are introduced into the classifier. The classifier is compared with the trained model, and the pedestrian part is displayed by the green rectangle.
Finally, the program achieved in INRIA pedestrian data set has achieved very good results.
Keywords: HOG; SVM; Python; Pedestrian Detection
目录
第一章 绪论 6
1.1研究背景和意义 6
1.2 当前研究现状 7
1.3 本文所作工作 9
1.4 本论文主要内容 9
第二章 行人检测基础技术与实现 10
2.1 HOG 10
2.1.1 分割图像 10
2.1.2 计算每个区块的方向梯度直方图 10
2.1.3 对block归一化 11
2.1.4 组成特征 11
2.1.5 目标检测中的问题 11
2.1.6 HOG实现流程图 12
2.2 SVM支持向量机 13
2.2.1 什么是SVM支持向量机? 13
2.2.2 SVM算法原理 13
2.3 行人检测具体实现 13
2.3.1 开发环境配置 14
2.3.2 准备数据集 14
2.3.3 提取图片hog特征并保存 14
2.3.4 训练过程 14
2.3.5 检测 14
2.3.6 最终结果 15
2.3.7 补充 15
第三章 实验结果分析 16
3.1 算法性能分析 16
3.2 提升识别精度 17
3.3 HOG函数 17
3.4 块归一化 20
3.5 SVM分类器 21
3.6 图像金字塔数量 22
3.7 NMS参数 23
3.8 样本数量 23
4.9 模型及结果分析 24
第四章 总结与展望 24
剩余内容已隐藏,请支付后下载全文,论文总字数:22704字
该课题毕业论文、开题报告、外文翻译、程序设计、图纸设计等资料可联系客服协助查找;