一种闯红灯车辆的非现场执法图片智能审核方法和系统Method and system for intelligently reviewing off-site law enforcement pictures of vehicles running red lights
技术领域Technical field
本发明属于交通数据处理技术领域,具体涉及一种闯红灯车辆的非现场执法图片智能审核方法和系统。The invention belongs to the technical field of traffic data processing, and specifically relates to a method and system for intelligently reviewing off-site law enforcement pictures of vehicles running red lights.
背景技术Background technique
智能交通违章监摄管理系统,俗称“电子警察”、“电子眼”,是当前道路交通非现场执法的主要设备,根据标准《闯红灯自动记录系统通用技术条件(GA/T496-2014)》的要求,电子警察在检测到车辆路口闯红灯行为时自动抓拍三张图片,作为执法依据,包括:(a)一张能反映车辆未到达停止线的图片、(b)一张能反映车辆已越过停止线的图片、(c)一张能反映车辆与(b)图片中车辆向前位移的图片;作为图片记录,标准还要求记录的最终图片应合成为一个图片文件,且至少应包含:时间、地点、方向、车道和设备编号等信息。通常电子警察系统将一张带有车牌特写的图片连同上述三张图片进行合成,再由审核人员调取记录进行图片的人工审核,经人工审核确认的违法记录将上传至“六合一”违法库。Intelligent traffic violation monitoring and photo management system, commonly known as "electronic police" and "electronic eye", is the main equipment for off-site law enforcement in current road traffic. According to the requirements of the standard "General Technical Requirements for Automatic Red Light Recording System (GA/T496-2014)", The electronic police will automatically capture three pictures when it detects a vehicle crossing a red light, as a basis for law enforcement, including: (a) a picture that reflects that the vehicle has not reached the stop line; (b) a picture that reflects that the vehicle has crossed the stop line Picture, (c) a picture that can reflect the forward displacement of the vehicle and (b) the picture; as a picture record, the standard also requires that the final picture recorded should be combined into a picture file, and at least include: time, place, Information such as directions, lanes, and equipment numbers. Usually the electronic police system synthesizes a picture with a close-up of the license plate and the above three pictures, and then the reviewer retrieves the records for manual review of the pictures, and the illegal records confirmed by the manual review will be uploaded to the "six in one" illegal database .
现实情况中,因电子设备工作状态、通讯质量、环境干扰等因素,非现场执法必须对电子警察抓拍的原始数据加以核查,以保证执法工作的严谨性。但现有技术中,非现场执法记录数量庞大,通过依赖人工进行质量筛查,效率低,且容易出现错漏等问题。In reality, due to factors such as the working status of electronic equipment, communication quality, and environmental interference, off-site law enforcement must verify the original data captured by the electronic police to ensure the rigor of law enforcement. However, in the prior art, the number of off-site law enforcement records is huge, and quality screening by relying on manual labor is low in efficiency and prone to errors and omissions.
发明内容Summary of the invention
本发明的目的是提出一种闯红灯车辆的非现场执法图片智能审核方法和系统,用以解决现有技术中由于通过人工对非现场执法记录质量筛查效率低、易出错的问题,具体技术方案如下:The purpose of the present invention is to propose a method and system for intelligently reviewing off-site law enforcement pictures of vehicles running red lights to solve the problem of low efficiency and error-prone problems in the prior art due to manual inspection of off-site law enforcement records quality. Specific technical solutions as follows:
一方面,提供一种闯红灯车辆的非现场执法图片智能审核系统,所述系统包括对接模块、标注模块、图片预处理模块、深度学习模块、车辆定位模块以及违法智审模块,其中:On the one hand, an off-site law enforcement image intelligent review system for vehicles running red lights is provided. The system includes a docking module, an annotation module, an image preprocessing module, a deep learning module, a vehicle positioning module, and an illegal intelligence review module, wherein:
对接模块:通过指定数据接口接入非现场执法系统,从非现场执法系统中提取车辆的闯红灯违法信息;Docking module: access to the off-site law enforcement system through the designated data interface, and extract the vehicle’s red light violation information from the off-site law enforcement system;
标注模块:从对接模块获取所述闯红灯违法信息,通过交互界面向使用者提供选择标注工具,并根据使用者在所述闯红灯违法信息对应的原始合成图片中的通过所述选择标注工具的标注情况,输出指定抓拍设备对应抓拍图片的属性信息;Annotation module: Obtain the red light violation information from the docking module, provide the user with a selection annotation tool through the interactive interface, and based on the user's annotation status through the selection annotation tool in the original composite picture corresponding to the red light violation information , Output the attribute information of the captured image corresponding to the specified capture device;
图片预处理模块:从对接模块获取抓拍车辆闯红灯的原始合成图片,并将所述原始合成图片基于GA/T496-2014要求拆分成第一图片P1、第二图片P2和第三图片P3;Picture preprocessing module: Obtain the original synthesized picture of the captured vehicle running through the red light from the docking module, and split the original synthesized picture into a first picture P1, a second picture P2, and a third picture P3 based on GA/T496-2014 requirements;
深度学习模块:基于目标车辆的所述属性信息和深度学习算法进行所述P1、P2和P3中机动车的轮廓识别,基于所述P1、P2和P3进行目标信号灯的灯色识别和相位识别;并根据灯色识别和相位识别结果判断所述目标车辆的违法检测记录是否可进行智能审核,若无法审核,则将所述识别结果传输至违法智审模块;否则,则将所述识别结果传送至车辆定位模块进一步处理;Deep learning module: based on the attribute information of the target vehicle and the deep learning algorithm, perform contour recognition of the motor vehicles in the P1, P2 and P3, and perform the light color recognition and phase recognition of the target signal lamp based on the P1, P2 and P3; According to the results of light color recognition and phase recognition, it is judged whether the illegal detection record of the target vehicle can be intelligently reviewed. If it cannot be reviewed, the recognition result is transmitted to the illegal intelligent review module; otherwise, the recognition result is transmitted To the vehicle positioning module for further processing;
车辆定位模块:接入对接模块的所述闯红灯违法信息,在P1中识别目标车辆位置并进行轮廓标记,并采用目标追踪算法CSRT在P2和P3中对目标车辆进行轮廓定位标记;Vehicle positioning module: access the red light violation information of the docking module, identify the location of the target vehicle in P1 and mark the contour, and use the target tracking algorithm CSRT to mark the contour of the target vehicle in P2 and P3;
违法智审模块:接入深度学习模块的灯色和相位识别结果,以及车辆定位模块目标车辆的轮廓标记、图片预处理模块拆分得到的P1、P2和P3,对非现场执法系统中的违法检测记录进行审核,判断目标车辆是否发生闯红灯行为。Illegal intelligence review module: access to the light color and phase recognition results of the deep learning module, as well as the contour mark of the target vehicle of the vehicle positioning module, and the P1, P2, and P3 split by the image preprocessing module, which are used for violations in the off-site law enforcement system The inspection records are reviewed to determine whether the target vehicle has red light running behavior.
进一步的,所述闯红灯违法信息包括所述原始合成图片,以及车辆号牌 号码数据;Further, the information on the violation of red light running includes the original composite picture and vehicle number plate number data;
所述交互界面设置于计算机、手机、IPAD等终端;The interactive interface is set in terminals such as computers, mobile phones, and IPADs;
所述选择标注工具包括矩形框标注、多边形框标注和多线段标注。The selection and labeling tools include rectangular frame labeling, polygonal frame labeling and multi-line segment labeling.
进一步的,所述属性信息包括静态目标的属性信息和动态目标的属性信息,其中,所述静态目标包括进出口道停止线、左转边界线、右转边界线以及信号灯,所述进出口道停止线、左转边界线、右转边界线的属性信息为多段线类型及其位置信息,所述信号灯的属性信息为矩形框类型及其灯头位置信息,所述矩形框类型包括左转箭头灯、直行箭头灯、右转箭头灯、左转圆饼灯、直行圆饼灯、直左圆饼灯、掉头箭头灯、公交专用灯;所述动态目标为所述原始合成图片中的车辆,通过所述选择标注工具标记车辆轮廓,输出车辆属性数据。Further, the attribute information includes attribute information of a static target and attribute information of a dynamic target, wherein the static target includes a stop line of an entrance and exit, a boundary line of a left turn, a boundary line of a right turn, and a signal light. The attribute information of the stop line, the left-turn boundary line, and the right-turn boundary line are the polyline type and its position information, the attribute information of the signal light is the rectangular frame type and its lamp head position information, and the rectangular frame type includes the left-turn arrow light , Straight arrow light, right turn arrow light, left round pie light, straight round pie light, straight left round pie light, U-turn arrow light, special bus lights; the dynamic target is the vehicle in the original composite picture, passing The selection marking tool marks the outline of the vehicle, and outputs the vehicle attribute data.
进一步的,图片预处理模块还包括:基于所述静态目标的属性信息,在所述P1、P2和P3中进行所述静态目标的定位。Further, the picture preprocessing module further includes: positioning the static target in the P1, P2, and P3 based on the attribute information of the static target.
进一步的,深度学习模块中,Furthermore, in the deep learning module,
基于所述车辆属性数据及深度学习算法训练得到车辆识别模型;以及Obtain a vehicle recognition model based on the vehicle attribute data and deep learning algorithm training; and
基于所述信号灯的属性信息训练得到信号灯灯色、相位识别模型。The color and phase recognition model of the signal lamp is obtained through training based on the attribute information of the signal lamp.
另一方面,提供一种闯红灯车辆的非现场执法图片智能审核方法,应用于上述系统,所述方法采用深度学习方法识别图片中的动态目标,并结合目标跟踪算法实现目标车辆的定位与轨迹重构,实现智能审核闯红灯行为,具体包括步骤:On the other hand, an intelligent review method for off-site law enforcement pictures of vehicles running red lights is provided, which is applied to the above system. The method uses deep learning methods to identify dynamic targets in the pictures, and combines target tracking algorithms to achieve the positioning and trajectory of target vehicles. To realize the intelligent review of red light running behavior, the specific steps include:
S1、由接入模块接入非现场执法系统采集车辆闯红灯违法信息,并将所述原始合成图片根据GA/T496-2014要求拆分得到P1、P2和P3;S1. The access module is connected to the off-site law enforcement system to collect information about the violation of the vehicle running red light, and the original synthesized picture is split according to GA/T496-2014 requirements to obtain P1, P2, and P3;
S2、由深度学习模块从P1、P2和P3中分别识别出闯红灯行为待审核的目标车辆所在位置并进行车辆的轮廓定位标记;S2. The deep learning module respectively identifies the location of the target vehicle whose red light running behavior is to be reviewed from P1, P2, and P3, and marks the contour of the vehicle;
S3、分别确定P1、P2和P3中所述轮廓定位标记的质心坐标,并在P1中 根据图片顺序连接三个质心,生成目标车辆的行驶轨迹;S3. Determine the centroid coordinates of the contour positioning marks in P1, P2, and P3, respectively, and connect the three centroids in P1 according to the order of the pictures to generate the driving trajectory of the target vehicle;
S4、基于所述进口道停止线及左转界线、右转界线位置信息,在P1中标记目标车辆的停止线和边界线位置;S4. Mark the stop line and the boundary line position of the target vehicle in P1 based on the position information of the stop line, left turn boundary, and right turn boundary of the entrance lane;
S5、检测所述行驶轨迹和进口道停止线之间是否存在交叉点,若存在,则进入步骤S6;否则,检测P1的质心坐标是否沿目标车辆前进方向驶过所述进口道停止线;若是,则进入步骤S6;若不是,则判定目标车辆不存在闯红灯违法,并结束流程;S5. Detect whether there is an intersection between the travel trajectory and the stop line of the entrance road, if so, go to step S6; otherwise, detect whether the center of mass coordinates of P1 pass the stop line of the entrance road in the forward direction of the target vehicle; if so; , Then go to step S6; if not, determine that the target vehicle does not violate the law by running a red light, and end the process;
S6、根据所述行驶轨迹与所述左转界线、右转界线位置信息的位置关系,判定并得到目标车辆在进口道的转向行为;S6. Determine and obtain the turning behavior of the target vehicle at the entrance lane according to the positional relationship between the driving track and the position information of the left turn boundary line and the right turn boundary line;
S7、基于所述灯头位置信息采用深度学习算法对P1和P3中目标车辆的信号灯及其相位信息进行识别,若相位一致,则进入步骤S8;否则,无法判断目标车辆对应的闯红灯违法记录的有效性,并结束流程;S7. Based on the lamp head position information, use a deep learning algorithm to identify the signal lights and phase information of the target vehicle in P1 and P3. If the phases are the same, go to step S8; otherwise, the validity of the red light violation record corresponding to the target vehicle cannot be determined Sex and end the process;
S8、基于所述转向行为的判定结果及所述信号灯及其相位信息进行识别的识别结果,若所述判定结果与所述识别结果一致,则判断目标车辆不存在闯红灯行为;否则判定目标车辆的闯红灯违法记录有效。S8. Based on the determination result of the steering behavior and the recognition result of the signal light and its phase information, if the determination result is consistent with the recognition result, it is determined that the target vehicle does not have red light running behavior; otherwise, it is determined that the target vehicle is The illegal record of running a red light is valid.
进一步的,步骤S2包括:Further, step S2 includes:
S21、对于P1,采用深度学习算法检测出P1中的所有车辆并对车辆所在的图片区域进行轮廓标记定位;从所述违法信息中提取车辆号牌号码数据,并根据车牌识别算法,确定P1中相应的目标车辆号牌所在位置,进行标记定位;结合车辆区域与目标车辆号牌位置,确定P1中的目标车辆位置,实现待审核违法车辆的初始位置轮廓的定位标记;S21. For P1, use a deep learning algorithm to detect all vehicles in P1 and perform contour mark positioning on the image area where the vehicles are located; extract vehicle number plate number data from the illegal information, and determine the number of vehicles in P1 according to the license plate recognition algorithm Mark the location of the corresponding target vehicle number plate; combine the vehicle area and the position of the target vehicle number plate to determine the target vehicle position in P1, and realize the location marking of the initial position contour of the illegal vehicle to be reviewed;
S22、对P2、P3采用深度学习算法检测出图中的所有车辆,并对车辆所在的图片区域进行轮廓标记定位;基于初始位置轮廓的定位标记确定目标车辆的初始位置;采用目标追踪算法CSRT,在P2、P3中对获得目标车辆的最终定位;结合车辆区域与目标跟踪结果,确定目标车辆在P2、P3中的位置, 对其轮廓进行定位标记。S22. Use deep learning algorithms for P2 and P3 to detect all vehicles in the picture, and perform contour mark positioning on the image area where the vehicle is located; determine the initial position of the target vehicle based on the positioning mark of the initial position contour; use the target tracking algorithm CSRT, The final positioning of the target vehicle is obtained in P2 and P3; combined with the vehicle area and target tracking results, the position of the target vehicle in P2 and P3 is determined, and its contour is marked for positioning.
进一步的,所述转向行为包括左转、直行和右转。Further, the turning behavior includes turning left, going straight and turning right.
进一步的,步骤S6中:若所述行驶轨迹与所述左转界线存在一个交点,则判断目标车辆左转;若所述行驶轨迹与所述右转界线存在一个交点,则判断目标车辆右转;若所述行驶轨迹与所述右转界线、左转界线不存在交点,则判定目标车辆直行。Further, in step S6: if there is an intersection between the driving trajectory and the left turn boundary, it is determined that the target vehicle turns left; if there is an intersection between the driving trajectory and the right turn boundary, then it is determined that the target vehicle turns right If there is no intersection between the driving track and the right turn boundary line and the left turn boundary line, it is determined that the target vehicle is going straight.
本发明的闯红灯车辆的非现场执法图片智能审核方法和系统,通过对非现场执法系统中的原始合成图片进行拆分得到符合GA/T496-2014要求的三张图片,采用如深度学习算法、目标跟踪算法等图片处理技术来对图片进行处理,得到目标车辆的轮廓定位标记、行驶轨迹以及进口道停止线及左转界线、右转界线位置信息,根据行驶轨迹与左转界线、右转界线的位置信息的位置关系来判断目标车辆的实际行驶状态,以及目标车辆灯色与其相位的关系来判断目标车辆的违法记录是符合;与现有技术相比,本发明通过对目标车辆采用多种图像处理算法实现其闯红灯违法记录的有效性,无需进行人工审核,可提高非现场执法原始检测记录审核工作的效率,降低人工成本。The method and system for intelligently reviewing off-site law enforcement pictures of vehicles running red lights of the present invention can obtain three pictures that meet the requirements of GA/T496-2014 by splitting the original synthesized pictures in the off-site law enforcement system, and adopt deep learning algorithms, goals, etc. Image processing technology such as tracking algorithm is used to process the image to obtain the contour positioning mark, driving trajectory, and entrance stop line, left turn boundary, right turn boundary position information of the target vehicle, according to the driving trajectory and left turn boundary, right turn boundary line The position relationship of the position information is used to determine the actual driving state of the target vehicle, and the relationship between the target vehicle's light color and its phase is used to determine whether the illegal record of the target vehicle is consistent. Compared with the prior art, the present invention adopts multiple images for the target vehicle. The processing algorithm realizes the effectiveness of the illegal record of running a red light without manual review, which can improve the efficiency of the original inspection record review of off-site law enforcement and reduce labor costs.
附图说明Description of the drawings
图1是本发明实施例中所述闯红灯车辆的非现场执法图片智能审核方法的流程图示意;FIG. 1 is a schematic flowchart of a method for intelligently reviewing off-site law enforcement pictures of a vehicle running a red light in an embodiment of the present invention;
图2是本发明实施例中运用所述闯红灯车辆的非现场执法图片智能审核系统结构组成及数据传输图示意;2 is a schematic diagram of the structure composition and data transmission diagram of an off-site law enforcement picture intelligent review system using the red light vehicle in an embodiment of the present invention;
图3为采用本发明方法的实施例中非现场执法的原始合成图片示意;FIG. 3 is a schematic diagram of an original synthesized picture of off-site law enforcement in an embodiment using the method of the present invention;
图4为采用本发明方法的实施例中在P1中目标车辆的定位图示意;FIG. 4 is a schematic diagram of a positioning diagram of a target vehicle in P1 in an embodiment of the method of the present invention;
图5为采用本发明方法的实施例中在P2中目标车辆的定位图示意;FIG. 5 is a schematic diagram of a positioning diagram of a target vehicle in P2 in an embodiment of the method of the present invention;
图6为采用本发明方法的实施例中在P3中目标车辆的定位图示意。Fig. 6 is a schematic diagram of the location of the target vehicle in P3 in an embodiment of the method of the present invention.
具体实施方式detailed description
为了使本技术领域的人员更好地理解本发明方案,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述。In order to enable those skilled in the art to better understand the solutions of the present invention, the technical solutions in the embodiments of the present invention will be described clearly and completely in conjunction with the accompanying drawings in the embodiments of the present invention.
在本发明实施例中,为实现对闯红灯车辆非现场执法图片的智能审核,提供了一种闯红灯车辆的非现场执法图片智能审核系统,系统包括对接模块、标注模块、图片预处理模块、深度学习模块、车辆定位模块以及违法智审模块,具体可参阅图1,对接模块分别与图片预处理模块、标注模块和车辆定位模块连接,通过对接模块获取车辆的违法记录检测数据,并传送给与之连接的各模块进行处理;图片预处理模块还与车辆定位模块、违法智审模块和深度学习模块连接,可将从对接模块获取的车辆的违法记录照片进行处理后进行后续处理;标注模块连接深度学习模块和图片预处理模块;车辆定位模块还连接违法智审模块;深度学习模块还连接车辆定位模块和违法智审模块,其中:In the embodiment of the present invention, in order to realize the intelligent review of off-site law enforcement pictures of vehicles running red lights, an intelligent review system for off-site law enforcement pictures of vehicles running red lights is provided. The system includes a docking module, a labeling module, a picture preprocessing module, and deep learning. Module, vehicle positioning module and illegal intelligence review module, please refer to Figure 1 for details. The docking module is respectively connected with the image preprocessing module, labeling module and vehicle positioning module. The vehicle’s illegal record detection data is obtained through the docking module and transmitted to it The connected modules are processed; the image preprocessing module is also connected with the vehicle positioning module, the illegal intelligence review module, and the deep learning module. It can process the illegal record photos of the vehicle obtained from the docking module for subsequent processing; mark the module connection depth The learning module and the image preprocessing module; the vehicle positioning module is also connected to the illegal intelligence examination module; the deep learning module is also connected to the vehicle positioning module and the illegal intelligence examination module, including:
对接模块:通过指定数据接口接入非现场执法系统,从非现场执法系统中提取车辆的闯红灯违法信息。Docking module: Connect to the off-site law enforcement system through the designated data interface, and extract the vehicle’s red light violation information from the off-site law enforcement system.
标注模块:从对接模块获取闯红灯违法信息,通过交互界面向使用者提供选择标注工具,并根据使用者在闯红灯违法信息对应的原始合成图片中的通过选择标注工具的标注情况,输出指定抓拍设备对应抓拍图片的的属性信息,参阅图3,为采用本发明系统进行智能审核过程中的原始合成图片示意;其中,属性信息包括静态目标的属性信息和动态目标的属性信息,静态目标包括进出口道停止线、左转边界线、右转边界线以及信号灯,进出口道停止线、左转边界线、右转边界线的属性信息为多段线类型及其位置信息,信号灯的属性信息为矩形框类型及其位置信息;动态目标为原始合成图片中的车辆,通过选择标注工具标记车辆轮廓,输出车辆属性数据。Annotation module: Obtain the red light violation information from the docking module, provide the user with a selection annotation tool through the interactive interface, and output the designated capture device according to the user's annotation by the selected annotation tool in the original composite picture corresponding to the red light violation information For the attribute information of the captured picture, refer to Fig. 3, which is a schematic diagram of the original synthesized picture in the intelligent review process using the system of the present invention; wherein the attribute information includes the attribute information of the static target and the attribute information of the dynamic target, and the static target includes the entrance and exit. The attribute information of stop line, left turn boundary line, right turn boundary line and signal light, entrance and exit road stop line, left turn boundary line, right turn boundary line are the polyline type and its position information, and the attribute information of the signal light is rectangular frame type And its position information; the dynamic target is the vehicle in the original composite picture, and the vehicle profile is marked by selecting the annotation tool, and the vehicle attribute data is output.
具体的,在实施例中,获取的闯红灯违法信息包括原始合成图片,以及车辆号牌号码数据、进口道停止线及左转界线、右转界线位置信息、信号灯类型和灯头位置信息;所述信号灯的属性信息为矩形框类型及其灯头位置信息,所述矩形框类型包括左转箭头灯、直行箭头灯、右转箭头灯、左转圆饼灯、直行圆饼灯、直左圆饼灯、掉头箭头灯、公交专用灯;交互界面设置于计算机、手机、IPAD等移动终端;选择标注工具包括矩形框、多边形框和多线段。Specifically, in the embodiment, the obtained red light violation information includes the original composite picture, as well as the vehicle number plate number data, entry lane stop line and left turn boundary line, right turn boundary line position information, signal lamp type and lamp head position information; the signal lamp The attribute information of is the rectangular frame type and its lamp head position information. The rectangular frame type includes left turn arrow light, straight arrow light, right turn arrow light, left turn round pie light, straight round pie light, straight left round pie light, U-turn arrow lights, dedicated bus lights; interactive interfaces are set on mobile terminals such as computers, mobile phones, IPAD, etc.; selection marking tools include rectangular boxes, polygonal boxes and multi-line segments.
图片预处理模块:从对接模块获取抓拍车辆闯红灯对应的原始合成图片,并将原始合成图片基于GA/T496-2014要求拆分成第一图片P1、第二图片P2和第三图片P3;基于静态目标的属性信息,在P1、P2和P3中进行静态目标的定位。Picture preprocessing module: Obtain the original synthesized picture corresponding to the captured vehicle running the red light from the docking module, and split the original synthesized picture into the first picture P1, the second picture P2 and the third picture P3 based on the requirements of GA/T496-2014; The attribute information of the target is used to locate the static target in P1, P2 and P3.
深度学习模块:基于属性信息及深度学习算法训练得到车辆识别模型,训练得到车辆识别模型,进行车辆识别;并基于图片预处理模块对信号灯的定位信息,即静态目标的定位训练得到信号灯灯色、相位识别模型,以此实现在P1、P2和P3中目标信号灯的灯色识别和相位识别;根据P1、P3的灯色识别结果以及相位识别结果对该审核记录的智能审核可行性进行判断,其中,若目标车辆的违法检测记录中的P1、P2和P3中存在两张图片的灯色不一致,则说明无法进行智能审核,并将识别结果传输至违法智审模块,进行后续判定;否则,将识别结果传输至车辆定位模块进行进一步处理。Deep learning module: Based on attribute information and deep learning algorithm training, the vehicle recognition model is obtained, and the vehicle recognition model is trained to perform vehicle recognition; and based on the positioning information of the signal lamp based on the image preprocessing module, that is, the static target positioning training obtains the signal lamp color, Phase recognition model to realize the light color recognition and phase recognition of the target signal lights in P1, P2, and P3; judge the feasibility of the intelligent audit of the audit record according to the light color recognition results of P1, P3 and the phase recognition results. If the light colors of the two pictures in P1, P2, and P3 in the illegal detection record of the target vehicle are inconsistent, it means that the intelligent review cannot be performed, and the recognition result is transmitted to the illegal intelligent review module for subsequent determination; otherwise, The recognition result is transmitted to the vehicle positioning module for further processing.
车辆定位模块:接入对接模块的闯红灯违法信息,首先在P1中,根据号牌识别方法进行所有的车辆号牌识别,根据闯红灯违法信息中的目标车辆号牌号码,结合深度学习模块输出的车辆轮廓标记情况,识别P1中的目标车辆位置,并进行目标车辆轮廓标记,具体可参阅图4;然后,采用目标追踪算法CSRT在P2和P3中识别处目标车辆位置,同时结合深度学习模块输出的车辆轮廓标记情况,确定目标车辆分别在P2和P3中的位置,并进行轮廓定位标 记,具体可参阅图5和图6;其中,图4、图5和图6中虚线框所示区域即为车辆定位模块自动定位结果。Vehicle positioning module: access the red light violation information of the docking module. First, in P1, all vehicle license plates are identified according to the number plate recognition method, and the target vehicle license plate number in the red light violation information is combined with the vehicle output by the deep learning module Contour marking situation, identify the target vehicle position in P1, and mark the target vehicle contour, see Figure 4 for details; then, use the target tracking algorithm CSRT to identify the target vehicle position in P2 and P3, and combine the output of the deep learning module For vehicle contour marking, determine the position of the target vehicle in P2 and P3, and perform contour positioning marking. For details, please refer to Figures 5 and 6; among them, the area shown by the dashed box in Figures 4, 5 and 6 is The vehicle positioning module automatically locates the result.
违法智审模块:接入深度学习模块的灯色和相位识别结果,同时接入车辆定位模块确定的目标车辆分别在P1、P2和P3中的轮廓定位标记,并分别确定轮廓定位标记的质心,按照顺序连接确定目标车辆行驶轨迹多段线坐标;同时,接入图片预处理模块对进口道停止线的定位,识别目标车辆的行驶轨迹多线段与进口道停止线的交点;其中,若进口道停止线与行驶轨迹具有交点,则进一步判断图片预处理模块对目标车辆的左转边界线和右转边界线的定位情况,若定位为目标车辆的左转边界线,且左转边界线与行驶轨迹具有一个交点,则判定目标车辆左转行使;同理,若定位为目标车辆的右转边界线,且右转边界线与行驶轨迹具有一个交点,则判定目标车辆右转行使;左转边界线或右转边界线与行使轨迹存在多个交点,对于目标车辆对应的违法检测记录的审核结果为无法识别;左转边界线或右转边界线与行使轨迹不存在交点,则判定目标车辆直行。Illegal intelligence review module: access the light color and phase recognition results of the deep learning module, and at the same time access the contour positioning marks of the target vehicle determined by the vehicle positioning module in P1, P2 and P3, and respectively determine the centroid of the contour positioning marks, Determine the polyline coordinates of the target vehicle's driving trajectory according to the sequence; at the same time, access the image preprocessing module to locate the stop line of the entrance road, and identify the intersection of the target vehicle's driving trajectory polyline and the stop line of the entrance road; where, if the entrance road stops If the line has an intersection with the driving trajectory, the image preprocessing module will further determine the positioning of the left-turn boundary line and the right-turn boundary line of the target vehicle. If it is positioned as the left-turn boundary line of the target vehicle, and the left-turn boundary line and the driving trajectory If there is an intersection, it is determined that the target vehicle turns left; similarly, if it is positioned as the right turn boundary line of the target vehicle, and the right turn boundary line has an intersection with the driving track, then it is determined that the target vehicle turns right and travel; Or there are multiple intersections between the right-turn boundary line and the driving trajectory, and the review result of the illegal detection record corresponding to the target vehicle is unrecognizable; if there is no intersection between the left-turn boundary line or the right-turn boundary line and the driving trajectory, the target vehicle is determined to go straight.
同时,在左转边界线或右转边界线与行使轨迹不存在交点的情况下,还判断行使轨迹上目标车辆在P1上轮廓定位标记质心的坐标与进口道停止线的位置关系,若质心的坐标未越过停止线,则根据上述判断目标车辆行使方向的方式进行判断具体的行使情况,并根据实际判断结果确定目标车辆是否存在闯红灯违法行为;否则,判定目标车辆不存在闯红灯违法的行使行为,违法智审模块将目标车辆对应的违法检测记录的审核结果确定为未发生闯红灯。At the same time, in the case that there is no intersection between the left-turn boundary line or the right-turn boundary line and the travel trajectory, it is also determined that the coordinates of the center of mass of the target vehicle's contour positioning mark on P1 on the travel trajectory are related to the position of the stop line of the entrance road. If the coordinates do not cross the stop line, the specific driving situation is determined according to the above method of judging the direction of the target vehicle, and the actual judgment result is used to determine whether the target vehicle has an illegal behavior of running a red light; otherwise, it is determined that the target vehicle does not have an illegal behavior of running a red light. The illegal intelligence review module determines that the review result of the illegal inspection record corresponding to the target vehicle is that there is no red light running.
在实际操作过程中,还需要在上述判定目标车辆的转向行使情况下,将目标车辆的实际转向与其在深度学习模块中输出的灯色、相位进行匹配,若识别出的转向与对应的灯色、相位不一致,则将目标车辆对应的违法检测记录审核结果确定为闯红灯,例如,若目标车辆对应信号灯放行相位为左转,, 而判定目标车辆的转向为右转,两者不一致,则判定目标车辆存在闯红灯行为;否则,判定目标车辆对应的违法检测记录为未闯红灯。In the actual operation process, it is also necessary to match the actual steering of the target vehicle with the light color and phase output in the deep learning module under the above-mentioned determination of the steering operation of the target vehicle. If the identified steering is with the corresponding light color , If the phase is inconsistent, the review result of the illegal detection record corresponding to the target vehicle is determined to be running a red light. For example, if the target vehicle corresponding to the signal light release phase is a left turn, and the steering of the target vehicle is determined to be a right turn, the target is determined The vehicle has a red light running behavior; otherwise, it is determined that the illegal detection record corresponding to the target vehicle is not running a red light.
参阅图2,在本发明实施例中,还提供一种闯红灯车辆的非现场执法图片智能审核方法,应用于上述闯红灯车辆的非现场执法图片智能审核系统,方法采用深度学习方法识别图片中的动态目标,并结合目标跟踪算法实现目标车辆的定位与轨迹重构,实现智能审核闯红灯行为,具体包括步骤:Referring to Figure 2, in the embodiment of the present invention, there is also provided an off-site law enforcement picture intelligent review method for vehicles running red lights, which is applied to the above-mentioned off-site law enforcement picture intelligent review system for vehicles running red lights, and the method uses a deep learning method to identify dynamics in pictures Target, combined with the target tracking algorithm to realize the positioning and trajectory reconstruction of the target vehicle, and realize the intelligent review of red light running behavior. The specific steps include:
S1、由接入模块接入非现场执法系统采集车辆闯红灯违法信息,并将原始合成图片根据GA/T496-2014要求拆分得到P1、P2和P3;S1. The access module is connected to the off-site law enforcement system to collect information on the violation of the red light of the vehicle, and split the original synthesized picture according to the requirements of GA/T496-2014 to obtain P1, P2 and P3;
S2、由深度学习模块从P1、P2和P3中分别识别出闯红灯行为待审核的目标车辆所在位置并进行车辆的轮廓定位标记;其中,对于P1,采用深度学习算法检测出P1中的所有车辆并对车辆所在的图片区域进行轮廓标记定位;从所述违法信息中提取车辆号牌号码数据,并根据车牌识别算法,确定P1中相应的目标车辆号牌所在位置,进行标记定位;结合车辆区域与目标车辆号牌位置,确定P1中的目标车辆位置,实现待审核违法车辆的初始位置轮廓的定位标记;对P2、P3采用深度学习算法检测出图中的所有车辆,并对车辆所在的图片区域进行轮廓标记定位;基于初始位置轮廓的定位标记确定目标车辆的初始位置;采用目标追踪算法CSRT,在P2、P3中对获得指定车辆的最终定位;结合车辆区域与目标跟踪结果,确定目标车辆在P2、P3中的位置,对其轮廓进行定位标记。S2. The deep learning module identifies the location of the target vehicle whose red light running behavior is to be reviewed from P1, P2, and P3, and marks the contour of the vehicle; for P1, the deep learning algorithm is used to detect all vehicles in P1 and Carry out contour mark positioning on the image area where the vehicle is located; extract the vehicle license plate number data from the illegal information, and determine the location of the corresponding target vehicle license plate in P1 according to the license plate recognition algorithm, and perform mark positioning; combine the vehicle area and The position of the target vehicle number plate, determine the target vehicle position in P1, and realize the positioning mark of the initial position contour of the illegal vehicle to be reviewed; use the deep learning algorithm for P2 and P3 to detect all vehicles in the picture, and check the picture area where the vehicle is located Carry out contour mark positioning; determine the initial position of the target vehicle based on the positioning mark of the initial position contour; use the target tracking algorithm CSRT to obtain the final positioning of the specified vehicle in P2 and P3; combine the vehicle area and target tracking results to determine the target vehicle’s location Position in P2 and P3, and mark its outline.
S3、分别确定P1、P2和P3中轮廓定位标记的质心坐标,并在P1中根据图片顺序连接三个质心,即从P1中轮廓定位标记的质心坐标开始,依次连接P2上轮廓定位标记的质心坐标,以及P3上轮廓定位标记的质心坐标,生成目标车辆的行驶轨迹;S3. Determine the centroid coordinates of the contour positioning marks in P1, P2, and P3 respectively, and connect the three centroids in P1 according to the order of the pictures, that is, starting from the centroid coordinates of the contour positioning marks in P1, and sequentially connect the centroids of the contour positioning marks on P2 The coordinates, and the centroid coordinates of the contour positioning mark on P3, generate the driving trajectory of the target vehicle;
S4、基于进口道停止线及左转界线、右转界线位置信息,在P1中标记目标车辆的停止线和边界线位置;S4. Mark the stop line and boundary line position of the target vehicle in P1 based on the position information of the stop line of the entrance lane, the left turn boundary and the right turn boundary;
S5、检测行驶轨迹和进口道停止线之间是否存在交叉点,若存在,则进入步骤S6;否则,检测P1的质心坐标是否沿目标车辆前进方向驶过进口道停止线;若是,则进入步骤S6;若不是,则判定目标车辆不存在闯红灯违法,并结束流程;S5. Detect whether there is an intersection between the driving trajectory and the stop line of the entrance road, if so, go to step S6; otherwise, check whether the center of mass coordinates of P1 pass the stop line of the entrance road in the forward direction of the target vehicle; if yes, go to step S6; if not, it is determined that the target vehicle does not violate the law by running a red light, and the process ends;
S6、根据行驶轨迹与左转界线、右转界线位置信息的位置关系,判定并得到目标车辆在进口道的转向行为;即判定目标车辆是左转、右转还是直行行使;具体的,若行驶轨迹与左转界线存在一个交点,则判断目标车辆左转;若行驶轨迹与右转界线存在一个交点,则判断目标车辆右转;若行驶轨迹与右转界线、左转界线不存在交点,则判定目标车辆直行。S6. Determine and obtain the turning behavior of the target vehicle at the entrance lane according to the positional relationship between the driving trajectory and the position information of the left turn boundary and right turn boundary; that is, determine whether the target vehicle is turning left, turning right or driving straight; specifically, if driving If there is an intersection between the trajectory and the left-turn boundary, it is determined that the target vehicle turns left; if there is an intersection between the driving trajectory and the right-turn boundary, it is determined that the target vehicle turns right; if there is no intersection between the driving trajectory and the right-turn boundary or left-turn boundary, then Determine that the target vehicle is going straight.
S7、基于灯头位置信息采用深度学习算法对P1和P3中目标车辆的信号灯及其相位信息进行识别,若相位一致,则进入步骤S8;否则,无法判断目标车辆对应的闯红灯违法记录的有效性,并结束流程;具体的,在一个实施例中,如图2、图4,目标车辆对应的信号灯为直行圆饼灯头,P1、P3中信号灯识别结果:直行圆饼灯均为红灯,进入步骤S8进行下一步判定;在另一个实施例中,目标车辆对应的信号灯为左转箭头灯,P1中信号灯左转箭头-红灯,P3中信号灯为左转箭头-绿灯,相位不一致,无法判别,结束本流程。S7. Use deep learning algorithms to identify the signal lights and phase information of the target vehicles in P1 and P3 based on the lamp head position information. If the phases are the same, go to step S8; otherwise, the validity of the red light violation record corresponding to the target vehicle cannot be judged. And end the process; specifically, in one embodiment, as shown in Figure 2 and Figure 4, the signal light corresponding to the target vehicle is a straight-going round pie lamp head, and the result of signal light recognition in P1 and P3: the straight-going round pie lights are all red lights, enter the step S8 performs the next step determination; in another embodiment, the signal light corresponding to the target vehicle is a left-turning arrow light, the signal light in P1 is a left-turning arrow-red light, and the signal light in P3 is a left-turning arrow-green light, and the phases are not consistent and cannot be distinguished. End this process.
S8、基于转向行为的判定结果及信号灯及其相位信息进行识别的识别结果,若判定结果与识别结果一致,则判断目标车辆不存在闯红灯行为;否则判定目标车辆的闯红灯违法记录有效。S8. The recognition result based on the judgment result of the steering behavior and the signal light and its phase information. If the judgment result is consistent with the recognition result, it is judged that the target vehicle does not have red light running behavior; otherwise, it is judged that the red light running illegal record of the target vehicle is valid.
本发明的闯红灯车辆的非现场执法图片智能审核方法和系统,通过对非现场执法系统中的原始合成图片进行拆分得到符合GA/T496-2014要求的三张图片,采用如深度学习算法、目标跟踪算法等图片处理技术来对图片进行处理,得到目标车辆的轮廓定位标记、行驶轨迹以及进口道停止线及左转界线、右转界线位置信息,根据行驶轨迹与左转界线、右转界线的位置信息的位置关系来判断目标车辆的实际行驶状态,以及目标车辆灯色与其相位的关 系来判断目标车辆的违法记录是符合;与现有技术相比,本发明通过对目标车辆采用多种图像处理算法实现其闯红灯违法记录的有效性,无需进行人工审核,可提高非现场执法原始检测记录审核工作的效率,降低人工成本。The method and system for intelligently reviewing off-site law enforcement pictures of vehicles running red lights of the present invention can obtain three pictures that meet the requirements of GA/T496-2014 by splitting the original synthesized pictures in the off-site law enforcement system, and adopt deep learning algorithms, goals, etc. Image processing technology such as tracking algorithm is used to process the image to obtain the contour positioning mark, driving trajectory, and entrance stop line, left turn boundary, right turn boundary position information of the target vehicle, according to the driving trajectory and left turn boundary, right turn boundary line The position relationship of the position information is used to determine the actual driving state of the target vehicle, and the relationship between the target vehicle's light color and its phase is used to determine whether the illegal record of the target vehicle is consistent. Compared with the prior art, the present invention adopts multiple images for the target vehicle. The processing algorithm realizes the effectiveness of the illegal record of running a red light without manual review, which can improve the efficiency of the original inspection record review of off-site law enforcement and reduce labor costs.
以上仅为本发明的较佳实施例,但并不限制本发明的专利范围,尽管参照前述实施例对本发明进行了详细的说明,对于本领域的技术人员而言,其依然可以对前述各具体实施方式所记载的技术方案进行修改,或者对其中部分技术特征进行等效替换。凡是利用本发明说明书及附图内容所做的等效结构,直接或间接运用在其他相关的技术领域,均同理在本发明专利保护范围之内。The above are only the preferred embodiments of the present invention, but do not limit the scope of the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still comment on the foregoing specific The technical solutions described in the implementation manners are modified, or some of the technical features are equivalently replaced. Any equivalent structure made by using the contents of the specification and drawings of the present invention, directly or indirectly used in other related technical fields, is similarly within the protection scope of the present invention.