A vehicle crossing detection method based on AI technology in complex scenarios

Through deep learning image instance segmentation model and topological relationship algorithm, the efficiency and accuracy issues of vehicle crossing line detection in complex scenarios are solved, efficient and accurate vehicle crossing line detection is achieved, and the supervision capability of the traffic supervision system is improved.

CN115439811BActive Publication Date: 2025-09-12EAST CHINA NORMAL UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210278017.8
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-21
Publication Date
2025-09-12
Estimated Expiration
2042-03-21

AI Technical Summary

Technical Problem

The existing technology for detecting vehicle crossing the line in complex scenarios has problems such as slow computing speed, large computing workload, susceptibility to environmental influences, and low accuracy, making it difficult to meet the needs of efficient and accurate traffic supervision.

Method used

A deep learning image instance segmentation model is used to identify the vehicle area and estimate the wheel position. The intersection of the wheel line and the lane line is used to determine whether the vehicle crosses the lane. The fast exclusion and straddle test algorithms are combined to determine whether the vehicle crosses the lane.

Benefits of technology

It improves the speed and accuracy of vehicle crossing line detection, reduces the cost of manual review, enhances the deterrent effect of the traffic supervision system, and reduces the occurrence of illegal and irregular behaviors.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115439811B_ABST
    Figure CN115439811B_ABST
Patent Text Reader

Abstract

The present invention discloses a method for detecting vehicle lane crossings in complex scenarios based on AI technology. The method utilizes a deep learning image instance segmentation model to identify vehicles, and determines intersecting line segments between wheel lines and drawn lane lines to detect whether the vehicle has crossed the lane line. The method specifically includes the following steps: image acquisition, vehicle identification using Mask R-CNN, drawing wheel lines representing the vehicle body, calculating the spatial topological relationship between lane lines and wheel lines, and parameter configuration. Compared with existing technologies, the present invention is simple, time-saving, labor-saving, economical, and efficient, and can accurately detect vehicle lane crossings in complex scenarios. It significantly improves detection speed and accuracy, reduces manual review costs, and effectively addresses the shortcomings of traditional detection methods, such as susceptibility to environmental influences and low accuracy. This method further improves the current traffic supervision system, enhances regulatory deterrence, and reduces the occurrence of vehicle violations.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of image processing technology, and in particular to a method for detecting vehicle crossing a line in complex scenarios based on AI technology. Background Art

[0002] In recent years, the number of cars has grown rapidly. While widespread adoption has driven industrial progress and economic development, it has also brought with it a host of traffic and urban management issues, including congestion, accidents, and pollution. Given the conflict between the demands of urban management and industrial development, strengthening standardized road management is imperative.

[0003] The emergence of intelligent transportation systems (ITS) has effectively alleviated these conflicts. ITS effectively integrates advanced technologies such as control, artificial intelligence, image processing, data communication, and electronic sensing, and applies them to transportation, service control, and vehicle behavior regulation. This strengthens the connection between roads, vehicles, and traffic participants, thereby achieving the goals of ensuring safety, improving the environment, and conserving energy. ITS is a collection of multiple systems, and road image monitoring systems are one such system used to monitor road violations, illegal activities, and congestion. These systems include vehicle / license plate detection, traffic flow measurement, and vehicle violation / infraction detection. Numerous cameras are distributed across roads, constantly recording and monitoring road surface information at intersections. Therefore, how to automatically process this massive amount of road surface information using computers to implement detection functions has become a major challenge. Vehicle crossing lane detection is a component of vehicle violation / infraction detection. If a vehicle crosses a solid lane line while driving, it often occupies multiple lanes, impacting other traffic participants, leading to traffic congestion, scratches, and even rear-end collisions and rollovers.

[0004] Existing technologies for road crossing detection typically use filtering operators to automatically extract or manually mark solid line areas in an image. Then, a difference method is used to identify the vehicle target, eliminate shadows, and finally, an improved vehicle center detection algorithm or grayscale frame difference statistics algorithm is used to detect road crossings. While these traditional algorithms are effective in processing images, they have limitations, such as slow computational speed, high computational complexity, high requirements for road surface and shooting angles, susceptibility to environmental influences, and low accuracy. Summary of the Invention

[0005] The purpose of the present invention is to provide a vehicle lane crossing detection method based on AI technology in complex scenarios to address the gaps in the existing technology. The deep learning image instance segmentation model is used to identify the corresponding area of ​​the vehicle in the image, estimate the position of the front and rear wheels in the vehicle area, and perform intersection line segment judgment based on the wheel connection line and the drawn lane line to detect whether the vehicle crosses the lane. Through AI technology, vehicle lane crossing detection in complex scenarios can be achieved, which greatly improves the detection speed and accuracy, reduces the cost of manual review, and further improves the current traffic supervision system, enhances the supervision deterrence, and reduces the occurrence of vehicle violations. In order to more accurately and efficiently improve the efficiency and accuracy of traffic violation detection, it has extremely broad application significance.

[0006] The specific technical solution implemented by the present invention is: a method for detecting vehicle lane crossings in complex scenarios based on AI technology. The method is characterized by using a deep learning image instance segmentation model to identify the corresponding area of ​​the vehicle in the image, estimate the position of the front and rear wheels in the vehicle area, and determine the intersection line segment between the wheel connection and the drawn lane line to detect whether the vehicle crosses the lane. The method specifically includes the following steps:

[0007] Step 1: Parameter design and configuration

[0008] Different parameters are configured specifically for the camera positions and angles at different intersections to improve detection accuracy and efficiency. The captured images are then used to generate cropped ROI images, lane line maps, and manually sampled wheel line slopes based on the set parameters.

[0009] The different configuration parameters mainly include: vehicle offset parameters, judgment threshold, detection range and lane line start and end coordinates, etc.

[0010] Step 2: Identify vehicles using deep learning

[0011] The image to be detected is input into the trained Mask R-CNN instance segmentation model for vehicle identification. Different colored masks are assigned to distinguish them and the outline coordinates of all vehicles are stored. After that, some vehicles with poor identification results are eliminated. The vehicle identification mainly includes three types: small and medium-sized vehicles, buses and trucks; the vehicles with poor identification results include: some large trucks and buses, which are too large in size, resulting in only the front of the vehicle being identified but not the body; vehicles far away from the camera, which are too small in the picture and exceed the detection range; vehicles at the edge of the picture, which have incomplete bodies, so the identified vehicle outline does not match the overall shape of the vehicle; and obscured vehicles, which are difficult to judge whether they are driving on the line even with the naked eye because their bodies are largely obscured by other vehicles.

[0012] Step 3: Draw the wheel lines representing the vehicle body

[0013] Through the detection of the Mask R-CNN model, the contour coordinate information of all vehicles is obtained. Among them, the contour point with the largest value in the Y direction of the entire vehicle is the coordinate of the contact point between the front wheel or the rear wheel of the vehicle and the ground (x ymax ,y max The X coordinate of the other wheel is obtained by adding or subtracting a fixed offset from the minimum or maximum value of the vehicle body contour in the X direction. The Y coordinate of the other wheel is obtained by manually sampling the wheel line slope according to the parameters set in step 1 using the following formula (a):

[0014] y2=k*((x2+offset_x)-x ymax )+y max (a);

[0015] Where: (x ymax ,y max ) is the coordinate of the contour point with the largest value in the Y direction of the vehicle; (x2, y2) is the other wheel point to be determined; offset_x is the fixed offset; k is the slope of the wheel line.

[0016] Step 4: Calculate the spatial topological relationship between lane lines and wheel lines

[0017] Based on the wheel connection obtained in step 3 and the lane line configured in step 1, their spatial topological relationship can be determined through a line segment intersection algorithm, and finally compared with the threshold to determine whether the vehicle has violated the lane crossing rule.

[0018] Compared with the existing technology, the present invention has the advantages of being simple, time-saving, labor-saving, economical, efficient, and can accurately realize vehicle line-crossing detection in complex scenarios, greatly improving the detection speed and accuracy, reducing the cost of manual review, and better solving the shortcomings of traditional detection methods that are easily affected by the environment and have low accuracy, thereby further improving the current traffic supervision system, enhancing the deterrent effect of supervision, and reducing the occurrence of vehicle violations. It has a wide range of application significance for more accurately and efficiently improving the efficiency and accuracy of traffic violation detection. BRIEF DESCRIPTION OF THE DRAWINGS

[0019] Figure 1 Flowchart of the present invention;

[0020] Figure 2 To crop the ROI image;

[0021] Figure 3 To draw lane line map;

[0022] Figure 4 Detect vehicle images for Mask R-CNN;

[0023] Figure 5 This is a schematic diagram for wheel line calculation;

[0024] Figure 6 Schematic diagram of the rapid exclusion experiment;

[0025] Figure 7 Schematic diagram of the straddling experiment;

[0026] Figures 8 and 9 is the image of the detected vehicles crossing the line;

[0027] Figures 10 and 11 This is a picture of the detected vehicles that did not cross the line. DETAILED DESCRIPTION

[0028] See attached Figure 1 , the specific implementation steps of the present invention are as follows:

[0029] Step 1: Parameter design and configuration

[0030] Refer to Appendix 1. For the positions and angles of cameras at different intersections, different parameters are configured to improve detection accuracy and efficiency. These mainly include vehicle offset parameters, judgment thresholds, detection ranges, and the coordinates of the beginning and end of lane lines. Specific parameter settings are detailed in Table 1 below:

[0031] Table 1 Parameter setting table

[0032]

[0033]

[0034] See Figure 2 , the acquired image is cropped according to the set parameters.

[0035] See Figure 3 , the acquired image is used to obtain the lane line drawing according to the set parameters.

[0036] Step 2: Identify vehicles using deep learning

[0037] The image to be detected is fed into the trained Mask R-CNN instance segmentation model for vehicle identification. The model identifies three main types of vehicles: small and medium-sized vehicles, buses, and trucks. Different colored masks are assigned to distinguish these vehicles, and the outline coordinates of all vehicles are stored. The model then removes vehicles with poor recognition results. These include: certain large trucks and buses, where the vehicle's large size results in only the front end being recognized, but not the entire body; vehicles far from the camera, which appear too small in the image and are outside the detection range; vehicles at the edge of the image, where the recognized outline does not match the overall shape due to incomplete bodywork; and vehicles that are obscured by other vehicles, where it is difficult to determine whether they are crossing the roadway, even with the naked eye.

[0038] See Figure 4 , use deep learning to identify vehicles, and filter out some vehicles with poor recognition results as required to obtain the Mask R-CNN detection vehicle map.

[0039] Step 3: Draw the wheel lines representing the vehicle body

[0040] See Figure 5 Through the detection of the Mask R-CNN model, the contour coordinate information of all vehicles is obtained. Among them, the contour point with the largest value in the Y direction of the entire vehicle is the coordinate of the contact point between the front wheel or the rear wheel of the vehicle and the ground (x ymax ,y max The X coordinate of the other wheel is obtained by adding or subtracting a fixed offset from the minimum or maximum value of the vehicle body contour in the X direction. Based on the wheel line slope obtained by manual sampling in step 1, the Y coordinate of the other wheel is obtained using the following formula (a):

[0041] y2=k*((x2+offset_x)-x ymax )+y max (a);

[0042] Where: (x ymax ,y max ) is the coordinate of the contour point with the largest value in the Y direction of the vehicle; (x2, y2) is the other wheel point to be determined; offset_x is the fixed offset; k is the slope of the wheel line.

[0043] Step 4: Calculate the spatial topological relationship between lane lines and wheel lines

[0044] Based on the wheel lines obtained in step 3 and the lane lines configured in step 1, their spatial topological relationship can be determined using a line segment intersection algorithm. This algorithm mainly consists of two parts: a rapid repulsion test and a straddle test.

[0045] See Figure 6a. The principle of the rapid repulsion experiment is that if any two line segments intersect, then their bounding rectangles must also intersect; conversely, if their bounding rectangles do not intersect, then the two line segments must also not intersect.

[0046] See Figure 6 b. Even after the rapid repulsion test, there are still cases where the two line segments do not intersect. Therefore, additional straddle experiments are needed to continue testing.

[0047] See Figure 7 The straddling experiment means that to prove that line segments AB and CD intersect, points A and B must be on opposite sides of line segment CD, and points C and D must be on opposite sides of line segment AB. Therefore, using the vector cross product method, connect the two endpoints of line segment CD with one of the endpoints of line segment AB to form vectors. Cross-product these vectors with vector AB. If the results have opposite signs, C and D are on opposite sides of line segment AB. Similarly, A and B can be proved to be on opposite sides of line segment CD.

[0048] See Figures 8 to 11 , the spatial topological relationship is judged by the line segment intersection algorithm, and finally compared with the threshold to obtain the result of whether the vehicle has violated the line.

[0049] The above is only a preferred implementation of the present invention and does not limit the present invention in any form. Therefore, any simple modifications, equivalent changes and modifications made to the above implementation method based on the technical essence of the present invention without departing from the content of the technical solution of the present invention shall be included in the scope of the claims of the present invention as long as they are equivalent to the implementation of the present invention.

Claims

1. A vehicle crossing line detection method based on AI technology in complex scenarios, characterized by This method uses a deep learning image instance segmentation model to identify the corresponding area of ​​the vehicle in the image, estimate the position of the front and rear wheels in the vehicle area, and determine the intersection line segment between the wheel connection and the drawn lane line to detect whether the vehicle crosses the lane. The specific steps include the following: Step 1: Parameter design and configuration Different parameters are configured for the camera placement and angle at different intersections. The captured images are then used to generate cropped ROI images, lane line drawings, and manually sampled wheel line slopes based on the set parameters. Step 2: Identify vehicles using deep learning The image to be detected is input into the trained Mask R-CNN instance segmentation model for vehicle identification. Different color masks are assigned to distinguish the images and the outline coordinates of all vehicles are stored. Some vehicles with poor recognition results are eliminated. Step 3: Draw the wheel lines representing the vehicle body Through the detection of the Mask R-CNN model, the contour coordinate information of all vehicles is obtained. Among them, the contour point with the largest value in the Y direction of the entire vehicle is the coordinate of the contact point between the front wheel or the rear wheel of the vehicle and the ground (x ymax ,y max The X coordinate of the other wheel is obtained by adding or subtracting a fixed offset from the minimum or maximum value of the vehicle body contour in the X direction. The Y coordinate of the other wheel is obtained by using the following formula (a) to calculate the slope of the wheel line obtained by manual sampling in step 1: y2=k*((x2+offset_x)-x ymax )+y max (a); Among them, (x ymax ,y max ) is the coordinate of the vehicle's contour point with the maximum value in the Y direction; (x2, y2) is the other wheel point to be determined; offset_x is the fixed offset; k is the slope of the wheel line; Step 4: Calculate the spatial topological relationship between lane lines and wheel lines Based on the wheel connection obtained in step 3 and the lane line configured in step 1, their spatial topological relationship is determined through a line segment intersection algorithm, and finally compared with the threshold to determine whether the vehicle has violated the lane crossing rule.

2. The vehicle crossing line detection method based on AI technology in complex scenarios according to claim 1 is characterized by The parameter design and configuration in step 1 mainly include: vehicle offset parameters, judgment threshold, detection range and lane line start and end coordinates.

3. The vehicle crossing line detection method based on AI technology in complex scenarios according to claim 1 is characterized in that The vehicle recognition in step 2 mainly includes three types: small and medium-sized vehicles, buses, and trucks. The vehicles with poor recognition results are eliminated, including: some large trucks and buses, which are too large in size, resulting in only the front of the vehicle being recognized but not the body; vehicles far away from the camera, which are too small in size in the picture and exceed the detection range; vehicles at the edge of the picture, which have incomplete bodies, so that the recognized vehicle outline does not match the overall shape of the vehicle; and obscured vehicles, which are obscured by other vehicles over a large area, making it difficult to judge whether they are driving on the line even with the naked eye.

Citation Information

Patent Citations

  • Line pressing detection method in auxiliary driving

    CN110287884A

  • Device, method and computer program for identifying a traffic sign in an image

    US20100067805A1