CN111814623A - A visual detection method of vehicle lane departure based on deep neural network - Google Patents
A visual detection method of vehicle lane departure based on deep neural network Download PDFInfo
- Publication number
- CN111814623A CN111814623A CN202010603998.XA CN202010603998A CN111814623A CN 111814623 A CN111814623 A CN 111814623A CN 202010603998 A CN202010603998 A CN 202010603998A CN 111814623 A CN111814623 A CN 111814623A
- Authority
- CN
- China
- Prior art keywords
- lane
- neural network
- vehicle
- deep neural
- detection method
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06V—IMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
- G06V20/00—Scenes; Scene-specific elements
- G06V20/50—Context or environment of the image
- G06V20/56—Context or environment of the image exterior to a vehicle by using sensors mounted on the vehicle
- G06V20/588—Recognition of the road, e.g. of lane markings; Recognition of the vehicle driving pattern in relation to the road
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F18/00—Pattern recognition
- G06F18/20—Analysing
- G06F18/24—Classification techniques
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06N—COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
- G06N3/00—Computing arrangements based on biological models
- G06N3/02—Neural networks
- G06N3/08—Learning methods
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20081—Training; Learning
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20084—Artificial neural networks [ANN]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Data Mining & Analysis (AREA)
- Computer Vision & Pattern Recognition (AREA)
- General Engineering & Computer Science (AREA)
- Life Sciences & Earth Sciences (AREA)
- Evolutionary Computation (AREA)
- Artificial Intelligence (AREA)
- Health & Medical Sciences (AREA)
- Computational Linguistics (AREA)
- Evolutionary Biology (AREA)
- Multimedia (AREA)
- Bioinformatics & Computational Biology (AREA)
- Biomedical Technology (AREA)
- Biophysics (AREA)
- Bioinformatics & Cheminformatics (AREA)
- General Health & Medical Sciences (AREA)
- Molecular Biology (AREA)
- Computing Systems (AREA)
- Mathematical Physics (AREA)
- Software Systems (AREA)
- Image Analysis (AREA)
Abstract
一种基于深度神经网络的车辆车道偏离视觉检测方法,包括以下步骤:(1)利用车道线分割算法定位和分割出车道线的位置;(2)裁取出图中分割出的车道线,并用分类算法对车道线分类;(3)神经网络模型压缩;(4)车载仪相机标定。本发明提出了一种基于深度神经网络的车辆车道偏离检测方法,结合了基于深度神经网络的车道线语义分割识别和坐标系视角转换算法,部署在行车记录仪上,成本低、鲁棒性强。本发明采用的是轻量的ERFnet‑SAD网络,并对模型做相应剪枝量化压缩,在保证精度的同时速度快。
A visual detection method for vehicle lane departure based on deep neural network, comprising the following steps: (1) using a lane line segmentation algorithm to locate and segment the position of the lane line; (2) cutting out the segmented lane line in the figure, and classifying it with The algorithm classifies the lane lines; (3) compresses the neural network model; (4) calibrates the vehicle-mounted camera. The invention proposes a vehicle lane departure detection method based on a deep neural network, which combines a deep neural network-based lane line semantic segmentation and recognition and a coordinate system perspective conversion algorithm, and is deployed on a driving recorder, with low cost and strong robustness. . The present invention adopts a lightweight ERFnet-SAD network, and performs corresponding pruning and quantization compression on the model, which ensures high speed while ensuring accuracy.
Description
技术领域technical field
本发明涉及车辆辅助驾驶领域,尤其涉及实时车道线实时语义分割与识别,车辆偏离预警。The invention relates to the field of vehicle assisted driving, in particular to real-time lane line real-time semantic segmentation and recognition, and vehicle departure warning.
背景技术Background technique
车辆安全辅助驾驶是当前智能交通领域的重要研究方向。国内外多家公司和研究机构都在做相关技术研究,其中就包括车辆车道偏离预警技术。据交通部门统计,有50%的交通事故是由车辆偏离正常行驶轨道所造成的。当车辆在长时间高速行驶时,驾驶员容易出现注意力不集中现象,极易导致车辆偏离正常车道,从而引发交通事故。因此,开发车辆车道偏离检测方法,主动对驾驶员进行安全驾驶提醒,是避免此类事故的有效手段。Vehicle safety assisted driving is an important research direction in the current intelligent transportation field. Many companies and research institutions at home and abroad are doing research on related technologies, including vehicle lane departure warning technology. According to the statistics of the traffic department, 50% of traffic accidents are caused by vehicles deviating from the normal driving track. When the vehicle is driving at high speed for a long time, the driver is prone to inattention, which can easily cause the vehicle to deviate from the normal lane, thereby causing traffic accidents. Therefore, developing a vehicle lane departure detection method and proactively reminding drivers of safe driving is an effective means to avoid such accidents.
如何精确的检测与识别、定位车道线是车辆车道偏离预警系统的核心技术问题,现今应用比较广泛的偏离预警系统例如AutoVue系统,LDW系统,AWS系统等都是利用安装在车辆前后左右多个部位的传感器、摄像头获取车道线信息,再通过传统图像处理方法(边缘检测、霍夫线检测、直线拟合等)检测识别车道线,然而传统的车道线检测方法对光照变化、天气变化、目标遮挡、背景干扰的问题极为敏感,从而导致系统适用范围窄,检测识别精度低等问题。How to accurately detect, identify, and locate the lane line is the core technical issue of the vehicle lane departure warning system. Nowadays, widely used departure warning systems such as AutoVue system, LDW system, AWS system, etc. are installed in multiple parts of the vehicle. The sensor and camera obtain the lane line information, and then detect and identify the lane line through traditional image processing methods (edge detection, Hough line detection, straight line fitting, etc.) , The problem of background interference is extremely sensitive, which leads to problems such as narrow application range of the system and low detection and recognition accuracy.
部分研究人员尝试采用基于深度学习的方法,比如Seokju Lee提出的VPGnet、Xingang Pan提出的SCNN,利用场景分割的算法对车道线以及车道分割,然后预测出消失点的位置。其算法使用的网络模型参数量较大,检出速度慢,无法应用到真实场景。Some researchers have tried to use deep learning-based methods, such as VPGnet proposed by Seokju Lee and SCNN proposed by Xingang Pan, using scene segmentation algorithms to segment lane lines and lanes, and then predict the location of the vanishing point. The network model parameters used by the algorithm are large, and the detection speed is slow, so it cannot be applied to the real scene.
发明内容SUMMARY OF THE INVENTION
针对现有车道线偏离预警系统的不足,本发明提出了一种基于深度神经网络的车辆车道偏离检测方法,结合了基于深度神经网络的车道线语义分割识别和坐标系视角转换算法,部署在行车记录仪上,成本低、鲁棒性强。本发明采用的是轻量的ERFnet-SAD网络,并对模型做相应剪枝量化压缩,在保证精度的同时速度快。In view of the shortcomings of the existing lane line departure warning system, the present invention proposes a vehicle lane departure detection method based on a deep neural network, which combines the lane line semantic segmentation recognition and coordinate system perspective conversion algorithm based on a deep neural network, and is deployed in driving. On the recorder, the cost is low and the robustness is strong. The invention adopts the lightweight ERFnet-SAD network, and performs corresponding pruning and quantization compression on the model, so as to ensure the accuracy and at the same time the speed is fast.
本发明解决其技术问题所采用的技术方案是:The technical scheme adopted by the present invention to solve its technical problems is:
一种基于深度神经网络的车辆车道偏离视觉检测方法,包括以下步骤:A method for visual detection of vehicle lane departure based on deep neural network, comprising the following steps:
(1)利用车道线分割算法定位和分割出车道线的位置;(1) Use the lane line segmentation algorithm to locate and segment the position of the lane line;
(2)裁取出图中分割出的车道线,并用分类算法对车道线分类;(2) Cut out the lane lines segmented in the figure, and use the classification algorithm to classify the lane lines;
(3)神经网络模型压缩;(3) Neural network model compression;
(4)车载仪相机标定。(4) Calibration of vehicle-mounted camera.
进一步,所述步骤(1)中,采用自注意力蒸馏学习轻量级车道检测网络 (LearningLightweight Lane Detection CNNs by Self Attention Distillation),与现有的其他基于深度神经网络的车道线分割算法(SCNN等)相比,参数量少了20倍,速度快了10倍。车道线检测基准数据集有三个(TuSimple、Culane和BDD100K),考虑到在国内应用,Culane数据集是在北京采集的,所以本方案选择在Culane 上进行训练。Further, in the step (1), self-attention distillation is used to learn the lightweight lane detection network (Learning Lightweight Lane Detection CNNs by Self Attention Distillation), which is different from other existing deep neural network-based lane line segmentation algorithms (SCNN etc.). ), the number of parameters is 20 times less and the speed is 10 times faster. There are three benchmark datasets for lane line detection (TuSimple, Culane, and BDD100K). Considering the domestic application, the Culane dataset was collected in Beijing, so this program chooses to train on Culane.
再进一步,所述步骤(2)中,将步骤(1)中分割出的车道线从图像中截取出,重新人工标注,放入分类网络训练,将车道线分为黄实线、白实线、黄虚线、白虚线、无线5类。Still further, in the step (2), the lane lines segmented in the step (1) are cut out from the image, manually marked again, put into the classification network for training, and the lane lines are divided into yellow solid lines and white solid lines. , yellow dotted line, white dotted line, wireless category 5.
更进一步,所述步骤(3)中,精简神经网络模型,对模型进行剪枝、量化压缩。Further, in the step (3), the neural network model is simplified, and the model is pruned and quantized and compressed.
所述步骤(4)中,在车道线分割算法定位到车道线的位置之后,需要得到自身车辆所在位置,采用对车载仪相机进行标定,转换图像坐标系。In the step (4), after the lane line segmentation algorithm locates the position of the lane line, the position of the own vehicle needs to be obtained, and the on-board camera is calibrated to convert the image coordinate system.
本发明的有益效果主要表现在:成本低、鲁棒性强,在保证精度的同时速度快。The beneficial effects of the invention are mainly manifested in: low cost, strong robustness, and high speed while ensuring accuracy.
附图说明Description of drawings
图1是车道线分割算法网络架构图。Figure 1 is the network architecture diagram of the lane line segmentation algorithm.
图2是车道线分割结果概率图。Figure 2 is a probability map of lane line segmentation results.
图3是Culane数据集示例Figure 3 is an example of the Culane dataset
图4是对概率图进行霍夫线检测。Figure 4 shows Hough line detection on the probability map.
图5是裁取出每条车道线。Figure 5 is to cut out each lane line.
图6是对车道线分类。Figure 6 is the classification of lane lines.
图7是神经元精简。Figure 7 is a neuron reduction.
图8是张氏标定模板。Figure 8 is Zhang's calibration template.
图9是坐标系转换。Figure 9 is a coordinate system conversion.
图10是图像透视变换。Figure 10 is an image perspective transformation.
具体实施方式Detailed ways
下面结合附图对本发明作进一步描述。The present invention will be further described below in conjunction with the accompanying drawings.
参照图1~图10,一种基于深度神经网络的车辆车道偏离视觉检测方法,包括以下步骤:1 to 10 , a method for visual detection of vehicle lane departure based on a deep neural network includes the following steps:
(1)车道线分割网络的网络结构如图1所示,由编码器和解码器组成,编码部分包括4个Encoder E1、E2、E3、E4,每Encoder由数个卷积、池化、BN(BatchNorm) 层组成,解码部分包括两个分支,右上的分支包括两个Decoder D1、D2组成,用于得到车道线分割结果概率图,如图2所示一条车道线对应一张概率图。右下的分支P1是一个分类网络,由简单的几层卷积和一层全连接层组成,用于判断车道线分割概率图是否存在车道线。网络结构图中可见每层Encoder之间包括一个AT-GEN,是一个注意力生成器(attention generator),浅层产生的attention map作为深层的target,一方面提取到更丰富的上下文信息,另一方面可以更好的指导深层网络训练,这就是自注意力蒸馏机制。网络的总损失函数是:(1) The network structure of the lane line segmentation network is shown in Figure 1. It consists of an encoder and a decoder. The encoding part includes 4 Encoders E1, E2, E3, and E4. Each Encoder consists of several convolutions, pooling, BN (BatchNorm) layer, the decoding part includes two branches, and the upper right branch includes two Decoders D1 and D2, which are used to obtain the probability map of lane line segmentation results. As shown in Figure 2, a lane line corresponds to a probability map. The lower right branch P1 is a classification network consisting of a few simple layers of convolution and one fully connected layer, which is used to determine whether there is a lane line in the lane line segmentation probability map. It can be seen in the network structure diagram that each layer of Encoder includes an AT-GEN, which is an attention generator. The attention map generated by the shallow layer is used as the target of the deep layer. On the one hand, richer context information is extracted, and the other is Aspects can better guide deep network training, which is the self-attention distillation mechanism. The total loss function of the network is:
其中Lseg是分割损失,用的是CrossEntropy函数,LIou是计算IOU(Intersectionover Union)损失,Lexist是判断车道线是否存在的损失,Ldistill是蒸馏损失,α、β、γ是平衡因子,而用L2Loss计算两个attention map的损失。车道线分割实施过程如下:Among them, L seg is the segmentation loss, using the CrossEntropy function, L Iou is the loss of calculating the IOU (Intersectionover Union), L exist is the loss of judging whether the lane line exists, L distill is the distillation loss, α, β, γ are balance factors, and Calculate the loss of two attention maps with L 2 Loss. The implementation process of lane line segmentation is as follows:
a.数据集准备:a. Dataset preparation:
本发明采用现有车道线基准数据集Culane,包括55个小时的车载仪视频,并抽取了10万多张车载仪记录城市道路图像,数据标签示例如图3所示。我们将数据集分为80000+张图作为训练集和30000+图作为测试集。每张图像的分辨率为 1640*590。考虑到所有的图像中车道路都在图片中下方,为减少图中信息负样本,同时提高训练效率、提升检测速度,将图像上方裁一部分丢弃,最后输入为 1640*350的图像。为增加网络模型的泛化能力,对数据集做数据随机增强,包括图像放大、缩小、裁剪、对比度增强、增加噪声等。The present invention uses the existing lane line benchmark data set Culane, including 55 hours of on-board camera video, and extracts more than 100,000 on-board cameras to record urban road images. An example of the data label is shown in Figure 3. We split the dataset into 80000+ graphs as training set and 30000+ graphs as test set. The resolution of each image is 1640*590. Considering that all the vehicles and roads in the images are in the lower part of the image, in order to reduce the negative samples of information in the image, and at the same time improve the training efficiency and the detection speed, the upper part of the image is cut and discarded, and the final input is an image of 1640*350. In order to increase the generalization ability of the network model, the data set is randomly enhanced, including image enlargement, reduction, cropping, contrast enhancement, and noise addition.
b.初始化训练模型:b. Initialize the training model:
初始化网络参数,在保证图像原始横纵比的同时将输入图像调整(resize)成976*208,随机打乱。设置网络初始学习率η=0.01,初始化迭代次数epoch=300,批处理数据量(BatchSize=32)等超参数。最后,网络参数迭代时使用随机梯度下降法(SGD)作为优化器,因此还要设置动量参数与权重衰减率参数等超参数,损失因子α,β,γ设置为0.1。Initialize the network parameters, resize the input image to 976*208 while ensuring the original aspect ratio of the image, and shuffle it randomly. Set the network initial learning rate η = 0.01, initialization iteration times epoch = 300, batch data volume (BatchSize = 32) and other hyperparameters. Finally, stochastic gradient descent (SGD) is used as the optimizer for network parameter iteration, so hyperparameters such as momentum parameters and weight decay rate parameters are also set, and the loss factors α, β, and γ are set to 0.1.
c.用训练好的模型检测车道线图:c. Use the trained model to detect the lane line map:
将车载仪获取的视频数据,拆成每帧逐一检测,不同的车载仪获取的图像分辨率不同,但本发明使用自适应裁剪算法将图像统一裁成1640:350的横纵比。检测结果输出4张概率图,以及4个概率值,通过阈值筛选,假设阈值设置为0.5,则概率值大于0.5的概率图被认为是存在有车道线,再对这张概率图进行后期处理。输出概率图分辨率为976*208,高为208,最初本发明是每隔20行取一个亮点,该点是这一行像素值最大的点,共得到10个点,再用三次样条插值算法拟合出一条曲线作为车道线。但多次实验发现,当概率图中噪声点多的时候,拟合的曲线非常不理想。于是本发明先对上述输出概率图中选取的10个点进行霍夫线检测筛选,考虑到霍夫变换算法比较耗时,为提高效率我们将概率图长宽缩小4倍,调整为(976/4,208/4)再做霍夫线检测,选取霍夫线概率最大的一条霍夫线,通过计算每个点到该霍夫线的距离,距离小于2.5像素值的点留下来,其余的丢弃。结果如图4所示,将远离霍夫线的4个点滤除。然后将图还原到976*208大小,利用筛选出的点进行曲线拟合。The video data obtained by the vehicle-mounted device is divided into each frame and detected one by one, and the image resolutions obtained by different vehicle-mounted devices are different, but the present invention uses an adaptive cropping algorithm to uniformly crop the image into an aspect ratio of 1640:350. The detection result outputs 4 probability maps and 4 probability values, which are filtered by the threshold. Assuming that the threshold is set to 0.5, the probability map with a probability value greater than 0.5 is considered to have lane lines, and the probability map is post-processed. The resolution of the output probability map is 976*208 and the height is 208. Initially, the present invention takes a bright spot every 20 lines, which is the point with the largest pixel value in this line, and a total of 10 points are obtained, and then the cubic spline interpolation algorithm is used. A curve is fitted as the lane line. However, many experiments have found that when there are many noise points in the probability map, the fitted curve is very unsatisfactory. Therefore, the present invention first performs Hough line detection and screening on 10 points selected in the above output probability map. Considering that the Hough transform algorithm is time-consuming, in order to improve efficiency, we reduce the length and width of the probability map by 4 times, and adjust it to (976/ 4, 208/4) Do the Hough line detection again, select the Hough line with the highest probability of the Hough line, and calculate the distance from each point to the Hough line. The points with a distance less than 2.5 pixels are left, and the rest throw away. The result is shown in Figure 4, where 4 points far from the Hough line are filtered out. Then restore the graph to 976*208 size, and use the selected points for curve fitting.
(2)在步骤(1)中获取了每条车道线的坐标点,然后对每一条线,做分类预测,过程如下:(2) In step (1), the coordinate points of each lane line are obtained, and then each line is classified and predicted. The process is as follows:
a.截取车道线:a. Intercept the lane line:
每条线我们选取三个点,线的两端坐标和线条的中点坐标,利用opencv的最小外接矩形函数对三个点做最小外接矩形检测,此时得到的一个矩形(最小宽度是1个像素值),将矩形宽度小于30的扩宽到30,即裁剪一个宽度为30个像素的矩形。此时得到的矩形框可能是倾斜的(不是水平或者竖直的,无法裁剪),需要对图像进行旋转,本方案统一将所有矩形旋转为竖直的。并逐条线裁取,分别作分类预测。裁剪如图5所示。For each line, we select three points, the coordinates of both ends of the line and the coordinates of the midpoint of the line, and use the minimum circumscribed rectangle function of opencv to detect the minimum circumscribed rectangle of the three points. At this time, a rectangle is obtained (the minimum width is 1 pixel value), widen the rectangle whose width is less than 30 to 30, that is, crop a rectangle with a width of 30 pixels. The rectangular frame obtained at this time may be inclined (not horizontal or vertical, and cannot be cropped), and the image needs to be rotated. This solution uniformly rotates all rectangles to be vertical. And cut line by line, respectively, for classification prediction. The cropping is shown in Figure 5.
b.训练一个分类器b. Train a classifier
裁取的每张矩形图只会出现一条线,每张图只会对应一个类别,分类任务相对简单,本发明选取了Resnet18网络作为分类网络,其结构如表1所示:There is only one line in each rectangular image that is cut, and each image can only correspond to one category. The classification task is relatively simple. The present invention selects the Resnet18 network as the classification network, and its structure is shown in Table 1:
表1Table 1
Resnet18由16个卷积层、1个池化层、1个全连接层组成,损失函数使用CrossEntropy Loss。同样需要数据集准备,我们裁剪了3000多条车道线,人工标注分类,并做数据增强(图像放大、缩小、对比图增强、增加随机噪声、随机裁剪等),将数据扩充2万多张。统一将图片分辨率调整为224*224,将图片送进网络训练,初始化学习率η=0.01、迭代次数epoch=50、BatchsSize=128,选取随机梯度下降优化器。分类效果如图6所示。图中字母bx表示白色虚线,bs表示白色实线。Resnet18 consists of 16 convolutional layers, 1 pooling layer, and 1 fully connected layer, and the loss function uses CrossEntropy Loss. Data set preparation is also required. We cropped more than 3,000 lane lines, manually labeled and classified them, and performed data enhancement (image enlargement, reduction, contrast map enhancement, random noise addition, random cropping, etc.), and expanded the data by more than 20,000 sheets. The image resolution is uniformly adjusted to 224*224, the image is sent to the network for training, the initial learning rate η=0.01, the number of iterations epoch=50, BatchsSize=128, and the stochastic gradient descent optimizer is selected. The classification effect is shown in Figure 6. The letter bx in the figure represents a white dotted line, and bs represents a white solid line.
(3)模型压缩:(3) Model compression:
考虑到本发明要移植到移动设备,此类设备计算能力、存储空间、运行内存有限,而神经网络模型体积和计算量大,因此需要对模型进行压缩。模型压缩目前主要使用通道剪枝、权重量化,本发明也是结合剪枝和量化的方法对模型进行压缩。A.通道剪枝,目的是裁剪掉神经网络中不重要的神经元,如图7所示,图中最后保留的黑色神经元是真正有效神经元。每一卷积层都会对应一个BN层,我们将BN层中的缩放因子gamma作为评价上一层输出贡献大小因子,利用L1 正则化gamma参数,使网络稀疏化,最后将gamma值为0的通道安全剪掉。B. 权重量化,权重量化着眼于参数本身,没有改变模型的计算量,主要包括权重共享和权值精简。其方法是对每一层权重矩阵利用K-means聚类算法聚成若干簇,使用计算得到每一个聚类中心值,代表cluster的权重。由于同一簇的权重共享一个权重大小,因此只需存储权值簇的索引值。最后为减少精度损失,需要通过微调训练对权重进行补偿。通过模型压缩,车道线分割网络网络参数量减小了一半,运行速度快了一倍。Considering that the present invention is to be transplanted to mobile devices, such devices have limited computing power, storage space, and running memory, while the neural network model has a large volume and a large amount of computation, so the model needs to be compressed. Model compression currently mainly uses channel pruning and weight quantization, and the present invention also compresses the model by combining the methods of pruning and quantization. A. Channel pruning, the purpose is to prune out the unimportant neurons in the neural network, as shown in Figure 7, the last black neurons in the figure are the real effective neurons. Each convolutional layer corresponds to a BN layer. We use the scaling factor gamma in the BN layer as the contribution size factor for evaluating the output of the previous layer, and use the L1 regularization gamma parameter to sparse the network. Finally, the channel with the gamma value of 0 is used. Safe to cut. B. Weight quantization. Weight quantization focuses on the parameters themselves, and does not change the calculation amount of the model, mainly including weight sharing and weight reduction. The method is to use the K-means clustering algorithm to cluster the weight matrix of each layer into several clusters, using The value of each cluster center is calculated to represent the weight of the cluster. Since the weights of the same cluster share a weight size, it is only necessary to store the index value of the weight cluster. Finally, to reduce the loss of accuracy, the weights need to be compensated by fine-tuning training. Through model compression, the number of network parameters of the lane line segmentation network is reduced by half, and the running speed is doubled.
(4)车载仪相机标定,本发明采用张正友标平面定法,该方法具有操作简单、对设备要求低、精度高等优点。张氏标定的基本原理可以用下面公式表示:(4) Calibration of vehicle-mounted instrument camera, the present invention adopts Zhang Zhengyou's calibration plane calibration method, which has the advantages of simple operation, low requirements for equipment and high precision. The basic principle of Zhang's calibration can be expressed by the following formula:
在此假定模板平面和世界坐标系Z=0的平面重合,矩阵K表示摄像机内参, M=[XY 1]T为模板平面上点齐次坐标,对于模板上的点,经过投影得到图像平面对应点,该点的齐次坐标用m=[u v 1]T表示,相对于世界坐标系,摄像机坐标系的旋转矩阵用[r1 r2 t]表示,平移向量则用t表示。令Here, it is assumed that the template plane and the plane of the world coordinate system Z=0 are coincident, the matrix K represents the camera internal parameters, M=[XY 1] T is the homogeneous coordinate of the point on the template plane, for the point on the template, the corresponding image plane is obtained by projection point, the homogeneous coordinate of this point is represented by m=[uv 1] T , relative to the world coordinate system, the rotation matrix of the camera coordinate system is represented by [r 1 r 2 t], and the translation vector is represented by t. make
由旋转矩阵性质可以知道,r1 Tr2=0,Pr1P=Pr2P=1,对于每幅图像来说,内参矩阵都具有两个基本约束:h1K-TK-1h2=0,h1 TK-TK-1h1=h2 TK-TK-1h2。其有5个待定内参数,因此图像数目不小于3张时,凭借线性唯一就可以计算出K。From the properties of the rotation matrix, it can be known that r 1 T r 2 =0, Pr 1 P=Pr 2 P=1, for each image, the internal parameter matrix has two basic constraints: h 1 K -T K -1 h 2 = 0, h 1 T K - T K -1 h 1 =h 2 T K - T K -1 h 2 . It has 5 undetermined internal parameters, so when the number of images is not less than 3, K can be calculated by virtue of linear uniqueness.
张氏标定方法通常采用以下几个步骤来完成:Zhang's calibration method usually adopts the following steps to complete:
a.打印制作好的模板,并贴在一个固定的平面上;a. Print the prepared template and paste it on a fixed plane;
b.对模板分别从不同的角度拍摄,得到对应的模板图像;b. Shoot the template from different angles to obtain the corresponding template image;
c.对拍摄的图像进行特征点检测;c. Perform feature point detection on the captured image;
d.对相机的内外参数进行相应的求解;d. Solve the internal and external parameters of the camera accordingly;
e.对相机畸变系数进行求解;e. Solve the camera distortion coefficient;
f.对得到的结果进行优化求解。f. Optimize and solve the obtained results.
图8是张氏标定所用的经典平面模板图。通过相机标定后,我们可以将车载仪相机的坐标系从相机坐标系转换到世界坐标系。如图9所示。同样车道线图转换效果如图10所示。由此我们可以确定本车所在的位置。Figure 8 is a classic plane template diagram used in Zhang's calibration. After the camera is calibrated, we can convert the coordinate system of the vehicle camera from the camera coordinate system to the world coordinate system. As shown in Figure 9. The same lane line map conversion effect is shown in Figure 10. From this we can determine the location of the vehicle.
通过以上步骤,可以确定图像中车道线位置,以及本车所在位置,重点放在车辆两侧靠近的车道线,设定一个阈值,当车辆距离车道线距离小于某个阈值时发出警告信息给车辆系统。以此来更好的预警车辆偏离轨道、协助车辆驾驶。Through the above steps, the position of the lane line in the image and the position of the vehicle can be determined, focusing on the lane lines approaching on both sides of the vehicle, setting a threshold, and sending a warning message to the vehicle when the distance between the vehicle and the lane line is less than a certain threshold system. In this way, it can better warn the vehicle to deviate from the track and assist the vehicle to drive.
Claims (5)
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010603998.XA CN111814623A (en) | 2020-06-29 | 2020-06-29 | A visual detection method of vehicle lane departure based on deep neural network |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN202010603998.XA CN111814623A (en) | 2020-06-29 | 2020-06-29 | A visual detection method of vehicle lane departure based on deep neural network |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| CN111814623A true CN111814623A (en) | 2020-10-23 |
Family
ID=72855348
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| CN202010603998.XA Pending CN111814623A (en) | 2020-06-29 | 2020-06-29 | A visual detection method of vehicle lane departure based on deep neural network |
Country Status (1)
| Country | Link |
|---|---|
| CN (1) | CN111814623A (en) |
Cited By (26)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN113158768A (en) * | 2021-03-03 | 2021-07-23 | 中山大学 | Intelligent vehicle lane line detection method based on ResNeSt and self-attention distillation |
| CN113221643A (en) * | 2021-04-06 | 2021-08-06 | 中国科学院合肥物质科学研究院 | Lane line classification method and system adopting cascade network |
| CN113781401A (en) * | 2021-08-17 | 2021-12-10 | 浙江工业大学 | A method and system for early warning of unmanned vehicle vehicle deviation |
| US11403069B2 (en) | 2017-07-24 | 2022-08-02 | Tesla, Inc. | Accelerated mathematical engine |
| US11409692B2 (en) | 2017-07-24 | 2022-08-09 | Tesla, Inc. | Vector computational unit |
| US11487288B2 (en) | 2017-03-23 | 2022-11-01 | Tesla, Inc. | Data synthesis for autonomous control systems |
| US11537811B2 (en) | 2018-12-04 | 2022-12-27 | Tesla, Inc. | Enhanced object detection for autonomous vehicles based on field view |
| US11561791B2 (en) | 2018-02-01 | 2023-01-24 | Tesla, Inc. | Vector computational unit receiving data elements in parallel from a last row of a computational array |
| US11562231B2 (en) | 2018-09-03 | 2023-01-24 | Tesla, Inc. | Neural networks for embedded devices |
| US11567514B2 (en) | 2019-02-11 | 2023-01-31 | Tesla, Inc. | Autonomous and user controlled vehicle summon to a target |
| US11610117B2 (en) | 2018-12-27 | 2023-03-21 | Tesla, Inc. | System and method for adapting a neural network model on a hardware platform |
| US11636333B2 (en) | 2018-07-26 | 2023-04-25 | Tesla, Inc. | Optimizing neural network structures for embedded systems |
| US11665108B2 (en) | 2018-10-25 | 2023-05-30 | Tesla, Inc. | QoS manager for system on a chip communications |
| US11681649B2 (en) | 2017-07-24 | 2023-06-20 | Tesla, Inc. | Computational array microprocessor system using non-consecutive data formatting |
| US11734562B2 (en) | 2018-06-20 | 2023-08-22 | Tesla, Inc. | Data pipeline and deep learning system for autonomous driving |
| US11748620B2 (en) | 2019-02-01 | 2023-09-05 | Tesla, Inc. | Generating ground truth for machine learning from time series elements |
| US11790664B2 (en) | 2019-02-19 | 2023-10-17 | Tesla, Inc. | Estimating object properties using visual image data |
| US11816585B2 (en) | 2018-12-03 | 2023-11-14 | Tesla, Inc. | Machine learning models operating at different frequencies for autonomous vehicles |
| CN117152707A (en) * | 2023-10-31 | 2023-12-01 | 武汉未来幻影科技有限公司 | Calculation method and device for offset distance of vehicle and processing equipment |
| US11841434B2 (en) | 2018-07-20 | 2023-12-12 | Tesla, Inc. | Annotation cross-labeling for autonomous control systems |
| US11893774B2 (en) | 2018-10-11 | 2024-02-06 | Tesla, Inc. | Systems and methods for training machine models with augmented data |
| US11893393B2 (en) | 2017-07-24 | 2024-02-06 | Tesla, Inc. | Computational array microprocessor system with hardware arbiter managing memory requests |
| US12014553B2 (en) | 2019-02-01 | 2024-06-18 | Tesla, Inc. | Predicting three-dimensional features for autonomous driving |
| US12307350B2 (en) | 2018-01-04 | 2025-05-20 | Tesla, Inc. | Systems and methods for hardware-based pooling |
| US12462575B2 (en) | 2021-08-19 | 2025-11-04 | Tesla, Inc. | Vision-based machine learning model for autonomous driving with adjustable virtual camera |
| US12522243B2 (en) | 2021-08-19 | 2026-01-13 | Tesla, Inc. | Vision-based system training with simulated content |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108537197A (en) * | 2018-04-18 | 2018-09-14 | 吉林大学 | A kind of lane detection prior-warning device and method for early warning based on deep learning |
| CN108805891A (en) * | 2018-05-23 | 2018-11-13 | 北京工业大学 | A kind of lane detection and vehicle positioning method based on carinate figure Yu improvement sequence RANSAC |
| CN110781768A (en) * | 2019-09-30 | 2020-02-11 | 奇点汽车研发中心有限公司 | Target object detection method and device, electronic device and medium |
-
2020
- 2020-06-29 CN CN202010603998.XA patent/CN111814623A/en active Pending
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN108537197A (en) * | 2018-04-18 | 2018-09-14 | 吉林大学 | A kind of lane detection prior-warning device and method for early warning based on deep learning |
| CN108805891A (en) * | 2018-05-23 | 2018-11-13 | 北京工业大学 | A kind of lane detection and vehicle positioning method based on carinate figure Yu improvement sequence RANSAC |
| CN110781768A (en) * | 2019-09-30 | 2020-02-11 | 奇点汽车研发中心有限公司 | Target object detection method and device, electronic device and medium |
Non-Patent Citations (1)
| Title |
|---|
| YUENAN HOU等: "Learning Lightweight Lane Detection CNNs by Self Attention Distillation", 《IEEE XPLORE》 * |
Cited By (44)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US11487288B2 (en) | 2017-03-23 | 2022-11-01 | Tesla, Inc. | Data synthesis for autonomous control systems |
| US12020476B2 (en) | 2017-03-23 | 2024-06-25 | Tesla, Inc. | Data synthesis for autonomous control systems |
| US11403069B2 (en) | 2017-07-24 | 2022-08-02 | Tesla, Inc. | Accelerated mathematical engine |
| US11409692B2 (en) | 2017-07-24 | 2022-08-09 | Tesla, Inc. | Vector computational unit |
| US11893393B2 (en) | 2017-07-24 | 2024-02-06 | Tesla, Inc. | Computational array microprocessor system with hardware arbiter managing memory requests |
| US12536131B2 (en) | 2017-07-24 | 2026-01-27 | Tesla, Inc. | Vector computational unit |
| US12216610B2 (en) | 2017-07-24 | 2025-02-04 | Tesla, Inc. | Computational array microprocessor system using non-consecutive data formatting |
| US12086097B2 (en) | 2017-07-24 | 2024-09-10 | Tesla, Inc. | Vector computational unit |
| US11681649B2 (en) | 2017-07-24 | 2023-06-20 | Tesla, Inc. | Computational array microprocessor system using non-consecutive data formatting |
| US12307350B2 (en) | 2018-01-04 | 2025-05-20 | Tesla, Inc. | Systems and methods for hardware-based pooling |
| US12455739B2 (en) | 2018-02-01 | 2025-10-28 | Tesla, Inc. | Instruction set architecture for a vector computational unit |
| US11561791B2 (en) | 2018-02-01 | 2023-01-24 | Tesla, Inc. | Vector computational unit receiving data elements in parallel from a last row of a computational array |
| US11797304B2 (en) | 2018-02-01 | 2023-10-24 | Tesla, Inc. | Instruction set architecture for a vector computational unit |
| US11734562B2 (en) | 2018-06-20 | 2023-08-22 | Tesla, Inc. | Data pipeline and deep learning system for autonomous driving |
| US11841434B2 (en) | 2018-07-20 | 2023-12-12 | Tesla, Inc. | Annotation cross-labeling for autonomous control systems |
| US11636333B2 (en) | 2018-07-26 | 2023-04-25 | Tesla, Inc. | Optimizing neural network structures for embedded systems |
| US12079723B2 (en) | 2018-07-26 | 2024-09-03 | Tesla, Inc. | Optimizing neural network structures for embedded systems |
| US11983630B2 (en) | 2018-09-03 | 2024-05-14 | Tesla, Inc. | Neural networks for embedded devices |
| US12346816B2 (en) | 2018-09-03 | 2025-07-01 | Tesla, Inc. | Neural networks for embedded devices |
| US11562231B2 (en) | 2018-09-03 | 2023-01-24 | Tesla, Inc. | Neural networks for embedded devices |
| US11893774B2 (en) | 2018-10-11 | 2024-02-06 | Tesla, Inc. | Systems and methods for training machine models with augmented data |
| US11665108B2 (en) | 2018-10-25 | 2023-05-30 | Tesla, Inc. | QoS manager for system on a chip communications |
| US11816585B2 (en) | 2018-12-03 | 2023-11-14 | Tesla, Inc. | Machine learning models operating at different frequencies for autonomous vehicles |
| US12367405B2 (en) | 2018-12-03 | 2025-07-22 | Tesla, Inc. | Machine learning models operating at different frequencies for autonomous vehicles |
| US12198396B2 (en) | 2018-12-04 | 2025-01-14 | Tesla, Inc. | Enhanced object detection for autonomous vehicles based on field view |
| US11908171B2 (en) | 2018-12-04 | 2024-02-20 | Tesla, Inc. | Enhanced object detection for autonomous vehicles based on field view |
| US11537811B2 (en) | 2018-12-04 | 2022-12-27 | Tesla, Inc. | Enhanced object detection for autonomous vehicles based on field view |
| US12136030B2 (en) | 2018-12-27 | 2024-11-05 | Tesla, Inc. | System and method for adapting a neural network model on a hardware platform |
| US11610117B2 (en) | 2018-12-27 | 2023-03-21 | Tesla, Inc. | System and method for adapting a neural network model on a hardware platform |
| US12014553B2 (en) | 2019-02-01 | 2024-06-18 | Tesla, Inc. | Predicting three-dimensional features for autonomous driving |
| US11748620B2 (en) | 2019-02-01 | 2023-09-05 | Tesla, Inc. | Generating ground truth for machine learning from time series elements |
| US12223428B2 (en) | 2019-02-01 | 2025-02-11 | Tesla, Inc. | Generating ground truth for machine learning from time series elements |
| US12164310B2 (en) | 2019-02-11 | 2024-12-10 | Tesla, Inc. | Autonomous and user controlled vehicle summon to a target |
| US11567514B2 (en) | 2019-02-11 | 2023-01-31 | Tesla, Inc. | Autonomous and user controlled vehicle summon to a target |
| US12236689B2 (en) | 2019-02-19 | 2025-02-25 | Tesla, Inc. | Estimating object properties using visual image data |
| US11790664B2 (en) | 2019-02-19 | 2023-10-17 | Tesla, Inc. | Estimating object properties using visual image data |
| CN113158768A (en) * | 2021-03-03 | 2021-07-23 | 中山大学 | Intelligent vehicle lane line detection method based on ResNeSt and self-attention distillation |
| CN113158768B (en) * | 2021-03-03 | 2023-02-24 | 中山大学 | Intelligent vehicle lane line detection method based on ResNeSt and self-attention distillation |
| CN113221643A (en) * | 2021-04-06 | 2021-08-06 | 中国科学院合肥物质科学研究院 | Lane line classification method and system adopting cascade network |
| CN113781401A (en) * | 2021-08-17 | 2021-12-10 | 浙江工业大学 | A method and system for early warning of unmanned vehicle vehicle deviation |
| US12462575B2 (en) | 2021-08-19 | 2025-11-04 | Tesla, Inc. | Vision-based machine learning model for autonomous driving with adjustable virtual camera |
| US12522243B2 (en) | 2021-08-19 | 2026-01-13 | Tesla, Inc. | Vision-based system training with simulated content |
| CN117152707B (en) * | 2023-10-31 | 2024-03-22 | 武汉未来幻影科技有限公司 | Calculation method and device for offset distance of vehicle and processing equipment |
| CN117152707A (en) * | 2023-10-31 | 2023-12-01 | 武汉未来幻影科技有限公司 | Calculation method and device for offset distance of vehicle and processing equipment |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN111814623A (en) | A visual detection method of vehicle lane departure based on deep neural network | |
| CN112990065B (en) | Vehicle classification detection method based on optimized YOLOv5 model | |
| CN107563372B (en) | License plate positioning method based on deep learning SSD frame | |
| Ohgushi et al. | Road obstacle detection method based on an autoencoder with semantic segmentation | |
| US11256986B2 (en) | Systems and methods for training a neural keypoint detection network | |
| CN111368687A (en) | Sidewalk vehicle illegal parking detection method based on target detection and semantic segmentation | |
| CN110232316A (en) | A kind of vehicle detection and recognition method based on improved DSOD model | |
| CN112766056B (en) | Method and device for detecting lane lines in low-light environment based on deep neural network | |
| CN106326858A (en) | Road traffic sign automatic identification and management system based on deep learning | |
| CN112257793A (en) | Remote traffic sign detection method based on improved YOLO v3 algorithm | |
| CN114882351A (en) | Multi-target detection and tracking method based on improved YOLO-V5s | |
| CN103324920A (en) | Method for automatically identifying vehicle type based on vehicle frontal image and template matching | |
| CN116630702A (en) | A Prediction Method of Road Adhesion Coefficient Based on Semantic Segmentation Network | |
| CN113033352B (en) | Real-time mobile traffic violation detection method based on combination of improved target semantic segmentation and target detection model | |
| CN116524189A (en) | High-resolution remote sensing image semantic segmentation method based on coding and decoding indexing edge characterization | |
| CN117197606B (en) | Automatic driving-oriented sparse convolution feature distillation point cloud target detection method | |
| CN113343817A (en) | Unmanned vehicle path detection method and device for target area and medium | |
| CN115294545A (en) | Complex road surface lane identification method and chip based on deep learning | |
| CN111582339A (en) | Vehicle detection and identification method based on deep learning | |
| CN118038134A (en) | DenseNet pavement state image recognition method based on mixed attention mechanism and transducer model | |
| CN114882205B (en) | Attention mechanism-based target detection method | |
| CN115311638A (en) | Line anchor classification lane line detection method based on time sequence | |
| CN116434056B (en) | A target recognition method, system and electronic device based on radar-visual fusion | |
| Zhang et al. | Chinese license plate recognition using machine and deep learning models | |
| CN114758319B (en) | A prediction method for near-field vehicle jamming behavior based on image input |
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 | ||
| RJ01 | Rejection of invention patent application after publication | ||
| RJ01 | Rejection of invention patent application after publication |
Application publication date: 20201023 |