CN117831306A - Crossroad traffic illegal behavior identification method and related device - Google Patents

Crossroad traffic illegal behavior identification method and related device Download PDF

Info

Publication number
CN117831306A
CN117831306A CN202311847966.4A CN202311847966A CN117831306A CN 117831306 A CN117831306 A CN 117831306A CN 202311847966 A CN202311847966 A CN 202311847966A CN 117831306 A CN117831306 A CN 117831306A
Authority
CN
China
Prior art keywords
target
images
vehicle
image
traffic sign
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202311847966.4A
Other languages
Chinese (zh)
Inventor
禹世杰
梅术正
施宏恩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
SHENZHEN HARZONE TECHNOLOGY CO LTD
Original Assignee
SHENZHEN HARZONE TECHNOLOGY CO LTD
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by SHENZHEN HARZONE TECHNOLOGY CO LTD filed Critical SHENZHEN HARZONE TECHNOLOGY CO LTD
Priority to CN202311847966.4A priority Critical patent/CN117831306A/en
Publication of CN117831306A publication Critical patent/CN117831306A/en
Pending legal-status Critical Current

Links

Landscapes

  • Traffic Control Systems (AREA)

Abstract

The application discloses a crossroad traffic violation identification method and a related device, wherein the method comprises the following steps: acquiring a background image of a target intersection of a target road section, and determining various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines and traffic lights; acquiring a target position of a target vehicle by using a target monocular 3D detector; and carrying out illegal recognition on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior recognition result. By adopting the embodiment of the application, the vehicle traffic violation identification accuracy can be improved.

Description

Crossroad traffic illegal behavior identification method and related device
Technical Field
The application relates to the technical field of intelligent traffic or the technical field of computers, in particular to a crossroad traffic illegal behavior identification method and a related device.
Background
The traffic intersection image recognition method is an important research direction in the fields of computer vision and artificial intelligence, and has a wide application prospect. With the increasing number of vehicles, the demands of traffic safety and intelligent traffic are continuously increasing, and higher demands are also put on the recognition accuracy of illegal behaviors.
At present, a common method is to detect a lane line in an image, and then acquire whether the 2D detected lane line is intersected with the lane line to judge whether to line the line, and the detection method is poor in precision, so that the problem of how to improve the vehicle traffic violation identification precision is to be solved.
Disclosure of Invention
The embodiment of the application provides a crossroad traffic violation identification method and a related device, which can improve the accuracy of vehicle traffic violation identification.
In a first aspect, an embodiment of the present application provides a method for identifying traffic offence at an intersection, where the method includes:
acquiring a background image of a target intersection of a target road section, and determining various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines and traffic lights;
acquiring a target position of a target vehicle by using a target monocular 3D detector;
and carrying out illegal recognition on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior recognition result.
In a second aspect, an embodiment of the present application provides an intersection traffic violation identification device, where the device includes: a first acquisition unit, a second acquisition unit and an identification unit, wherein,
The first acquisition unit is used for acquiring a background image of a target intersection of a target road section and determining various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines and traffic lights;
the second acquisition unit is used for acquiring the target position of the target vehicle by using the target monocular 3D detector;
and the identification unit is used for carrying out illegal identification on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior identification result.
In a third aspect, an embodiment of the present application provides an electronic device, including a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, the programs including instructions for performing the steps in the first aspect of the embodiment of the present application.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium, where the computer-readable storage medium stores a computer program for electronic data exchange, where the computer program causes a computer to perform some or all of the steps as described in the first aspect of the embodiments of the present application.
In a fifth aspect, embodiments of the present application provide a computer program product, wherein the computer program product comprises a non-transitory computer readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps described in the first aspect of the embodiments of the present application. The computer program product may be a software installation package.
By implementing the embodiment of the application, the following beneficial effects are achieved:
as can be seen, the method and the related device for identifying traffic illegal behaviors at an intersection described in the embodiments of the present application acquire a background image of a target intersection of a target road section, determine various traffic sign positions through the background image, wherein no vehicle and no person are in the background image, and the various traffic sign positions include at least one of the following: the method comprises the steps of obtaining a target position of a target vehicle by using a target monocular 3D detector, carrying out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain a target illegal behavior recognition result, and taking the extracted arrow marks, the route identifications, various crossroads and the like of various roads on the road as the standard of the crossroad lane crossing, wherein the standard driving direction of each lane can carry out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain the target illegal behavior recognition result, so that the vehicle traffic illegal recognition accuracy can be improved.
Drawings
In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings that are required in the embodiments or the description of the prior art will be briefly described below, it being obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Fig. 1 is a schematic flow chart of a method for identifying traffic offence at an intersection according to an embodiment of the present application;
fig. 2 is a schematic flow chart of another method for identifying traffic offence at an intersection according to an embodiment of the present application;
fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 4 is a functional unit composition block diagram of an intersection traffic offence identification device provided in an embodiment of the present application.
Detailed Description
In order to make the present application solution better understood by those skilled in the art, the following description will clearly and completely describe the technical solution in the embodiments of the present application with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present application.
The terms first, second and the like in the description and in the claims of the present application and in the above-described figures, are used for distinguishing between different objects and not for describing a particular sequential order. Furthermore, the terms "comprise" and "have," as well as any variations thereof, are intended to cover a non-exclusive inclusion. For example, a process, method, system, article, or apparatus that comprises a list of steps or elements is not limited to only those listed steps or elements but may include other steps or elements not listed or inherent to such process, method, article, or apparatus.
Reference herein to "an embodiment" means that a particular feature, structure, or characteristic described in connection with the embodiment may be included in at least one embodiment of the present application. The appearances of such phrases in various places in the specification are not necessarily all referring to the same embodiment, nor are separate or alternative embodiments mutually exclusive of other embodiments. Those of skill in the art will explicitly and implicitly appreciate that the embodiments described herein may be combined with other embodiments.
The electronic devices described in the embodiments of the present application may include smart phones (such as Android mobile phones, iOS mobile phones, windows Phone mobile phones, etc.), tablet computers, palm computers, automobile recorders, video matrixes, traffic guidance platforms, servers, notebook computers, mobile internet devices (MID, mobile Internet Devices), which are merely examples, but not exhaustive, including but not limited to the above electronic devices.
With development of a monocular vision 3D detection method, in the embodiment of the application, various traffic sign positions on a road are extracted, then the 3D positions of vehicles are detected, the coincidence degree of the traffic sign positions and the vehicles is calculated, and the illegal situation is judged. In practical application, because the focal length and the camera shooting angle of various intersection cameras are different, the size of the vehicle is different when the vehicle is imaged, and the accuracy of subsequent image detection can be affected.
The embodiments of the present application are described in detail below.
Referring to fig. 1, fig. 1 is a flow chart of a method for identifying traffic offences at an intersection according to an embodiment of the present application, and as shown in the drawing, the method for identifying traffic offences at an intersection includes:
101. acquiring a background image of a target intersection of a target road section, and determining various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines, traffic lights.
In this embodiment of the present application, the target road section may be preset or default, and the target intersection may also be preset or default. The various traffic sign locations may include at least one of: lane lines, balustrades, crosswalk lines, traffic lights, safety islands, turntables, etc., are not limited herein.
In the specific implementation, the background image can be extracted according to the shot video content, and the background image has no vehicles or no personnel, has the same lifting effect as no person on the road, and only contains stationary objects such as lane lines, arrows, handrails, crosswalk lines, traffic lights and the like.
In specific implementation, a background image of a target intersection of a target road section can be acquired, and various traffic sign positions are determined through the background image, wherein vehicles and personnel are absent in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines, traffic lights.
In practical application, the background image of the target intersection of the target road section can be formed by fusing a plurality of images shot by the same camera and the same visual angle, the number of vehicles, pedestrians and the like at the intersection at different moments is different, the positions of the intersection at different moments are also different, the images at different moments can be collected, the images are fused to obtain the background image by a certain method, and the background image can be obtained by fusing the images by utilizing the principle.
In the specific implementation, vehicles coming and going at the crossroad have randomness, and the judgment of the follow-up vehicle illegal is determined by stably extracting the background map of the road. There are many video background extraction methods, including adaptive background extraction, gaussian Mixture Model (GMM) based background extraction, and fuzzy integration based background extraction. The methods can well extract video background images, and a background extraction method based on GMM is adopted. After the video background images are extracted, target detection is carried out on the background images, lane lines, arrows, handrails, crosswalk lines, traffic lights and the like are identified, and the identification results and positions are recorded.
102. A target position of a target vehicle is acquired using a target monocular 3D detector.
In the embodiment of the application, the target position of the target vehicle is acquired by using a target monocular 3D detector, wherein the target monocular 3D detector may include a monosdle model.
In practical application, because the shooting angles are different in focal length and distance, the imaging sizes of objects with different angles on the camera are the same, when the network is trained, similar images are obtained, but labels (deep labels) are inconsistent, so that one-to-many label mapping is caused, and network confusion is caused, and training is influenced.
In the specific implementation, the monocular 3D detector can be trained according to the unified sample, the position of the vehicle is obtained, the unified and labeled sample can be input into the monole model for training, so that the 3D size of the intersection image is obtained, and the consistency of the depth label is ensured.
Optionally, the method further comprises the following steps:
s1, acquiring images shot by different crossroads to obtain a plurality of first images, wherein each first image corresponds to a focal length and a shooting angle;
s2, carrying out normalization processing on the focal length and the shooting angle of each first image in the plurality of first images to obtain a plurality of second images, wherein the focal length and the shooting angle of each second image are the same;
and S3, training the initial monocular 3D detector through the plurality of second images to obtain the target monocular 3D detector.
In a specific implementation, because the shooting angles are different in focal length and distance, the imaging sizes of objects with different angles on the camera are the same, when the network is trained, similar images are obtained, but labels are inconsistent, so that one-to-many label mapping is caused, and network confusion is caused, and training is influenced.
In the embodiment of the application, the images shot at different crossroads can be obtained to obtain a plurality of first images, each first image corresponds to a focal length and a shooting angle, the focal length and the shooting angle of each first image in the plurality of first images are normalized to obtain a plurality of second images, the focal length and the shooting angle of each second image are the same, the initial monocular 3D detector is trained through the plurality of second images to obtain the target monocular 3D detector,
in the embodiment of the application, the following two training methods may be adopted: 1. converting a training label method; 2. the input image is converted.
The specific principle is that the depth ambiguity is for depth, and in a specific implementation, the problem is directly solved by converting ground truth (ground trunk) depth labels, that is, in a training stage, the depth labels are converted by multiplying a scaling factor. In the inference phase, the predicted depth is in normalized space, and a denormalization transformation is required to recover the metric information.
In specific implementation, the input image is converted into an analog standard camera imaging effect. Specifically, during the training phase the training image is scaled according to focus, multiplied by the ratio to which the scaling corresponds, and then the image is randomly cropped for training. In the reasoning phase, the denormalization transformation adjusts the prediction depth back to the original size without scaling.
In particular, when detecting the image, the image needs to be turned to a uniform viewing angle to accurately predict the size of the vehicle, which is helpful for subsequent development.
Optionally, in the step S1, the capturing of images captured by different intersections may be implemented as follows:
aiming at cameras of each intersection, acquiring lengths of images at different angles during installation so as to obtain lengths of objects at different angles; proportional conversion is carried out according to the length of the object to obtain a proportional coefficient; and acquiring images shot at different crossroads according to the proportionality coefficient.
Wherein, different crossroads correspond to different cameras.
In the embodiment of the application, when 3D target detection is performed, the image is not calibrated, and the size correspondence of the shot image is not known. The viewing angle of the shot has a great influence on the prediction of the size of the image object, so that a certain preprocessing of the image is required. The processing steps are as follows: first, focal length f of each intersection camera i Photographing axis z of camera j At an angle alpha, f to the ground i Inconsistencies with α can lead to inconsistencies in image predictions as well, resulting in difficulty in training 3D size prediction models.
In the embodiment of the application, aiming at the cameras of each intersection, the lengths of the images under different angles are acquired during installation so as to obtain the lengths of the objects under different angles; proportional conversion is carried out according to the length of the object to obtain a proportional coefficient; and acquiring images shot at different intersections according to the proportionality coefficients, namely, each image can correspond to one proportionality coefficient.
In the embodiment of the application, the angle alpha between the shooting axis of the camera and the ground plane is detected firstly, and then the length l of the shot object on the image at different angles is measured during installation 1 ,l 2 ,…,l n . Then, the object length under different visual angles can be obtained, scaling is carried out according to the different object lengths, the images can be unified to one visual angle by multiplying the images by a ratio, and when training is carried out, the images are cut out, so that the images with the same size are obtained.
Optionally, in step S2, the normalization processing is performed on the focal length and the shooting angle of each of the plurality of first images to obtain a plurality of second images, which may be implemented as follows:
identifying license plate numbers and vehicle types in the plurality of first images; acquiring different angles between the camera axis of each camera and the ground, and determining a corresponding affine transformation formula; and according to the license plate numbers and the vehicle types in the first images, the proportionality coefficient of each first image, and affine transformation formulas corresponding to the license plate numbers and the vehicle types in the first images and each camera, unifying the camera spaces of all the images in the first images so as to ensure that the length and the width of each type of vehicle are unified, and obtaining the second images.
In the embodiment of the application, the license plate numbers and the vehicle types in the first images can be identified, different angles between the camera axis of each camera and the ground are obtained, corresponding affine transformation formulas are determined, and according to the license plate numbers and the vehicle types in the first images, the proportionality coefficient of each first image and the affine transformation formulas corresponding to the license plate numbers and the vehicle types in the first images and each camera, all the images in the first images are unified into a camera space so as to ensure that the length and the width of each model of vehicle are unified, a plurality of second images are obtained, and under the statistical camera space, the length and the width of each model of vehicle are unified, so that the marked error can be greatly reduced, and the error of model training is reduced. The labeling result of the processing is input into a common monocular vision 3D detection model, and the size information of the vehicle can be obtained through training.
In the specific implementation, the images shot by different road openings are converted into the images shot under the unified focal length and the unified visual angle, and the length of the same vehicle model is basically fixed, so that the length of the vehicle can be normalized. Specifically, the license plate number on the image can be firstly identified, the vehicle type of the vehicle is determined according to the license plate number, and then the vehicle length is determined according to the vehicle type; and then according to different angles of the camera axis and the ground, calculating an affine transformation formula, wherein the formula has the following characteristics: the image can be converted into a standard camera space f with a camera axis at 90 degrees to the opposite side c Thus, the length of the vehicle is vertical, and errors are reducedThe difference, the length and width of each model on the image are marked accurately, the length and width are recorded as standard size, each image is found out corresponding affine transformation formula according to the angle of the camera, and then the image is converted into unified camera space f according to the transformation formula c Under the space, the length and the width of each model of vehicle are uniform, so that the marking error can be greatly reduced, and the model training error can be reduced. The labeling result of the processing is input into a common monocular vision 3D detection model, and the size information of the vehicle can be obtained through training.
103. And carrying out illegal recognition on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior recognition result.
In the embodiment of the application, since the arrow marks, the route marks and the various crossroads of various roads are extracted, the standard running direction of each lane serving as the standard of the crossroad lane intersection can be used for carrying out illegal recognition on the target vehicle according to the target position and various traffic sign positions, and a target illegal behavior recognition result is obtained. The target offence identification result may include at least one of: the line pressing, the fault path walking, the illegal stop, the red light running and the like are not limited herein, and the target illegal action recognition result can also comprise no illegal action.
In this embodiment of the application, can draw the background image according to the video content of shooing, no vehicle, unmanned in this background image, the effect of mentioning is like no one on the same road, only contain the lane line, the arrow, the railing, crosswalk line, static objects such as traffic lights, make unified transformation to the image sample that different bayonet sockets shoot again, become the sample under unified angle, unified focus, with the relative position of accurate study out the vehicle in the image, correct the label of sample mark again, train monocular 3D detector according to the sample after unifying, obtain the position of vehicle, judge the illegal condition according to the relative position of marks such as vehicle and lane.
Optionally, in step 103, the target vehicle is illegally identified according to the target position and the various traffic sign positions, so as to obtain a target illegal behavior identification result, which may be implemented as follows:
extracting the three-dimensional size of the target vehicle;
judging whether the target vehicle is in line pressing or not by utilizing the three-dimensional size and the set of the positions of the ground lane lines;
and/or the number of the groups of groups,
determining a target track image of the target vehicle in a preset time period according to the target position;
Judging whether the target vehicle walks by mistake according to the target track image and the various traffic sign positions;
and/or the number of the groups of groups,
according to whether the target position is in a preset area or not; the preset area is determined by the various traffic sign positions;
detecting whether the time length of the target position in the preset area is longer than the preset time length or not when the target position is in the preset area;
and/or the number of the groups of groups,
determining whether the traffic light is in a red light state or not through the traffic sign positions and traffic lights corresponding to the vehicles where the target positions are located;
if yes, detecting whether the target position moves to a designated area; the designated area is determined by the various traffic sign locations.
In this embodiment of the application, can draw the three-dimensional size of target vehicle, whether the target vehicle is line ball is judged to the collection of the position of reuse three-dimensional size and ground lane line, in the concrete implementation, to line ball judgement, then can acquire the 3 dimension length, width, the height of vehicle, promptly express as respectively: l (L) 1 ,w 1 ,h 1 Then according to the length of the vehicle and the set { l } of the positions of the ground lane lines in the image label Whether or not there is coincidence to determine whether or not to press the line.
In a specific implementation, the preset time period can be preset or the system defaults, then a target track image of the target vehicle in the preset time period can be determined according to the target position, and the target track image and various traffic signs are used according to the target track imageJudging whether the target vehicle is in a wrong track or not according to the position, namely aiming at the wrong track, firstly extracting the track tra in the vehicle 45s in the video j And drawing the track on an image with the same size as the shot picture, training a deep learning track classifier, and comparing the track classifier with the lane mark travelled by the vehicle according to the classification result, wherein the track is not walked by mistake if the track is consistent with the lane mark travelled by the vehicle, and the track is walked by mistake if the track is inconsistent with the lane mark travelled by the vehicle.
In a specific implementation, the preset area can be preset or default by the system, and the preset area is determined by various traffic sign positions. The preset duration may also be preset or default to the system. And detecting whether the duration of the target position in the preset area is longer than the preset duration or not when the target position is in the preset area according to whether the target position is in the preset area or not. Specifically, for illicit parking: the accurate position of stopping in the picture can be known in advance, the position of the vehicle can be predicted according to the 3D target detection model, the image position is shot at regular intervals in set time, and when the position of the vehicle is in the stopping-violating position, the stopping-violating position of the vehicle is judged.
In the specific implementation, the designated area is preset or default, the designated area is determined by various traffic sign positions, whether the designated area is in a red light state or not can be determined by various traffic sign positions and traffic lights corresponding to vehicles where the target positions are located, and if so, whether the target positions move to the designated area is detected. In specific implementation, aiming at the condition of red light running, firstly, images are acquired, namely, the state that the road crossing is not crossed, the state that the vehicle runs in the middle of the road, the state that the vehicle passes through the traffic light to reach the opposite road crossing are respectively adopted, then, whether the color of the traffic light on the three images is red or not is identified, and if yes, the traffic light running is judged.
For further illustration, as shown in fig. 2, in the embodiment of the present application, a background image of an intersection is extracted, various traffic sign line positions are detected, the sizes of the photographed images are unified, the sizes of the images are checked, the checked images are subjected to position detection by using a single vision 3D image detector, the positions of the vehicles are obtained, and the positions of the vehicles are used for line pressing judgment, lane crossing judgment, stop violation judgment and red light running judgment.
Specifically, whether the vehicle position and the lane line position overlap with each other or not is judged according to the line pressing, if yes, the line is pressed, and if not, the line is not pressed. And (3) aiming at the misroad judgment, extracting the running track of the vehicle, identifying the track by a track classifier, judging whether the lane marks on which the vehicle turns are consistent or not, if so, not going wrong, and if not, going wrong. And judging whether the vehicle position and the lane line position overlap or not according to the illegal parking, wherein the overlapping time exceeds the set value, if yes, the illegal parking is performed, and if not, the illegal parking is not performed. 3 images are collected aiming at red light running judgment, whether the red light exists in various images or not is judged according to the images on a lane and the images when the traffic light passes through the lane, the images when the traffic light passes through the opposite lane or the left and right lane, if yes, the red light is running, and if not, the red light is not running.
It can be seen that, in the method for identifying traffic illegal behaviors at an intersection described in the embodiments of the present application, a background image of a target intersection of a target road section is obtained, and various traffic sign positions are determined through the background image, wherein no vehicle and no person are present in the background image, and the various traffic sign positions include at least one of the following: the method comprises the steps of obtaining a target position of a target vehicle by using a target monocular 3D detector, carrying out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain a target illegal behavior recognition result, and taking the extracted arrow marks, the route identifications, various crossroads and the like of various roads on the road as the standard of the crossroad lane crossing, wherein the standard driving direction of each lane can carry out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain the target illegal behavior recognition result, so that the vehicle traffic illegal recognition accuracy can be improved.
Referring to fig. 3, fig. 3 is a schematic structural diagram of an electronic device according to an embodiment of the present application, as shown in the drawing, the electronic device includes a processor, a memory, a communication interface, and one or more programs, where the one or more programs are stored in the memory and configured to be executed by the processor, and in the embodiment of the present application, the programs include instructions for executing the following steps:
Acquiring a background image of a target intersection of a target road section, and determining various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines and traffic lights;
acquiring a target position of a target vehicle by using a target monocular 3D detector;
and carrying out illegal recognition on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior recognition result.
Optionally, the above program further comprises instructions for performing the steps of:
acquiring images shot by different crossroads to obtain a plurality of first images, wherein each first image corresponds to a focal length and a shooting angle;
normalizing the focal length and the shooting angle of each first image in the plurality of first images to obtain a plurality of second images, wherein the focal length and the shooting angle of each second image are the same;
training an initial monocular 3D detector through the plurality of second images to obtain the target monocular 3D detector.
Optionally, in the acquiring images taken at different intersections, the program includes instructions for:
Aiming at cameras of each intersection, acquiring lengths of images at different angles during installation so as to obtain lengths of objects at different angles;
proportional conversion is carried out according to the length of the object to obtain a proportional coefficient;
and acquiring images shot at different crossroads according to the proportionality coefficient.
Optionally, in the aspect of normalizing the focal length and the shooting angle of each of the plurality of first images to obtain a plurality of second images, the program includes instructions for executing the following steps:
identifying license plate numbers and vehicle types in the plurality of first images;
acquiring different angles between the camera axis of each camera and the ground, and determining a corresponding affine transformation formula;
and according to the license plate numbers and the vehicle types in the first images, the proportionality coefficient of each first image, and affine transformation formulas corresponding to the license plate numbers and the vehicle types in the first images and each camera, unifying the camera spaces of all the images in the first images so as to ensure that the length and the width of each type of vehicle are unified, and obtaining the second images.
Optionally, in the aspect of performing the illegal recognition on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior recognition result, the program includes instructions for executing the following steps:
Extracting the three-dimensional size of the target vehicle;
judging whether the target vehicle is in line pressing or not by utilizing the three-dimensional size and the set of the positions of the ground lane lines;
and/or the number of the groups of groups,
determining a target track image of the target vehicle in a preset time period according to the target position;
judging whether the target vehicle walks by mistake according to the target track image and the various traffic sign positions;
and/or the number of the groups of groups,
according to whether the target position is in a preset area or not; the preset area is determined by the various traffic sign positions;
detecting whether the time length of the target position in the preset area is longer than the preset time length or not when the target position is in the preset area;
and/or the number of the groups of groups,
determining whether the traffic light is in a red light state or not through the traffic sign positions and traffic lights corresponding to the vehicles where the target positions are located;
if yes, detecting whether the target position moves to a designated area; the designated area is determined by the various traffic sign locations.
It can be seen that, in the electronic device described in the embodiment of the present application, a background image of a target intersection of a target road segment is obtained, and various traffic sign positions are determined through the background image, where there is no vehicle or no person in the background image, and the various traffic sign positions include at least one of the following: the method comprises the steps of obtaining a target position of a target vehicle by using a target monocular 3D detector, carrying out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain a target illegal behavior recognition result, and taking the extracted arrow marks, the route identifications, various crossroads and the like of various roads on the road as the standard of the crossroad lane crossing, wherein the standard driving direction of each lane can carry out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain the target illegal behavior recognition result, so that the vehicle traffic illegal recognition accuracy can be improved.
Fig. 4 is a functional block diagram of an intersection traffic offence identification device 400 according to an embodiment of the present application. The intersection traffic offence identification apparatus 400 is applied to an electronic device, and the intersection traffic offence identification apparatus 400 may include: a first acquisition unit 401, a second acquisition unit 402, and an identification unit 403, wherein,
the first obtaining unit 401 is configured to obtain a background image of a target intersection of a target road section, and determine various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines and traffic lights;
the second acquiring unit 402 is configured to acquire a target position of the target vehicle by using a target monocular 3D detector;
the identifying unit 403 is configured to perform illegal identification on the target vehicle according to the target position and the various traffic sign positions, so as to obtain a target illegal behavior identification result.
Optionally, the apparatus 400 is further specifically configured to:
acquiring images shot by different crossroads to obtain a plurality of first images, wherein each first image corresponds to a focal length and a shooting angle;
Normalizing the focal length and the shooting angle of each first image in the plurality of first images to obtain a plurality of second images, wherein the focal length and the shooting angle of each second image are the same;
training an initial monocular 3D detector through the plurality of second images to obtain the target monocular 3D detector.
Optionally, in the aspect of acquiring images taken by different intersections, the apparatus 400 is specifically configured to:
aiming at cameras of each intersection, acquiring lengths of images at different angles during installation so as to obtain lengths of objects at different angles;
proportional conversion is carried out according to the length of the object to obtain a proportional coefficient;
and acquiring images shot at different crossroads according to the proportionality coefficient.
Optionally, in the aspect of normalizing the focal length and the shooting angle of each of the plurality of first images to obtain a plurality of second images, the apparatus 400 is specifically configured to:
identifying license plate numbers and vehicle types in the plurality of first images;
acquiring different angles between the camera axis of each camera and the ground, and determining a corresponding affine transformation formula;
and according to the license plate numbers and the vehicle types in the first images, the proportionality coefficient of each first image, and affine transformation formulas corresponding to the license plate numbers and the vehicle types in the first images and each camera, unifying the camera spaces of all the images in the first images so as to ensure that the length and the width of each type of vehicle are unified, and obtaining the second images.
Optionally, in the aspect of performing the illegal recognition on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior recognition result, the recognition unit 403 is specifically configured to:
extracting the three-dimensional size of the target vehicle;
judging whether the target vehicle is in line pressing or not by utilizing the three-dimensional size and the set of the positions of the ground lane lines;
and/or the number of the groups of groups,
determining a target track image of the target vehicle in a preset time period according to the target position;
judging whether the target vehicle walks by mistake according to the target track image and the various traffic sign positions;
and/or the number of the groups of groups,
according to whether the target position is in a preset area or not; the preset area is determined by the various traffic sign positions;
detecting whether the time length of the target position in the preset area is longer than the preset time length or not when the target position is in the preset area;
and/or the number of the groups of groups,
determining whether the traffic light is in a red light state or not through the traffic sign positions and traffic lights corresponding to the vehicles where the target positions are located;
if yes, detecting whether the target position moves to a designated area; the designated area is determined by the various traffic sign locations.
It can be seen that, the intersection traffic violation recognition device described in the embodiments of the present application obtains a background image of a target intersection of a target road section, determines various traffic sign positions through the background image, where no vehicle and no person are present in the background image, and the various traffic sign positions include at least one of the following: the method comprises the steps of obtaining a target position of a target vehicle by using a target monocular 3D detector, carrying out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain a target illegal behavior recognition result, and taking the extracted arrow marks, the route identifications, various crossroads and the like of various roads on the road as the standard of the crossroad lane crossing, wherein the standard driving direction of each lane can carry out illegal recognition on the target vehicle according to the target position and various traffic sign positions to obtain the target illegal behavior recognition result, so that the vehicle traffic illegal recognition accuracy can be improved.
It may be understood that the functions of each program module of the intersection traffic offence identification apparatus of the present embodiment may be specifically implemented according to the method in the foregoing method embodiment, and the specific implementation process may refer to the relevant description of the foregoing method embodiment, which is not repeated herein.
The embodiment of the application also provides a computer storage medium, where the computer storage medium stores a computer program for electronic data exchange, where the computer program causes a computer to execute part or all of the steps of any one of the methods described in the embodiments of the method, where the computer includes an electronic device.
Embodiments of the present application also provide a computer program product comprising a non-transitory computer-readable storage medium storing a computer program operable to cause a computer to perform some or all of the steps of any one of the methods described in the method embodiments above. The computer program product may be a software installation package, said computer comprising an electronic device.
It should be noted that, for simplicity of description, the foregoing method embodiments are all expressed as a series of action combinations, but it should be understood by those skilled in the art that the present application is not limited by the order of actions described, as some steps may be performed in other order or simultaneously in accordance with the present application. Further, those skilled in the art will also appreciate that the embodiments described in the specification are all preferred embodiments, and that the acts and modules referred to are not necessarily required in the present application.
In the foregoing embodiments, the descriptions of the embodiments are emphasized, and for parts of one embodiment that are not described in detail, reference may be made to related descriptions of other embodiments.
In the several embodiments provided in this application, it should be understood that the disclosed apparatus may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, such as the above-described division of units, merely a division of logic functions, and there may be additional manners of dividing in actual implementation, such as multiple units or components may be combined or integrated into another system, or some features may be omitted, or not performed. Alternatively, the coupling or direct coupling or communication connection shown or discussed with each other may be an indirect coupling or communication connection via some interfaces, devices or units, or may be in electrical or other forms.
The units described above as separate components may or may not be physically separate, and components shown as units may or may not be physical units, may be located in one place, or may be distributed over a plurality of network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
In addition, each functional unit in each embodiment of the present application may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit. The integrated units may be implemented in hardware or in software functional units.
The integrated units described above, if implemented in the form of software functional units and sold or used as stand-alone products, may be stored in a computer readable memory. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution in the form of a software product stored in a memory, including several instructions for causing a computer device (which may be a personal computer, a server or a network device, etc.) to perform all or part of the steps of the above-mentioned method of the various embodiments of the present application. And the aforementioned memory includes: a U-disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a removable hard disk, a magnetic disk, or an optical disk, or other various media capable of storing program codes.
Those of ordinary skill in the art will appreciate that all or a portion of the steps in the various methods of the above embodiments may be implemented by a program that instructs associated hardware, and the program may be stored in a computer readable memory, which may include: flash disk, read-Only Memory (ROM), random access Memory (Random Access Memory, RAM), magnetic disk or optical disk.
The foregoing has outlined rather broadly the more detailed description of embodiments of the present application, wherein specific examples are provided herein to illustrate the principles and embodiments of the present application, the above examples being provided solely to assist in the understanding of the methods of the present application and the core ideas thereof; meanwhile, as those skilled in the art will have modifications in the specific embodiments and application scope in accordance with the ideas of the present application, the present description should not be construed as limiting the present application in view of the above.

Claims (10)

1. A method for identifying traffic violations at an intersection, the method comprising:
acquiring a background image of a target intersection of a target road section, and determining various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines and traffic lights;
Acquiring a target position of a target vehicle by using a target monocular 3D detector;
and carrying out illegal recognition on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior recognition result.
2. The method according to claim 1, wherein the method further comprises:
acquiring images shot by different crossroads to obtain a plurality of first images, wherein each first image corresponds to a focal length and a shooting angle;
normalizing the focal length and the shooting angle of each first image in the plurality of first images to obtain a plurality of second images, wherein the focal length and the shooting angle of each second image are the same;
training an initial monocular 3D detector through the plurality of second images to obtain the target monocular 3D detector.
3. The method of claim 2, wherein the acquiring images taken at different intersections comprises:
aiming at cameras of each intersection, acquiring lengths of images at different angles during installation so as to obtain lengths of objects at different angles;
proportional conversion is carried out according to the length of the object to obtain a proportional coefficient;
And acquiring images shot at different crossroads according to the proportionality coefficient.
4. The method of claim 3, wherein normalizing the focal length and the shooting angle of each of the plurality of first images to obtain a plurality of second images comprises:
identifying license plate numbers and vehicle types in the plurality of first images;
acquiring different angles between the camera axis of each camera and the ground, and determining a corresponding affine transformation formula;
and according to the license plate numbers and the vehicle types in the first images, the proportionality coefficient of each first image, and affine transformation formulas corresponding to the license plate numbers and the vehicle types in the first images and each camera, unifying the camera spaces of all the images in the first images so as to ensure that the length and the width of each type of vehicle are unified, and obtaining the second images.
5. The method according to any one of claims 1-4, wherein said performing the illegal recognition of the target vehicle according to the target location and the various traffic sign locations to obtain a target illegal behavior recognition result includes:
extracting the three-dimensional size of the target vehicle;
Judging whether the target vehicle is in line pressing or not by utilizing the three-dimensional size and the set of the positions of the ground lane lines;
and/or the number of the groups of groups,
determining a target track image of the target vehicle in a preset time period according to the target position;
judging whether the target vehicle walks by mistake according to the target track image and the various traffic sign positions;
and/or the number of the groups of groups,
according to whether the target position is in a preset area or not; the preset area is determined by the various traffic sign positions;
detecting whether the time length of the target position in the preset area is longer than the preset time length or not when the target position is in the preset area;
and/or the number of the groups of groups,
determining whether the traffic light is in a red light state or not through the traffic sign positions and traffic lights corresponding to the vehicles where the target positions are located;
if yes, detecting whether the target position moves to a designated area; the designated area is determined by the various traffic sign locations.
6. An intersection traffic violation identification device, the device comprising: a first acquisition unit, a second acquisition unit and an identification unit, wherein,
the first acquisition unit is used for acquiring a background image of a target intersection of a target road section and determining various traffic sign positions through the background image; no vehicles and no personnel are in the background image, and the various traffic sign positions comprise at least one of the following: lane lines, railings, crosswalk lines and traffic lights;
The second acquisition unit is used for acquiring the target position of the target vehicle by using the target monocular 3D detector;
and the identification unit is used for carrying out illegal identification on the target vehicle according to the target position and the various traffic sign positions to obtain a target illegal behavior identification result.
7. The device according to claim 6, characterized in that it is also specifically adapted to:
acquiring images shot by different crossroads to obtain a plurality of first images, wherein each first image corresponds to a focal length and a shooting angle;
normalizing the focal length and the shooting angle of each first image in the plurality of first images to obtain a plurality of second images, wherein the focal length and the shooting angle of each second image are the same;
training an initial monocular 3D detector through the plurality of second images to obtain the target monocular 3D detector.
8. The apparatus according to claim 7, characterized in that in said capturing images taken at different intersections, said apparatus is particularly adapted to:
aiming at cameras of each intersection, acquiring lengths of images at different angles during installation so as to obtain lengths of objects at different angles;
Proportional conversion is carried out according to the length of the object to obtain a proportional coefficient;
and acquiring images shot at different crossroads according to the proportionality coefficient.
9. An electronic device comprising a processor, a memory for storing one or more programs and configured to be executed by the processor, the programs comprising instructions for performing the steps in the method of any of claims 1-5.
10. A computer-readable storage medium, characterized in that a computer program for electronic data exchange is stored, wherein the computer program causes a computer to perform the method according to any one of claims 1-5.
CN202311847966.4A 2023-12-28 2023-12-28 Crossroad traffic illegal behavior identification method and related device Pending CN117831306A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311847966.4A CN117831306A (en) 2023-12-28 2023-12-28 Crossroad traffic illegal behavior identification method and related device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311847966.4A CN117831306A (en) 2023-12-28 2023-12-28 Crossroad traffic illegal behavior identification method and related device

Publications (1)

Publication Number Publication Date
CN117831306A true CN117831306A (en) 2024-04-05

Family

ID=90520298

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311847966.4A Pending CN117831306A (en) 2023-12-28 2023-12-28 Crossroad traffic illegal behavior identification method and related device

Country Status (1)

Country Link
CN (1) CN117831306A (en)

Similar Documents

Publication Publication Date Title
CN110501018B (en) Traffic sign information acquisition method for high-precision map production
Dhiman et al. Pothole detection using computer vision and learning
CN109284674B (en) Method and device for determining lane line
CN109637151B (en) Method for identifying illegal driving of emergency lane on highway
CN110619279B (en) Road traffic sign instance segmentation method based on tracking
WO2018145602A1 (en) Lane determination method, device and storage medium
Guo et al. Robust road detection and tracking in challenging scenarios based on Markov random fields with unsupervised learning
CN112069643B (en) Automatic driving simulation scene generation method and device
CN111753797B (en) Vehicle speed measuring method based on video analysis
Alam et al. Indian traffic sign detection and recognition
CN103824452A (en) Lightweight peccancy parking detection device based on full view vision
CN110689724B (en) Automatic motor vehicle zebra crossing present pedestrian auditing method based on deep learning
CN110348463B (en) Method and device for identifying vehicle
CN110675637A (en) Vehicle illegal video processing method and device, computer equipment and storage medium
Zhang et al. A graded offline evaluation framework for intelligent vehicle’s cognitive ability
Revilloud et al. An improved approach for robust road marking detection and tracking applied to multi-lane estimation
CN111814593A (en) Traffic scene analysis method and device, and storage medium
CN110147731A (en) Vehicle type recognition method and Related product
CN113903008A (en) Ramp exit vehicle violation identification method based on deep learning and trajectory tracking
CN113256731A (en) Target detection method and device based on monocular vision
Bu et al. A UAV photography–based detection method for defective road marking
CN111046723B (en) Lane line detection method based on deep learning
Bichkar et al. Traffic sign classification and detection of Indian traffic signs using deep learning
CN111383248A (en) Method and device for judging red light running of pedestrian and electronic equipment
CN112528944A (en) Image identification method and device, electronic equipment and storage medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination