CN114299461A - Two-stage-based vehicle illegal lane change identification method - Google Patents

Two-stage-based vehicle illegal lane change identification method Download PDF

Info

Publication number
CN114299461A
CN114299461A CN202111476375.1A CN202111476375A CN114299461A CN 114299461 A CN114299461 A CN 114299461A CN 202111476375 A CN202111476375 A CN 202111476375A CN 114299461 A CN114299461 A CN 114299461A
Authority
CN
China
Prior art keywords
lane
image
lane line
line
vehicle
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.)
Pending
Application number
CN202111476375.1A
Other languages
Chinese (zh)
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.)
Jiangsu Aerospace Dawei Technology Co Ltd
Original Assignee
Jiangsu Aerospace Dawei Technology Co Ltd
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 Jiangsu Aerospace Dawei Technology Co Ltd filed Critical Jiangsu Aerospace Dawei Technology Co Ltd
Priority to CN202111476375.1A priority Critical patent/CN114299461A/en
Priority to PCT/CN2022/081155 priority patent/WO2023103204A1/en
Publication of CN114299461A publication Critical patent/CN114299461A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/04Architecture, e.g. interconnection topology
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/764Arrangements for image or video recognition or understanding using pattern recognition or machine learning using classification, e.g. of video objects
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/77Processing image or video features in feature spaces; using data integration or data reduction, e.g. principal component analysis [PCA] or independent component analysis [ICA] or self-organising maps [SOM]; Blind source separation
    • G06V10/774Generating sets of training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/70Arrangements for image or video recognition or understanding using pattern recognition or machine learning
    • G06V10/82Arrangements for image or video recognition or understanding using pattern recognition or machine learning using neural networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/50Context or environment of the image
    • G06V20/56Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
    • G06V20/58Recognition of moving objects or obstacles, e.g. vehicles or pedestrians; Recognition of traffic objects, e.g. traffic signs, traffic lights or roads

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Evolutionary Computation (AREA)
  • Multimedia (AREA)
  • Health & Medical Sciences (AREA)
  • Artificial Intelligence (AREA)
  • Computing Systems (AREA)
  • General Health & Medical Sciences (AREA)
  • Software Systems (AREA)
  • Databases & Information Systems (AREA)
  • Medical Informatics (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Data Mining & Analysis (AREA)
  • Biomedical Technology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • Molecular Biology (AREA)
  • General Engineering & Computer Science (AREA)
  • Mathematical Physics (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)
  • Traffic Control Systems (AREA)

Abstract

本发明公开了一种基于两阶段的车辆违规变道识别方法,包括步骤:车辆和摄像机启动,实时读取摄像机图像作为输入;对输入图像进行处理,检测车道线;对比车道线基点的变化情况,判断车辆是否变道和变道方向,若未变道则重新读取图像进行识别,否则截取变道车道线图像进行下一步;将车道线类型预测模型应用于设备,对变道车道线进行识别,如识别结果为实线、实虚或双实线之一,则为违规变道,发出警报提示。本发明能识别车道线、车辆变道和变道的车道线类型;对残差模块改进,提升了算法的识别精度,能够快速完成车道线的检测和识别,方便进行嵌入式移植应用。

Figure 202111476375

The invention discloses a two-stage vehicle violation lane change recognition method, comprising the steps of: starting the vehicle and the camera, and reading the camera image in real time as an input; processing the input image to detect lane lines; and comparing the changes of the base points of the lane lines , to determine whether the vehicle changes lanes and the direction of the lane change, if not, re-read the image for identification, otherwise intercept the image of the lane change lane line and proceed to the next step; apply the lane line type prediction model to the equipment, and carry out Recognition, if the recognition result is one of solid line, solid virtual or double solid line, it is illegal lane change, and an alarm prompt is issued. The invention can identify lane lines, vehicle lane changes and lane line types of lane changes; improves the residual module, improves the recognition accuracy of the algorithm, can quickly complete the detection and identification of lane lines, and facilitates embedded transplant applications.

Figure 202111476375

Description

一种基于两阶段的车辆违规变道识别方法A two-stage vehicle illegal lane change recognition method

技术领域technical field

本发明属于智能交通技术领域,尤其涉及一种基于两阶段的车辆违规变道识别方法。The invention belongs to the technical field of intelligent transportation, and in particular relates to a two-stage vehicle violation lane change identification method.

背景技术Background technique

近年来,随着机动车普及程度的提高,许多国家出现了汽车销量快速增长与道路建设基础不足的矛盾,给人民群众的生命和财产安全带来了巨大威胁。据统计,全球每年约有130万人死于交通事故,80%的交通事故是由司机的错误直接或间接造成的,如疲劳驾驶、注意力不集中、不良驾驶习惯等,其中,大约50%的汽车交通事故是由于车辆违规变道造成的。In recent years, with the increase in the popularity of motor vehicles, the contradiction between the rapid growth of vehicle sales and the lack of road construction infrastructure has appeared in many countries, posing a huge threat to people's lives and property safety. According to statistics, about 1.3 million people die in traffic accidents every year in the world, and 80% of traffic accidents are directly or indirectly caused by driver errors, such as fatigue driving, inattention, bad driving habits, etc. Among them, about 50% of car accidents are caused by vehicles changing lanes illegally.

随着计算机计算能力的提升和工业应用的加速,智能交通领域得到快速发展,智能驾驶辅助系统(ADAS,Advanced Driver Assistance System)得到大量工作者的关注和研究,成为了提高道路安全的重要创新技术,在此技术中,由于车道线检测不仅可以用于车道偏离预警和车道保持辅助,还有助于进行违规变道识别工作,维护道路安全和驾驶员的行车安全,成为了最基本的和最具有挑战性的工作之一。With the improvement of computer computing power and the acceleration of industrial applications, the field of intelligent transportation has developed rapidly, and the Advanced Driver Assistance System (ADAS) has attracted the attention and research of a large number of workers, and has become an important innovative technology to improve road safety. , In this technology, since lane line detection can not only be used for lane departure warning and lane keeping assist, but also help to identify illegal lane changes and maintain road safety and driver safety, it has become the most basic and most important. One of the challenging jobs.

已有大量方法应用于车道线检测,主要可分为传统的机器学习算法和深度学习。有工作者通过修改形态学操作对输入图像进行处理,以获得好的车道线检测效果。一部分工作者通过训练深度学习模型,对图像进行分割获得车道线轮廓。还有一部分工作者使用检测算法直接进行车道线位置确定。由于目前车道线类型识别数据集少和缺少车道线类型识别算法,现有的方法在车道线位置检测方面取得了较好的效果,但对于变道的车道线类型识别算法较少,是否为违规变道的误识别率较高,且难以应用于嵌入式。A large number of methods have been applied to lane line detection, which can be mainly divided into traditional machine learning algorithms and deep learning. Some workers process the input image by modifying the morphological operation to obtain a good effect of lane line detection. Some workers obtain lane outlines by segmenting images by training deep learning models. Some workers use detection algorithms to directly determine the location of lane lines. Due to the lack of data sets for lane type recognition and the lack of lane type recognition algorithms, the existing methods have achieved good results in lane line position detection, but there are fewer lane line type recognition algorithms for lane changes, whether it is illegal The false recognition rate of lane change is high, and it is difficult to apply to embedded.

发明内容SUMMARY OF THE INVENTION

本发明目的在于提供一种基于两阶段的车辆违规变道识别方法,提高违规变道识别率,有效的维护道路安全。为了解决车道线类型识别数据集少的问题,通过整理公开数据集和使用现有条件录制实际场景中的图像,制作车道线类型识别数据集,用于识别算法的训练。为解决车道线类型识别算法精度低和嵌入式应用难的问题,通过分析车道线类型的特点和嵌入式移植的要求,先使用形态学操作对车道线进行检测,并判断是否存在变道,若存在则进行前方图像提取并进入车道线识别;通过性能对比和嵌入式移植速度要求,识别算法选择resnet50为基础模型,同时,根据车道线类型的特点和resnet50的特点,对resnet50进行改进,以取得更高的识别精度。The purpose of the present invention is to provide a two-stage vehicle illegal lane change recognition method, which can improve the illegal lane change recognition rate and effectively maintain road safety. In order to solve the problem of the lack of data sets for lane line type recognition, by arranging public data sets and using existing conditions to record images in actual scenes, a lane line type recognition data set is produced for the training of recognition algorithms. In order to solve the problem of low accuracy of the lane line type recognition algorithm and difficult embedded application, by analyzing the characteristics of the lane line type and the requirements of embedded transplantation, first use the morphological operation to detect the lane line, and judge whether there is a lane change. If there is, extract the front image and enter the lane line recognition; through the performance comparison and the embedded transplant speed requirements, the recognition algorithm selects resnet50 as the basic model, and at the same time, according to the characteristics of the lane line type and the characteristics of the resnet50, the resnet50 is improved to obtain Higher recognition accuracy.

本发明提出的一种基于两阶段的违规变道识别方法,具体执行包含以下实现步骤:A two-stage illegal lane change identification method proposed by the present invention, the specific execution includes the following implementation steps:

车辆和ADAS摄像机启动,实时读取摄像机图像作为输入;The vehicle and ADAS cameras are started, and the camera images are read in real time as input;

对输入图像进行处理,检测车道线;Process the input image to detect lane lines;

对比车道线基点的变化情况,判断车辆是否变道和变道方向,若未变道则重新读取图像进行识别,否则截取变道车道线图像进行下一步;Compare the changes of the base point of the lane line to determine whether the vehicle changes lanes and the direction of the lane change, if not, re-read the image for identification, otherwise, intercept the image of the lane change lane line for the next step;

将车道线类型预测模型应用于设备,对变道车道线进行识别,如识别结果为实线、实虚或双实线之一,则为违规变道,发出警报提示。Apply the lane line type prediction model to the equipment to identify the lane change lane line. If the recognition result is one of solid line, solid dotted line or double solid line, it is a violation of lane change and an alarm will be issued.

进一步的,所述对输入图像进行处理,检测车道线包括:Further, the processing of the input image to detect lane lines includes:

对输入图像进行逆透视变换,生成鸟瞰图;Perform inverse perspective transformation on the input image to generate a bird's-eye view;

对所述鸟瞰图进行灰度处理和高斯滤波,消除图像中的噪声和干扰信息得到二值图像,并通过计算每列像素点个数确定出车道线的两个基点;Perform grayscale processing and Gaussian filtering on the bird's-eye view, eliminate noise and interference information in the image to obtain a binary image, and determine the two base points of the lane line by calculating the number of pixel points in each column;

结合滑动窗口和车道线基点搜索出属于左、右车道线的像素坐标,之后进行拟合并映射到原图像。Combined with the sliding window and the base point of the lane line, the pixel coordinates belonging to the left and right lane lines are searched, and then fitted and mapped to the original image.

进一步的,所述对输入图像进行逆透视变换,生成鸟瞰图,使用如下转化矩阵:Further, performing inverse perspective transformation on the input image to generate a bird's-eye view, using the following transformation matrix:

Figure BDA0003393683310000031
Figure BDA0003393683310000031

进一步的,所述对所述鸟瞰图进行灰度处理和高斯滤波,消除图像中的噪声和干扰信息得到二值图像,并通过计算每列像素点个数确定出车道线的两个基点的计算过程为:Further, performing grayscale processing and Gaussian filtering on the bird's-eye view, eliminating noise and interference information in the image to obtain a binary image, and determining the calculation of the two base points of the lane line by calculating the number of pixel points in each column. The process is:

Gray=R×0.299+G×0.587+B×0.114Gray=R×0.299+G×0.587+B×0.114

Figure BDA0003393683310000032
Figure BDA0003393683310000032

Figure BDA0003393683310000033
Figure BDA0003393683310000033

Figure BDA0003393683310000034
Figure BDA0003393683310000034

式中,R、G和B分别为鸟瞰图图像的三个通道,Gray为处理后的灰度图像,G(x,y)为高斯滤波后的灰度值,w为输入图像的宽度,

Figure BDA0003393683310000035
为图像从左到右每列像素为255的个数,llbase为左车道线基点,lrbase为右车道线基点。In the formula, R, G and B are the three channels of the bird's-eye view image respectively, Gray is the processed grayscale image, G(x,y) is the grayscale value after Gaussian filtering, w is the width of the input image,
Figure BDA0003393683310000035
The number of pixels in each column of the image from left to right is 255, l lbase is the base point of the left lane line, and l rbase is the base point of the right lane line.

进一步的,所述判断车辆是否变道和变道方向的方法为:Further, the method for judging whether the vehicle changes lanes and the direction of the lane change are:

Figure BDA0003393683310000036
Figure BDA0003393683310000036

Figure BDA0003393683310000037
Figure BDA0003393683310000037

式中,

Figure BDA0003393683310000041
为第二帧图像的左车道线基点,
Figure BDA0003393683310000042
为第一帧图像的左车道线基点,若第一帧和第二帧基点差值大于阈值β则为右变道,小于-β则为左变道。In the formula,
Figure BDA0003393683310000041
is the base point of the left lane line of the second frame image,
Figure BDA0003393683310000042
is the base point of the left lane line of the first frame image. If the difference between the base point of the first frame and the second frame is greater than the threshold β, it is a right lane change, and if it is less than -β, it is a left lane change.

进一步的,所述车道线类型预测模型通过以下步骤建立:Further, the lane line type prediction model is established through the following steps:

定义识别车道线类型,获取用于训练违规变道识别算法的车道线类型数据集;Define the identified lane line type, and obtain the lane line type data set used to train the illegal lane change identification algorithm;

对图像通道和尺寸进行预处理,以满足模型输入;Preprocess the image channels and dimensions to satisfy the model input;

使用卷积层、池化层、新残差块、空洞卷积和全连接搭建训练模型;Build training models using convolutional layers, pooling layers, new residual blocks, atrous convolutions, and full connections;

设置损失函数和约束参数,用于计算识别率和调整模型权重,其中,损失函数使用交叉熵损失函数;Set the loss function and constraint parameters for calculating the recognition rate and adjusting the weight of the model, where the loss function uses the cross entropy loss function;

使用车道线类型识别数据集对模型进行训练,迭代多次之后得到收敛的识别模型。The model is trained using the lane line type recognition dataset, and a converged recognition model is obtained after multiple iterations.

进一步的,所述新残差块通过添加空洞卷积到残差块形成,用于解决下采样造成特征信息丢失,保留丰富的特征信息;输入图像先经过卷积、最大池化得到X,之后输入所述新残差块,得到通过经过卷积处理后的Oc(X)和经过空洞卷积处理的Ok(X),并经过跳跃连接和相加操作,保留更加丰富的图像信息,完成此模块并循环经过此模块;最后经过全连接层输出图像类别。Further, the new residual block is formed by adding hole convolution to the residual block, which is used to solve the loss of feature information caused by downsampling and retain rich feature information; the input image is first convolved and maximum pooled to obtain X, and then Input the new residual block, obtain O c (X) after convolution processing and O k (X) after hole convolution processing, and through skip connection and addition operation, retain richer image information, Complete this module and loop through this module; finally pass through the fully connected layer to output the image category.

本发明的有益效果如下:The beneficial effects of the present invention are as follows:

本发明提出的基于两阶段的车辆违规变道识别方法对车道线问题进行综合考虑,不仅考虑车道线检测和车辆变道,还将变道的车道线类型进行识别,有助于判断车辆是否为违规变道,更好的维护道路交通安全。The two-stage vehicle illegal lane change recognition method proposed by the present invention comprehensively considers the lane line problem, not only considers the lane line detection and vehicle lane change, but also identifies the lane line type of the lane change, which is helpful to determine whether the vehicle is Change lanes illegally and better maintain road traffic safety.

本发明提出的基于两阶段的车辆违规变道识别方法,对车道线类型识别时,综合考虑车道线的特点和现有算法的特点,对resnet50的残差模块进行改进,更充分的使用图像的信息,提升了算法的识别精度。The two-stage vehicle violation lane change recognition method proposed by the present invention takes into account the characteristics of the lane lines and the characteristics of the existing algorithm comprehensively when recognizing the type of lane lines, improves the residual module of resnet50, and makes full use of the image information, which improves the recognition accuracy of the algorithm.

本发明第一阶段使用形态学操作和滤波技术,第二阶段使用resnet50框架,总体上,能够快速完成车道线的检测和识别,方便进行嵌入式移植应用。The first stage of the present invention uses morphological operation and filtering technology, and the second stage uses the resnet50 framework. In general, the detection and identification of lane lines can be quickly completed, and the embedded transplantation application is convenient.

附图说明Description of drawings

图1为本发明的流程示意图;Fig. 1 is the schematic flow chart of the present invention;

图2为识别数据集含有的车道线类型示意图;Figure 2 is a schematic diagram of the lane line types contained in the identification data set;

图3为改进的resnet50残差模块示意图;Figure 3 is a schematic diagram of the improved resnet50 residual module;

图4为车道线检测阶段示意图;Figure 4 is a schematic diagram of the lane line detection stage;

图5为车辆变道车道线变化和车道线识别区域提取示意图。FIG. 5 is a schematic diagram of the lane line change of the vehicle changing lanes and the extraction of the lane line recognition area.

具体实施方式Detailed ways

下面结合附图对本发明作进一步的说明,但不以任何方式对本发明加以限制,基于本发明教导所作的任何变换或替换,均属于本发明的保护范围。The present invention is further described below in conjunction with the accompanying drawings, but the present invention is not limited in any way, and any transformation or replacement based on the teachings of the present invention belongs to the protection scope of the present invention.

步骤1:定义识别车道线类型,获取用于训练违规变道识别算法的车道线类型数据集,具体如下:Step 1: Define the identified lane line type, and obtain the lane line type data set used to train the illegal lane change identification algorithm, as follows:

制作车道线识别数据集,其中车道线识别数据集包含多个类别的车道线检测数据,每个车道线识别数据对应一种车道线类型,并且车道线数量是已知确定的,参照图2。Create a lane line recognition data set, where the lane line recognition data set contains multiple categories of lane line detection data, each lane line recognition data corresponds to a lane line type, and the number of lane lines is known and determined, refer to Figure 2.

根据车道线类型和识别算法性能,将车道线类型分为六大类,即识别类型数目为6,分别为实线(黄实线和白实线)、虚线(黄虚线和白虚线)、双实线(双白实线和双黄实线)、双黄虚线、实虚线、虚实线。以此为目标,综合网上公开的数据集和实际车载设备获取的图像,制作违规变道识别数据集。According to the type of lane lines and the performance of the recognition algorithm, the types of lane lines are divided into six categories, that is, the number of recognition types is 6, which are solid line (yellow solid line and white solid line), dashed line (yellow dashed line and white dashed line), double Solid line (double white solid line and double yellow solid line), double yellow dashed line, solid dashed line, dashed solid line. With this as the goal, a data set for illegal lane change recognition is produced by synthesizing the data set publicly available on the Internet and the images obtained by the actual in-vehicle equipment.

步骤2:建立基于识别的车道线类型预测模型,建立过程如下:Step 2: Establish a lane line type prediction model based on recognition. The establishment process is as follows:

2a:对图像通道和尺寸进行预处理,以满足模型输入;2a: Preprocess the image channels and dimensions to satisfy the model input;

2b:搭建训练模型使用的卷积层、池化层、新残差块、空洞卷积和全连接,其中,经过分析车道线类型信息和resnet50残差块的特点,添加空洞卷积到经典残差块,用于解决下采样造成特征信息丢失,保留更加丰富的特征信息;2b: Build the convolution layer, pooling layer, new residual block, hole convolution and full connection used in the training model. After analyzing the lane line type information and the characteristics of the resnet50 residual block, add hole convolution to the classic residual block. Difference block, used to solve the loss of feature information caused by downsampling, and retain more abundant feature information;

如图3所示,1×1卷积层,3×3,rate2卷积层,3×3,rate4卷积层,3×3,rate8卷积层和池化层并联后,一方面通过新残差块中经典残差块的64个1×1的卷积把256维channel降到64维,再经过64个3×3卷积,最后通过64个1×1卷积恢复到256个channel,另一方面通过新残差块中1×1卷积层和Dropout层进行空洞卷积,连接到经典残差块。参照图3,输入图像先经过卷积、最大池化得到X,之后输入本发明提出的残差块,得到通过经过卷积处理后的Oc(X)和经过空洞卷积处理的Ok(X),并经过跳跃连接和相加操作,保留更加丰富的图像信息,完成此模块并循环经过此模块;最后经过全连接层(图中未标出)输出图像类别。ResNet为残差网络Residual Network的缩写,该网络广泛用于目标分类领域以及计算机视觉任务主干经典神经网络的一部分,ResNet50是其中的经典网络,ResNet为本领域的公知常识,本发明不再赘述,本实施例中的经典残差块为ResNet50中的残差块。As shown in Figure 3, 1×1 convolutional layer, 3×3, rate2 convolutional layer, 3×3, rate4 convolutional layer, 3×3, rate8 convolutional layer and pooling layer are connected in parallel. The 64 1×1 convolutions of the classic residual block in the residual block reduce the 256-dimensional channel to 64-dimensional, and then go through 64 3×3 convolutions, and finally restore to 256 channels through 64 1×1 convolutions , on the other hand, it is connected to the classical residual block by atrous convolution through the 1×1 convolution layer and the Dropout layer in the new residual block. Referring to Figure 3, the input image is first subjected to convolution and maximum pooling to obtain X, and then the residual block proposed by the present invention is input to obtain O c (X) after convolution processing and O k (X) after hole convolution processing. X), and through skip connection and addition operations, retain richer image information, complete this module and cycle through this module; finally, go through the fully connected layer (not marked in the figure) to output the image category. ResNet is the abbreviation of Residual Network, which is widely used in the field of target classification and a part of the backbone classical neural network for computer vision tasks. The classical residual block in this embodiment is the residual block in ResNet50.

2c:设置损失函数和约束参数,用于计算识别率和调整模型权重,其中,损失函数是使用交叉熵损失。交叉熵损失函数的数学公式如下:2c: Set the loss function and constraint parameters for calculating the recognition rate and adjusting the weight of the model, where the loss function is to use the cross entropy loss. The mathematical formula of the cross-entropy loss function is as follows:

Figure BDA0003393683310000061
Figure BDA0003393683310000061

其中yi表示样本i的label,正类为1,负类为0,pi表示样本i预测为正类的概率,N为样本个数。where y i represents the label of sample i, positive class is 1, negative class is 0, p i represents the probability that sample i is predicted to be positive class, and N is the number of samples.

2d:使用制作的车道线类型识别数据集对模型进行训练,迭代多次之后得到收敛的识别模型;2d: Use the produced lane line type recognition data set to train the model, and obtain a converged recognition model after multiple iterations;

步骤3:车辆和ADAS摄像机启动,实时读取摄像机图像作为输入;Step 3: The vehicle and ADAS camera are started, and the camera image is read in real time as input;

步骤4:对输入图像进行处理,检测车道线,具体为:Step 4: Process the input image to detect lane lines, specifically:

4a:对输入图像进行逆透视变换,生成鸟瞰图,转化矩阵为:4a: Perform inverse perspective transformation on the input image to generate a bird's-eye view. The transformation matrix is:

Figure BDA0003393683310000071
Figure BDA0003393683310000071

4b:对鸟瞰图进行灰度处理和高斯滤波,消除图像中的噪声和干扰信息得到二值图像,并通过计算每列像素点个数确定出车道线的两个基点,计算过程为:4b: Perform grayscale processing and Gaussian filtering on the bird's-eye view, eliminate noise and interference information in the image to obtain a binary image, and determine the two base points of the lane line by calculating the number of pixels in each column. The calculation process is as follows:

Gray=R×0.299+G×0.587+B×0.114Gray=R×0.299+G×0.587+B×0.114

Figure BDA0003393683310000072
Figure BDA0003393683310000072

Figure BDA0003393683310000073
Figure BDA0003393683310000073

Figure BDA0003393683310000074
Figure BDA0003393683310000074

式中,R、G和B分别为鸟瞰图图像的三个通道,Gray为处理后的灰度图像,G(x,y)为高斯滤波后的灰度值,w为输入图像的宽度,

Figure BDA0003393683310000075
为图像从左到右每列像素为255的个数,llbase为左车道线基点,lrbase为右车道线基点。In the formula, R, G and B are the three channels of the bird's-eye view image respectively, Gray is the processed grayscale image, G(x,y) is the grayscale value after Gaussian filtering, w is the width of the input image,
Figure BDA0003393683310000075
The number of pixels in each column of the image from left to right is 255, l lbase is the base point of the left lane line, and l rbase is the base point of the right lane line.

4c:结合滑动窗口和车道线基点搜索出属于左、右车道线的像素坐标,之后进行拟合并映射到原图像,从左到右车道线分别标记1和2.4c: Combine the sliding window and the base point of the lane line to search for the pixel coordinates belonging to the left and right lane lines, then fit and map to the original image, and mark 1 and 2 respectively from the left to right lane lines.

步骤5:对比车道线基点的变化情况,判断车辆是否变道和变道方向,若未变道则返回步骤4,否则截取变道车道线图像进行步骤6,判断方法为:Step 5: Compare the changes of the base point of the lane line to determine whether the vehicle has changed lanes and the direction of the lane change, if not, return to step 4, otherwise, intercept the image of the lane change lane line and go to step 6. The judgment method is:

Figure BDA0003393683310000076
Figure BDA0003393683310000076

Figure BDA0003393683310000081
Figure BDA0003393683310000081

式中,

Figure BDA0003393683310000082
为第二帧图像的左车道线基点,
Figure BDA0003393683310000083
为第一帧图像的左车道线基点,若第一帧和第二帧基点差值大于阈值β则为右变道,小于-β则为左变道。In the formula,
Figure BDA0003393683310000082
is the base point of the left lane line of the second frame image,
Figure BDA0003393683310000083
is the base point of the left lane line of the first frame image. If the difference between the base point of the first frame and the second frame is greater than the threshold β, it is a right lane change, and if it is less than -β, it is a left lane change.

步骤6:将检测模型应用于设备,对变道车道线进行识别,并判断是否为违规变道。如识别结果实线、实虚、双实线则为违规变道,发出警报提示。Step 6: Apply the detection model to the equipment, identify the lane changing lane lines, and determine whether it is an illegal lane change. If the identification result is a solid line, a solid virtual line, or a double solid line, it is a violation of lane change, and an alarm prompt is issued.

实施例Example

本实施案例的具体实现方法如前所述,不在详细阐述具体的步骤,下面针对车道线类型识别的精度进行展示。本实施案例测试数据来自于实际场景,使用图片受光照、阴影和积水等多种环境影响。The specific implementation method of this embodiment is as described above, and the specific steps are not described in detail, but the accuracy of lane line type recognition is shown below. The test data of this implementation case comes from the actual scene, and the pictures used are affected by various environments such as lighting, shadows, and standing water.

为更加直观的显示本发明的优点,对本发明的第二阶段进行定量分析,选用标准为:In order to display the advantages of the present invention more intuitively, the second stage of the present invention is quantitatively analyzed, and the selection criteria are:

Figure BDA0003393683310000084
Figure BDA0003393683310000084

式中,p为识别精度,Ti为第i类识别正确的个数,Ii为第i类的总个数,k为类别数。In the formula, p is the recognition accuracy, T i is the number of correct identifications of the i-th type, I i is the total number of the i-th type, and k is the number of categories.

在同一实验环境下,经过多次实验取平均,resnet18的精度为70%,resnet50的精度为77%,本发明的精度为85%,充分说明了本发明的有效性和优越性。In the same experimental environment, after taking the average of many experiments, the accuracy of resnet18 is 70%, the accuracy of resnet50 is 77%, and the accuracy of the present invention is 85%, which fully demonstrates the effectiveness and superiority of the present invention.

本发明的有益效果如下:The beneficial effects of the present invention are as follows:

本发明提出的基于两阶段的车辆违规变道识别方法对车道线问题进行综合考虑,不仅考虑车道线检测和车辆变道,还将变道的车道线类型进行识别,有助于判断车辆是否为违规变道,更好的维护道路交通安全。The two-stage vehicle illegal lane change recognition method proposed by the present invention comprehensively considers the lane line problem, not only considers the lane line detection and vehicle lane change, but also identifies the lane line type of the lane change, which is helpful to determine whether the vehicle is Change lanes illegally and better maintain road traffic safety.

本发明提出的基于两阶段的车辆违规变道识别方法,对车道线类型识别时,综合考虑车道线的特点和现有算法的特点,对resnet50的残差模块进行改进,更充分的使用图像的信息,提升了算法的识别精度。The two-stage vehicle violation lane change recognition method proposed by the present invention takes into account the characteristics of the lane lines and the characteristics of the existing algorithm comprehensively when recognizing the type of lane lines, improves the residual module of resnet50, and makes full use of the image information, which improves the recognition accuracy of the algorithm.

本发明第一阶段使用形态学操作和滤波技术,第二阶段使用resnet50框架,总体上,能够快速完成车道线的检测和识别,方便进行嵌入式移植应用。The first stage of the present invention uses morphological operation and filtering technology, and the second stage uses the resnet50 framework. In general, the detection and identification of lane lines can be quickly completed, and the embedded transplantation application is convenient.

本文所使用的词语“优选的”意指用作实例、示例或例证。本文描述为“优选的”任意方面或设计不必被解释为比其他方面或设计更有利。相反,词语“优选的”的使用旨在以具体方式提出概念。如本申请中所使用的术语“或”旨在意指包含的“或”而非排除的“或”。即,除非另外指定或从上下文中清楚,“X使用A或B”意指自然包括排列的任意一个。即,如果X使用A;X使用B;或X使用A和B二者,则“X使用A或B”在前述任一示例中得到满足。As used herein, the word "preferred" means serving as an example, instance, or illustration. Any aspect or design described herein as "preferred" is not necessarily to be construed as advantageous over other aspects or designs. Rather, use of the word "preferred" is intended to present concepts in a specific manner. The term "or" as used in this application is intended to mean an inclusive "or" rather than an exclusive "or." That is, unless specified otherwise or clear from context, "X employs A or B" is meant to naturally include either of the permutations. That is, "X uses A or B" is satisfied in any of the preceding examples if X uses A; X uses B; or X uses both A and B.

而且,尽管已经相对于一个或实现方式示出并描述了本公开,但是本领域技术人员基于对本说明书和附图的阅读和理解将会想到等价变型和修改。本公开包括所有这样的修改和变型,并且仅由所附权利要求的范围限制。特别地关于由上述组件(例如元件等)执行的各种功能,用于描述这样的组件的术语旨在对应于执行所述组件的指定功能(例如其在功能上是等价的)的任意组件(除非另外指示),即使在结构上与执行本文所示的本公开的示范性实现方式中的功能的公开结构不等同。此外,尽管本公开的特定特征已经相对于若干实现方式中的仅一个被公开,但是这种特征可以与如可以对给定或特定应用而言是期望和有利的其他实现方式的一个或其他特征组合。而且,就术语“包括”、“具有”、“含有”或其变形被用在具体实施方式或权利要求中而言,这样的术语旨在以与术语“包含”相似的方式包括。Furthermore, although the present disclosure has been shown and described with respect to one implementation or implementation, equivalent variations and modifications will occur to those skilled in the art based on a reading and understanding of this specification and drawings. The present disclosure includes all such modifications and variations and is limited only by the scope of the appended claims. In particular with respect to the various functions performed by the above-described components (eg, elements, etc.), the terms used to describe such components are intended to correspond to any component that performs the specified function of the component (eg, which is functionally equivalent) (unless otherwise indicated), even if not structurally equivalent to the disclosed structures that perform the functions of the exemplary implementations of the present disclosure shown herein. Furthermore, although a particular feature of the present disclosure has been disclosed with respect to only one of several implementations, such feature may be combined with one or other features of other implementations as may be desirable and advantageous for a given or particular application combination. Also, to the extent that the terms "including," "having," "containing," or variations thereof, are used in the detailed description or the claims, such terms are intended to include in a manner similar to the term "comprising."

本发明实施例中的各功能单元可以集成在一个处理模块中,也可以是各个单元单独物理存在,也可以多个或多个以上单元集成在一个模块中。上述集成的模块既可以采用硬件的形式实现,也可以采用软件功能模块的形式实现。所述集成的模块如果以软件功能模块的形式实现并作为独立的产品销售或使用时,也可以存储在一个计算机可读取存储介质中。上述提到的存储介质可以是只读存储器,磁盘或光盘等。上述的各装置或系统,可以执行相应方法实施例中的存储方法。Each functional unit in this embodiment of the present invention may be integrated into one processing module, or each unit may exist physically alone, or multiple or more units may be integrated into one module. The above-mentioned integrated modules can be implemented in the form of hardware, and can also be implemented in the form of software function modules. If the integrated modules are implemented in the form of software functional modules and sold or used as independent products, they may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a magnetic disk or an optical disk, and the like. The above-mentioned apparatuses or systems may execute the storage methods in the corresponding method embodiments.

综上所述,上述实施例为本发明的一种实施方式,但本发明的实施方式并不受所述实施例的限制,其他的任何背离本发明的精神实质与原理下所做的改变、修饰、代替、组合、简化,均应为等效的置换方式,都包含在本发明的保护范围之内。To sum up, the above-mentioned embodiment is an embodiment of the present invention, but the embodiment of the present invention is not limited by the embodiment, and any other changes that deviate from the spirit and principle of the present invention, Modifications, substitutions, combinations, and simplifications should all be equivalent substitutions, which are all included within the protection scope of the present invention.

Claims (7)

1. A two-stage-based vehicle illegal lane change identification method is characterized by comprising the following steps:
starting the vehicle and the ADAS camera, and reading the camera image in real time as input;
processing an input image and detecting a lane line;
comparing the change condition of the lane line base point, judging whether the vehicle changes lane or not and the lane changing direction, if not, reading the image again for recognition, otherwise, intercepting the lane changing lane line image for the next step;
and applying the lane line type prediction model to equipment, identifying the lane change lane line, and if the identification result is one of a solid line, a virtual line or a double solid line, indicating that the lane change is illegal, and sending an alarm prompt.
2. The method for identifying a lane change violation of a vehicle according to claim 1, wherein the processing the input image and the detecting the lane line comprises:
carrying out inverse perspective transformation on the input image to generate a bird's-eye view;
carrying out gray processing and Gaussian filtering on the aerial view, eliminating noise and interference information in the image to obtain a binary image, and determining two base points of the lane line by calculating the number of pixel points in each row;
and searching pixel coordinates belonging to the left lane line and the right lane line by combining the sliding window and the lane line base point, and then fitting and mapping the pixel coordinates to the original image.
3. The two-stage-based lane change identification method for the violation of the vehicle according to claim 2, wherein the input image is subjected to inverse perspective transformation to generate an aerial view, and a transformation matrix is used as follows:
Figure FDA0003393683300000011
4. the two-stage-based vehicle illegal lane change identification method according to claim 2, wherein the calculation process of performing gray processing and gaussian filtering on the aerial view, eliminating noise and interference information in an image to obtain a binary image, and determining two base points of a lane line by calculating the number of pixels in each row is as follows:
Gray=R×0.299+G×0.587+B×0.114
Figure FDA0003393683300000021
Figure FDA0003393683300000022
Figure FDA0003393683300000023
wherein R, G and B are the three channels of the bird's eye view image,gray is the processed Gray image, G (x, y) is the gaussian filtered Gray value, w is the width of the input image,
Figure FDA0003393683300000024
the number of pixels in each column is 255 from left to right, llbaseIs a base point of the left lane line,/rbaseIs a base point of the right lane line.
5. The two-stage-based vehicle violation lane-changing identification method according to claim 2, wherein the method for judging whether the vehicle changes lane and the lane-changing direction is as follows:
Figure FDA0003393683300000025
Figure FDA0003393683300000026
in the formula (I), the compound is shown in the specification,
Figure FDA0003393683300000027
is the left lane line base point of the second frame image,
Figure FDA0003393683300000028
and if the difference value between the base points of the first frame and the second frame is larger than a threshold value beta, the lane change is performed on the right side, and if the difference value is smaller than-beta, the lane change is performed on the left side.
6. The two-stage-based vehicle violation lane-change identification method according to claim 1, wherein the lane line type prediction model is built by:
defining and identifying lane line types, and acquiring a lane line type data set for training an illegal lane change identification algorithm;
preprocessing the image channel and size to meet the model input;
building a training model by using the convolution layer, the pooling layer, the new residual block, the cavity convolution sum and the full connection;
setting a loss function and a constraint parameter for calculating the recognition rate and adjusting the model weight, wherein the loss function uses a cross entropy loss function;
and training the model by using the lane line type recognition data set, and obtaining a converged recognition model after iteration for multiple times.
7. The two-stage-based vehicle violation lane-changing identification method according to claim 6, wherein the new residual block is formed by adding a hole convolution to the residual block, so as to solve the problem of feature information loss caused by downsampling and retain rich feature information; the input image is firstly convolved and maximally pooled to obtain X, and then the X is input into the new residual block to obtain O after being convolvedc(X) and O subjected to hole convolution processingk(X) and through skip join and add operations, retaining richer image information, completing the module and cycling through the module; and finally, outputting the image category through a full connection layer.
CN202111476375.1A 2021-12-06 2021-12-06 Two-stage-based vehicle illegal lane change identification method Pending CN114299461A (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202111476375.1A CN114299461A (en) 2021-12-06 2021-12-06 Two-stage-based vehicle illegal lane change identification method
PCT/CN2022/081155 WO2023103204A1 (en) 2021-12-06 2022-03-16 Vehicle illegal lane change recognition method based on two stages

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202111476375.1A CN114299461A (en) 2021-12-06 2021-12-06 Two-stage-based vehicle illegal lane change identification method

Publications (1)

Publication Number Publication Date
CN114299461A true CN114299461A (en) 2022-04-08

Family

ID=80965150

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202111476375.1A Pending CN114299461A (en) 2021-12-06 2021-12-06 Two-stage-based vehicle illegal lane change identification method

Country Status (2)

Country Link
CN (1) CN114299461A (en)
WO (1) WO2023103204A1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114940181A (en) * 2022-05-07 2022-08-26 深圳汇辰软件有限公司 Vehicle lane change prediction method and device and electronic equipment

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160034778A1 (en) * 2013-12-17 2016-02-04 Cloud Computing Center Chinese Academy Of Sciences Method for detecting traffic violation
CN106652468A (en) * 2016-12-09 2017-05-10 武汉极目智能技术有限公司 Device and method for detection of violation of front vehicle and early warning of violation of vehicle on road
CN110136447A (en) * 2019-05-23 2019-08-16 杭州诚道科技股份有限公司 Lane change of driving a vehicle detects and method for distinguishing is known in illegal lane change
CN110647850A (en) * 2019-09-27 2020-01-03 福建农林大学 Automatic lane deviation measuring method based on inverse perspective principle
CN112070729A (en) * 2020-08-26 2020-12-11 西安交通大学 Anchor-free remote sensing image target detection method and system based on scene enhancement
CN112149595A (en) * 2020-09-29 2020-12-29 爱动超越人工智能科技(北京)有限责任公司 Method for detecting lane line and vehicle violation by using unmanned aerial vehicle
CN112819096A (en) * 2021-02-26 2021-05-18 西北大学 Method for constructing fossil image classification model based on composite convolutional neural network
CN113177443A (en) * 2021-04-13 2021-07-27 深圳市天双科技有限公司 Method for intelligently identifying road traffic violation based on image vision

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4656456B2 (en) * 2008-10-22 2011-03-23 日本電気株式会社 Lane marking device, lane marking detection method, and lane marking detection program
CN107481526A (en) * 2017-09-07 2017-12-15 公安部第三研究所 System and method for lane change detection record and illegal lane change report control
WO2019163493A1 (en) * 2018-02-20 2019-08-29 日立オートモティブシステムズ株式会社 Image capturing device
CN112949398B (en) * 2021-01-29 2023-05-05 成都安智杰科技有限公司 Lane line detection method, ranging method and corresponding device

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160034778A1 (en) * 2013-12-17 2016-02-04 Cloud Computing Center Chinese Academy Of Sciences Method for detecting traffic violation
CN106652468A (en) * 2016-12-09 2017-05-10 武汉极目智能技术有限公司 Device and method for detection of violation of front vehicle and early warning of violation of vehicle on road
CN110136447A (en) * 2019-05-23 2019-08-16 杭州诚道科技股份有限公司 Lane change of driving a vehicle detects and method for distinguishing is known in illegal lane change
CN110647850A (en) * 2019-09-27 2020-01-03 福建农林大学 Automatic lane deviation measuring method based on inverse perspective principle
CN112070729A (en) * 2020-08-26 2020-12-11 西安交通大学 Anchor-free remote sensing image target detection method and system based on scene enhancement
CN112149595A (en) * 2020-09-29 2020-12-29 爱动超越人工智能科技(北京)有限责任公司 Method for detecting lane line and vehicle violation by using unmanned aerial vehicle
CN112819096A (en) * 2021-02-26 2021-05-18 西北大学 Method for constructing fossil image classification model based on composite convolutional neural network
CN113177443A (en) * 2021-04-13 2021-07-27 深圳市天双科技有限公司 Method for intelligently identifying road traffic violation based on image vision

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
陈刚;陈斌;钱基德;: "车载移动执法中违规车辆智能检测研究", 电子科技大学学报, no. 03, 30 May 2018 (2018-05-30) *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114940181A (en) * 2022-05-07 2022-08-26 深圳汇辰软件有限公司 Vehicle lane change prediction method and device and electronic equipment

Also Published As

Publication number Publication date
WO2023103204A1 (en) 2023-06-15

Similar Documents

Publication Publication Date Title
CN111104903B (en) A depth-aware traffic scene multi-target detection method and system
CN113762209A (en) Multi-scale parallel feature fusion road sign detection method based on YOLO
CN112990065B (en) Vehicle classification detection method based on optimized YOLOv5 model
CN114049572A (en) Detection method for identifying small target
Ye et al. A two-stage real-time YOLOv2-based road marking detector with lightweight spatial transformation-invariant classification
CN105335716A (en) Improved UDN joint-feature extraction-based pedestrian detection method
JP2016062610A (en) Feature model generation method and feature model generation device
CN111008639B (en) License plate character recognition method based on attention mechanism
CN114037640B (en) Image generation method and device
CN110717493B (en) License plate recognition method containing stacked characters based on deep learning
CN113505640B (en) A small-scale pedestrian detection method based on multi-scale feature fusion
CN111209858B (en) Real-time license plate detection method based on deep convolutional neural network
CN110197152A (en) A kind of road target recognition methods for automated driving system
CN114298187B (en) An Object Detection Method Fused with Improved Attention Mechanism
CN110599521A (en) Method for generating trajectory prediction model of vulnerable road user and prediction method
CN111931683B (en) Image recognition method, device and computer readable storage medium
CN110458047A (en) A method and system for off-road environment scene recognition based on deep learning
CN112613434A (en) Road target detection method, device and storage medium
CN117789144A (en) A cross network lane line detection method and device based on weight fusion
CN112446292A (en) 2D image salient target detection method and system
CN113627477B (en) Vehicle multi-attribute identification method and system
CN114973202A (en) Traffic scene obstacle detection method based on semantic segmentation
CN114299461A (en) Two-stage-based vehicle illegal lane change identification method
CN114596548A (en) Target detection method, apparatus, computer equipment, and computer-readable storage medium
CN114550023A (en) Traffic target static information extraction device

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