Vehicle illegal parking detection method, system and computer storage medium
By detecting areas of interest and vehicles in the target video frame, combined with lane division models and vehicle detection frame analysis, the shortcomings of ball cameras and gun cameras in vehicle illegal parking detection are solved, and efficient and accurate illegal parking detection is achieved.
Patent Information
- Application Number
- CN202210428127.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-22
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2042-04-22
AI Technical Summary
The dome cameras in existing surveillance equipment cannot specify the detection area, resulting in their ineffective use in vehicle parking detection tasks. In addition, the changes in the viewing range of the gun camera lead to a high false alarm rate, and the deployment of lane lines requires a lot of manpower and material resources.
By detecting the region of interest and all target vehicles in the target video frame, lane division is performed using the trained lane division model and DeepLabv3 model. The vehicle detection frames of the candidate vehicles in different video frames are combined to analyze whether the vehicle is illegally parked.
It improves the accuracy of vehicle illegal parking detection and the utilization rate of existing monitoring resources, reduces the false alarm rate, and supports video data detection of spherical cameras.
Smart Images

Figure CN114743146B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present application relate to the field of image recognition technology, and in particular to a method and device for detecting illegal parking of a vehicle, and a computer storage medium. Background Art
[0002] In the past decade, more and more people have owned private cars. The increasing number of vehicles has made the road traffic load heavier, especially during peak traffic hours. Once an accident occurs, it is easy to cause congestion. Traffic police need to confirm the location of the congestion as soon as possible, find the problem, and deal with it in a timely manner.
[0003] Currently, the surveillance equipment installed on highways and urban roads includes many dome cameras. However, this type of camera cannot be effectively used in vehicle parking violation detection tasks because it cannot specify the detection area.
[0004] In view of this, the present application provides a vehicle parking violation detection technology applicable to a spherical camera. Summary of the Invention
[0005] In view of the above problems, the present application provides a method, device and computer storage medium for detecting illegal parking of vehicles, which can at least partially solve the problems in the prior art.
[0006] The first aspect of the present application provides a method for detecting illegally parked vehicles, comprising: sequentially acquiring target video frames in a target video according to a preset frame interval; detecting an area of interest and all target vehicles in each target video frame to determine a candidate vehicle in each target video frame; and obtaining an analysis result of illegally parked vehicles for the candidate vehicle based on each vehicle detection frame of the same candidate vehicle in each target video frame.
[0007] The second aspect of the present application provides a vehicle illegal parking detection device, including: an acquisition module, used to sequentially acquire each target video frame in the target video according to a preset frame interval; a screening module, used to detect the area of interest and all target vehicles in each target video frame to determine the candidate vehicle in each target video frame; a detection module, used to obtain the illegal parking analysis result of the candidate vehicle based on each vehicle detection frame of the same candidate vehicle in each target video frame.
[0008] A third aspect of the present application provides a computer storage medium, wherein the computer storage medium stores instructions for executing the steps of the method described in the first aspect.
[0009] In summary, the vehicle parking violation detection solution of the embodiment of the present application detects the region of interest and all target vehicles in the target video frame to determine the candidate vehicles in the region of interest, and then detects the vehicle detection frames of the same candidate vehicle in different target video frames to obtain an analysis result on whether the candidate vehicle is illegally parked. Therefore, the present application is suitable for performing vehicle parking violation detection on video data with a variable viewing range, and can improve the accuracy of the parking violation detection results. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments recorded in the embodiments of the present application. For ordinary technicians in this field, other drawings can also be obtained based on these drawings.
[0011] Figure 1 This is a processing flow chart of a vehicle illegal parking detection method according to an exemplary embodiment of the present application.
[0012] Figures 2 to 8 This is a processing flow chart of a vehicle illegal parking detection method according to another exemplary embodiment of the present application.
[0013] Figure 9 This is a structural block diagram of a vehicle illegal parking detection device according to an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0014] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present application, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the embodiments of the present application, all other embodiments obtained by ordinary technicians in this field should fall within the scope of protection of the embodiments of the present application.
[0015] Currently, the more commonly used road behavior analysis technology is mainly based on a gun-type camera whose camera position does not change. By marking lane lines, turning directions, traffic lights and other information on the image, it distinguishes which vehicles are moving on the road and which are parked vehicles on the roadside within a given lane frame. Then, based on the parking time of the vehicle, it determines whether there is any illegal parking.
[0016] However, the above solution has the following disadvantages: 1. Although the field of view of the gun camera can remain basically unchanged, it is inevitable that the camera's fixing device may loosen, causing the camera's field of view to move slightly. In this case, lane differentiation based on pre-marked lane lines can easily cause false alarms and require a lot of manual maintenance; 2. It is completely unusable for dome cameras because dome cameras need to be frequently rotated to zoom in and out and cannot be maintained; 3. When a large number of cameras need to be deployed, lane lines need to be manually divided for each camera, and this operation requires a lot of manpower and material support.
[0017] In view of this, the present application provides a vehicle illegal parking detection solution, which can at least partially solve the problems existing in the above-mentioned existing technical solutions.
[0018] The following describes in detail various embodiments of the present application in conjunction with the accompanying drawings.
[0019] Figure 1 This is the processing flow of the vehicle illegal parking detection method of the exemplary embodiment of this application. As shown in the figure, the vehicle illegal parking detection method of this embodiment mainly includes the following steps:
[0020] Step S102: sequentially obtain target video frames in the target video according to a preset frame interval.
[0021] Optionally, the target video can be obtained from one of a dome camera and a box camera, but is not limited thereto and can also be other types of cameras.
[0022] Optionally, the viewing range of the target video may be fixed or non-fixed.
[0023] Optionally, each target video frame in the target video may be extracted sequentially based on a preset frame interval.
[0024] Step S104 : detecting the region of interest and all target vehicles in each target video frame to determine candidate vehicles in each target video frame.
[0025] Optionally, an area of interest including a target lane and all target vehicles may be detected in each target video frame, and target vehicles located in the area of interest may be determined as candidate vehicles for each target video frame.
[0026] Optionally, the target lane may include at least one of a motor vehicle lane, a non-motor vehicle lane, an emergency lane, and a sidewalk.
[0027] Optionally, a trained lane segmentation model may be used to perform lane segmentation on the target video frame to determine a target lane in the target video frame.
[0028] Step S106: Obtain the illegal parking analysis result of the candidate vehicle based on each vehicle detection frame of the same candidate vehicle in each target video frame.
[0029] Optionally, two vehicle detection frames of the same candidate vehicle in two adjacent target video frames may be compared to obtain an intersection-and-union ratio of the candidate vehicle, and an analysis result of whether the candidate vehicle is illegally parked may be determined based on this.
[0030] In summary, the vehicle parking violation detection method of this embodiment detects the region of interest and all target vehicles in each target video frame to determine the candidate vehicles within the region of interest, and analyzes whether the candidate vehicle is illegally parked by comparing the vehicle detection frames of the same candidate vehicle in different target video frames. Accordingly, the present application can perform vehicle parking violation detection on video data with a fixed viewing range or a non-fixed viewing range, and can support video data from spherical cameras to improve the utilization rate of existing monitoring resources and have a higher accuracy of detection results.
[0031] Figure 2 The following figure shows the processing flow of the vehicle parking violation detection method according to another embodiment of the present application. As shown in the figure, this embodiment is a specific implementation plan of the above step S104. As shown in the figure, this embodiment mainly includes the following steps:
[0032] Step S202: determine one target video frame as the current video frame in sequence.
[0033] Specifically, according to the timestamp of each target video frame, a target video frame may be acquired in sequence as the current video frame.
[0034] Step S204: Detect all target vehicles in the current video frame and determine each vehicle detection frame corresponding to each target vehicle.
[0035] In this embodiment, all motor vehicles in the current video frame may be detected to determine a vehicle detection frame for each motor vehicle.
[0036] Step S206 : determining a region of interest including the target lane in the current video frame based on the target lane identified from the current video frame.
[0037] Optionally, the target lane may include at least one of a motor vehicle lane, a non-motor vehicle lane, an emergency lane, and a sidewalk.
[0038] Optionally, a DeepLabv3 model may be used to perform lane segmentation on the current video frame to determine a target lane in the current video frame.
[0039] Specifically, the DeepLabv3 model can be used to segment the road to obtain motor vehicle lane areas, non-motor vehicle lane areas, solid line areas, dotted line areas, emergency lane areas, diversion areas at forks, sidewalks, etc.
[0040] Step S208: Identify all vehicle detection frames within the region of interest to determine the target vehicle within the target lane as a candidate vehicle for the current video frame.
[0041] In this way, the present application can automatically detect the target lane in the target video frame and determine whether the candidate vehicle in the target lane is illegally parked, so as to support the execution of vehicle illegal parking analysis for video data with non-fixed viewing range.
[0042] Figure 3 The following figure shows the process flow of processing vehicle congestion status in another embodiment of the present application. This embodiment shows the technical solution for identifying the target lane in each video frame. As shown in the figure, this embodiment mainly includes the following steps:
[0043] In step S302, the lane division information of the target video corresponding to the current video frame is queried, and based on the framing range of the current video frame and the framing range of the previous video frame, the framing range of the current video frame is analyzed to see whether it has changed. Based on the lane division information query result and the framing range analysis result, one of step S304, step S306, and step S308 is selected for execution.
[0044] In this embodiment, the previous video frame is a target video frame that is extracted from the target video and is previous to the current video frame.
[0045] Step S304: If the lane division information of the target video is not found, lane division is performed for the current video frame.
[0046] In step S306, if the lane division information of the target video is found and it is determined that the viewing range of the current video frame has changed, lane division is performed for the current video frame, and the lane division information of the target video is updated based on the lane division information of the current video frame.
[0047] Step S308: If the lane division information of the target video is found and it is determined that the framing range of the current video frame has not changed, the target lane in the current video frame is identified based on the lane division information of the target video.
[0048] In this embodiment, the target lane may include at least one of a motor vehicle lane, a non-motor vehicle lane, an emergency lane, and a sidewalk.
[0049] In summary, with the target lane recognition scheme described in this embodiment, if it is determined that the framing range in the target video frame has not changed, the current lane division result is used. Lane division is only re-executed when it is determined that the framing range in the target video frame has changed, thereby reducing the system's computational load and improving system processing efficiency.
[0050] Figure 4 FIG2 shows the processing flow of another exemplary embodiment of the present application. This embodiment is a specific implementation of the above step S106. As shown in the figure, this embodiment mainly includes the following steps:
[0051] Step S402: Obtain a candidate vehicle.
[0052] Specifically, when there are multiple candidate vehicles in the target video frame, one candidate vehicle may be selected in turn, and an analysis may be performed on whether the selected candidate vehicle is illegally parked.
[0053] Step S404: Obtain a first intersection-over-union (IoU) value of the candidate vehicle based on two vehicle detection frames of the candidate vehicle in two adjacent target video frames.
[0054] Specifically, the first intersection-to-union ratio of the candidate vehicle may be calculated by dividing the intersection of two vehicle detection frames of the candidate vehicle in two adjacent target video frames by the union of two vehicle detection frames of the candidate vehicle in two adjacent target video frames.
[0055] Step S406 , determining whether the first IoU value is greater than a static IoU threshold value, if not, executing step S408 , if yes, executing step S410 .
[0056] Optionally, the static IoU threshold is greater than 0.9. Preferably, the static IoU threshold can be set to 0.95.
[0057] Specifically, the first IoU value of the candidate vehicle is compared with a stationary IoU threshold value to analyze whether the candidate vehicle is in a stationary state.
[0058] Step S408: Eliminate candidate vehicles.
[0059] Specifically, if the intersection-and-union (IoU) value of the two vehicle detection frames of a candidate vehicle in two adjacent target video frames is not greater than the stationary IoU threshold, it indicates that the candidate vehicle has moved, and the candidate vehicle is eliminated.
[0060] Step S410 , obtaining second intersection-over-union (IoU) values of the stationary vehicle corresponding to each target video frame based on each vehicle detection frame and an average detection frame of each vehicle detection frame in a plurality of target video frames.
[0061] Optionally, an average detection frame can be calculated based on the vehicle detection frames of the stationary vehicle between the starting video frame and the target video frame before the current video frame, and the intersection-and-union ratio between the vehicle detection frame of the stationary vehicle in the current video frame and the average detection frame can be calculated to determine a second intersection-and-union ratio of the stationary vehicle corresponding to the current video frame.
[0062] Step S414: Obtain a preliminary parking violation analysis result of whether the stationary vehicle is illegally parked based on the second intersection-over-union ratios of the stationary vehicle corresponding to each target video frame and the preset interval range.
[0063] In summary, the present application analyzes whether a stationary vehicle is illegally parked by calculating the average detection frame, which can improve the accuracy of the vehicle illegal parking analysis results.
[0064] Figure 5 The processing flow of the vehicle parking violation analysis method of another exemplary embodiment of the present application is shown. This embodiment is a specific implementation of the above step S412. As shown in the figure, this embodiment mainly includes the following steps:
[0065] Step S502 : The target video frame in which the candidate vehicle is determined to be a stationary vehicle is used as the starting video frame.
[0066] Step S504 : based on the starting video frame, sequentially obtain a target video frame as the current video frame, and determine the previous target video frame of the current video frame as the previous video frame.
[0067] For example, if the candidate vehicle is determined to be a stationary vehicle in the first target video frame, the first target video frame is determined as the starting video frame of the stationary vehicle; if the current video frame is the sixth target video frame, the fifth target video frame is determined as the previous video frame.
[0068] Step S506 , determining an average detection frame based on the vehicle detection frames in the target video frames between the starting video frame and the previous target video frame of the stationary vehicle.
[0069] For example, an average detection frame is determined based on the vehicle detection frames of the stationary vehicle in the first to fifth target video frames.
[0070] In this embodiment, an average detection frame is determined based on the vehicle detection frame of the stationary vehicle in each non-jittered video frame from the starting video frame to the previous target video frame, thereby improving the accuracy of the vehicle illegal parking analysis result.
[0071] For the specific judgment scheme of non-jitter video frames, please refer to the following Figure 6 Specific embodiment of the present invention.
[0072] Step S508: Determine a second intersection-over-union (IoU) value of the stationary vehicle corresponding to the current video frame based on the vehicle detection frame and the average detection frame of the stationary vehicle in the current video frame.
[0073] For example, the intersection-and-union ratio between the vehicle detection frame and the average detection frame of the stationary vehicle in the sixth frame is calculated to obtain a second intersection-and-union ratio value of the stationary vehicle corresponding to the sixth target video frame.
[0074] Figure 6 The processing flow of the vehicle parking violation analysis method according to another embodiment of the present application is shown. This embodiment can continue to execute the above step S508. As shown in the figure, this embodiment mainly includes the following steps:
[0075] Step S602 , determining whether the second intersection-to-union ratio satisfies a preset interval range, if so, proceeding to step S604 , if not, proceeding to step S612 .
[0076] In this embodiment, the preset interval range is between 0.5 and 0.8. That is, when the second IoU value of the stationary vehicle corresponding to the current video frame falls between 0.5 and 0.8, step S604 is executed; otherwise, step S606 is executed.
[0077] Step S604: determine the current video frame as a shaking video frame.
[0078] In this embodiment, if the current video frame is determined to be a shaking video frame, it indicates that the size of the vehicle detection frame generated for the stationary vehicle is unstable.
[0079] Step S606 , counting the number of jittered video frames of the stationary vehicle from the starting video frame to the current video frame.
[0080] Step S608 , determining whether the jitter frame number exceeds a preset jitter frame number threshold, executing step S610 , if not, returning to step S508 to obtain a second IoU value of the stationary vehicle corresponding to the next target video frame, and performing analysis.
[0081] In this embodiment, the preset jitter frame number threshold may be set to 4 frames.
[0082] Step S610: Eliminate stationary vehicles.
[0083] Specifically, if the number of jitter frames of the stationary vehicle exceeds 4 frames, it indicates that the detection and identification of the stationary vehicle is unstable, and the illegal parking analysis process of the stationary vehicle is terminated.
[0084] Step S612 , determining whether the second intersection-over-union ratio is higher than an upper limit of a preset interval; if so, proceeding to step S614 ; otherwise, proceeding to step S610 .
[0085] For example, it is determined whether the second intersection-over-union ratio is higher than 0.8. If so, proceed to step S614.
[0086] Specifically, if the second intersection-over-combination ratio neither falls within the preset interval nor exceeds the upper limit of the preset interval, it means that the second intersection-over-combination ratio is lower than the lower limit of the preset interval.
[0087] In this embodiment, if the second intersection-over-union (IoU) of the stationary vehicle corresponding to any target video frame is less than the lower limit of the preset interval, for example, less than 0.5, it means that the stationary vehicle has moved, and step S610 is performed to eliminate the stationary vehicle to stop the illegal parking analysis processing of the stationary vehicle.
[0088] Step S614 : determine the current video frame as a non-shaking video frame, and return to step S508 to obtain a second intersection-over-union (IoU) value of the stationary vehicle corresponding to the next target video frame, and perform analysis.
[0089] Figure 7 The processing flow of another exemplary embodiment of the vehicle parking violation detection method of the present application is shown. This embodiment is a specific implementation of the above step S414. As shown in the figure, this embodiment mainly includes the following steps:
[0090] Step S702 : determining a set of video frames of the stationary vehicle according to the second intersection-over-union ratios of the stationary vehicle corresponding to the target video frames.
[0091] In this embodiment, each target video frame in the video frame set is continuous with each other, and the second IoU value of each target video frame exceeds a lower limit of a predetermined range (eg, exceeds 0.5).
[0092] Step S704 : determining the cumulative number of detection frames and the cumulative stationary duration of the stationary vehicle according to each target video frame in the video frame set and each time information corresponding to each target video frame.
[0093] Optionally, the cumulative number of detection frames of the stationary vehicle may be determined based on each target video frame in the video frame set.
[0094] Optionally, the start timestamp and the end timestamp of the video frame set may be determined according to the timestamps corresponding to the target video frames in the video frame set, and the cumulative stationary time of the stationary vehicle may be determined based on the start timestamp and the end timestamp.
[0095] Step S706: If the cumulative number of detection frames exceeds the first frame number threshold, and the cumulative static time exceeds the first time threshold, a preliminary parking violation analysis result is obtained that the stationary vehicle is illegally parked.
[0096] Optionally, the first duration threshold is between 10 seconds and 60 seconds.
[0097] Optionally, the first frame number threshold may be determined according to the first duration threshold, a preset video frame rate, and a preset ratio.
[0098] Optionally, the preset video frame rate may be between 25 and 30, and the preset ratio may be between 40% and 50%.
[0099] In summary, this embodiment determines whether a stationary vehicle is illegally parked by analyzing the cumulative number of detection frames and the cumulative stationary time of the stationary vehicle, thereby reducing the misjudgment rate of illegally parked vehicles.
[0100] Figure 8 The processing flow of the vehicle parking violation detection method of another exemplary embodiment of the present application is shown. This embodiment can continue to execute the above step S414. As shown in the figure, this embodiment mainly includes the following steps:
[0101] Step S802 : Detect multiple target vehicles adjacent to the stationary vehicle in each target video frame to determine multiple reference vehicles of the stationary vehicle.
[0102] Alternatively, the reference vehicle may be determined by:
[0103] If the cumulative detection frame number of any target vehicle exceeds the second frame number threshold, and the cumulative stationary time of the target vehicle exceeds the second time threshold, the target vehicle is determined as a reference vehicle for the stationary vehicle.
[0104] In this embodiment, the method for determining the cumulative stationary time and the cumulative number of detection frames of the target vehicle is the same as the method for determining the cumulative stationary time and the cumulative number of detection frames of the stationary vehicle. For details, please refer to the above Figure 7 The relevant description of the embodiments will not be repeated here.
[0105] Optionally, the second duration threshold may be determined based on the first duration threshold, the second frame number threshold may be determined based on the first frame number threshold, and the number of reference vehicles may be between 2 and 3.
[0106] For example, the second duration threshold may be one third of the first duration threshold, and the second frame number threshold may also be one third of the first frame number threshold.
[0107] Step S804: Based on the inter-vehicle distances between any two of the reference vehicles and the stationary vehicles, if the inter-vehicle distances between any two of the reference vehicles and the stationary vehicles are less than a preset inter-vehicle distance threshold, a final illegal parking analysis result is obtained indicating that the stationary vehicles do not illegally park.
[0108] Optionally, the inter-vehicle distance between each reference vehicle and any two of the stationary vehicles is calculated as follows: a straight-line distance between center points of the two vehicle detection frames / an average value of widths and heights of the two vehicle detection frames.
[0109] Optionally, the preset vehicle distance threshold is 2.
[0110] Specifically, if the distance between each reference vehicle and any two stationary vehicles is less than 2, it means that the distance between any two vehicles is less than the size of one vehicle, indicating that there is a traffic congestion, and the stationary vehicles do not have the phenomenon of illegal parking.
[0111] In summary, this application can further improve the accuracy of vehicle illegal parking detection results by further incorporating reference vehicles and analyzing the illegal parking status of stationary vehicles.
[0112] Figure 9 1 is a block diagram of a vehicle parking violation detection device according to an exemplary embodiment of the present application. As shown in the figure, the vehicle parking violation detection device 900 of this embodiment mainly includes an acquisition module 902, a screening module 904, and a detection module 906.
[0113] The acquisition module 902 is configured to sequentially acquire target video frames in the target video according to a preset frame interval.
[0114] The screening module 904 is configured to detect the region of interest and all target vehicles in each target video frame to determine candidate vehicles in each target video frame.
[0115] The detection module 906 is configured to obtain a parking violation analysis result of the candidate vehicle based on each vehicle detection frame of the same candidate vehicle in each target video frame.
[0116] Optionally, the screening module 904 is further used to: determine each target video frame as the current video frame in turn; detect all target vehicles in the current video frame and determine each vehicle detection frame corresponding to each target vehicle; determine the region of interest in the current video frame containing the target lane based on the target lane identified from the current video frame; identify all vehicle detection frames located in the region of interest to determine the target vehicle located in the target lane as a candidate vehicle for the current video frame.
[0117] Optionally, the filtering module 904 is also used to: query the lane division information of the target video corresponding to the current video frame, and analyze whether the framing range of the current video frame has changed based on the framing range of the current video frame and the framing range of the previous video frame, wherein the previous video frame is the target video frame previous to the current video frame extracted from the target video; if the lane division information of the target video is not queried, lane division is performed for the current video frame; if the lane division information of the target video is queried, and it is determined that the framing range of the current video frame has changed, lane division is performed for the current video frame, and the lane division information of the target video is updated based on the lane division information of the current video frame; if the lane division information of the target video is queried, and it is determined that the framing range of the current video frame has not changed, the target lane in the current video frame is identified based on the lane division information of the target video.
[0118] Optionally, the screening module 904 is also used to: use the DeepLab model to perform lane division on the current video frame to determine the target lane in the current video frame; the target lane includes at least one of a motor vehicle lane, a non-motor vehicle lane, an emergency lane, and a sidewalk.
[0119] Optionally, the candidate vehicles include at least one, and the detection module 906 is further used to: obtain a candidate vehicle; obtain a first intersection-and-union (IoU) value of the candidate vehicle based on two vehicle detection frames of the candidate vehicle in two adjacent target video frames, and if the first IoU value is greater than a stationary IoU threshold value, determine the candidate vehicle as a stationary vehicle; obtain each second IoU value of the stationary vehicle corresponding to each target video frame based on each vehicle detection frame of the stationary vehicle in multiple target video frames and an average detection frame of each vehicle detection frame; obtain a preliminary illegal parking analysis result on whether the stationary vehicle is illegally parked based on each second IoU value of the stationary vehicle corresponding to each target video frame and a preset interval range.
[0120] Optionally, the static intersection-over-union threshold is greater than 0.9.
[0121] Optionally, the detection module 906 is further used to: use the target video frame that determines the candidate vehicle to be the stationary vehicle as the starting video frame; based on the starting video frame, sequentially obtain a target video frame as the current video frame, and determine the previous target video frame of the current video frame as the previous video frame; determine an average detection frame based on each vehicle detection frame in each target video frame from the starting video frame to the previous target video frame of the stationary vehicle; determine a second intersection-union ratio of the stationary vehicle corresponding to the current video frame based on the vehicle detection frame of the stationary vehicle in the current video frame and the average detection frame.
[0122] Optionally, the detection module 906 is also used to: if the second intersection-and-union ratio of the stationary vehicle corresponding to the current video frame falls within the preset interval range, determine the current video frame as a jittered video frame; if the number of jittered video frames of the stationary vehicle between the starting video frame and the current video frame exceeds a preset jitter frame number threshold, stop the illegal parking analysis processing of the stationary vehicle; wherein, the preset interval range is between 0.5 and 0.8; the preset jitter frame number threshold is 4 frames.
[0123] Optionally, the detection module 906 is further configured to: determine the current video frame as a non-jittered video frame if the second intersection-over-union (IoU) value of the stationary vehicle corresponding to the current video frame is higher than an upper limit of the preset interval; and determine an average detection frame based on the vehicle detection frames of the stationary vehicle in each non-jittered video frame between the starting video frame and the previous target video frame;
[0124] Optionally, the detection module 906 is also used to: determine the video frame set of the stationary vehicle based on the second intersection-and-union ratios of the stationary vehicle corresponding to the target video frames, wherein each target video frame in the video frame set is continuous with each other, and the second intersection-and-union ratio of each target video frame exceeds the lower limit of the preset interval range; determine the cumulative number of detection frames and the cumulative stationary time of the stationary vehicle based on the target video frames in the video frame set and the time information corresponding to each target video frame; if the cumulative number of detection frames exceeds the first frame number threshold, and the cumulative stationary time exceeds the first time threshold, and the preliminary illegal parking analysis result that the stationary vehicle is illegally parked is obtained.
[0125] Optionally, the first duration threshold is between 10 seconds and 60 seconds; the first frame number threshold is determined based on the first duration threshold, a preset video frame rate, and a preset ratio; wherein the preset video frame rate is between 25 and 30, and the preset ratio is between 40% and 50%.
[0126] Optionally, the detection module 906 is further configured to: stop the illegal parking analysis process of the stationary vehicle if the second intersection-over-union (IoU) value of the stationary vehicle corresponding to any target video frame is less than a lower limit of the preset interval.
[0127] Optionally, if the preliminary illegal parking analysis result is that the stationary vehicle is illegally parked, the detection module 906 is further used to: detect multiple target vehicles adjacent to the stationary vehicle in each target video frame to determine multiple reference vehicles of the stationary vehicle; based on the vehicle distance between each reference vehicle and any two of the stationary vehicles, if each vehicle distance between them is less than a preset vehicle distance threshold, obtain a final illegal parking analysis result that the stationary vehicle is not illegally parked.
[0128] Optionally, the detection module 906 is also used to: if the cumulative number of detection frames of any target vehicle exceeds a second frame number threshold, and the cumulative stationary time of the target vehicle exceeds a second time threshold, the target vehicle is determined as a reference vehicle of the stationary vehicle; wherein, the cumulative stationary time and the cumulative number of detection frames of the target vehicle are determined in the same manner as the cumulative stationary time and the cumulative number of detection frames of the stationary vehicle.
[0129] Another embodiment of the present application further provides a computer storage medium, wherein the computer storage medium stores instructions for executing the steps in the above-mentioned vehicle parking violation detection method embodiments.
[0130] In summary, the vehicle illegal parking detection method, device and computer storage medium provided by each embodiment of the present application detect the area of interest and all target vehicles in the target video frame to determine the candidate vehicle located in the area of interest, and compare the vehicle detection frames of the same candidate vehicle in different target video frames to determine whether the candidate vehicle has illegally parked. Accordingly, the present application can be applied to video data with a changing viewing range (for example, video data obtained from a dome camera) to perform vehicle illegal parking detection to improve the utilization rate of existing monitoring resources and have a higher detection result accuracy.
[0131] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the embodiments of the present application, and not to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, ordinary technicians in this field should understand that they can still modify the technical solutions recorded in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A method for detecting illegally parked vehicles, comprising: Sequentially acquiring target video frames in the target video according to a preset frame interval; Detecting the region of interest and all target vehicles in each target video frame to determine candidate vehicles in each target video frame; Obtaining a parking violation analysis result of the candidate vehicle based on each vehicle detection frame of the same candidate vehicle in each target video frame; The detecting of the region of interest and all target vehicles in each target video frame to determine the candidate vehicles in each target video frame includes: Determine each target video frame as the current video frame in turn; Detect all target vehicles in the current video frame and determine each vehicle detection frame corresponding to each target vehicle; Determining, based on the target lane identified from the current video frame, a region of interest in the current video frame that includes the target lane; Identifying all vehicle detection frames within the region of interest to determine a target vehicle within the target lane as a candidate vehicle for the current video frame; The target lane in the current video frame can be identified by: querying lane division information of the target video corresponding to the current video frame, and analyzing whether the framing range of the current video frame has changed based on the framing range of the current video frame and the framing range of a previous video frame, wherein the previous video frame is a target video frame preceding the current video frame extracted from the target video; If no lane division information of the target video is found, performing lane division for the current video frame; If the lane division information of the target video is found and it is determined that the framing range of the current video frame has changed, lane division is performed for the current video frame, and the lane division information of the target video is updated based on the lane division information of the current video frame; If the lane division information of the target video is found and it is determined that the framing range of the current video frame has not changed, the target lane in the current video frame is identified based on the lane division information of the target video.
2. The method according to claim 1, wherein The method further comprises: Performing lane segmentation on the current video frame using a DeepLab model to determine a target lane in the current video frame; The target lane includes at least one of a motor vehicle lane, a non-motor vehicle lane, an emergency lane, and a sidewalk.
3. The method according to claim 1, wherein The candidate vehicle includes at least one vehicle, and obtaining a parking violation analysis result of the candidate vehicle based on each vehicle detection frame of the same candidate vehicle in each target video frame includes: Get a candidate vehicle; Obtaining a first intersection-of-union (IoU) value of the candidate vehicle based on two vehicle detection frames of the candidate vehicle in two adjacent target video frames, and determining the candidate vehicle as a stationary vehicle if the first IoU value is greater than a stationary IoU threshold; Obtaining second intersection-over-union (IoU) values of the stationary vehicle corresponding to each target video frame based on each vehicle detection frame and an average detection frame of each vehicle detection frame in the plurality of target video frames; A preliminary parking violation analysis result is obtained based on the second intersection-over-union ratios of the stationary vehicle corresponding to each target video frame and a preset interval range, as to whether the stationary vehicle is illegally parked.
4. The method according to claim 3, wherein: The static IoU threshold is greater than 0.
9.
5. The method according to claim 3, wherein: The obtaining, based on each vehicle detection frame of the stationary vehicle in the plurality of target video frames and an average detection frame of the vehicle detection frames, each second intersection-over-union ratio of the stationary vehicle corresponding to each target video frame comprises: using a target video frame in which the candidate vehicle is determined to be the stationary vehicle as a starting video frame; Based on the starting video frame, sequentially acquiring a target video frame as a current video frame, and determining a target video frame preceding the current video frame as a previous video frame; determining an average detection frame based on each vehicle detection frame of the stationary vehicle in each target video frame between the starting video frame and the preceding target video frame; A second intersection-over-union (IoU) value of the stationary vehicle corresponding to the current video frame is determined according to the vehicle detection frame of the stationary vehicle in the current video frame and the average detection frame.
6. The method according to claim 5, wherein: The method further comprises: If the second intersection-over-union value of the stationary vehicle corresponding to the current video frame falls within the preset interval, determining the current video frame as a jittery video frame; If the number of jittered video frames of the stationary vehicle between the starting video frame and the current video frame exceeds a preset jittered frame number threshold, stopping the illegal parking analysis process of the stationary vehicle; Wherein, the preset interval range is between 0.5 and 0.8; The preset jitter frame number threshold is 4 frames.
7. The method according to claim 6, wherein: The method further comprises: If the second intersection-over-union (IoU) value of the stationary vehicle corresponding to the current video frame is higher than the upper limit of the preset interval, determining the current video frame as a non-shaking video frame; An average detection frame is determined based on the vehicle detection frame of the stationary vehicle in each non-jittered video frame between the starting video frame and the previous target video frame.
8. The method according to claim 3, wherein: Obtaining a preliminary parking violation analysis result of whether the stationary vehicle is illegally parked according to each second intersection-over-union ratio corresponding to each target video frame of the stationary vehicle includes: determining a set of video frames of the stationary vehicle based on the second intersection-over-union (IoU) values of the stationary vehicle corresponding to the target video frames, wherein the target video frames in the set of video frames are continuous with each other and the second IoU value of each target video frame exceeds a lower limit of the preset interval; Determining the cumulative number of detection frames and the cumulative stationary duration of the stationary vehicle according to each target video frame and each time information corresponding to each target video frame in the video frame set; If the cumulative number of detection frames exceeds a first frame number threshold, and the cumulative stationary time exceeds a first time threshold, and the preliminary illegal parking analysis result is obtained that the stationary vehicle is illegally parked.
9. The method according to claim 8, wherein The first duration threshold is between 10 seconds and 60 seconds; The first frame number threshold is determined according to the first duration threshold, a preset video frame rate, and a preset ratio; The preset video frame rate is between 25 and 30, and the preset ratio is between 40% and 50%.
10. The method according to claim 8, wherein The method further comprises: If the second intersection-over-union (IoU) value of the stationary vehicle corresponding to any target video frame is less than a lower limit of the preset interval, the illegal parking analysis process of the stationary vehicle is stopped.
11. The method according to claim 8, wherein If the preliminary parking violation analysis result indicates that the stationary vehicle is illegally parked, the method further includes: detecting a plurality of target vehicles adjacent to the stationary vehicle in each target video frame to determine a plurality of reference vehicles of the stationary vehicle; According to the inter-vehicle distance between each reference vehicle and any two of the stationary vehicles, if the inter-vehicle distance between each of the reference vehicles and any two of the stationary vehicles is less than a preset inter-vehicle distance threshold, a final illegal parking analysis result is obtained indicating that the stationary vehicles do not park illegally.
12. The method according to claim 11, wherein The reference vehicle can be determined by: If the cumulative number of detection frames of any target vehicle exceeds a second frame number threshold, and the cumulative stationary time of the target vehicle exceeds a second time threshold, the target vehicle is determined as a reference vehicle for the stationary vehicle; The cumulative stationary time and the cumulative number of detection frames of the target vehicle are determined in the same manner as the cumulative stationary time and the cumulative number of detection frames of the stationary vehicle.
13. The method according to claim 12, wherein: The second duration threshold is determined based on the first duration threshold, the second frame number threshold is determined based on the first frame number threshold, and the number of the reference vehicles is between 2 and 3.
14. The method according to claim 11, wherein The inter-vehicle distance is determined by: Determining the inter-vehicle distance based on the center positions of the two vehicle detection frames of each reference vehicle and any two of the stationary vehicles, and the height and width values of the two vehicle detection frames; Among them, the preset vehicle distance threshold is 2.
15. A vehicle illegal parking detection device, comprising: An acquisition module, configured to sequentially acquire target video frames in a target video according to a preset frame interval; a screening module, configured to detect a region of interest and all target vehicles in each target video frame to determine candidate vehicles in each target video frame; The detection module is used to obtain the illegal parking analysis results of the candidate vehicle based on each vehicle detection frame of the same candidate vehicle in each target video frame. The detecting of the region of interest and all target vehicles in each target video frame to determine the candidate vehicles in each target video frame includes: sequentially determining each target video frame as the current video frame; detecting all target vehicles in the current video frame to determine each vehicle detection frame corresponding to each target vehicle; determining a region of interest in the current video frame containing the target lane based on the target lane identified from the current video frame; identifying all vehicle detection frames within the region of interest to determine the target vehicle located in the target lane as the candidate vehicle in the current video frame; The target lane in the current video frame can be identified by: Query the lane division information of the target video corresponding to the current video frame, and analyze whether the framing range of the current video frame has changed based on the framing range of the current video frame and the framing range of the previous video frame, wherein the previous video frame is a target video frame previous to the current video frame extracted from the target video; if the lane division information of the target video is not queried, perform lane division for the current video frame; if the lane division information of the target video is queried, and it is determined that the framing range of the current video frame has changed, perform lane division for the current video frame, and update the lane division information of the target video based on the lane division information of the current video frame; if the lane division information of the target video is queried, and it is determined that the framing range of the current video frame has not changed, identify the target lane in the current video frame according to the lane division information of the target video.
16. A computer storage medium, characterized in that The computer storage medium stores instructions for executing the steps of the method according to any one of claims 1 to 14.
Citation Information
Patent Citations
Intersection traffic information perception control system and method
CN112017437A
Illegal parking vehicle detection method and device
CN113591679A
Vehicle identification method and device, equipment and storage medium
CN113963153A
Vehicle congestion detection method and device and computer storage medium
CN114882709A