A computer vision-based method, system, and apparatus for detecting vehicle cutting in line.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-08-25
- Publication Date
- 2026-08-14
AI Technical Summary
然而,加塞行为进一步恶化了交通拥堵问题
[0037]This invention addresses existing problems by developing a computer vision-based method, system, and apparatus for detecting vehicle cutting in. One embodiment of the method uses computer vision to acquire traffic images and determines the congestion status and new vehicles in each lane through pre-defined lane areas. When a lane is congested, a new vehicle belonging to an adjacent lane is identified as a cutting vehicle, thus accurately detecting cutting behavior and effectively solving the problem of failed cutting vehicle detection in related technologies. Furthermore, adaptive key point selection effectively solves the problem of misjudgment of lane changes caused by partial vehicle obstruction or special shooting angles, demonstrating practical application value.
Smart Images

Figure CN115359438B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of computer vision technology, and in particular to a method, system, and apparatus for detecting vehicle cutting in line based on computer vision. Background Technology
[0002] With the rapid increase in private car ownership, traffic congestion has become an unavoidable problem. Some vehicles resort to cutting in line to reduce waiting time during traffic jams. However, this behavior further exacerbates the traffic congestion problem.
[0003] How to identify and accurately detect vehicles cutting in line has become a technical problem that urgently needs to be solved by those skilled in the art. Summary of the Invention
[0004] To address at least one of the aforementioned problems, a first embodiment of the present invention provides a computer vision-based method for detecting vehicle lane-cutting, comprising:
[0005] The system uses a pre-set vehicle detection model to detect vehicles in the received traffic images in real time and outputs vehicle detection boxes in the traffic images.
[0006] Based on a preset lane area, vehicle information for each lane of the traffic image is obtained according to the vehicle detection box. The vehicle information includes the vehicle detection box within the lane and the congestion information of the lane.
[0007] In response to the congestion information indicating a congested lane, and the presence of a new vehicle detection box in the lane compared to the previous frame of traffic image, it is determined whether the new vehicle detection box belongs to an adjacent lane of the lane. If so, the target vehicle corresponding to the new vehicle detection box is a vehicle that cut in line.
[0008] Furthermore, the step of obtaining vehicle information for each lane of the traffic image based on the preset lane area and the vehicle detection box further includes:
[0009] Based on the preset lane area, the intersection of each vehicle detection frame with each lane is detected to obtain the vehicle detection frames included in each lane;
[0010] Based on the lane direction, the vehicle detection frames in each lane are sorted, and the congestion information of the lane is obtained based on the position information of adjacent vehicle detection frames in the same lane.
[0011] Furthermore, the step of detecting the intersection of each vehicle detection frame with each lane based on a preset lane area to obtain the vehicle detection frames included in each lane further includes: detecting the intersection of the center point and / or the bottom edge midpoint of each vehicle detection frame with each lane to obtain the vehicle detection frames included in each lane.
[0012] The step of sorting the vehicle detection frames of each lane according to the lane direction and obtaining the congestion information of the lane according to the position information of adjacent vehicle detection frames in the same lane further includes: determining whether the distance between the center points of adjacent vehicle detection frames is less than a preset congestion threshold according to the position coordinates of adjacent vehicle detection frames in the same lane; if it is less than the congestion threshold, the lane is considered to be in a congested state.
[0013] Furthermore, before obtaining vehicle information of each lane of the traffic image based on the pre-set lane area and the vehicle detection box, the detection method further includes: obtaining key point information of each vehicle detection box using a pre-set vehicle key point detection model based on the vehicle detection box, wherein the key point information includes coordinate information and classification information of multiple key points of the vehicle detection box, and the classification information includes attribute information and visibility information.
[0014] The step of obtaining vehicle information for each lane of the traffic image based on a pre-set lane area and the vehicle detection frame further includes:
[0015] Based on the pre-set lane area, and according to the key point information of each vehicle detection box, the intersection of each vehicle detection box with each lane is detected to obtain the vehicle detection boxes included in each lane.
[0016] Based on the lane direction, the vehicle detection frames in each lane are sorted, and the congestion information of the lane is obtained based on the position information of adjacent vehicle detection frames in the same lane.
[0017] Furthermore, the plurality of vehicle key points include the wheel key points of each wheel of the target vehicle corresponding to the vehicle detection frame.
[0018] The method of detecting the intersection of each vehicle detection frame with each lane based on the key point information of each vehicle detection frame and obtaining the vehicle detection frames included in each lane further includes: detecting each vehicle detection frame respectively, and determining that the vehicle detection frame belongs to the lane in response to any wheel key point of the vehicle detection frame falling into the lane, and obtaining the vehicle detection frames included in each lane.
[0019] The step of sorting the vehicle detection frames in each lane according to the lane direction and obtaining the congestion information of the lane based on the position information of adjacent vehicle detection frames in the same lane further includes: determining whether the distance between the center points of adjacent vehicle detection frames is less than a preset congestion threshold based on the position coordinates of adjacent vehicle detection frames in the same lane, and / or whether the distance between at least one corresponding key point of adjacent vehicle detection frames in the same lane is less than a preset congestion threshold. If it is less than the congestion threshold, the lane is considered to be in a congested state.
[0020] Furthermore, the step of responding to a lane where the congestion information indicates a congested state, and where the vehicle detection box of the lane has a newly added vehicle detection box compared to the previous frame of the traffic image, and determining whether the newly added vehicle detection box also belongs to an adjacent lane of the lane, and if so, determining that the target vehicle corresponding to the newly added vehicle detection box is a vehicle cutting in line, further includes:
[0021] Extract the coordinates of the center point of each vehicle detection frame in the lane;
[0022] Project the coordinates of each center point onto a preset projection area and obtain the corresponding center point projection coordinates. Use the center point projection coordinates other than the vehicles cutting in line to form a queuing area.
[0023] The system determines the vehicle that cut in line based on the center point coordinates of the vehicle that cuts in line, and obtains the position of the vehicle that cuts in line.
[0024] Furthermore, after determining whether the newly added vehicle detection box belongs to an adjacent lane of the lane in response to the congestion information indicating a congested state, and if so, the target vehicle corresponding to the newly added vehicle detection box is a vehicle cutting in line, the detection method further includes:
[0025] The system captures and stores images of vehicles cutting in line, and uses a pre-set license plate detection model to detect these images and outputs the license plate information of the vehicles cutting in line.
[0026] A second embodiment of the present invention provides a computer vision-based vehicle lane-cutting detection system, including a vehicle detection model, a congestion state detection unit, a lane-cutting detection unit, and a control unit, wherein the control unit is configured to:
[0027] The vehicle detection model is used to detect the received traffic images in real time and output the vehicle detection boxes in the traffic images.
[0028] Based on a pre-set lane area, the congestion detection unit uses the vehicle detection frame to obtain vehicle information for each lane of the traffic image. The vehicle information includes the vehicle detection frame within the lane and the congestion information of the lane.
[0029] In response to a lane being congested, the lane-cutting detection unit uses the presence of a new vehicle detection box in the lane's vehicle detection box compared to the previous frame of the traffic image to determine whether the new vehicle detection box belongs to an adjacent lane of the lane. If so, the target vehicle corresponding to the new vehicle detection box is a lane-cutting vehicle.
[0030] Furthermore, the detection system also includes a vehicle key point detection model, and the control unit is further configured as follows:
[0031] Based on the vehicle detection bounding box, the key point information of each vehicle detection bounding box is obtained using the vehicle key point detection model. The key point information includes the coordinate information and classification information of multiple key points of the vehicle detection bounding box. The classification information includes attribute information and visibility information.
[0032] Furthermore, the detection system also includes a license plate detection model, and the control unit is further configured as follows:
[0033] The system captures and stores images of vehicles cutting in line, uses the license plate detection model to detect these images, and outputs the license plate information of the vehicles cutting in line.
[0034] A third embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon that, when executed by a processor, implements the method described in the first embodiment of the present invention.
[0035] A fourth embodiment of the present invention provides a computer device including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the method described in the first embodiment of the present invention.
[0036] The beneficial effects of this invention are as follows:
[0037] This invention addresses existing problems by developing a computer vision-based method, system, and apparatus for detecting vehicle cutting in. One embodiment of the method uses computer vision to acquire traffic images and determines the congestion status and new vehicles in each lane through pre-defined lane areas. When a lane is congested, a new vehicle belonging to an adjacent lane is identified as a cutting vehicle, thus accurately detecting cutting behavior and effectively solving the problem of failed cutting vehicle detection in related technologies. Furthermore, adaptive key point selection effectively solves the problem of misjudgment of lane changes caused by partial vehicle obstruction or special shooting angles, demonstrating practical application value. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 A flowchart illustrating the detection method according to an embodiment of the present invention is shown;
[0040] Figure 2 A schematic diagram of a vehicle cutting in line according to an embodiment of the present invention is shown;
[0041] Figure 3 A schematic diagram illustrating the vehicle obstruction according to another embodiment of the present invention is shown;
[0042] Figure 4 A schematic diagram showing key points of a vehicle detection frame according to an embodiment of the present invention;
[0043] Figure 5 A schematic diagram showing the projection of the center point of the vehicle detection frame according to an embodiment of the present invention is provided.
[0044] Figure 6 This diagram illustrates a structural block diagram of the detection system according to an embodiment of the present invention.
[0045] Figure 7 This diagram illustrates the structure of a computer device according to another embodiment of the present invention;
[0046] Figure 8 A flowchart illustrating a detection method according to another embodiment of the present invention is shown. Detailed Implementation
[0047] To more clearly illustrate the present invention, the following description, in conjunction with preferred embodiments and accompanying drawings, further explains the invention. Similar components in the drawings are indicated by the same reference numerals. Those skilled in the art should understand that the specific description below is illustrative rather than restrictive and should not be construed as limiting the scope of protection of the present invention.
[0048] According to Article 45 of the Road Traffic Safety Law, when a motor vehicle encounters a queue of vehicles ahead that are stopped or moving slowly, it shall not overtake by using the opposite lane or cut in front of waiting vehicles. According to relevant laws and regulations, the traffic violation of "cutting in" by a motor vehicle will result in 2 points being deducted and a fine of 200 yuan.
[0049] In related technologies, electronic police systems utilize computer vision technology to automatically detect and warn against lane-cutting behavior. Typically, they assess lane congestion based on judging vehicle lane-changing behavior. For example, in assisted driving scenarios, they predict lane-cutting behavior from vehicles ahead for timely response, using real-time lane line detection and judgment of preceding vehicle behavior. However, real-time lane line detection is susceptible to weather and lighting conditions, leading to detection failures. Furthermore, this method can only detect lane-cutting behavior from vehicles ahead, and misjudgments of lane changes are prone to occur when vehicles are partially obscured or at specific angles. Additionally, this method cannot detect following vehicles, making it unsuitable for electronic police systems that need to monitor high traffic volumes.
[0050] Based on the above questions, such as Figure 1 As shown, one embodiment of the present invention provides a computer vision-based method for detecting vehicle cutting in, comprising:
[0051] The system uses a pre-set vehicle detection model to detect vehicles in the received traffic images in real time and outputs vehicle detection boxes in the traffic images.
[0052] Based on a preset lane area, vehicle information for each lane of the traffic image is obtained according to the vehicle detection box. The vehicle information includes the vehicle detection box within the lane and the congestion information of the lane.
[0053] In response to the congestion information indicating a congested lane, and the presence of a new vehicle detection box in the lane compared to the previous frame of traffic image, it is determined whether the new vehicle detection box belongs to an adjacent lane of the lane. If so, the target vehicle corresponding to the new vehicle detection box is a vehicle that cut in line.
[0054] In this embodiment, based on the acquired traffic images and by pre-setting lane regions, and with each traffic image clearly showing the location of each lane, the trained vehicle detection model accurately detects vehicle detection boxes, thereby determining the vehicle detection boxes and lane congestion status for each lane. In the case of lane congestion, it determines whether there is a new vehicle in the current lane and whether the new vehicle belongs to an adjacent lane to confirm whether the vehicle is cutting in line. Thus, it accurately detects vehicle cutting in line behavior through computer vision, effectively solving the problem of failure in detecting cutting in line in related technologies, and has high robustness.
[0055] In a specific example, taking a particular road as an example, the identification of vehicles cutting in line is achieved through the following detection steps, the specific process of which is as follows:
[0056] The first step is to acquire traffic images captured by the road image acquisition device, use a pre-set vehicle detection model to perform real-time detection on the received traffic images, and output the vehicle detection boxes in the traffic images.
[0057] In this embodiment, as Figure 2 As shown, a vehicle detection model is used to detect vehicles in traffic images and output multiple vehicle detection boxes, i.e. Figure 2 The system uses multiple rectangular boxes to identify vehicles, each representing a detected target vehicle. The vehicle detection model is a trained target detection model. This application does not specify a particular target detection model; it can be Faster R-CNN, Cascade R-CNN, Mask R-CNN, YOLO series, SSD, RetinaNet, FCOS, CornerNet, etc., with the design principle being the detection of target vehicles. This embodiment uses a trained YOLOv5 target detection network as the vehicle detection model, which outputs the following based on the input traffic image: Figure 2 The image shown has multiple vehicle detection boxes.
[0058] In this embodiment, training the YOLOv5 object detection network specifically includes:
[0059] First, collect real-world scene images of the road described in this embodiment, including multi-dimensional scene images such as sunny days, rainy days, snowy days, nighttime, cities, towns, eye-level views, overhead views, distant views, and close-up views.
[0060] Secondly, the vehicles in the aforementioned real-scene images are manually labeled and saved as tag files corresponding one-to-one with the real-scene images. The vehicles include motor vehicles such as cars, buses, and trucks.
[0061] Next, the labeled real-world scene images and label files are used as training data and input into the YOLOv5 network for training to obtain the vehicle detection model of this embodiment. YOLOv5 (You Only LookOnce) is a single-stage object detection algorithm released by Ultralytics LLC. Compared to YOLOv4, YOLOv5 features a smaller mean weight file and shorter training and inference speeds, while maintaining only a slight decrease in average detection accuracy.
[0062] This embodiment collects images of real road scenes, including multi-dimensional scenes such as climate, angle, and scene type, and manually annotates the images to obtain high-quality training data; then, it selects the mature and efficient YOLOv5 network in the field for training to obtain a vehicle detection model; thereby, it can quickly and accurately detect the input traffic images to stably output multiple vehicle detection boxes in the traffic images.
[0063] The second step involves obtaining vehicle information for each lane of the traffic image based on a pre-defined lane area and the vehicle detection frame. The vehicle information includes the vehicle detection frame within its lane and the congestion information of that lane.
[0064] In this embodiment, as Figure 2 As shown, based on the obtained vehicle detection frames, and according to the known lane area, the vehicle detection frames included in each lane are obtained by detecting the intersection of each vehicle detection frame with each lane; according to the lane direction, the vehicle detection frames of each lane are sorted, and the congestion information of the lane is obtained based on the position information of adjacent vehicle detection frames within the same lane. Specifically, this includes:
[0065] First, the image acquisition device outputs a traffic image showing lane areas, such as the lane lines marked with solid black lines in the image. This traffic image has four lanes, labeled lane 1, lane 2, lane 3, and lane 4 from right to left. This embodiment addresses the problem in related technologies where real-time lane line detection is easily affected by weather, lighting, and other factors, leading to detection failures. By using pre-defined lane areas for lane determination, this embodiment effectively avoids the aforementioned problems and reduces the hardware cost and computational load of lane line recognition by avoiding real-time calculations. This allows for efficient, stable, and low-cost lane line detection. During the camera installation and debugging phase, this embodiment annotates the lane line information in the scene captured by the camera, for example, by manually marking points to construct polygons, forming lane polygon representations of the lane line information.
[0066] It is worth noting that this invention does not specifically limit the annotation method. Those skilled in the art should select a suitable annotation method according to the specific application scenario, including but not limited to the annotation of road information by on-site camera installation and debugging personnel with the assistance of relevant surveying instruments through client software; or the annotation of road information by traffic management personnel directly reading the road images collected by the camera in the control client of the control center; or the annotation of lane area by the control client first automatically generating the annotation information of the lane area through image recognition technology, and then manually adjusting and confirming it by the management personnel, etc.
[0067] Secondly, vehicle detection frames for each lane are obtained. By detecting the intersection of each vehicle detection frame with each lane, it is determined whether the vehicle detection frame belongs to a particular lane. In this embodiment, the lane area is a polygon determined by manual annotation. By varying the density of the manually marked points, polygons of different precision are achieved, which can accurately identify various complex road information, such as straight lines, arcs, and irregular broken lines; the vehicle detection frames are as follows: Figure 2 The image shows a standard rectangular frame. This embodiment determines whether a vehicle detection frame belongs to a lane by judging whether it intersects with the lane information marked by the manually labeled polygon. Compared to related technologies that rely on real-time lane line detection to determine lane affiliation, the method in this embodiment is simpler, faster, more stable, and more efficient.
[0068] Considering the differences in vehicle height and road curvature, in one optional embodiment, the vehicle detection frames included in each lane are obtained by detecting the intersection of the center point of each vehicle detection frame with each lane, or by detecting the intersection of the midpoint of the bottom edge of each vehicle detection frame with each lane, or by detecting the intersection of the center point of each vehicle detection frame with each lane, and by detecting the intersection of the midpoint of the bottom edge of each vehicle detection frame with each lane, thereby obtaining the vehicle detection frames included in each lane.
[0069] Specifically, the intersection of the center point of each vehicle detection frame with each lane is detected to obtain the vehicle detection frames included in each lane. That is, the center point position of each vehicle detection frame is obtained based on its position information. If the center point position is located within the lane area, the vehicle corresponding to that vehicle detection frame is determined to be within that lane. The intersection of the midpoint of the bottom edge of each vehicle detection frame with each lane is also detected to obtain the vehicle detection frames included in each lane. That is, the midpoint position of the bottom edge of each vehicle detection frame is obtained based on its position information. If the midpoint position is located within the lane area, the vehicle corresponding to that vehicle detection frame is determined to be within that lane. Alternatively, the vehicle corresponding to that vehicle detection frame is determined to be within the lane by simultaneously detecting both the intersection of the center point of each vehicle detection frame with each lane and the intersection of the midpoint of the bottom edge of each vehicle detection frame with each lane.
[0070] In this embodiment, the camera projects an image of the three-dimensional space in reality onto a two-dimensional plane to complete the acquisition and recording of the road scene. During the projection process, due to the different heights of vehicles or when the vehicle is located in a position with a large degree of curvature, it is easy to make misjudgments when using the vehicle detection frame to obtain the vehicle detection frame included in each lane. Therefore, in this embodiment, it is more accurate to obtain the vehicle detection frame included in each lane by using the intersection of the center point and / or the midpoint of the bottom edge of the vehicle detection frame with each lane, which has better accuracy and stability.
[0071] Considering that vehicles may be obscured to varying degrees on actual roads, or that the angle between a vehicle's position and the road's direction of extension may be significant, the vehicle detection bounding box output by the vehicle detection model may not fully represent the vehicle, potentially leading to misjudgments about whether a vehicle is within the lane. For example... Figure 3As shown, in the traffic image from right to left, there are lanes 1, 2, and 3, respectively. The vehicle detection boxes include a first vehicle detection box 10, a second vehicle detection box 20, and a third vehicle detection box 30 located in lane 3, and a fourth vehicle detection box 40 and a fifth vehicle detection box 50 located in lane 1. However, most of the car 20 is obscured by the truck 10. Therefore, the vehicle detection boxes for the car 20 cannot completely and accurately represent the position information of the target vehicle. Thus, using the vehicle detection boxes to determine whether the car 20 belongs to lane 3 is prone to misjudgment. To address this issue, in one optional embodiment, based on the vehicle detection frames, key point information for each vehicle detection frame is obtained using a pre-set vehicle key point detection model. The key point information includes coordinate information and classification information of multiple key points within the vehicle detection frame, with the classification information including attribute information and visibility information. Based on a pre-set lane region, the intersection of each vehicle detection frame with each lane is detected according to the key point information of each vehicle detection frame to obtain the vehicle detection frames included in each lane. According to the lane direction, the vehicle detection frames in each lane are sorted, and congestion information for the lane is obtained based on the position information of adjacent vehicle detection frames within the same lane.
[0072] In this embodiment, as Figure 4 As shown Figure 3 The diagram illustrates the key points of the fifth vehicle detection bounding box 50. The vehicle key point detection model outputs key point information for the input vehicle detection bounding box, including coordinate information and visibility information. The coordinate information is the specific coordinates of the key point, and the visibility information indicates whether the key point is visible in the traffic image. The key points include, but are not limited to, the front and rear lights, roof corners, and wheels of the target vehicle. Specifically, a large number of labeled vehicle key point images are first collected; that is, key point annotations are manually added to the vehicle images to obtain the coordinates of each key point, the name of the corresponding part, and whether each key point is visible. Then, the images and annotations are simultaneously fed into a deep learning network for training. In this embodiment, a ResNet network is used. The model performs coordinate regression training based on the labeled key point information to obtain the key point detection model.
[0073] Specifically, firstly, images of all target vehicles in the traffic image are cropped based on the vehicle detection bounding boxes to obtain vehicle images of all vehicles; then, each vehicle image is input into the vehicle keypoint detection model to obtain the keypoint information of each vehicle detection bounding box. For example... Figure 4As shown, the fifth vehicle detection box 50 includes multiple key points that can characterize the outline of the target vehicle, such as the roof corner points 511, 512, 513 and 514 of the fifth vehicle detection box 50, the headlights 522 and 523 of the fifth vehicle detection box 50, the taillights 515 and 516 of the fifth vehicle detection box 50, and the wheels 517, 518, 521 and 524 of the fifth vehicle detection box 50. Among them, key points 511, 512, 513, 514, 515, 516, 517 and 518 are visible points in the image, while key points 521, 522, 523 and 524 are invisible points in the image, that is, occluded points. For example, wheels 521 and 524 are key points of the two wheels located on the other side of the vehicle, and headlights 522 and 523 are points occluded by roadside bushes.
[0074] like Figure 3 As shown, in the traffic image, the first vehicle detection box 10, being a tall truck, obstructs the second vehicle detection box 20, which only shows the right half of the target vehicle. Using only the vehicle detection box to determine whether a vehicle belongs to lane 3 can easily lead to misjudgments. Therefore, by using a trained vehicle key point detection model, after inputting the vehicle image into the model, all key points of the vehicle are obtained, including but not limited to the front and rear lights, roof corners, and wheels. Specifically, for the second vehicle detection box 20, the vehicle key point detection model can obtain complete vehicle key point information, and use this information and the geometric relationship within the lane polygon to determine the lane, such as... Figure 3 As shown, although the second vehicle detection frame 20 is obscured, its wheel key points can be inferred from the key point model, indicating that the obscured part of the second vehicle detection frame 20 does not cross the lane. This embodiment uses a key point detection model to obtain the key points of each vehicle detection frame for judgment. Compared to the above embodiment which uses the center point and / or the midpoint of the bottom edge of the vehicle detection frame for judgment, this further effectively solves the problem of detection failure caused by incomplete vehicle detection frames due to obscuration.
[0075] Furthermore, considering that when large vehicles are turning in the lane, i.e. at a large angle, the vehicle detection frame is projected onto the ground due to perspective, which can easily lead to lane detection failure, in an optional embodiment, the relationship between the wheel key points and the lane area is used for lane determination.
[0076] In this embodiment, a target vehicle is determined to belong to a lane if any key point of its wheel falls within the polygon of the lane. The lane detection method used in this embodiment effectively avoids misjudgments caused by using vehicle detection frames under occlusion and large angle conditions, enabling accurate, stable, and effective lane determination. For example, each vehicle detection frame is detected separately, and in response to any key point of the target vehicle corresponding to that vehicle detection frame falling within the lane, the vehicle detection frame is determined to belong to that lane, thereby obtaining the vehicle detection frames included in each lane.
[0077] Next, based on the lane direction, the vehicle detection frames in each lane are sorted.
[0078] In this embodiment, the vehicle detection frames for each lane are sorted according to the lane direction. For example, the lane direction includes both horizontal and vertical directions. Considering that actual road conditions are often complex, lanes are rarely perfectly horizontal or vertical, and often have curves or bends, the relevant personnel should determine and mark whether the lane is horizontal or vertical based on the actual situation when installing or debugging the camera equipment. If the lane is vertical, it is sorted vertically according to the vertical coordinate of the center point of the vehicle detection frame; if the lane is horizontal, it is sorted horizontally according to the horizontal coordinate of the center point of the vehicle detection frame. This embodiment, which sorts the vehicle detection frames for each lane according to the lane direction, can adapt to various complex road conditions and obtain all vehicles in each lane after sorting.
[0079] Finally, the congestion information of the lane is obtained based on the position information of adjacent vehicle detection frames within the same lane.
[0080] In this embodiment, based on the position coordinates of adjacent vehicle detection frames within the same lane, it is determined whether the distance between the center points of adjacent vehicle detection frames is less than a preset congestion threshold. If it is less than the congestion threshold, the lane is considered congested. According to Article 45 of the Road Traffic Safety Law, when a motor vehicle encounters vehicles queuing or moving slowly ahead, it is prohibited to overtake by using the opposite lane or cut into the queue. Therefore, it is necessary to first determine whether the road is congested. This involves flexibly adjusting the congestion assessment scale based on the distance of each vehicle from its adjacent front and rear thresholds, and accurately determining the overall congestion situation of the entire lane within the monitoring range of the camera.
[0081] Based on the multiple key point information of the target vehicle corresponding to each vehicle detection frame obtained in the above embodiments, in an optional embodiment, the congestion information of the lane is determined by whether the distance between at least one key point of adjacent vehicle detection frames in the same lane is less than a preset congestion threshold. If the distance is less than the congestion threshold, the lane is considered to be in a congested state.
[0082] In this embodiment, by using key point information, it is possible to more accurately determine whether the lane to which the vehicle belongs is congested.
[0083] It is worth noting that this embodiment also includes congestion judgment based on whether the distance between the center points of adjacent vehicle detection frames used simultaneously in the same lane is less than a preset congestion threshold, and whether the distance between at least one key point corresponding to adjacent vehicle detection frames is less than the preset congestion threshold. If it is less than the congestion threshold, the lane congestion information is in a congested state, further improving the accuracy of the lane congestion status.
[0084] The method described in this embodiment, based on a pre-set lane area, can easily, quickly, and stably detect vehicle detection frames in each lane; sort the vehicle detection frames in each lane according to the lane direction; and flexibly and accurately obtain the lane congestion information based on the position information of adjacent vehicle detection frames in the same lane.
[0085] The third step is to respond to the congestion information indicating that the lane is in a congested state, and the vehicle detection box of the lane has a newly added vehicle detection box compared to the previous frame of traffic image, to determine whether the newly added vehicle detection box also belongs to the adjacent lane of the lane. If so, the target vehicle corresponding to the newly added vehicle detection box is a vehicle that cuts in.
[0086] In this embodiment, according to the definition of lane-cutting behavior, a lane-cutting vehicle should be one that crosses the lane lines. Therefore, judging only the detection boxes of vehicles that cross the lane lines can be much more efficient. Specifically, as shown... Figure 2 As shown, lanes 1 and 2 are not congested, while lanes 3 and 4 are congested. For example, lanes 1 and 2 are straight lanes with a green light, while lanes 3 and 4 are left-turn lanes with a red light. In this state, by comparing the vehicles in each lane in two adjacent traffic images, it can be determined whether a vehicle newly added to that lane in the current frame compared to the previous frame is also in an adjacent lane. If so, it is determined that the vehicle has crossed the lane line and is entering the current lane; otherwise, it is considered a normal merging vehicle.
[0087] like Figure 2 As shown, when lane 2 is not congested while lane 3 is congested, the vehicle detection box 100 corresponding to the black vehicle belongs to both lane 2 and lane 3. That is, the black vehicle crosses lane 2 and lane 3. Therefore, the black vehicle corresponding to the vehicle detection box 100 is determined to be a vehicle that cuts in.
[0088] To further obtain the cutting-in position of the vehicle, in an optional embodiment, in response to the congestion information indicating a congested lane and the presence of a new vehicle detection box in the lane compared to the previous frame of traffic image, determining whether the new vehicle detection box also belongs to an adjacent lane of the lane, and if so, identifying the target vehicle corresponding to the new vehicle detection box as the cutting-in vehicle, further includes: extracting the center point coordinates of each vehicle detection box in the lane; projecting each center point coordinate to a preset projection area and obtaining the corresponding center point projection coordinates; using the center point projection coordinates other than the cutting-in vehicle to form a queuing area; and in response to the center point coordinates corresponding to the cutting-in vehicle belonging to the queuing area, identifying the cutting-in vehicle and obtaining its cutting-in position.
[0089] In this embodiment, as Figure 5 As shown Figure 2 In the partial view, lane 3 is in a congested state and the congestion queue includes vehicle detection boxes 4, which are vehicle detection boxes 200, 300, 400 and 500 along the longitudinal direction. At this time, vehicle detection box 100 is cutting in from lane 2 to lane 3 by crossing the lane line. In this embodiment, the center points of the four vehicle detection frames in lane 3 are projected onto the left coordinate axis y to form a queuing area. Specifically, the center point 201 of vehicle detection frame 200, the center point 301 of vehicle detection frame 300, the center point 401 of vehicle detection frame 400, and the center point 501 of vehicle detection frame 500 are projected onto the coordinate axis y, and are sorted along the y-axis. When the front of the vehicle in vehicle detection frame 100 enters lane 3, in response to the center point 101 of vehicle detection frame 100 being projected onto the coordinate axis y, it is further determined that the target vehicle corresponding to vehicle detection frame 100 has engaged in cutting in line and that the cutting position is between vehicle detection frames 300 and 400, that is, the cutting position of the vehicle is further obtained.
[0090] Based on the detection of the cutting-in behavior of the vehicle cutting in, and considering the need to punish the vehicle cutting in, in an optional embodiment, the detection method further includes: capturing and storing the image of the vehicle cutting in, and using a preset license plate detection model to detect the image of the vehicle cutting in and outputting the license plate information of the vehicle cutting in.
[0091] This embodiment uses the license plate detection model to identify the license plate information of vehicles that cut in line through images of vehicles cutting in line. For example, an image of a vehicle cutting in line is captured on-site, input into the license plate detection model for license plate recognition, and finally the captured on-site image and the license plate recognition result are reported to the traffic management department so that the traffic management department can impose traffic penalties in accordance with the law.
[0092] Thus, the identification of vehicles cutting in line is complete. In this embodiment, a pre-set vehicle detection model is first used to obtain vehicle detection boxes and vehicle IDs. A pre-set vehicle keypoint detection model is then used to obtain keypoint information for each vehicle detection box, including the vehicle's keypoint location and classification. Next, lane determination is performed based on the predicted geometric relationship between the vehicle's wheel keypoints and the lane polygon to obtain the vehicle detection boxes and lane congestion status for each lane. Finally, when a lane is congested, it is determined whether a new vehicle has been added to the adjacent two frames of traffic images, and whether the added vehicle simultaneously belongs to the adjacent lane. This determines whether the added vehicle is cutting in line, enabling accurate detection of vehicle cutting-in behavior using computer vision.
[0093] To further illustrate the detection of vehicle cutting-in in this embodiment, such as Figure 8 As shown, a practical example will be used to illustrate this:
[0094] S1: The image acquisition device acquires traffic images.
[0095] In this embodiment, traffic images are captured in real time using cameras installed on the road. These traffic images include pre-defined lane areas, meaning the lane areas are already marked on the traffic images. This embodiment addresses the problem in related technologies where real-time lane line detection is easily affected by factors such as weather and lighting, leading to detection failures. By using pre-defined lane areas for lane determination, this embodiment effectively avoids the aforementioned problems and reduces the hardware cost and computational load of lane line recognition by avoiding real-time calculations. This allows for efficient, stable, and low-cost lane line detection.
[0096] S2: Acquire traffic images and use a vehicle detection model to detect objects and output vehicle detection boxes.
[0097] In this embodiment, a vehicle detection model is used to detect traffic images in real time and quickly and accurately detect multiple vehicle detection boxes in the traffic images. For example, it detects and traverses all vehicles in the traffic images and outputs the corresponding vehicle detection boxes.
[0098] S3: Use the vehicle key point detection model to obtain key point information for each vehicle detection box.
[0099] In this embodiment, considering that vehicles on actual roads may have varying degrees of occlusion, a vehicle keypoint detection model is used to obtain keypoint information for each vehicle detection box based on the acquired vehicle detection boxes. This keypoint information includes the coordinates and classification information of multiple key points within the vehicle detection box. For example, if a traffic image's vehicle detection box only includes a portion of the target vehicle's image, the vehicle keypoint detection model can obtain multiple key points such as the vehicle's front and rear lights, roof corners, and wheels, as well as the coordinates, location names, and visibility status of each key point, thereby further obtaining the target vehicle's location information.
[0100] S4: Traverse each lane region to obtain the vehicle detection boxes included in each lane region.
[0101] In this embodiment, vehicle detection boxes in each lane area are obtained based on the known lane areas. For example, the vehicle detection boxes included in each lane are obtained based on the intersection of each vehicle detection box and / or the key point information of each vehicle detection box with each lane.
[0102] S5: Determine whether each lane area is congested based on the vehicle detection boxes in each lane area.
[0103] In this embodiment, the vehicle detection frames included in each lane area are sorted according to the lane direction, and the congestion status is determined by the vehicle detection frames of two adjacent vehicles and / or the key point information of each vehicle detection frame.
[0104] S6: Detect whether a vehicle crosses the lane line by using the vehicle detection frame and / or the key point information of each vehicle detection frame.
[0105] In this embodiment, based on the fact that the lane area is in a congested state, the system uses vehicle detection boxes and / or key point information of each vehicle detection box to determine whether there are any new vehicles in the congested lanes, and whether the new vehicle also belongs to an adjacent lane. If so, it indicates that the vehicle is a vehicle that cuts in.
[0106] S7: Determine whether the vehicle cutting in is in the congestion queue of this lane area.
[0107] In this embodiment, to further determine the cutting-in behavior of vehicles cutting in, the congestion queue of the lane area is obtained by projecting the center point coordinates of each vehicle detection box in the lane area onto the projection area, and it is determined whether the center point coordinate projection of the cutting-in vehicle belongs to the congestion queue. By projecting the center point coordinates, the cutting-in behavior of the vehicles cutting in is not only verified again, but the cutting-in position of the vehicles cutting in can also be obtained.
[0108] S8: Collect evidence and report vehicles that cut in line.
[0109] In this embodiment, based on the detected vehicles cutting in line, an image of the vehicle cutting in line is captured as evidence of cutting in line. For example, the vehicle crosses the lane line to enter a lane that is in a congested state. The license plate detection model is used to detect the image of the vehicle cutting in line and output the license plate information of the vehicle cutting in line, so as to be reported to the traffic management department as the basis for traffic penalties.
[0110] This embodiment obtains vehicle detection boxes through a vehicle detection model, and further obtains key point information of each vehicle detection box through a vehicle key point detection model; then, it determines the lane by whether the vehicle's wheel key points are within the lane polygon based on geometric relationships, and obtains the vehicle detection boxes and lane congestion status of each lane; when the lane is congested, it determines whether there are any new vehicles in the two adjacent traffic image frames of that lane, and whether the new vehicles belong to the adjacent lanes, thereby determining whether the new vehicles are cutting in line, which can achieve accurate detection of vehicle cutting in line behavior through computer vision.
[0111] Corresponding to the vehicle lane-cutting detection method based on computer vision provided in the above embodiments, an embodiment of this application also provides a vehicle lane-cutting detection system based on computer vision, such as... Figure 6 As shown, the system includes a vehicle detection model, a congestion detection unit, a lane-jumping detection unit, and a control unit. The control unit is configured to: use the vehicle detection model to perform real-time detection on the received traffic image and output vehicle detection boxes in the traffic image; based on a preset lane area, use the congestion detection unit to obtain vehicle information for each lane in the traffic image according to the vehicle detection boxes, the vehicle information including vehicle detection boxes within the lane and congestion information of the lane; in response to a lane where the congestion information indicates a congested state, use the lane-jumping detection unit to determine whether the newly added vehicle detection box belongs to an adjacent lane of the lane if there is a newly added vehicle detection box compared to the previous frame of the traffic image, and if so, the target vehicle corresponding to the newly added vehicle detection box is a lane-jumping vehicle.
[0112] The vehicle cutting-in detection system of this embodiment acquires traffic images based on computer vision and determines the congestion status and new vehicles in each lane through preset lane areas. When a lane is congested and a new vehicle belongs to an adjacent lane, it is determined that the vehicle is cutting in, thereby accurately detecting vehicle cutting-in behavior and effectively solving the problem of failure in cutting-in vehicle detection in related technologies. It has practical application value. For specific implementation details of this embodiment, please refer to the foregoing embodiments, which will not be repeated here.
[0113] It is worth noting that the various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.
[0114] Another embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the following: real-time detection of a received traffic image using a preset vehicle detection model and outputs vehicle detection boxes in the traffic image; based on a preset lane area and according to the vehicle detection boxes, obtains vehicle information for each lane of the traffic image, the vehicle information including vehicle detection boxes within the lane and congestion information of the lane; in response to a lane being congested and the vehicle detection boxes of the lane having a newly added vehicle detection box compared to the previous frame of the traffic image, determines whether the newly added vehicle detection box also belongs to an adjacent lane of the lane, and if so, the target vehicle corresponding to the newly added vehicle detection box is a vehicle that cut in line.
[0115] In practical applications, the computer-readable storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.
[0116] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.
[0117] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.
[0118] Computer program code for performing the operations of this invention can be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, and C++, as well as conventional procedural programming languages such as "C" or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0119] like Figure 7 As shown, another embodiment of the present invention provides a structural schematic diagram of a computer device. Figure 7 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of the present invention.
[0120] like Figure 7 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).
[0121] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.
[0122] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.
[0123] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 7 Not shown; usually referred to as a "hard drive"). Although Figure 7 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of the present invention.
[0124] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of the present invention.
[0125] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 20. Figure 7 As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 7 As not shown, it can be used in conjunction with computer device 12 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.
[0126] The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a computer vision-based vehicle lane-cutting detection method provided in this embodiment of the invention.
[0127] This invention addresses existing problems by developing a computer vision-based method, system, and apparatus for detecting vehicle cutting in. One embodiment of the method uses computer vision to acquire traffic images and determines the congestion status and new vehicles in each lane through pre-defined lane areas. When a lane is congested, a new vehicle belonging to an adjacent lane is identified as a cutting vehicle, thus accurately detecting cutting behavior and effectively solving the problem of failed cutting vehicle detection in related technologies. Furthermore, adaptive key point selection effectively solves the problem of misjudgment of lane changes caused by partial vehicle obstruction or special shooting angles, demonstrating practical application value.
[0128] Obviously, the above embodiments of the present invention are merely examples for clearly illustrating the present invention, and are not intended to limit the implementation of the present invention. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all the implementation methods here. All obvious variations or modifications derived from the technical solutions of the present invention are still within the protection scope of the present invention.
Claims
1. A method for detecting vehicle cutting in line based on computer vision, characterized in that, include: The system uses a pre-set vehicle detection model to detect vehicles in the received traffic images in real time and outputs vehicle detection boxes in the traffic images. Based on a pre-set lane area, vehicle information for each lane in the traffic image is obtained according to the vehicle detection frames. The intersection of the center point and bottom midpoint of each vehicle detection frame with each lane is detected to determine the lane to which each vehicle detection frame belongs. The pre-set lane area is a fixed polygonal lane area constructed by manually marking lane line information during the camera installation and debugging phase. According to the lane direction, each vehicle detection frame in each lane is sorted. Based on the position coordinates of adjacent vehicle detection frames in the same lane, it is determined whether the distance between the center points of adjacent vehicle detection frames is less than a preset congestion threshold. If it is less than the congestion threshold, the lane is considered to be in a congested state. The vehicle information includes the vehicle detection frames in the lane to which the vehicle belongs, as well as the congestion information of the lane. In response to the congestion information indicating a congested lane, and the presence of a new vehicle detection box in the lane compared to the previous frame of traffic image, it is determined whether the new vehicle detection box belongs to an adjacent lane of the lane. If so, the target vehicle corresponding to the new vehicle detection box is a vehicle that cut in line.
2. The detection method according to claim 1, characterized in that, Before obtaining vehicle information of each lane of the traffic image based on the vehicle detection box according to the preset lane area, the detection method further includes: obtaining key point information of each vehicle detection box using a preset vehicle key point detection model based on the vehicle detection box, wherein the key point information includes coordinate information and classification information of multiple key points of the vehicle detection box, and the classification information includes attribute information and visibility information. The step of obtaining vehicle information for each lane of the traffic image based on a pre-set lane area and the vehicle detection frame further includes: Based on the pre-set lane area, and according to the key point information of each vehicle detection box, the intersection of each vehicle detection box with each lane is detected to obtain the vehicle detection boxes included in each lane. Based on the lane direction, the vehicle detection frames in each lane are sorted, and the congestion information of the lane is obtained based on the position information of adjacent vehicle detection frames in the same lane.
3. The detection method according to claim 2, characterized in that, The multiple vehicle key points include the wheel key points of each wheel of the target vehicle corresponding to the vehicle detection frame. The method of detecting the intersection of each vehicle detection frame with each lane based on the key point information of each vehicle detection frame and obtaining the vehicle detection frames included in each lane further includes: detecting each vehicle detection frame respectively, and determining that the vehicle detection frame belongs to the lane in response to any wheel key point of the vehicle detection frame falling into the lane, and obtaining the vehicle detection frames included in each lane. The step of sorting the vehicle detection frames in each lane according to the lane direction and obtaining the congestion information of the lane based on the position information of adjacent vehicle detection frames in the same lane further includes: determining whether the distance between the center points of adjacent vehicle detection frames is less than a preset congestion threshold based on the position coordinates of adjacent vehicle detection frames in the same lane, and / or whether the distance between at least one corresponding key point of adjacent vehicle detection frames in the same lane is less than a preset congestion threshold. If it is less than the congestion threshold, the lane is considered to be in a congested state.
4. The detection method according to any one of claims 1-3, characterized in that, The step of responding to the congestion information indicating a congested lane, and the presence of a newly added vehicle detection box compared to the previous frame of the traffic image, further includes determining whether the newly added vehicle detection box belongs to an adjacent lane of the lane. If so, the target vehicle corresponding to the newly added vehicle detection box is a vehicle cutting in line. Extract the coordinates of the center point of each vehicle detection frame in the lane; Project the coordinates of each center point onto a preset projection area and obtain the corresponding center point projection coordinates. Use the center point projection coordinates other than the vehicles cutting in line to form a queuing area. In response to the fact that the center point coordinates of the vehicle cutting in line belong to the queuing area, the vehicle cutting in line is identified and the cutting position of the vehicle cutting in line is obtained; and / or After determining whether the newly added vehicle detection box belongs to an adjacent lane of the lane in response to the congestion information indicating a congested state, and if so, the target vehicle corresponding to the newly added vehicle detection box is a vehicle cutting in line, the detection method further includes: The system captures and stores images of vehicles cutting in line, and uses a pre-set license plate detection model to detect these images and outputs the license plate information of the vehicles cutting in line.
5. A vehicle lane-cutting detection system based on computer vision, characterized in that, It includes a vehicle detection model, a congestion detection unit, a lane-cutting detection unit, and a control unit, wherein the control unit is configured as follows: The vehicle detection model is used to detect the received traffic images in real time and output the vehicle detection boxes in the traffic images. Based on a pre-set lane area, the congestion detection unit obtains vehicle information for each lane of the traffic image using the vehicle detection frames. It detects the intersection of the center point and bottom midpoint of each vehicle detection frame with each lane to determine the lane to which each vehicle detection frame belongs. The pre-set lane area is a fixed polygonal lane area constructed by manually marking lane line information during the camera installation and debugging phase. According to the lane direction, each vehicle detection frame in each lane is sorted. Based on the position coordinates of adjacent vehicle detection frames in the same lane, it is determined whether the distance between the center points of adjacent vehicle detection frames is less than a preset congestion threshold. If it is less than the congestion threshold, the lane is considered to be in a congested state. The vehicle information includes the vehicle detection frames in the lane to which the vehicle belongs, as well as the congestion information of the lane. In response to a lane being congested, the lane-cutting detection unit uses the presence of a new vehicle detection box in the lane's vehicle detection box compared to the previous frame of the traffic image to determine whether the new vehicle detection box belongs to an adjacent lane of the lane. If so, the target vehicle corresponding to the new vehicle detection box is a lane-cutting vehicle.
6. The detection system according to claim 5, characterized in that, The detection system also includes a vehicle key point detection model, and the control unit is further configured to: based on the vehicle detection frame, use the vehicle key point detection model to obtain key point information of each vehicle detection frame, wherein the key point information includes coordinate information and classification information of multiple key points of the vehicle detection frame, and the classification information includes attribute information and visibility information; and / or The detection system also includes a license plate detection model, and the control unit is further configured to: capture and store images of the vehicles cutting in line, and use the license plate detection model to detect the images of the vehicles cutting in line and output the license plate information of the vehicles cutting in line.
7. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-4.
8. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-4.
Citation Information
Patent Citations
Method and device for detecting vehicle queue jumping behavior
CN105632186A
Expressway congestion judgment method, device, equipment and medium
CN113936458A
Vehicle dangerous lane change detection method and device and electronic equipment
CN114898325A