CN111598069B - A deep learning-based method for analyzing the lane-changing area of expressway vehicles - Google Patents

A deep learning-based method for analyzing the lane-changing area of expressway vehicles Download PDF

Info

Publication number
CN111598069B
CN111598069B CN202010729116.4A CN202010729116A CN111598069B CN 111598069 B CN111598069 B CN 111598069B CN 202010729116 A CN202010729116 A CN 202010729116A CN 111598069 B CN111598069 B CN 111598069B
Authority
CN
China
Prior art keywords
lane
vehicle
area
lane change
road
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
CN202010729116.4A
Other languages
Chinese (zh)
Other versions
CN111598069A (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.)
Zhejiang Lab
Original Assignee
Zhejiang Lab
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 Zhejiang Lab filed Critical Zhejiang Lab
Priority to CN202010729116.4A priority Critical patent/CN111598069B/en
Publication of CN111598069A publication Critical patent/CN111598069A/en
Application granted granted Critical
Publication of CN111598069B publication Critical patent/CN111598069B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V20/00Scenes; Scene-specific elements
    • G06V20/40Scenes; Scene-specific elements in video content
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/23Clustering techniques
    • 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
    • G06N3/045Combinations of networks
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V10/00Arrangements for image or video recognition or understanding
    • G06V10/40Extraction of image or video features
    • G06V10/44Local feature extraction by analysis of parts of the pattern, e.g. by detecting edges, contours, loops, corners, strokes or intersections; Connectivity analysis, e.g. of connected components
    • GPHYSICS
    • G08SIGNALLING
    • G08GTRAFFIC CONTROL SYSTEMS
    • G08G1/00Traffic control systems for road vehicles
    • G08G1/01Detecting movement of traffic to be counted or controlled
    • G08G1/017Detecting movement of traffic to be counted or controlled identifying vehicles
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06VIMAGE OR VIDEO RECOGNITION OR UNDERSTANDING
    • G06V2201/00Indexing scheme relating to image or video recognition or understanding
    • G06V2201/08Detecting or categorising vehicles

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)
  • Artificial Intelligence (AREA)
  • Multimedia (AREA)
  • Evolutionary Computation (AREA)
  • Life Sciences & Earth Sciences (AREA)
  • General Engineering & Computer Science (AREA)
  • Biomedical Technology (AREA)
  • Molecular Biology (AREA)
  • Health & Medical Sciences (AREA)
  • Bioinformatics & Computational Biology (AREA)
  • Biophysics (AREA)
  • Computational Linguistics (AREA)
  • General Health & Medical Sciences (AREA)
  • Bioinformatics & Cheminformatics (AREA)
  • Computing Systems (AREA)
  • Mathematical Physics (AREA)
  • Software Systems (AREA)
  • Evolutionary Biology (AREA)
  • Image Analysis (AREA)
  • Traffic Control Systems (AREA)

Abstract

The invention discloses a highway vehicle lane change area analysis method based on deep learning, which comprises the steps of firstly carrying out structural modeling on lanes and lane lines of a road; simultaneously detecting the outer frame of the vehicle in the high-definition monitoring video of the highway; tracking the vehicle track in the video according to the detection result of the vehicle in each frame of image; combining the vehicle track with the road structured data, identifying the vehicle lane change according to the lane area where the vehicle passes, and detecting the vehicle lane change position according to the intersection position of the vehicle frame and the lane line; and finally, carrying out clustering analysis on the lane changing positions of the vehicles passing through in different time periods to obtain the lane changing hot spot areas of the vehicles on the expressway in different time periods. The method has the advantages of simple steps and accurate result, detects the lane changing behavior of the vehicle and analyzes the lane changing area by using the camera data in the expressway, and provides powerful support for the fine traffic management and lane design of the expressway.

Description

一种基于深度学习的高速公路车辆换道区域分析方法A deep learning-based method for analyzing the lane-changing area of expressway vehicles

技术领域technical field

本发明涉及驾驶行为检测领域,特别是涉及一种基于深度学习的高速公路车辆换道区域分析方法。The invention relates to the field of driving behavior detection, in particular to a deep learning-based lane-changing area analysis method for expressway vehicles.

背景技术Background technique

随着经济社会的快速发展,人们对交通出行的需求不断增加,尤其是长距离出行的需求。据统计2019年末全国民用汽车保有量26150万辆,比上年末增加2122万辆。交通需求的增长与现有道路状况之间的矛盾日益突出。高速公路作为城市之间的交通大动脉,其交通压力也日益增大。合理的交通管理可有效减少交通拥堵情况的发生。为提升交通管理水平,需对高速公路上车辆的驾驶行为进行准确的分析。With the rapid economic and social development, people's demand for transportation is increasing, especially for long-distance travel. According to statistics, at the end of 2019, the number of civilian vehicles in the country was 261.5 million, an increase of 21.22 million over the end of the previous year. The contradiction between the growth of traffic demand and the existing road conditions is becoming more and more prominent. As the main traffic artery between cities, the traffic pressure is also increasing day by day. Reasonable traffic management can effectively reduce the occurrence of traffic congestion. In order to improve the level of traffic management, it is necessary to accurately analyze the driving behavior of vehicles on the highway.

高速公路车辆的车道变换是最为常见的驾驶行为,车道变换是指道路上车辆因需要而变换车道的行驶行为。高速公路上合理的换道能够提升整个交通流的速度,缓解交通压力,提高道路通行能力,但是过于频繁的换道与不合理的换道将会增加交通流的不稳定性,增大交通的危险性。近年来车辆换道逐渐成为造成交通事故的重要原因,其安全问题不得不引起人们的重视。因此,为了保障行车安全,充分合理地利用高速公路的道路资源,需要对高速公路上车辆换道行为进行检测与分析。Lane changing of highway vehicles is the most common driving behavior. Lane changing refers to the driving behavior of vehicles on the road changing lanes due to needs. Reasonable lane changing on the expressway can increase the speed of the entire traffic flow, relieve traffic pressure and improve road capacity, but too frequent lane changing and unreasonable lane changing will increase the instability of traffic flow and increase traffic flow. danger. In recent years, vehicle lane changing has gradually become an important cause of traffic accidents, and its safety issues have to attract people's attention. Therefore, in order to ensure the driving safety and make full and reasonable use of the road resources of the expressway, it is necessary to detect and analyze the lane-changing behavior of vehicles on the expressway.

对现有研究进行分析,目前高速公路所采集的数据主要有交通流量、车辆速度、车道占有率等,这些数据均为交通的宏观状态数据,而在交通精细管理中需要更为微观的交通数据。其中车辆换道信息是十分重要的微观交通数据。在传统车辆换道检测中,通常利用车载GPS定位数据获取车辆换道参数。此类方法受限于GPS的定位精度,同时并非所有车辆均搭载GPS,这些都使得高速公路车辆换道行为检测的不准确和不全面,为此本发明提供一种基于深度学习的高速公路车辆换道区域分析方法。According to the analysis of the existing research, the data collected by the expressway mainly include traffic flow, vehicle speed, lane occupancy rate, etc. These data are the macro-state data of traffic, and more micro-traffic data is needed in the fine traffic management. . Among them, vehicle lane-changing information is very important micro-traffic data. In traditional vehicle lane change detection, vehicle lane change parameters are usually obtained by using on-board GPS positioning data. Such methods are limited by the positioning accuracy of GPS, and not all vehicles are equipped with GPS, which makes the detection of lane-changing behavior of expressway vehicles inaccurate and incomplete. Therefore, the present invention provides a deep learning-based expressway vehicle. Lane change area analysis method.

发明内容SUMMARY OF THE INVENTION

为了解决以上问题,本发明提供一种基于深度学习的高速公路车辆换道区域分析方法,本发明的目的是采用高速公路上广泛布设的摄像头,基于深度学习方法,对车辆换道行为进行检测,同时基于检测结果进行分析,为精细化的交通管理和车道设计提供支撑。为达此目的,本发明提供了一种基于深度学习的高速公路车辆换道区域分析方法,包括以下步骤:In order to solve the above problems, the present invention provides a method for analyzing the lane-changing area of expressway vehicles based on deep learning. At the same time, it analyzes based on the detection results to provide support for refined traffic management and lane design. To achieve this purpose, the present invention provides a deep learning-based method for analyzing the lane-changing area of expressway vehicles, which includes the following steps:

(1)根据高速公路的监控视频,提取道路背景,根据道路背景中的车道和车道线划分车道区域,得到道路结构化数据;(1) According to the surveillance video of the expressway, extract the road background, divide the lane area according to the lanes and lane lines in the road background, and obtain the road structured data;

(2)采用基于深度学习的目标检测模型对监控视频的每帧图像中车辆进行检测,获取车辆的外边框;(2) Use the target detection model based on deep learning to detect the vehicle in each frame of the surveillance video, and obtain the outer frame of the vehicle;

(3)根据每帧图像中车辆的检测结果,对监控视频中车辆轨迹进行跟踪;(3) Track the vehicle trajectory in the surveillance video according to the detection result of the vehicle in each frame of image;

(4)将车辆轨迹与道路结构化数据相结合,根据车辆所经过的车道区域对车辆换道进行识别,根据车辆的外边框与车道线相交位置对车辆换道位置进行检测;(4) Combine the vehicle trajectory with the road structured data, identify the vehicle lane change according to the lane area the vehicle passes through, and detect the vehicle lane change position according to the intersection of the outer frame of the vehicle and the lane line;

(5)对不同时间段内所经过车辆的换道位置进行聚类分析,得出不同时间段的高速公路车辆换道热点区域。(5) Cluster analysis is performed on the lane-changing positions of vehicles passing by in different time periods, and the lane-changing hot spots of expressway vehicles in different time periods are obtained.

作为本发明的进一步改进,所述步骤(1)包括如下子步骤:As a further improvement of the present invention, the step (1) includes the following sub-steps:

(1.1)对于高速公路上的监控视频,选取连续T帧视频画面,将采集到的图片叠加求和,而后求取平均值作为道路背景,其计算公式为:(1.1) For the surveillance video on the highway, select consecutive T frames of video images, superimpose and sum the collected images, and then obtain the average value as the road background. The calculation formula is:

Figure 64938DEST_PATH_IMAGE001
Figure 64938DEST_PATH_IMAGE001

式中,P为道路背景画面,I i 为第i帧画面,T为连续帧数;In the formula, P is the road background picture, I i is the ith frame picture, and T is the number of consecutive frames;

(1.2)加载道路背景,在道路背景之上绘制道路车道线和车道区域,同时计算所有车道区域的最小外接矩形作为车道区域,并将所有结果数据以json格式保存,得到道路结构化数据;(1.2) Load the road background, draw road lane lines and lane areas on the road background, calculate the minimum circumscribed rectangle of all lane areas as the lane area, and save all the result data in json format to obtain road structured data;

作为本发明的进一步改进,所述步骤(2)包括如下步骤:As a further improvement of the present invention, the step (2) includes the following steps:

所述步骤(2)包括如下子步骤:The step (2) includes the following substeps:

(2.1)根据步骤(1)所得车道区域,从视频帧图像中裁剪出车道区域图像;(2.1) According to the lane area obtained in step (1), crop the lane area image from the video frame image;

(2.2)将车道区域图像输入训练好的基于深度学习的目标检测模型,计算后输出画面中的车辆的外边框,其中,目标检测模型为EfficientDet,使用人工标注好的车辆检测框数据进行训练。(2.2) Input the image of the lane area into the trained target detection model based on deep learning, and output the outer frame of the vehicle in the picture after calculation. The target detection model is EfficientDet, which uses the manually marked vehicle detection frame data for training.

作为本发明的进一步改进,所述步骤(3)中,采用SORT方法对监控视频中车辆轨迹进行跟踪。As a further improvement of the present invention, in the step (3), the SORT method is used to track the vehicle trajectory in the surveillance video.

作为本发明的进一步改进,所述步骤(4)包括如下子步骤:As a further improvement of the present invention, the step (4) includes the following substeps:

(4.1)新建变量D={key,value},用以记录车辆所处的车道编号,其中,key为车辆编号,value为车道编号;(4.1) Create a new variable D={key, value} to record the lane number where the vehicle is located, where the key is the vehicle number and the value is the lane number;

(4.2)对每帧画面的轨迹结果,遍历所有车辆,计算车辆所处的车道编号,进而根据车道编号和车辆编号进行分析:(4.2) For the trajectory results of each frame, traverse all vehicles, calculate the lane number where the vehicle is located, and then analyze according to the lane number and vehicle number:

如果车道编号不存在则直接分析下一辆车;If the lane number does not exist, analyze the next vehicle directly;

如果车辆编号未在变量D的key中则将该车辆编号和目前车所处的车道编号添加到变量D中;If the vehicle number is not in the key of variable D, add the vehicle number and the lane number of the current vehicle to variable D;

如果车辆编号已在变量D的key中则进一步判断车道编号是否发生改变:如果车道编号未改变则直接分析下一辆车,如果车道编号发生改变则认为发生换道;If the vehicle number is already in the key of variable D, it is further judged whether the lane number has changed: if the lane number has not changed, the next vehicle is directly analyzed; if the lane number has changed, it is considered that a lane change has occurred;

(4.3)对于发生换道的车辆,运用车辆外边框下边缘的边与车道线进行相交计算,得到车道线上的交点坐标,将该点作为换道位置点。(4.3) For the vehicle that has changed lanes, use the edge of the lower edge of the outer frame of the vehicle and the lane line to calculate the intersection to obtain the coordinates of the intersection point on the lane line, and use this point as the lane change position point.

作为本发明的进一步改进,所述步骤(4.2)中,计算车辆所处的车道编号,具体方法为:As a further improvement of the present invention, in the step (4.2), the lane number where the vehicle is located is calculated, and the specific method is:

使用车辆的外边框的下边缘三等分点A和B作为车辆所处车道的判断点,采用射线法判断A点和B点是否处于车道区域的多边形内;如果A和B两点均在同一车道区域内则认为该车在此车道内。Use the trisecting points A and B of the lower edge of the outer frame of the vehicle as the judgment points of the lane where the vehicle is located, and use the ray method to judge whether points A and B are within the polygon of the lane area; if both points A and B are in the same lane In the lane area, the car is considered to be in this lane.

作为本发明的进一步改进,所述步骤(5)包括如下子步骤:As a further improvement of the present invention, the step (5) includes the following substeps:

(5.1)将每条车道线划分为N等份,选取时间段t1-t2之间的车辆换道位置数据,统计每条车道等分段内的换道次数;(5.1) Divide each lane line into N equal parts, select the vehicle lane changing position data between the time period t1-t2, and count the number of lane changes in each lane and other segments;

(5.2)对每条车道等分段内的换道次数使用高斯滤波进行平滑;(5.2) Use Gaussian filtering to smooth the number of lane changes in each lane and other segments;

(5.3)以时间、换道位置、换道次数三个元素构建换道区域的三维分析空间,对换道区域进行可视化分析。(5.3) The three-dimensional analysis space of the lane-changing area is constructed with three elements of time, lane-changing position, and lane-changing times, and the lane-changing area is visually analyzed.

本发明的一种基于深度学习的高速公路车辆换道区域分析方法与现有技术相比,具有以下技术效果:Compared with the prior art, a deep learning-based expressway vehicle lane changing area analysis method of the present invention has the following technical effects:

(1)本发明将深度学习领域高效准确的目标检测方法用于高速公路车辆的检测,同时采用轻量化的前端交互手段进行道路车道线与车道区域建模,两者结合大大提升了车辆换道检测的便捷性和准确率,减少了GPS等其他传感器的使用,属于深度学习算法在智能交通领域的跨学科应用。(1) The present invention uses an efficient and accurate target detection method in the field of deep learning for the detection of highway vehicles, and uses a lightweight front-end interactive method to model road lane lines and lane areas. The combination of the two greatly improves vehicle lane changing. The convenience and accuracy of detection reduces the use of other sensors such as GPS, and belongs to the interdisciplinary application of deep learning algorithms in the field of intelligent transportation.

(2)本发明通过对换道位置进行聚类分析,可获得不同时间段的高速公路车辆换道热点区域,解决传统方法中车辆换道难以分析的问题,为精细化的交通管理提供数据支撑。(2) The present invention can obtain the hotspot areas of the expressway vehicle lane changing in different time periods by performing cluster analysis on the lane changing position, solve the problem that the vehicle lane changing is difficult to analyze in the traditional method, and provide data support for refined traffic management .

附图说明Description of drawings

图1为本发明方法的总体流程图;Fig. 1 is the overall flow chart of the method of the present invention;

图2为视频中连续9帧的画面展示图;Fig. 2 is the picture display diagram of 9 consecutive frames in the video;

图3为道路背景图;Figure 3 is a road background map;

图4为车道线和车道区域绘制结果图;Figure 4 shows the result of drawing lane lines and lane areas;

图5为车辆检测结果图。FIG. 5 is a graph of vehicle detection results.

具体实施方式Detailed ways

下面结合附图与具体实施方式对本发明做进一步详细描述:The present invention will be described in further detail below in conjunction with the accompanying drawings and specific embodiments:

本发明提供了一种基于深度学习的高速公路车辆换道区域分析方法,本发明的目的是采用高速公路上广泛布设的摄像头,基于深度学习方法,对车辆换道行为进行检测,同时基于检测结果进行分析,为精细化的交通管理和车道设计提供支撑。The present invention provides a method for analyzing the lane-changing area of expressway vehicles based on deep learning. The purpose of the present invention is to detect the lane-changing behavior of vehicles based on the deep learning method by using cameras widely deployed on the expressway, and at the same time based on the detection results. Perform analysis to provide support for refined traffic management and lane design.

本技术领域技术人员可以理解的是,除非另外定义,这里使用的所有术语(包括技术术语和科学术语)具有与本发明所属领域中的普通技术人员的一般理解相同的意义。还应该理解的是,诸如通用字典中定义的那些术语应该被理解为具有与现有技术的上下文中的意义一致的意义,并且除非像这里一样定义,不会用理想化或过于正式的含义来解释。It will be understood by those skilled in the art that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with their meanings in the context of the prior art and, unless defined as herein, are not to be taken in an idealized or overly formal sense. explain.

作为一个实施例,选取某高速公路上一个监控视频作为数据来源,图2为该视频中连续9帧的图像画面。As an embodiment, a surveillance video on a certain expressway is selected as a data source, and FIG. 2 is an image of 9 consecutive frames in the video.

如图1所示,一种基于深度学习的高速公路车辆换道区域分析方法,包括如下步骤:As shown in Figure 1, a deep learning-based method for analyzing the lane-changing area of expressway vehicles includes the following steps:

(1)对于高速公路上高清监控视频,提取道路背景,运用前端交互对道路的车道和车道线进行结构化建模,即划分车道区域;具体包括如下子步骤:(1) For the high-definition surveillance video on the highway, extract the road background, and use the front-end interaction to construct a structured modeling of the road lanes and lane lines, that is, to divide the lane area; it includes the following sub-steps:

(1.1)对该监控的视频画面,选取连续100帧视频画面,优选地,该连续100帧视频画面中无车辆。将采集到的图片叠加求和,然后求取平均值作为道路背景,所得结果如图3所示,其计算公式为:(1.1) For the monitored video images, select continuous 100 frames of video images, preferably, there are no vehicles in the continuous 100 frames of video images. The collected pictures are superimposed and summed, and then the average value is taken as the road background. The result is shown in Figure 3. The calculation formula is:

Figure 247657DEST_PATH_IMAGE002
Figure 247657DEST_PATH_IMAGE002

式中,P为道路背景画面,I i 为第i帧画面,T为连续帧数,本实施例中取100。In the formula, P is the road background picture, I i is the ith frame picture, T is the number of consecutive frames, which is 100 in this embodiment.

(1.2)前端页面加载道路背景图片,在道路背景图片上绘制道路车道线和车道区域,绘制结果如图4所示,同时计算所有车道区域的最小外接矩形作为车道区域,并将所有结果数据以json格式保存。(1.2) Load the road background image on the front-end page, draw the road lane line and lane area on the road background image, and the drawing result is shown in Figure 4. At the same time, the minimum circumscribed rectangle of all lane areas is calculated as the lane area, and all the result data are calculated as the lane area. Save in json format.

(2) 采用基于深度学习的目标检测模型对高速公路高清监控视频的每帧图像中车辆进行检测,获取车辆的外边框(Bounding box),包括如下子步骤:(2) Use the target detection model based on deep learning to detect the vehicle in each frame of the high-definition surveillance video of the highway, and obtain the outer frame of the vehicle (Bounding box), including the following sub-steps:

(2.1)根据步骤(1.2)所得车道区域,从视频帧图像中裁剪出车道区域的图像,以减少目标检测的计算量和数据传输的数据量;(2.1) According to the lane area obtained in step (1.2), the image of the lane area is cropped from the video frame image, so as to reduce the calculation amount of target detection and the data amount of data transmission;

(2.2) 将车道区域图像输入基于EfficientDet的车辆检测模型,计算后输出画面中的车辆的外边框,其中车辆检测模型使用人工标注好的车辆检测框数据提前进行训练,模型可以以API形式对外提供调用接口,检测结果如图5所示;车辆检测模型不局限于EfficientDet,还可以采用SSD、Yolo、Faster RCNN等模型。(2.2) Input the image of the lane area into the vehicle detection model based on EfficientDet, and output the outer frame of the vehicle in the picture after calculation. The vehicle detection model uses the manually marked vehicle detection frame data for training in advance, and the model can be provided in the form of API. Call the interface, and the detection results are shown in Figure 5; the vehicle detection model is not limited to EfficientDet, but can also use models such as SSD, Yolo, and Faster RCNN.

(3) 根据每帧图像中车辆的检测结果,运用SORT方法对视频中车辆轨迹进行跟踪,SORT方法主要包括获取邻接矩阵、简单匹配、匈牙利匹配、状态更新等步骤。此外,还可以采用Deep SORT等方法。(3) According to the detection result of the vehicle in each frame of image, the SORT method is used to track the vehicle trajectory in the video. The SORT method mainly includes the steps of obtaining the adjacency matrix, simple matching, Hungarian matching, and state update. In addition, methods such as Deep SORT can also be used.

(4) 将车辆轨迹与道路结构化数据相结合,根据车辆所经过的车道区域对车辆换道进行识别,根据车辆的外边框与车道线相交位置对车辆换道位置进行检测,包括如下子步骤:(4) Combine the vehicle trajectory with the road structured data, identify the vehicle lane change according to the lane area the vehicle passes through, and detect the vehicle lane change position according to the intersection of the outer frame of the vehicle and the lane line, including the following sub-steps :

(4.1)新建类型为字典的变量D={key,value},用以记录车辆所处的车道编号,key为车辆编号,由步骤(2)车辆检测时编号获得,value为车道编号;(4.1) Create a dictionary variable D={key, value} to record the lane number where the vehicle is located. The key is the vehicle number, which is obtained from the number when the vehicle is detected in step (2), and the value is the lane number;

(4.2)对每帧画面的轨迹结果,遍历所有车辆,计算车辆所处的车道编号,进而根据车道编号和车辆编号进行分析,如果车道编号不存在则直接分析下一辆车,如果车辆编号未在变量D的key中则将该车辆编号和目前车所处的车道编号添加到变量D中,如果车辆编号已在变量D的key中则进一步判断车道编号是否发生改变:如果车道编号未改变则直接分析下一辆车,如果车道编号发生改变则认为发生换道。其中,对于车辆所处的车道编号计算可以采用如下方法:使用车辆外边框的下边缘三等分点A和B作为车辆所处车道的判断点,采用射线法判断A点和B点是否处于车道区域的多边形内,即从该点做水平射线,如果与某个车道区域多边形存在奇数个交点则在该车道区域内,否则不在该车道区域内,如果A和B两点在同一车道区域内则认为该车在此车道内。(4.2) For the trajectory results of each frame, traverse all vehicles, calculate the lane number where the vehicle is located, and then analyze according to the lane number and vehicle number. If the lane number does not exist, analyze the next vehicle directly. If the vehicle number does not exist In the key of variable D, the vehicle number and the lane number where the current car is located are added to variable D. If the vehicle number is already in the key of variable D, it is further judged whether the lane number has changed: if the lane number has not changed, then The next vehicle is directly analyzed, and a lane change is considered to have occurred if the lane number has changed. Among them, for the calculation of the lane number where the vehicle is located, the following method can be used: use the trisecting points A and B of the lower edge of the outer frame of the vehicle as the judgment points of the lane where the vehicle is located, and use the ray method to judge whether points A and B are in the lane. In the polygon of the area, that is, the horizontal ray is made from this point. If there is an odd number of intersections with a polygon of a lane area, it is in the lane area, otherwise it is not in the lane area. If the two points A and B are in the same lane area, then The vehicle is considered to be in this lane.

(4.3)对于发生换道的车辆,运用车辆外边框下边缘的边与车道线进行相交计算,得到车道线上的交点坐标,将该点作为换道位置点。(4.3) For the vehicle that has changed lanes, use the edge of the lower edge of the outer frame of the vehicle and the lane line to calculate the intersection to obtain the coordinates of the intersection point on the lane line, and use this point as the lane change position point.

(5)对不同时间段内所经过车辆的换道位置进行聚类分析,得出不同时间段的高速公路车辆换道热点区域,包括如下子步骤:(5) Perform a cluster analysis on the lane-changing positions of vehicles passing by in different time periods, and obtain the lane-changing hot spots of expressway vehicles in different time periods, including the following sub-steps:

(5.1) 将每条车道线划分为N等份,选取时间段t1-t2之间的车辆换道位置数据,统计每条车道等分段内的换道次数。例如,将每条车道线划分为10等份,选取时间段8:00-10:00之间的车辆换道位置数据,统计每条车道等分段内的每10分钟换道次数,车道1与2之间车道线换道统计所得结果如表1所示;(5.1) Divide each lane line into N equal parts, select the vehicle lane change position data between time period t1-t2, and count the number of lane changes in each lane and other segments. For example, divide each lane line into 10 equal parts, select the vehicle lane change position data between 8:00-10:00 in the time period, and count the number of lane changes per 10 minutes in each lane and other segments, lane 1 The statistical results of lane change between lanes and 2 are shown in Table 1;

表1换道次数统计原始表Table 1. Original table of statistics on the number of lane changes

Figure 558553DEST_PATH_IMAGE004
Figure 558553DEST_PATH_IMAGE004

(5.2)对每条车道等分段内的换道次数使用高斯滤波进行平滑,其公式为: (5.2) Use Gaussian filtering to smooth the number of lane changes in each lane and other segments, and the formula is:

Figure 484921DEST_PATH_IMAGE005
Figure 484921DEST_PATH_IMAGE005

式中x为随机变量(本实施例中为高斯核的位置索引),μ为高斯分布的期望值,σ为高斯分布的标准差。where x is a random variable (in this embodiment, the position index of the Gaussian kernel), μ is the expected value of the Gaussian distribution, and σ is the standard deviation of the Gaussian distribution.

在平滑中选取1*3的高斯核,其中μ取0,σ取0.8,所得高斯核为[0.239,0.522,0.239],车道1与2之前车道线换道统计平滑后结果如表2所示;In the smoothing, a 1*3 Gaussian kernel is selected, where μ is 0, σ is 0.8, and the resulting Gaussian kernel is [0.239, 0.522, 0.239]. The results of lane change before lane 1 and 2 after statistical smoothing are shown in Table 2. ;

表2换道次数统计高斯平滑表Table 2 Statistical Gaussian smoothing table for the number of lane changes

Figure 830451DEST_PATH_IMAGE007
Figure 830451DEST_PATH_IMAGE007

(5.3)以时间、换道的车道线位置、换道次数这个三个元素构建换道区域的三维分析空间,对换道区域进行可视化分析,更为直观。(5.3) The three-dimensional analysis space of the lane-changing area is constructed with the three elements of time, lane-changing lane line position, and lane-changing times, and the visual analysis of the lane-changing area is more intuitive.

以上所述,仅是本发明的较佳实施例而已,并非是对本发明作任何其他形式的限制,而依据本发明的技术实质所作的任何修改或等同变化,仍属于本发明所要求保护的范围。The above are only preferred embodiments of the present invention, and are not intended to limit the present invention in any other form, and any modifications or equivalent changes made according to the technical essence of the present invention still fall within the scope of protection of the present invention. .

Claims (5)

1. A highway vehicle lane change area analysis method based on deep learning is characterized by comprising the following specific steps:
(1) extracting a road background according to a monitoring video of the expressway, and dividing lane areas according to lanes and lane lines in the road background to obtain road structured data;
(2) detecting the vehicle in each frame of image of the monitoring video by adopting a target detection model based on deep learning to obtain the outer frame of the vehicle;
(3) tracking the vehicle track in the monitoring video according to the detection result of the vehicle in each frame of image;
(4) combining the vehicle track with the road structured data, identifying the vehicle lane change according to the lane area where the vehicle passes, and detecting the vehicle lane change position according to the intersection position of the outer frame of the vehicle and the lane line; the method comprises the following substeps:
(4.1) newly establishing a variable D = { key, value }, and recording the lane number of the vehicle, wherein key is the vehicle number, and value is the lane number;
(4.2) traversing all vehicles according to the track result of each frame of picture, calculating the lane number of the vehicle, and analyzing according to the lane number and the vehicle number:
if the lane number does not exist, directly analyzing the next vehicle;
if the vehicle number is not in the key of the variable D, adding the vehicle number and the lane number where the current vehicle is located into the variable D;
and if the vehicle number is already in the key of the variable D, further judging whether the lane number is changed: if the lane number is not changed, directly analyzing the next vehicle, and if the lane number is changed, considering that lane change occurs;
the lane number of the vehicle is calculated, and the specific method comprises the following steps:
using trisection points A and B of the lower edge of an outer frame of the vehicle as judgment points of a lane where the vehicle is located, and judging whether the point A and the point B are in a polygon of a lane area by adopting a ray method; if the two points A and B are in the same lane area, the vehicle is considered to be in the lane;
(4.3) for the vehicles with lane change, performing intersection calculation by using the edge of the lower edge of the outer frame of the vehicle and a lane line to obtain intersection point coordinates on the lane line, and taking the point as a lane change position point;
(5) and carrying out clustering analysis on the lane changing positions of the vehicles passing through in different time periods to obtain the lane changing hot spot areas of the vehicles on the expressway in different time periods.
2. The method for analyzing the lane change area of the highway vehicle based on the deep learning of claim 1, wherein the method comprises the following steps: the step (1) comprises the following substeps:
(1.1) for the monitoring video on the expressway, selecting continuous T frame video pictures, superposing and summing the collected pictures, and then solving an average value as a road background, wherein the calculation formula is as follows:
Figure 491421DEST_PATH_IMAGE001
in the formula (I), the compound is shown in the specification,Pthe picture is a background picture of the road,I i is as followsiThe number of frames of a picture is,Tis a continuous frame number;
and (1.2) loading a road background, drawing a road lane line and lane areas on the road background, and calculating the minimum circumscribed rectangle of all the lane areas as the lane areas.
3. The method for analyzing the lane change area of the highway vehicle based on the deep learning of claim 1, wherein the method comprises the following steps: the step (2) comprises the following substeps:
(2.1) cutting out a lane area image from the video frame image according to the lane area obtained in the step (1);
and (2.2) inputting the lane area image into a trained target detection model based on deep learning, calculating and outputting the outer frame of the vehicle in the picture, wherein the target detection model is EfficientDet, and training by using the manually marked vehicle detection frame data.
4. The method for analyzing the lane change area of the highway vehicle based on the deep learning of claim 1, wherein the method comprises the following steps: in the step (3), the vehicle track in the monitoring video is tracked by adopting an SORT method.
5. The method for analyzing the lane change area of the highway vehicle based on the deep learning of claim 1, wherein the method comprises the following steps: the step (5) comprises the following substeps:
(5.1) dividing each lane line into N equal parts, selecting lane change position data of vehicles in a time period of t1-t2, and counting lane change times in equal segments of each lane;
(5.2) smoothing the number of conversion passes in each lane equal segment by using Gaussian filtering;
and (5.3) constructing a three-dimensional analysis space of the lane change region by using three elements of time, lane change position and lane change number, and performing visual analysis on the lane change region.
CN202010729116.4A 2020-07-27 2020-07-27 A deep learning-based method for analyzing the lane-changing area of expressway vehicles Active CN111598069B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010729116.4A CN111598069B (en) 2020-07-27 2020-07-27 A deep learning-based method for analyzing the lane-changing area of expressway vehicles

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010729116.4A CN111598069B (en) 2020-07-27 2020-07-27 A deep learning-based method for analyzing the lane-changing area of expressway vehicles

Publications (2)

Publication Number Publication Date
CN111598069A CN111598069A (en) 2020-08-28
CN111598069B true CN111598069B (en) 2020-11-06

Family

ID=72186756

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010729116.4A Active CN111598069B (en) 2020-07-27 2020-07-27 A deep learning-based method for analyzing the lane-changing area of expressway vehicles

Country Status (1)

Country Link
CN (1) CN111598069B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112092815B (en) * 2020-09-02 2021-07-16 北京航空航天大学 Vehicle track changing tracking control method based on model prediction
CN113128382A (en) * 2021-04-06 2021-07-16 青岛以萨数据技术有限公司 Method and system for detecting lane line at traffic intersection
CN113469075A (en) * 2021-07-07 2021-10-01 上海商汤智能科技有限公司 Method, device and equipment for determining traffic flow index and storage medium
CN115909223B (en) * 2022-10-14 2024-08-09 北京科技大学 A method and system for matching WIM system information with surveillance video data
CN116110230A (en) * 2022-11-02 2023-05-12 东北林业大学 Vehicle lane crossing line identification method and system based on vehicle-mounted camera

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014180986A (en) * 2013-03-21 2014-09-29 Toyota Motor Corp Lane change assist system
CN106981202A (en) * 2017-05-22 2017-07-25 中原智慧城市设计研究院有限公司 A kind of vehicle based on track model lane change detection method back and forth
CN107146415A (en) * 2017-07-05 2017-09-08 廊坊师范学院 A method for detecting and locating traffic incidents

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110136447B (en) * 2019-05-23 2021-01-12 杭州诚道科技股份有限公司 Method for detecting lane change of driving and identifying illegal lane change

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014180986A (en) * 2013-03-21 2014-09-29 Toyota Motor Corp Lane change assist system
CN106981202A (en) * 2017-05-22 2017-07-25 中原智慧城市设计研究院有限公司 A kind of vehicle based on track model lane change detection method back and forth
CN107146415A (en) * 2017-07-05 2017-09-08 廊坊师范学院 A method for detecting and locating traffic incidents

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
车辆轨迹数据提取道路交叉口特征的决策树模型;万子健 等;《测绘学报》;20191130;第48卷(第11期);第1391-1403页 *

Also Published As

Publication number Publication date
CN111598069A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN111598069B (en) A deep learning-based method for analyzing the lane-changing area of expressway vehicles
CN111145545B (en) UAV monitoring system and method for road traffic behavior based on deep learning
CN109977782B (en) Cross-store operation behavior detection method based on target position information reasoning
WO2020206861A1 (en) Yolo v3-based detection method for key object at transportation junction
Cai et al. Applying machine learning and google street view to explore effects of drivers’ visual environment on traffic safety
CN110619279B (en) Road traffic sign instance segmentation method based on tracking
US12148219B2 (en) Method, apparatus, and computing device for lane recognition
CN111554105A (en) An intelligent flow recognition and statistics method for complex traffic intersections
CN107563310A (en) A kind of lane change detection method violating the regulations
CN105321342A (en) Intersection vehicle queuing length detection method based on aerial video
CN113011331B (en) Method and device for detecting whether motor vehicle gives way to pedestrians, electronic equipment and medium
CN108877237A (en) Vehicle Speed based on monitor video image integrates resolving system and method
CN104978567A (en) Vehicle detection method based on scenario classification
CN106778688A (en) The detection method of crowd's throat floater event in a kind of crowd scene monitor video
CN109948690A (en) A high-speed rail scene perception method based on deep learning and structural information
CN106570449B (en) A kind of flow of the people defined based on region and popularity detection method and detection system
CN110443142A (en) A kind of deep learning vehicle count method extracted based on road surface with segmentation
CN114037966A (en) High-precision map feature extraction method, device, medium and electronic equipment
CN114998744A (en) Segmentation method of agricultural machinery track field and road based on fusion of motion and vision features
CN115457277A (en) A method and system for intelligent pavement disease identification and detection
CN117455237A (en) A road traffic accident risk prediction method based on multi-source data
CN110889347B (en) Density traffic flow counting method and system based on space-time counting characteristics
CN116597270A (en) Road damage target detection method based on integrated learning network of attention mechanism
Xu et al. Deep learning based vehicle violation detection system
CN112989916A (en) Crowd counting method combining density estimation and target detection

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