CN109871778B - Lane keeping control method based on transfer learning - Google Patents

Lane keeping control method based on transfer learning Download PDF

Info

Publication number
CN109871778B
CN109871778B CN201910065082.0A CN201910065082A CN109871778B CN 109871778 B CN109871778 B CN 109871778B CN 201910065082 A CN201910065082 A CN 201910065082A CN 109871778 B CN109871778 B CN 109871778B
Authority
CN
China
Prior art keywords
model
data
training
steering
lane
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201910065082.0A
Other languages
Chinese (zh)
Other versions
CN109871778A (en
Inventor
侯俊
张阳
史孙航
刘欣晟
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Changan University
Original Assignee
Changan University
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Changan University filed Critical Changan University
Priority to CN201910065082.0A priority Critical patent/CN109871778B/en
Publication of CN109871778A publication Critical patent/CN109871778A/en
Application granted granted Critical
Publication of CN109871778B publication Critical patent/CN109871778B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T10/00Road transport of goods or passengers
    • Y02T10/10Internal combustion engine [ICE] based vehicles
    • Y02T10/40Engine management systems

Landscapes

  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a lane keeping control method based on transfer learning, which comprises the steps of firstly collecting videos recorded by a front camera of a driving recorder and steering control signals of a vehicle as training data, preprocessing the data by changing brightness, resizing, increasing shadows and the like, using VGGNet trained based on an ImageNet data set as a feature extraction network, and simultaneously adding a full connection layer on the top layer to construct an end-to-end lane line keeping control network model; further training the model through the collected driving video and steering signals, and finally evaluating the robustness of the network model; the VGGNet trained based on the ImageNet data set is used as the feature extraction network, the steering angle of automatic driving can be well fitted under the condition that vehicle-mounted computing resources and data sets are limited, meanwhile, the method has certain effectiveness and reliability in the aspect of generalization of a network model, and can be widely applied to various lane line maintenance task systems related to automatic driving.

Description

基于迁移学习的车道保持控制方法Lane Keeping Control Method Based on Transfer Learning

技术领域technical field

本发明属于计算机技术领域,具体涉及一种基于迁移学习的车道保持控制方法。The invention belongs to the technical field of computers, and in particular relates to a lane keeping control method based on transfer learning.

背景技术Background technique

基于计算机视觉的传统模式识别方法,往往需要人为地设计特征。而人为设计特征往往容易存在疏漏,对于自动驾驶汽车来说,忽视了某种情况的程序设计缺陷可能会造成严重的后果。近年来,以卷积神经网络(Convolutional Neural Network,CNN)为代表的深度学习方法因其对于复杂环境的适应性,已成为自动驾驶领域的关键技术之一。卷积神经网络之所以能够成功应用,主要依赖两个因素:一是大型的公共数据集(比如ImageNet),二是高性能计算平台(比如GPU集群)。然而在利用深度学习进行自动驾驶过程中仍然存在一些技术难点亟待解决。Traditional pattern recognition methods based on computer vision often require artificially designed features. Human-designed features are often prone to omissions. For self-driving cars, a program design flaw that ignores a certain situation may cause serious consequences. In recent years, the deep learning method represented by Convolutional Neural Network (CNN) has become one of the key technologies in the field of autonomous driving because of its adaptability to complex environments. The successful application of convolutional neural networks mainly depends on two factors: one is a large public dataset (such as ImageNet), and the other is a high-performance computing platform (such as a GPU cluster). However, there are still some technical difficulties to be solved in the process of using deep learning for automatic driving.

其中之一就是深度学习算法模型对计算资源要求较高导致不利于车载计算平台训练。大型深层神经网络的训练对计算资源要求较高,但由于车载计算平台对于功耗、体积等多方面的需求,只适合搭建简单的深度学习计算环境,这成为阻碍深度学习在自动驾驶领域广泛应用的瓶颈之一。例如,用ImageNet数据集训练一个深度为16层的卷积神经网络,利用NVIDIA Tesla K80GPU需要大约10天才能完成模型训练。如果换做普通PC机(以GTX970为例)可能需要1年以上的时间才能完成训练。另一个问题是驾驶数据集采集难度大,而用较小的数据集训练的模型在面对真实复杂环境时泛化表现欠佳。One of them is that the deep learning algorithm model has high requirements for computing resources, which is not conducive to the training of on-board computing platforms. The training of large-scale deep neural networks requires high computing resources. However, due to the needs of power consumption and volume of the vehicle-mounted computing platform, it is only suitable for building a simple deep learning computing environment, which hinders the widespread application of deep learning in the field of autonomous driving. one of the bottlenecks. For example, using the ImageNet dataset to train a convolutional neural network with a depth of 16 layers, it takes about 10 days to complete the model training using NVIDIA Tesla K80GPU. If you switch to an ordinary PC (take GTX970 as an example), it may take more than a year to complete the training. Another problem is that the collection of driving data sets is difficult, and models trained with smaller data sets do not generalize well in real complex environments.

因此,在计算资源和数据集均有限的情况下,如何高效地获得可靠模型是当前深度学习技术在自动驾驶领域应用的一个主要难点。此外,传统的车道保持算法有例如重庆长安汽车股份有限公司提出的专利“基于偏差预测算法的车道保持及自动对中系统和方法”(申请日:2014-10-31,申请号:CN 201410613860,公开号:CN104442814B)和电子科技大学提出的专利“一种车道线检测稳固算法”(申请日:2017-8-18,申请号:CN 201710712894,公开号:CN107516078A)。上述两申请专利的方法都能够在一定程度上有效检测车道线。但是这两种方法本质上均是将车道识别与转向控制信号的生成分开处理,再基于特定规则进行车道线保持。因此,这些基于规则判断的算法很难满足复杂条件下的驾驶需求。Therefore, in the case of limited computing resources and data sets, how to efficiently obtain a reliable model is a major difficulty in the application of deep learning technology in the field of autonomous driving. In addition, traditional lane keeping algorithms include, for example, the patent "lane keeping and automatic centering system and method based on deviation prediction algorithm" proposed by Chongqing Changan Automobile Co., Ltd. (application date: 2014-10-31, application number: CN 201410613860, Publication number: CN104442814B) and the patent "A Lane Line Detection Stabilization Algorithm" proposed by the University of Electronic Science and Technology of China (application date: 2017-8-18, application number: CN 201710712894, publication number: CN107516078A). Both of the above two patent-applied methods can effectively detect lane lines to a certain extent. However, these two methods essentially separate lane recognition from the generation of steering control signals, and then maintain lane lines based on specific rules. Therefore, it is difficult for these rule-based algorithms to meet the driving needs under complex conditions.

发明内容Contents of the invention

本发明的目的在于提供一种基于迁移学习的车道保持控制方法,采用端到端模型,通过输入原始行车记录仪前置视频直接输出车辆转向控制信号,从而达到车道线保持的目的,解决现有技术的问题。The object of the present invention is to provide a lane keeping control method based on transfer learning, which adopts an end-to-end model and directly outputs the vehicle steering control signal by inputting the front-end video of the original driving recorder, so as to achieve the purpose of keeping lane lines and solve the existing problems. technical problem.

为了实现上述目的,本发明采用的技术方案是,基于迁移学习的车道保持控制方法,包括以下具体步骤:In order to achieve the above object, the technical solution adopted in the present invention is a lane keeping control method based on transfer learning, comprising the following specific steps:

S1,采集行车中视频数据和转向数据;S1, collecting video data and steering data during driving;

S2,对S1收集的数据进行切分与转换;经过切分与转换之后的数据集分为训练集和测试集,S2, segment and convert the data collected by S1; the data set after segmentation and conversion is divided into training set and test set,

S3,构建端到端的车道线保持控制模型,具体为:S3, build an end-to-end lane keeping control model, specifically:

S31采用迁移学习的手段对模型进行初始化,利用基于ImageNet数据集训练的VGGNet作为特征提取网络,冻结VGG16的前8层权重;在卷积层和全连接层之间加入Flatten层;在此基础上,同时将VGG16原有的3个全连接层改为5个全连接层;再添加一个全连接层输出转向角度值,构建出端到端的车道保持控制模型;S31 uses transfer learning to initialize the model, uses VGGNet trained based on the ImageNet dataset as a feature extraction network, and freezes the weights of the first 8 layers of VGG16; adds a Flatten layer between the convolutional layer and the fully connected layer; on this basis , and at the same time change the original 3 fully connected layers of VGG16 to 5 fully connected layers; add another fully connected layer to output the steering angle value, and construct an end-to-end lane keeping control model;

S32,对步骤31所构建的模型进行优化,在算法层面采用Max-pooling,BatchNormalization,Truncated Normal方法进行模型优化;S32, optimize the model constructed in step 31, and optimize the model by using Max-pooling, BatchNormalization, and Truncated Normal methods at the algorithm level;

S4,采用S2所分出的训练集数据对S3所构建的模型进行训练,得到训练模型和权重参数;S4, using the training set data separated by S2 to train the model constructed by S3 to obtain the training model and weight parameters;

S5,车辆在行驶过程中,采用S4所得训练模型以及权重参数,根据车辆的行车记录仪所监测到路面信息实现车辆行驶车道的实时控制。S5. During the driving process of the vehicle, the training model and weight parameters obtained in S4 are used to realize real-time control of the driving lane of the vehicle according to the road surface information monitored by the driving recorder of the vehicle.

S1中,行车中视频数据来自行车记录仪中的视频,转向数据采用车辆行驶过程中的转向控制信号。In S1, the driving video data comes from the video in the bicycle recorder, and the steering data uses the steering control signal during the driving of the vehicle.

S2中,对S1中的视频数据采用H264/MKV格式以1280×720的分辨率进行编码。In S2, the video data in S1 is encoded in the H264/MKV format with a resolution of 1280×720.

S2中,对S1中的视频数据按图片逐帧提取后采用改变亮度、重设尺寸和增加阴影的方式进行预处理。In S2, the video data in S1 is extracted frame by frame and preprocessed by changing brightness, resizing and adding shadows.

S3中,采用Maxpooling减小特征提取的误差;采用伯努利函数,以概率P随机生成一个0或1的向量,使某个神经元以概率P停止工作;In S3, Maxpooling is used to reduce the error of feature extraction; a Bernoulli function is used to randomly generate a vector of 0 or 1 with probability P, so that a certain neuron stops working with probability P;

采用Batch Normalization在深度网络的中间层内添加正态标准化处理,同时约束网络在训练过程中自动调整该标准化的强度。Batch Normalization is used to add normal normalization processing in the middle layer of the deep network, and at the same time constrain the network to automatically adjust the strength of the normalization during the training process.

S3中,网络模型中除最后一层外,其余各层均使用修正单元Relu作为激活函数。In S3, except for the last layer in the network model, all other layers use the correction unit Relu as the activation function.

S3中,采用TruncatedNormal进行截尾高斯分布初始化,丢弃位于均值两个标准差以外的数据并重新形成截尾分布的数据。In S3, TruncatedNormal is used to initialize the truncated Gaussian distribution, discarding data outside the two standard deviations of the mean and re-forming the truncated distributed data.

S4中,模型的运行环境为:NVIDIA Tesla K80、12GB Memory、61GB RAM和Tensorflow-gpu1.10.0。In S4, the running environment of the model is: NVIDIA Tesla K80, 12GB Memory, 61GB RAM, and Tensorflow-gpu1.10.0.

采用MSE(Mean Squared Error)评估S4所得训练模型的稳健性和精确度;MSE通过评价数据的变化程度来体现训练模型的稳健性和精确度,MSE的值越小,模型的精确度更高;MSE为:MSE (Mean Squared Error) is used to evaluate the robustness and accuracy of the training model obtained in S4; MSE reflects the robustness and accuracy of the training model by evaluating the degree of data change, the smaller the value of MSE, the higher the accuracy of the model; MSE is:

Figure BDA0001955426060000031
Figure BDA0001955426060000031

其中,

Figure BDA0001955426060000032
为S2得到的测试集中第i个数据的真实转向值,
Figure BDA0001955426060000033
为S4中得到的模型根据测试集中输入的图像数据对第i个转向信号的预测值,N为数据集的大小;MSE<3°时,S4所得模型的稳健性和精确度符合要求,当MSE≥3°时,重复S3和S4,直至MSE<3°。in,
Figure BDA0001955426060000032
The true steering value of the i-th data in the test set obtained for S2,
Figure BDA0001955426060000033
is the prediction value of the i-th turn signal by the model obtained in S4 based on the input image data in the test set, N is the size of the data set; when MSE<3°, the robustness and accuracy of the model obtained in S4 meet the requirements, when MSE When ≥3°, repeat S3 and S4 until MSE<3°.

与现有技术相比,本发明至少具有以下有益效果:Compared with the prior art, the present invention has at least the following beneficial effects:

首先本发明中采用的神经网络算法,将特征提取这一步也就融入到算法当中,提高了建立模型的效率;克服了传统模式识别方法在原始数据中提取特征,图像像素数太多,数据维度高,会产生维度灾难,是特征需要足够的经验去设计,在数据量越来越大的情况下也越来越困难的问题;传统车道线保持方法通常将车道线识别与转向控制信号的生成分开处理,先识别车道线,再基于特定规则进行转向控制从而达到车道线保持的效果,因此,这些基于规则判断的算法很难满足复杂条件下的驾驶需求,而本发明中采用了端到端的控制模型,通过最后一个全连接层直接输出转向角度值,输入行车记录仪采集的视频数据,可直接输出车辆转向控制角度,从而简化了控制模式;深度学习算法模型本身具有对计算资源要求高以及对数据的依赖性强的特点;对此,本发明在所述方法基于迁移学习,利用基于ImageNet数据集训练的VGGNet作为特征提取网络,在车载计算资源和数据集均有限的情况下,提出了一种获得高效可靠模型的方法;仿真结果表明,本发明能够较好地拟合自动驾驶的转向角度,同时在模型泛化方面具有一定的有效性与可靠性,可以广泛应用于各类自动驾驶相关的车道线保持任务系统中。First of all, the neural network algorithm adopted in the present invention integrates the feature extraction step into the algorithm, which improves the efficiency of model building; overcomes the traditional pattern recognition method to extract features from the original data, the number of image pixels is too large, and the data dimension High, it will cause a disaster of dimensionality. It is a problem that needs enough experience to design features, and it is becoming more and more difficult when the amount of data is increasing; traditional lane keeping methods usually combine lane line recognition with steering control signal generation. Separate processing, first identify the lane line, and then perform steering control based on specific rules to achieve the effect of lane line keeping. Therefore, these rule-based judgment algorithms are difficult to meet the driving needs under complex conditions, and the present invention adopts end-to-end The control model directly outputs the steering angle value through the last fully connected layer, and inputs the video data collected by the driving recorder to directly output the steering control angle of the vehicle, thus simplifying the control mode; the deep learning algorithm model itself has high requirements for computing resources and To the characteristic of strong dependence on data; To this, the present invention is based on transfer learning in described method, utilizes VGGNet based on ImageNet data set training as feature extraction network, under the all limited situation of on-board computing resource and data set, propose A method for obtaining an efficient and reliable model; simulation results show that the present invention can better fit the steering angle of automatic driving, and has certain effectiveness and reliability in model generalization, and can be widely used in various types of automatic driving Relevant lane keeping task system.

附图说明Description of drawings

图1是本发明的实现流程框图;Fig. 1 is the realization flow diagram of the present invention;

图2(a)和图2(b)为采集的图像数据,图2(c)和图2(d)为处理中间过程的数据图。Figure 2(a) and Figure 2(b) are the collected image data, and Figure 2(c) and Figure 2(d) are the data diagrams in the middle of processing.

图3(a)是一般神经网络训练过程,图3(b)是采用Dropout神经网络的训练过程。Figure 3(a) is the general neural network training process, and Figure 3(b) is the training process using the Dropout neural network.

图4是修正单元激活函数ReLU(x)示意图Figure 4 is a schematic diagram of the correction unit activation function ReLU(x)

图5是本发明的算法模型架构图;Fig. 5 is the framework diagram of the algorithm model of the present invention;

图6是本发明模型预测结果与测试集性能比较图。Fig. 6 is a comparison chart of the prediction result of the model of the present invention and the performance of the test set.

具体实施方式Detailed ways

本发明首先采集行车记录仪前置相机录制的视频和车辆的转向控制信号作为训练数据,通过改变亮度、重设尺寸、增加阴影等方式对数据进行预处理,利用基于ImageNet数据集训练的VGGNet作为特征提取网络,同时在顶层添加全连接层,由此构建端到端的车道线保持控制模型;而后通过采集的行车视频和转向信号对该模型进行进一步地训练;最后利用MSE对模型稳健性进行评估。The present invention first collects the video recorded by the front camera of the driving recorder and the steering control signal of the vehicle as training data, preprocesses the data by changing the brightness, resetting the size, adding shadows, etc., and uses the VGGNet trained based on the ImageNet data set as training data. Feature extraction network, while adding a fully connected layer on the top layer, thereby constructing an end-to-end lane line keeping control model; then further training the model through the collected driving video and turn signals; finally using MSE to evaluate the robustness of the model .

参照附图1,本发明的具体实现步骤如下:With reference to accompanying drawing 1, concrete realization steps of the present invention are as follows:

S1:收集数据集S1: Collect Datasets

首先采集行车记录仪前置相机录制的视频和车辆的转向控制信号作为训练数据。数据集给出了每一帧图像对应的转向角度。在本发明中,输入的自变量X是摄像头获取的单帧图片,输出的应变量Y为方向盘的转向角度。问题实质为利用卷积神经网络(CNN)训练一个端到端模型F,输入视频图像x,利用该模型预测方向盘转向角度,即y=f(x);First, the video recorded by the front camera of the driving recorder and the steering control signal of the vehicle are collected as training data. The dataset gives the steering angle corresponding to each frame of image. In the present invention, the input independent variable X is a single-frame image captured by the camera, and the output variable Y is the steering angle of the steering wheel. The essence of the problem is to use a convolutional neural network (CNN) to train an end-to-end model F, input a video image x, and use the model to predict the steering wheel steering angle, that is, y=f(x);

S2:数据预处理S2: Data preprocessing

视频文件采用H264/MKV格式以1280×720的分辨率进行编码;视频中有大量干扰因素比如天空等,需要对数据集进行切分与转换。The video file is encoded in H264/MKV format with a resolution of 1280×720; there are a lot of interference factors in the video, such as the sky, etc., and the data set needs to be segmented and converted.

首先将将视频按图片逐帧提取,便于后续进一步图像处理。参考图2,具体参考图2(a)、图2(b)、图2(c)以及图2(d)通过改变亮度、重设尺寸、增加阴影等方式对数据进行预处理,从而在数据集有限的情况下起到人工增加训练集大小的作用。First, the video will be extracted frame by frame according to the picture, which is convenient for further image processing. Referring to Figure 2, specifically refer to Figure 2(a), Figure 2(b), Figure 2(c) and Figure 2(d) to preprocess the data by changing the brightness, resizing, adding shadows, etc., so that the data When the set is limited, it plays the role of artificially increasing the size of the training set.

除了光照条件外,真实路况上另一种可能出现的情况就是阴影,比如建筑、树木、其他车辆的影子,会对算法结果产生干扰,因此本发明通过随机添加阴影来模拟这种情况——在图像上随机选取3~4个点,将这一区域的色调调暗,具体通过在HLS色域中的第二通道增加一层shadow mask实现;再将处理后的数据数据集切分为训练集和测试集。In addition to lighting conditions, another possible situation on real road conditions is shadows, such as shadows of buildings, trees, and other vehicles, which will interfere with the algorithm results, so the present invention simulates this situation by randomly adding shadows—— Randomly select 3 to 4 points on the image to darken the tone of this area, which is achieved by adding a layer of shadow mask to the second channel in the HLS color gamut; and then divide the processed data dataset into training sets and the test set.

S3:建立模型S3: Model building

S31模型初始化:利用基于ImageNet数据集训练的VGGNet作为特征提取网络,冻结VGG16的前8层权重,在卷积层和全连接层之间加入Flatten层,同时将VGG16原有的3个全连接层改为5个全连接层,最后一个全连接层直接输出转向角度值,由此构建端到端的车道线保持控制模型;S31 model initialization: use VGGNet trained based on the ImageNet dataset as a feature extraction network, freeze the weights of the first 8 layers of VGG16, add a Flatten layer between the convolutional layer and the fully connected layer, and at the same time use the original 3 fully connected layers of VGG16 Change to 5 fully connected layers, and the last fully connected layer directly outputs the steering angle value, thereby constructing an end-to-end lane keeping control model;

由于自动驾驶数据集较小,因此本发明基于迁移学习,并采用迁移学习的手段对网络模型进行初始化;本发明对VGGNet网络模型的前8层即泛化能力最强的各层进行权重冻结,然后对后面的网络进行S32,以期达到理想效果,具体为:首先导入基于ImageNet训练的VGG16notop权重,该网络模型适用于特征提取;在网络模型最底层增加正则化层,提高网络模型运算速度;冻结前8层权重参数,保留泛化能力;在卷积层和全连接层之间加入Flatten层,并将VGG16原有的3个全连接层改为5个全连接层,最后一个全连接层直接输出预测角度值,从而实现端到端预测的功能,其中,全连接层网络的数学表达式为:Y=WH+b;其中,W表示全连接层与上一层网络之间的权重矩阵,b为偏置值矩阵,Y则为该层输出;Flatten层用于扁平参数,即多维输入一维化。Because the automatic driving data set is small, the present invention is based on transfer learning, and uses the means of transfer learning to initialize the network model; the present invention freezes the weights of the first 8 layers of the VGGNet network model, that is, the layers with the strongest generalization ability, Then perform S32 on the following network in order to achieve the desired effect, specifically: first import the VGG16notop weight based on ImageNet training, this network model is suitable for feature extraction; add a regularization layer at the bottom of the network model to improve the operation speed of the network model; freeze The weight parameters of the first 8 layers retain the generalization ability; add the Flatten layer between the convolutional layer and the fully connected layer, and change the original 3 fully connected layers of VGG16 to 5 fully connected layers, and the last fully connected layer directly Output the predicted angle value, so as to realize the function of end-to-end prediction, wherein, the mathematical expression of the fully connected layer network is: Y=WH+b; where W represents the weight matrix between the fully connected layer and the previous layer network, b is the bias value matrix, and Y is the output of this layer; the Flatten layer is used for flattening parameters, that is, multi-dimensional input is one-dimensional.

S32网络模型优化:S32 network model optimization:

S321特征提取的误差主要来自两个方面:一是邻域大小受限造成的估计值方差增大;二是卷积层参数误差造成估计均值的偏移,采用Mean-pooling减小第一种误差,更多的保留图像的背景信息,采用Max-pooling减小第二种误差,更多的保留纹理信息;本发明需要识别的主要是车道线纹理信息,采用Maxpooling用于减小特征提取的误差。The error of S321 feature extraction mainly comes from two aspects: one is the increase in the variance of the estimated value caused by the limitation of the neighborhood size; the other is the deviation of the estimated mean value caused by the parameter error of the convolution layer, and the first error is reduced by using Mean-pooling , more background information of the image is retained, Max-pooling is used to reduce the second error, and more texture information is retained; the present invention needs to identify mainly lane line texture information, and Max-pooling is used to reduce the error of feature extraction .

S322,大规模神经网络模型有两个缺点:训练时间长以及容易过拟合;参考图3,本发明采用Dropout在深度学习网络的训练过程中,对于神经网络单元,按照一定的概率将其暂时从网络模型中丢弃;本发明采用伯努利函数,以概率P随机生成一个0或1的向量,从而让某个神经元以概率P停止工作,也就是将这个神经元的激活值变为0。S322, the large-scale neural network model has two disadvantages: long training time and easy overfitting; referring to Fig. 3, the present invention uses Dropout in the training process of the deep learning network. Discarded from the network model; the present invention uses the Bernoulli function to randomly generate a vector of 0 or 1 with probability P, so that a certain neuron stops working with probability P, that is, the activation value of this neuron becomes 0 .

S323,采用Batch Normalization在网络模型的中间层内添加正态标准化处理,作为BN层出现,同时约束网络模型在训练过程中自动调整该标准化的强度,从而加快训练速度并降低权值初始化的成本;S323, using Batch Normalization to add normal normalization processing in the middle layer of the network model, appearing as a BN layer, and constraining the network model to automatically adjust the normalization strength during the training process, thereby speeding up the training speed and reducing the cost of weight initialization;

S324,网络模型各层除最后一层外,均使用修正单元Relu作为激活函数,使网络模型更快速地收敛,且不会饱和,用于对抗梯度消失问题,将ReLU应用到各个像素,并将特征图中的所有小于0的像素值设置为零,在ConvNet中引入非线性,其收敛速度远快于sigmoid,在负数部分,ReLU会将其置为0,那么梯度也为0,训练过程中负数部分不会更新,如图4所示;S324, each layer of the network model except the last layer uses the correction unit Relu as the activation function, so that the network model can converge faster and will not be saturated, and is used to combat the problem of gradient disappearance. ReLU is applied to each pixel, and the All pixel values less than 0 in the feature map are set to zero, introducing nonlinearity in ConvNet, and its convergence speed is much faster than sigmoid. In the negative part, ReLU will set it to 0, so the gradient is also 0. During the training process The negative part will not be updated, as shown in Figure 4;

S325,采用TruncatedNormal进行截尾高斯分布初始化,位于均值两个标准差以外的数据将会被丢弃并重新生成,形成截尾分布的数据;最终获得的模型结构如图5所示。S325, use TruncatedNormal to initialize the truncated Gaussian distribution, and the data located outside the two standard deviations of the mean will be discarded and regenerated to form truncated distributed data; the finally obtained model structure is shown in Figure 5.

S4,训练模型:采用S2所分出的训练集数据对S3所构建的模型进行训练,得到用keras导出训练模型(JSON格式)和权重参数(HDF5格式);运行环境为NVIDIA Tesla K80、12GB Memory、61GB RAM和Tensorflow-gpu1.10.0;S4, training model: use the training set data separated by S2 to train the model built by S3, and obtain the training model (JSON format) and weight parameters (HDF5 format) exported by keras; the operating environment is NVIDIA Tesla K80, 12GB Memory , 61GB RAM and Tensorflow-gpu1.10.0;

S5,车辆在行驶过程中,采用S4所得训练模型以及权重参数,根据车辆的行车记录仪所监测到路面信息实现车辆行驶车道的实时控制,对行车记录仪中的数据进行与S2相同的处理之后将其作为S4所得模型的输入进行实时控制车辆在车道中的行驶。S5, during the driving process of the vehicle, use the training model and weight parameters obtained in S4, and realize the real-time control of the vehicle driving lane according to the road surface information monitored by the vehicle's driving recorder, and perform the same processing on the data in the driving recorder as in S2 Use it as the input of the model obtained in S4 to control the driving of the vehicle in the lane in real time.

采用MSE(Mean Squared Error)对S4所得训练模型的稳健性和精确度进行评估,MSE的值越小,说明预测模型描述实验数据具有更好的精确度,MSE (Mean Squared Error) is used to evaluate the robustness and accuracy of the training model obtained in S4. The smaller the value of MSE, the better the accuracy of the prediction model describing the experimental data.

Figure BDA0001955426060000071
Figure BDA0001955426060000071

其中,

Figure BDA0001955426060000081
为第i个数据的真实转向值
Figure BDA0001955426060000082
为模型对第i个信号的预测值,N为数据集的大小,MSE<3°时,训练模型的稳健性和精确度符合要求;本发明模型预测结果与测试集性能比较结果如图6所示,本发明所得训练模型的稳健性和精确度均符合要求。in,
Figure BDA0001955426060000081
is the true steering value of the i-th data
Figure BDA0001955426060000082
is the predicted value of the i-th signal by the model, N is the size of the data set, and when MSE<3°, the robustness and accuracy of the training model meet the requirements; the model prediction results of the present invention and the performance comparison results of the test set are shown in Figure 6 It is shown that the robustness and accuracy of the training model obtained by the present invention all meet the requirements.

Claims (6)

1. The lane keeping control method based on the transfer learning is characterized by comprising the following specific steps of:
s1, collecting video data and steering data in a driving process;
s2, segmenting and converting the data collected in the S1; dividing the data set after cutting and conversion into a training set and a testing set;
s3, constructing an end-to-end lane line keeping control model, specifically:
s31, initializing the model by adopting a transfer learning means, and freezing the front 8 layers of weights of the VGG16 by using VGGNet trained on the ImageNet data set as a feature extraction network; adding a Flatten layer between the convolution layer and the full-connection layer; on the basis, the original 3 full connection layers of the VGG16 are changed into 5 full connection layers; adding a full-connection layer output steering angle value to construct an end-to-end lane keeping control model;
s32, optimizing the model constructed in the step 31, and optimizing the model by adopting a Max-posing, batch Normalization and Truncated Normalization method in an algorithm level; specifically, the method comprises the following steps: reducing errors of feature extraction by adopting Maxpooling; a Bernoulli function is adopted to randomly generate a vector of 0 or 1 according to the probability P, so that a certain neuron stops working according to the probability P;
adding normal standardization processing in a middle layer of the deep network by adopting Batch Normalization, and simultaneously restricting the network to automatically adjust the standardized strength in the training process;
except the last layer in the network model, the other layers all use a correction unit Relu as an activation function;
initializing Truncated Gaussian distribution by adopting a Truncated Normal, discarding data beyond two standard deviations of the mean value, and reforming the data of the Truncated distribution;
s4, training the model constructed in the S3 by adopting the training set data separated in the S2 to obtain a training model and weight parameters;
and S5, in the driving process of the vehicle, the training model and the weight parameters obtained in the S4 are adopted, and the real-time control of the driving lane of the vehicle is realized according to the road information monitored by the vehicle data recorder of the vehicle.
2. The method for controlling lane keeping based on transfer learning of claim 1, wherein in S1, the video data in driving is from a video in a drive recorder, and the steering data is a steering control signal in the driving process of the vehicle.
3. The method of claim 1, wherein in S2, the video data in S1 is encoded in H264/MKV format at 1280 x 720 resolution.
4. The method for controlling lane keeping based on transfer learning of claim 1, wherein in S2, the video data in S1 is pre-processed by changing brightness, resizing and increasing shadow after being extracted frame by frame.
5. The transfer learning-based lane-keeping control method according to claim 1, wherein in S4, the operating environment of the model is: NVIDIA Tesla K80, 12GB Memory, 61GB RAM and Tensorflow-gpu1.10.0.
6. The transfer learning-based lane-keeping control method according to claim 1, wherein the robustness and accuracy of the training model obtained in S4 is evaluated using MSE; MSE is:
Figure FDA0003795519130000021
wherein,
Figure FDA0003795519130000022
for the true steering value of the ith data in the test set obtained at S2,
Figure FDA0003795519130000023
the model obtained in S4 is used for predicting the ith steering signal according to the image data input in the test set, N is the size of the data set, when MSE is less than 3 degrees, the robustness and the accuracy of the model obtained in S4 meet the requirements, and when MSE is more than or equal to 3 degreesS3 and S4 are repeated until MSE < 3 deg..
CN201910065082.0A 2019-01-23 2019-01-23 Lane keeping control method based on transfer learning Active CN109871778B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201910065082.0A CN109871778B (en) 2019-01-23 2019-01-23 Lane keeping control method based on transfer learning

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201910065082.0A CN109871778B (en) 2019-01-23 2019-01-23 Lane keeping control method based on transfer learning

Publications (2)

Publication Number Publication Date
CN109871778A CN109871778A (en) 2019-06-11
CN109871778B true CN109871778B (en) 2022-11-15

Family

ID=66917899

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201910065082.0A Active CN109871778B (en) 2019-01-23 2019-01-23 Lane keeping control method based on transfer learning

Country Status (1)

Country Link
CN (1) CN109871778B (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109161932A (en) * 2018-10-22 2019-01-08 中南大学 A kind of extracting method of aluminium cell acute conjunctivitis video behavioral characteristics
CN111353644B (en) * 2020-02-27 2023-04-07 成都美云智享智能科技有限公司 Prediction model generation method of intelligent network cloud platform based on reinforcement learning
CN111439259B (en) * 2020-03-23 2020-11-27 成都睿芯行科技有限公司 Agricultural garden scene lane deviation early warning control method and system based on end-to-end convolutional neural network
CN111559321A (en) * 2020-05-11 2020-08-21 四川芯合利诚科技有限公司 Control method of automobile camera

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106971563A (en) * 2017-04-01 2017-07-21 中国科学院深圳先进技术研究院 Intelligent traffic lamp control method and system
CN108009524A (en) * 2017-12-25 2018-05-08 西北工业大学 A kind of method for detecting lane lines based on full convolutional network
WO2018171109A1 (en) * 2017-03-23 2018-09-27 北京大学深圳研究生院 Video action detection method based on convolutional neural network
CN109002807A (en) * 2018-07-27 2018-12-14 重庆大学 A kind of Driving Scene vehicle checking method based on SSD neural network

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10068140B2 (en) * 2016-12-02 2018-09-04 Bayerische Motoren Werke Aktiengesellschaft System and method for estimating vehicular motion based on monocular video data

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018171109A1 (en) * 2017-03-23 2018-09-27 北京大学深圳研究生院 Video action detection method based on convolutional neural network
CN106971563A (en) * 2017-04-01 2017-07-21 中国科学院深圳先进技术研究院 Intelligent traffic lamp control method and system
CN108009524A (en) * 2017-12-25 2018-05-08 西北工业大学 A kind of method for detecting lane lines based on full convolutional network
CN109002807A (en) * 2018-07-27 2018-12-14 重庆大学 A kind of Driving Scene vehicle checking method based on SSD neural network

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
基于深度强化学习的自动驾驶策略学习方法;夏伟等;《集成技术》;20170515(第03期);全文 *
基于端到端深度学习的智能车自动转向研究;邹斌等;《计算机应用研究》;20171010(第09期);全文 *

Also Published As

Publication number Publication date
CN109871778A (en) 2019-06-11

Similar Documents

Publication Publication Date Title
CN109871778B (en) Lane keeping control method based on transfer learning
CN110009095B (en) Efficient segmentation method of road driving area based on deep feature compression convolutional network
CN108229461B (en) Tunnel crack rapid identification method based on deep learning
CN110689482B (en) Face super-resolution method based on supervised pixel-by-pixel generation countermeasure network
CN111640101A (en) Ghost convolution characteristic fusion neural network-based real-time traffic flow detection system and method
CN110991444B (en) License plate recognition method and device for complex scene
CN112465273B (en) A Local Attention Mechanism-Based Trajectory Prediction Method for Unmanned Vehicles
CN106169081A (en) A kind of image classification based on different illumination and processing method
CN111882620A (en) Road drivable area segmentation method based on multi-scale information
CN111209858B (en) Real-time license plate detection method based on deep convolutional neural network
CN111696110A (en) Scene segmentation method and system
CN115272777B (en) Semi-supervised image parsing method for power transmission scenarios
CN115376082B (en) Lane line detection method integrating traditional feature extraction and deep neural network
CN116844041A (en) A farmland extraction method based on bidirectional convolution temporal self-attention mechanism
CN116740121A (en) Straw image segmentation method based on special neural network and image preprocessing
CN115909245A (en) A visual multitasking method based on deep learning
CN113537173A (en) A Face Image Authenticity Recognition Method Based on Facial Patch Mapping
CN114882278B (en) A tire pattern classification method and device based on attention mechanism and transfer learning
CN114463340B (en) Agile remote sensing image semantic segmentation method guided by edge information
CN114140622B (en) Image real-time saliency detection method based on dual-branch network
CN112132746B (en) Small-scale pedestrian target rapid super-resolution method for intelligent roadside equipment
CN111798461B (en) Pixel-level remote sensing image cloud area detection method for guiding deep learning by coarse-grained label
CN114529730A (en) Convolutional neural network ground material image classification method based on LBP (local binary pattern) features
CN117152072A (en) Remote sensing image change detection method based on two-stage feature pyramid network
CN114937153B (en) Neural Network-Based Visual Feature Processing System and Method in Weak Texture Environment

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant