基于深度学习的车辆检测及分类
摘 要
在现代社会中,车辆数量不断增加,对于车辆的监控不能仅仅依赖于人工视频分析,自动化技术在车辆监控视频中有着更加广泛的应用,通过视频分析技术可以分析视频中的车辆信息,完成全自动的车辆特征提取,分类,超速检查,异常自动报警等功能。
相比通过其他传感器进行车辆分析的技术,通过是车辆视频分析具有以下的有点:
将车型检测融入到视频监控中,自动化分析监控视频中的车型信息,效率高。
在某些应用场合,例如进行交通调查,可以把车辆图像按照车型分类离线保存。
可以检测大范围内的交通流量信息,减少设备数量,节约资金。
为此,本文设计基于深度卷积神经网络设计相应的车型特征 提取算法,并结合softmax分类器构建识别系统。实验显示该系 统在显著提高识别准确率的同时保持了较高的特征提取速度,本文主要进行了以下研究工作:
首先,本文探究了车型识别的应用背景,并分析了车型识别的发展现状,深度学习在物体检测和识别的发展状况,也分析了深度学习在车型识别的发展状况。
在制定了较为完善的研究方案的基础上,本文首先研究了视频序列中提取运动物体前景的方法与技术。包括高斯混合模型,卡尔曼滤波提取运动物体前景图的方法。
在完成了对运动车辆前景的提取以后。探究了深度学习识别车型的方法。研究了卷积神经网络的工作原理,以及神经网络在工业界的各种应用技巧,确定了卷积神经网络的结构以及参数。探究了卷积神经网络在训练阶段的各种最优化方法,确定了适用于本课题的最优化方法。
关键词: 车型识别;机器视觉;图像处理;深度学习;
Abstract
With the continuous improvement of living standards of modern society, the rapid growth of the number of cars, traffic regulation facing enormous challenges. Video surveillance system as an important means of transportation regulation, has been widely used in various fields of modern transportation. Video-based vehicle recognition system is the use of computer analysis of images collected by the camera, used video analysis of a specific area, complete vehicle detection and vehicle recognition. The technology is simple to use green, easy to maintain, only need to set up a video camera or use existing monitoring equipment, the incoming video into the system on the road, we can immediately analyze and extract information highway vehicles
Compared with other detection techniques, by means of the advantages of video detection is reflected in the following aspects:
The vehicle detection into video surveillance, video monitoring automatic analysis of information models, and high efficiency.For some applications, such as traffic survey, you can save the image of the vehicle in accordance with the vehicle classification offline.It can detect a wide range of traffic information, reduce the number of equipment, save money.
Therefore, we propose extraction algorithm based on neural network design convolution depth corresponding models feature, combined with softmax classifier constructed recognition system. Experiments show that the system is in a significantly improved recognition accuracy while maintaining a high speed feature extraction, this paper carried out the following work:
First, this paper explores the vehicle identification application background, and analyzes the development of models to identify, study in depth development of object detection and recognition, but also analyzes in depth study of the development of vehicle recognition.
In the development of a more comprehensive research program based on paper studies the extraction of moving objects in video sequences promising methods and techniques. Including Gaussian mixture model, Kalman filter extracting moving foreground object diagram approach.
Upon completion of the extraction of the moving vehicle promising future. Explores the deep learning method for identifying the model. Research on the convolutional neural network works, and neural network techniques in a variety of applications in industry, to determine the structure and parameters of convolution neural network. It explores the convolutional neural network training in various stages of optimization methods to determine the applicable to the issue of optimization methods.
Keywords: vehicle identification; machine vision; image processing; deep learning;
- 实验测试与分析
5.1 概述
基于上述深度学习的结构,在是识别时间和准确率之间的矛盾关系,最终决定采用cifar-10网络结构。
采用min-batch梯度下降算法对网络进行训练,并用python对特征进行可视化分析,抽取小汽车和大型汽车进行了单张图像的分类测试。
最后在监控识别中进行了最适合分类的单张图像的提取并将分类与其结合实现了监控视频中车辆的检测以及分类的功能。
训练以及测试所用电脑CPU i7-6700六核12线程主频3.7GHZ,显卡TitanX 12G显存,内存32G,操作系统为ubuntu 14.04。
下图是车型识别的整体架构和神经往网络结构示意图

图 5-1 梯度下降算法的收敛情况示意图

图 5-2 神经网络结构示意图
5.2卷积神经网络测试
下面是收集的训练的部分样本

图 5-3 部分车型样本示意图
利用python提取到神经网络各个层卷积模板学习到的特征

图 5-4 第一层卷积提取到的体征

图 5-5 第二层卷积提取到的体征

图 5-6 第三层卷积提取到的体征
在输入单张小型汽车图像以后,神经网络层的响应数据层信息

图 5-7 第一层响应的数据信息

图 5-8 第二层响应的数据信息

图 5-9 第三层响应的数据信息

图 5-10 第一层响应的数据信息

图 5-11 Softmax分类器响应信息
5.3前景提取测试
利用GMM提取运动车辆前景图象

使用卡尔曼滤波器对车辆进行跟踪处理,获得车辆在整个视频序列中最适合分类的图像。

5.4 本章小结
本章对卷积神经网络的提取的特征进行了可视化分析,并对单张车辆图像经过特征的卷积运算的激活数据进行可视化分分析。利用GMM高斯混合模型和卡尔曼滤波提取运动车辆的前景进行了相关实验。
结 论
在现代社会中,车辆数量不断增加,对于车辆的监控不能仅仅依赖于人工视频分析,自动化技术在车辆监控视频中有着更加广泛的应用,通过视频分析技术可以分析视频中的车辆信息,完成全自动的车辆特征提取,分类,超速检查,异常自动报警等功能。车型检测以及分类是智能交通系统中非常重要的一部分,具有很强的应用价值。
本文主要研究成果如下:
(1)对车辆前景提取算法进行了研究,使用GMM高斯混合模型和卡尔曼滤波器结合的方法获取了视频序列中最适合分类的车辆图像。
(2)研究了深度学习的网络结构,研究了卷积层,下采样层,全连接层,softmax分类层的作用以及各个参数的对于最终特征提取和分类结果的影响,研究了提高模型泛化能力的正则化方法,包括L2正则化方法,dropout和dropconnect方法,研究了神经网络激活函数,包括sigmoid激活函数,relu激活函数,以及在训练过程中进行梯度检验的方法,训练过程中步长的初始值选择和步长的改变策略方法,同时对数据和特征进行了可视化分析。
(3)研究了反响传播算法以及反向传播算法在深度学习中的应用,包括反向传播在卷积层和下采样层的传播,研究了随机梯度下降算法在深度学习中的应用,包括学习率的初始化,学习率的改变方式和改变步长以及各种优化的随机梯度下降算法。
本文在车型检测和分类方向取得了一定的成果,所设计的算法能够应用在监控视频中完成车辆检测和分类。但是本课题最终的检测分类速率比较慢,一方面是因为采用的是传统的卷积神经网络的深度学习框架,另一方面没有采用多线程技术将检测和分类两个环节分别进行。还有很大的改进空间,可以采用个比较流行的fastern-rcnn或者ssd这种将检测和分类计融合在同一个神经网络中的深度学习框架达到实时检测和分类的效果。
更多推荐



所有评论(0)