A parking lot congestion detection method, system, computer device and medium

By using vehicle detection and tracking models in parking lots to determine vehicle parking status, the problem of managers having difficulty identifying congestion is solved, achieving accurate congestion alerts and improved user experience.

CN114612843BActive Publication Date: 2026-02-03BOE TECHNOLOGY GROUP CO LTD
View PDF 5 Cites 0 Cited by

Patent Information

Application Number
CN202210281777.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-22
Publication Date
2026-02-03
Estimated Expiration
2042-03-22

AI Technical Summary

Technical Problem

In existing parking lot management, congestion easily occurs when there is a large volume of traffic. It is difficult for managers to identify and manage the congestion in a timely manner, which exacerbates the congestion and affects the user experience.

Method used

The system uses a vehicle detection model to extract target vehicles from video images and a vehicle tracking model to track and match vehicles, determine their movement distance, and use a preset threshold to determine whether the vehicle is in a parked state. If the condition is met, a congestion alarm is sent.

Benefits of technology

It improved the accuracy of vehicle recognition, reduced false alarms, enabled accurate assessment of congestion at parking lot entrances and exits, and improved the user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114612843B_ABST
    Figure CN114612843B_ABST
Patent Text Reader

Abstract

Embodiments of the present application disclose a parking lot congestion detection method, system, computer device and medium, wherein the detection method of an embodiment comprises: using a vehicle detection model to perform vehicle extraction on a vehicle collection image and output a target vehicle, the vehicle collection image being collected from a received parking lot video according to a preset first time interval; using a vehicle tracking model to track the target vehicle in each of a plurality of continuous vehicle collection images and lock a target matching vehicle; respectively judging whether each target matching vehicle is in a parking state according to a moving distance of each target matching vehicle within a continuous time; obtaining a parking state parameter of the target matching vehicle in the parking state, and sending a congestion alarm if the parking state parameter does not satisfy a preset parking threshold, thereby effectively improving the accuracy of target vehicle identification, reducing misjudgment, achieving accurate judgment of congestion at a parking lot entrance, and improving the parking experience of a user.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of traffic control, and in particular to a parking lot congestion detection method and system, computer equipment and a medium. BACKGROUND

[0002] In existing parking lots, congestion is prone to occur when the traffic volume is large, especially at the exit or entrance of the parking lot. When congestion occurs, vehicles need to wait for a long time to exit or enter the parking lot.

[0003] Generally, management personnel patrol inside and outside the parking lot to check whether there is congestion, so as to timely dredge when the parking lot is congested. However, the number of management personnel in a general parking lot is small, the area of the parking lot is large, and the management work is difficult. When the parking lot is congested, the management personnel may not be able to timely obtain the congestion problem of the parking lot, so as to be unable to timely dredge, resulting in more and more serious congestion of the parking lot, affecting the parking experience of users. SUMMARY

[0004] To solve at least one of the above problems, the first embodiment of the present application provides a parking lot congestion detection method, which comprises:

[0005] using a vehicle detection model to perform vehicle extraction on a vehicle collection image and output a target vehicle, the vehicle collection image being collected from a received parking lot video according to a preset first time interval;

[0006] using a vehicle tracking model to track the target vehicle in each of a plurality of continuous vehicle collection images and lock a target matching vehicle;

[0007] respectively determining whether each target matching vehicle is in a parking state according to the moving distance of each target matching vehicle within a continuous time;

[0008] obtaining a parking state parameter of the target matching vehicle in the parking state, and sending a congestion alarm if the parking state parameter does not satisfy a preset parking threshold.

[0009] In one specific embodiment, the using a vehicle detection model to perform vehicle extraction on a vehicle collection image and output a target vehicle further comprises:

[0010] using a target detection model to perform vehicle extraction on a vehicle collection image and output a rectangular frame in the vehicle collection image to represent the target vehicle.

[0011] In one specific embodiment, the using a vehicle tracking model to track the target vehicle in each of a plurality of continuous vehicle collection images and lock a target matching vehicle further comprises:

[0012] respectively according to the target vehicle, using a target tracking algorithm to perform state prediction on a rectangular frame of a next vehicle collection image according to corresponding rectangular frames in at least two continuous vehicle collection images to obtain a predicted rectangular frame;

[0013] performing vehicle extraction on the next vehicle collection image using a target detection model to obtain a measured rectangular frame;

[0014] respectively matching each predicted rectangular frame and each measured rectangular frame to determine whether the predicted rectangular frame tracks the corresponding measured rectangular frame, and if so, locking the target vehicle as a target matching vehicle and establishing a vehicle tracking table, wherein the vehicle tracking table includes the target matching vehicle and a vehicle identifier corresponding to the target matching vehicle.

[0015] In one specific embodiment, the step of respectively matching each predicted rectangular frame and each measured rectangular frame to determine whether the predicted rectangular frame tracks the corresponding measured rectangular frame further includes:

[0016] using an IOU algorithm to calculate a distance between each predicted rectangular frame and each measured rectangular frame;

[0017] using a Hungarian algorithm to obtain a measured rectangular frame matched with each predicted rectangular frame of each target vehicle according to the distance.

[0018] In one specific embodiment, the step of determining whether each target matching vehicle is in a parking state according to a moving distance of each target matching vehicle in continuous time further includes:

[0019] respectively obtaining collection points of rectangular frames of each target matching vehicle in the latest N continuous vehicle collection images, the collection points being points at predefined positions in the rectangular frames;

[0020] respectively generating collection arcs according to the collection points of the rectangular frames of each target matching vehicle in the N vehicle collection images, the collection arcs representing moving distances of the corresponding target matching vehicles in time periods corresponding to the N vehicle collection images;

[0021] using a preset parking distance threshold to determine lengths of the collection arcs, and determining that a target matching vehicle corresponding to a collection arc is in the parking state if the collection arc is less than or equal to the parking distance threshold;

[0022] wherein N is a positive integer greater than or equal to 20.

[0023] In one specific embodiment, the step of using a preset parking distance threshold to determine lengths of the collection arcs, and determining that a target matching vehicle corresponding to a collection arc is in the parking state if the collection arc is less than or equal to the parking distance threshold further includes:

[0024] In a preset parking continuous time, a target matching vehicle in the parking state is determined at N collection points to generate a collection arc as a cycle, and if a collection arc of a certain cycle is greater than the parking distance threshold, it is determined that the target matching vehicle is in a non-parking state.

[0025] In one specific embodiment, the parking threshold includes a parking quantity threshold and a parking timing threshold, and the parking state parameter includes a parking quantity and a parking time.

[0026] The parking state parameter of the target matching vehicle in the parking state is obtained, and if the parking state parameter does not satisfy a preset parking threshold, a congestion alarm is sent.

[0027] According to a preset second time interval, it is determined whether the number of target matching vehicles in the parking state is greater than a preset parking quantity threshold, and if so, a timer is used to time, and if not, the timer is initialized.

[0028] According to the timer, it is determined whether the parking time of the target matching vehicle in the parking state is greater than a preset parking timing threshold, and if so, a congestion alarm is sent.

[0029] The second embodiment of the application provides a parking lot congestion detection system, which comprises an image collection device, a vehicle detection model, a vehicle tracking model, and a controller, wherein the controller is configured to:

[0030] The vehicle detection model is used to extract vehicles from vehicle collection images and output target vehicles, and the vehicle collection images are collected from parking lot videos recorded by the image collection device received according to a preset first time interval.

[0031] The vehicle tracking model is used to track and lock target matching vehicles in the target vehicles in a plurality of continuous vehicle collection images.

[0032] According to the movement distance of each target matching vehicle in a continuous time, it is determined whether each target matching vehicle is in a parking state.

[0033] The parking state parameter of the target matching vehicle in the parking state is obtained, and if the parking state parameter does not satisfy a preset parking threshold, a congestion alarm is sent.

[0034] The third embodiment of the application provides a computer readable storage medium, which stores a computer program, and the program is executed by a processor to realize the method of the first embodiment of the application.

[0035] The fourth embodiment of the present application provides a computer device, comprising a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the processor implements the method of the first embodiment of the present application when executing the program.

[0036] The beneficial effects of the present application are as follows:

[0037] The present application aims at the existing problems, and formulates a parking lot congestion detection method, system, computer device and medium. The vehicle detection model is used to extract target vehicles from vehicle image collection, and the vehicle tracking model is used to track and match the target vehicles, so as to further judge the parking state of each target vehicle, so as to judge whether the current parking lot is in a congested state according to the pre-set parking threshold and alarm, effectively improve the accuracy of target vehicle identification, reduce misjudgment, realize accurate judgment of the congestion of the parking lot entrance, thereby making up for the problems in the prior art, improving the parking experience of users, and having practical application prospect. BRIEF DESCRIPTION OF DRAWINGS

[0038] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings needed in the embodiment description will be briefly introduced. Obviously, the drawings in the following description are only some embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor.

[0039] Figure 1 A flow chart of a parking lot congestion detection method according to an embodiment of the present application is shown;

[0040] Figure 2 A schematic diagram of extracting a target vehicle according to an embodiment of the present application is shown;

[0041] Figures 3a-3b A schematic diagram of collecting an arc line of a target matching vehicle according to an embodiment of the present application is shown;

[0042] Figure 4 A schematic diagram of a parking lot congestion detection system according to an embodiment of the present application is shown;

[0043] Figure 5 A structural schematic diagram of a computer device according to another embodiment of the present application is shown. DETAILED DESCRIPTION

[0044] For a more clear explanation of the present application, the present application is further described below in combination with preferred embodiments and drawings. Similar components are denoted by the same reference numerals in the drawings. Those skilled in the art should understand that the specific description below is illustrative rather than limiting, and the protection scope of the present application should not be limited thereby.

[0045] In order to solve the congestion problem existing at the entrance and exit of the parking lot, some solutions are also proposed in the prior art, as follows:

[0046] In Chinese patent documents, one named "A parking lot congestion early warning method, device and system" with application number CN201810482776.X introduces a parking lot congestion early warning method. The management personnel of the parking lot can obtain the congestion phenomenon at the exit or entrance of the parking lot in time according to the early warning information. However, this method relies on setting a geomagnetic detector or a camera as a congestion detector at the entrance and exit of the parking lot. When the geomagnetic detector is used as the congestion detector, if the vehicle is long, one vehicle may span two geomagnetic detectors, and the two geomagnetic detectors will detect the vehicle together. According to this method, the system will judge that the actual number of vehicles is two, although it is only one. The above solution is prone to congestion misjudgment.

[0047] In Chinese patent documents, one named "A parking lot congestion early warning system" with application number 201810094463.7 introduces a parking lot exit traffic early warning system. It needs to set multiple infrared opposite-acting sensors on the exit trunk road. When the exit trunk road is congested, the opposite-acting signal of the corresponding infrared opposite-acting sensor is blocked by the congested traffic flow. However, when a non-vehicle (such as a staff member) is located at the position of the infrared opposite-acting sensor, it may also be misjudged as congestion.

[0048] Therefore, as shown in the drawings, one embodiment of the present application proposes a parking lot congestion detection method applied to the exit or entrance of the parking lot, which comprises: Figure 1

[0049] using a vehicle detection model to perform vehicle extraction on the vehicle collection image and output a target vehicle, the vehicle collection image being collected from the received parking lot video according to a preset first time interval;

[0050] using a vehicle tracking model to track the target vehicle in the continuous multiple vehicle collection images and lock a target matching vehicle;

[0051] respectively judging whether each target matching vehicle is in a parking state according to the moving distance of each target matching vehicle within a continuous time;

[0052] ​acquiring a parking state parameter of the target matching vehicle in the parking state, and sending a congestion alarm if the parking state parameter does not satisfy a pre-set parking threshold.

[0053] The embodiment extracts target vehicles from vehicle collection images by using a vehicle detection model, tracks and matches the target vehicles by using a vehicle tracking model, and further judges the parking states of the target vehicles, so as to judge whether the current parking lot is in a congestion state according to a pre-set parking threshold and send an alarm, effectively improving the accuracy of target vehicle recognition, reducing misjudgment, accurately judging the congestion state of the parking lot entrance, and thus making up for the problems in the prior art, improving the parking experience of users, and having practical application prospects.

[0054] In one specific embodiment, as shown in Figure 1 The congestion detection method includes:

[0055] S10, using a vehicle detection model to perform vehicle extraction on a vehicle collection image and output a target vehicle, the vehicle collection image being collected from a received parking lot video according to a pre-set first time interval.

[0056] In this example, the vehicle collection image is defined as a certain frame image in the parking lot video, and the first time interval is the time interval between two frame images, for example, 40 ms, that is, the vehicle detection model collects the received parking lot video every 40 ms, and performs vehicle extraction on the collected vehicle collection image to output the target vehicle.

[0057] It should be noted that the time value of the first time interval is exemplary, and a person skilled in the art can set a corresponding first time interval to complete the collection of vehicle images according to actual conditions.

[0058] Further, as shown in Figure 2 The vehicle collection image of the parking lot includes four target vehicles, which are extracted by using a target detection model and output rectangular frames in the vehicle collection image to represent the four target vehicles, numbered as 1#, 2#, 3# and 4#.

[0059] It should be noted that the form of the rectangular frame used to represent the target vehicle is not limited in the present application, which can be a horizontal frame as shown in the embodiment, or a rotating frame, etc., and a person skilled in the art can set a corresponding rectangular frame according to actual conditions.

[0060] This example uses the YOLOv5 object detection model. YOLOv5 is a single-stage object detection algorithm that incorporates several improvements over YOLOv4, resulting in significant performance gains in both speed and accuracy. Key improvements include: Input layer: During model training, this includes Mosaic data augmentation, adaptive anchor box calculation, and adaptive image scaling; Baseline network: This primarily includes Focus and CSP structures; Neck network: Object detection networks often insert layers between the Backbone and the final Head output layer; YOLOv5 adds an FPN+PAN structure; Head output layer: The anchor box mechanism in the output layer is the same as in YOLOv4, with improvements primarily in the training loss function GIOU_Loss and the predicted box selection DIOU_nms. This example effectively avoids misidentifying one vehicle as two or misidentifying staff as vehicles, thus improving vehicle recognition accuracy.

[0061] S20. Use a vehicle tracking model to track and lock onto the target vehicle in multiple consecutive vehicle images.

[0062] In this example, after identifying the target vehicle using a vehicle detection model, a vehicle tracking model is further used to track the target vehicle. Specifically:

[0063] First, based on the target vehicle, a target tracking algorithm is used to predict the state of the bounding box in the next vehicle image based on the bounding boxes corresponding to at least two consecutive vehicle images to obtain the predicted bounding box.

[0064] This example uses the SORT algorithm for target tracking. SORT is a simple online real-time multi-target tracking algorithm that uses detection as a key component, propagates the target state to future frames, associates the current detection with existing targets, and manages the lifecycle of the tracked target. If we define the image captured in the current frame in this example as the "next vehicle capture image" for which state prediction is needed, then at least two consecutive vehicle capture images can be the penultimate and penultimate vehicle capture images. The bounding boxes in the penultimate vehicle capture image are numbered 1#", 2#", 3#", and 4#, respectively, while the bounding boxes in the penultimate vehicle capture image are numbered 1#', 2#', 3#', and 4#'. Using the target tracking algorithm, the state prediction of the bounding boxes in the current frame's vehicle capture image can be performed based on the bounding boxes in the penultimate and penultimate vehicle capture images to obtain the predicted bounding boxes.

[0065] For example, using a target tracking algorithm, the state prediction of the bounding box of the current frame of the vehicle image of target vehicle 1# is performed. Specifically, the predicted bounding box 1## is obtained by combining the bounding box 1#" in the second-to-last frame of the vehicle image and the bounding box 1#' in the last frame of the vehicle image.

[0066] Similarly, using the target tracking algorithm, the state prediction of the bounding box of the current frame of the target vehicle 2# is performed. Specifically, the predicted bounding box 2## is obtained by combining the bounding box 2#" in the second-to-last frame of the vehicle image and the bounding box 2#' in the first-to-last frame of the vehicle image.

[0067] Similarly, using the target tracking algorithm, the state prediction of the bounding box of the current frame of the target vehicle 3# is performed. Specifically, the predicted bounding box 3## is obtained by combining the bounding box 3#" in the second-to-last frame of the vehicle image and the bounding box 3#' in the last frame of the vehicle image.

[0068] Similarly, using the target tracking algorithm, the state prediction of the bounding box of the current frame of the target vehicle 4# is performed. Specifically, the predicted bounding box 4## is obtained by combining the bounding box 4#" in the second-to-last frame of the vehicle image and the bounding box 4#' in the last frame of the vehicle image.

[0069] In this example, using a target tracking algorithm combined with at least two consecutive vehicle images enables the prediction of the bounding box state of the next vehicle image, thereby obtaining the predicted bounding box for subsequent target vehicle matching.

[0070] Secondly, the target detection model is used to extract the vehicle from the next vehicle image to obtain the measured bounding box.

[0071] For example, if the vehicle image in the current frame contains 6 vehicles, the target detection model is used to extract the vehicles from the vehicle image in the current frame to obtain the measured bounding boxes, which are numbered 1*, 2*, 3*, 4*, 5* and 6* respectively.

[0072] Finally, each predicted bounding box and the measured bounding box are matched to determine whether the predicted bounding box has tracked the corresponding measured bounding box. The specific steps are as follows:

[0073] The IOU algorithm was used to calculate the distance between each predicted bounding box and each measured bounding box.

[0074] Based on the distance, the Hungarian algorithm is used to obtain the measured bounding boxes that match the predicted bounding boxes of each target vehicle.

[0075] In a specific example, the IOU algorithm is used to calculate the distance between the predicted bounding box 1## and each measured bounding box 1*, 2*, 3*, 4*, 5* and 6*; the Hungarian algorithm is used to perform matching calculations based on multiple obtained distances. For example, the measured bounding box that matches the predicted bounding box 1## is 4*, that is, the predicted bounding box of the target vehicle 1# is 1## and the measured bounding box is 4*.

[0076] Similarly, the IOU algorithm is used to calculate the distance between the predicted bounding box 2## and each measured bounding box 1*, 2*, 3*, 5* and 6*; the Hungarian algorithm is used to match based on this distance. For example, the measured bounding box that matches the predicted bounding box 2## is 3*, that is, the predicted bounding box of the target vehicle 2# is 2## and the measured bounding box is 3*.

[0077] Similarly, the IOU algorithm is used to calculate the distance between the predicted bounding box 3## and each measured bounding box 1*, 2*, 5* and 6*. The Hungarian algorithm is used to match based on this distance. For example, the measured bounding box that matches the predicted bounding box 3## is 2*, that is, the predicted bounding box of the target vehicle 3# is 3## and the measured bounding box is 2*.

[0078] Similarly, the IOU algorithm is used to calculate the distance between the predicted bounding box 4## and each measured bounding box 1*, 5* and 6*. The Hungarian algorithm is then used to match based on this distance. For example, the measured bounding box that matches the predicted bounding box 4## is 5*, that is, the predicted bounding box of the target vehicle 4# is 4## and the measured bounding box is 5*.

[0079] In this example, if the Hungarian algorithm can obtain a measured rectangle that matches the predicted rectangle of each target vehicle based on the distance between each predicted rectangle and each measured rectangle, it indicates that the predicted rectangle has tracked the corresponding measured rectangle. If the Hungarian algorithm cannot obtain a measured rectangle that matches the predicted rectangle of each target vehicle based on the distance between each predicted rectangle and each measured rectangle, it indicates that the predicted rectangle has not tracked the corresponding measured rectangle, for example, when the vehicle has driven out of the area that the parking lot image acquisition device can capture.

[0080] Further, if the predicted rectangular box tracks the corresponding measured rectangular box, that is, the vehicle tracking model can achieve the tracking and matching of the target vehicle, then lock the target vehicle as the target matching vehicle and establish a vehicle tracking table. The vehicle tracking table includes the target matching vehicle and the vehicle identifier corresponding to the target matching vehicle one by one. The vehicle identifier is an identity number that can uniquely represent the vehicle, such as 1#, 2#, 3#, etc., or can also be license plate numbers such as Beijing AXXXX1, Beijing AXXXX2, Beijing AXXXX3, etc. For example, the vehicle tracking table: target vehicle 1# - the first rectangular box, target vehicle 2# - the second rectangular box, target vehicle 3# - the third rectangular box...; or target vehicle Beijing AXXXX1 - the first rectangular box, Beijing AXXXX2 - the second rectangular box, Beijing AXXXX3 - the third rectangular box.

[0081] It should be noted that the above vehicle identifiers are exemplary. Those skilled in the art can select the corresponding vehicle identifiers according to the actual situation and assign the corresponding vehicle identifiers to the target matching vehicle after achieving the tracking and locking of the target matching vehicle, so as to facilitate the subsequent judgment of the parking state of the vehicle using the vehicle identifier.

[0082] S30. Determine whether each target matching vehicle is in a parking state according to the moving distances of each target matching vehicle within a continuous time respectively. The specific steps are as follows:

[0083] First, obtain the collection points of the rectangular boxes of each target matching vehicle in the latest continuous N vehicle acquisition images respectively. The collection point is the point at a predefined position in the rectangular box.

[0084] In a specific example, N = 20. If one frame time is 40 ms, then the continuous time is 800 ms, that is, obtain the collection points of the rectangular boxes of each target matching vehicle in the latest continuous 20 frames of vehicle acquisition images respectively. The collection point is the point at a predefined position in the rectangular box.

[0085] It should be noted that the collection point is a point at a fixed position. The present application does not specifically limit the position of the collection point, and the selection principle is to be able to represent the movement of the target matching vehicle. In a preferred embodiment, the center point coordinates of the rectangular box are used as the collection point. At the same time, in order to avoid the jumping of the rectangular box caused by occlusion and the like, Gaussian filtering is performed on each collection point to remove noise, so as to further improve the stability and accuracy of the collection point and avoid the jumping of the detection box caused by occlusion.

[0086] Secondly, as Figures 3a-3bAs shown, acquisition arcs are generated based on the acquisition points of the rectangular boxes in the N vehicle acquisition images of each target matching vehicle. The acquisition arcs represent the movement distance of the corresponding target matching vehicle in the time period corresponding to the N consecutive vehicle acquisition images, where N is a positive integer greater than or equal to 20.

[0087] For example, such as Figure 3a and Figure 3b As shown, the acquisition arc generated based on the 20 acquisition points of the target vehicle 1# is defined as l1, which represents its movement distance L1 in the time period (e.g., 800ms) corresponding to 20 consecutive vehicle acquisition images; the acquisition arc generated based on the 20 acquisition points of the target vehicle 2# is defined as l2, which represents its movement distance L2 in the time period corresponding to 20 consecutive vehicle acquisition images; the acquisition arc generated based on the 20 acquisition points of the target vehicle 3# is defined as l3, which represents its movement distance L3 in the time period corresponding to 20 consecutive vehicle acquisition images; and the acquisition arc generated based on the 20 acquisition points of the target vehicle 4# is defined as l4, which represents its movement distance L4 in the time period corresponding to 20 consecutive vehicle acquisition images.

[0088] Finally, the length of each collection arc is determined using a preset parking distance threshold. If the collection arc is less than or equal to the parking distance threshold, it is determined that the target matching vehicle corresponding to the collection arc is in the parking state.

[0089] In this example, the preset parking distance threshold is L. That is, if the collected arc l1 is less than or equal to the parking distance threshold (i.e., L1≤L), the target matching vehicle 1# is determined to be in a parked state; if the collected arc l2 is greater than the parking distance threshold (i.e., L2>L), the target matching vehicle 2# is determined to be in a non-parked state; similarly, if the collected arc l3 is less than or equal to the parking distance threshold (i.e., L3≤L), the target matching vehicle 3# is determined to be in a parked state; and if the collected arc l4 is less than or equal to the parking distance threshold (i.e., L4≤L), the target matching vehicle 4# is determined to be in a parked state.

[0090] To further improve the accuracy of vehicle motion state assessment, in a preferred example, within a preset continuous parking time, the target matching vehicle in the parking state is judged by generating a collection arc with N collection points as the period. If the collection arc of a certain period is greater than the parking distance threshold, it is determined that the target matching vehicle is in a non-parking state.

[0091] In other words, taking the collection arcs generated by the above N collection points as a judgment period, and setting the preset parking continuous time to M s, there are (M / N) judgment periods. The target matching vehicle is determined to be in a true parking state when the collection arcs in (M / N) judgment periods within M s are all less than or equal to the parking distance threshold; if the collection arc in any period is greater than the parking distance threshold, the target matching vehicle is determined to be in a non-parking state.

[0092] In other words, the collection arc generated by the above N collection points is used as a judgment period. If the target matching vehicle is in a parking state within the judgment period, the parking count is incremented by 1. Only when the parking count within M s accumulates to (M / N) is the target matching vehicle determined to be in a true parking state.

[0093] Taking target vehicle 1# as an example, when N=20 (20*40ms=800ms) and M=60, there are 75 judgment cycles. It is required that the distance L1 of the acquisition arc l1 in all 75 cycles within 60s is less than or equal to the parking distance threshold L, that is, the number of parking times is 75, and the target vehicle 1# is determined to be in a true parking state; if the distance L1 of the acquisition arc l1 in any cycle is greater than the parking distance threshold L, then the target vehicle 1# is determined to be in a non-parking state.

[0094] It should be understood that the number of collection points N and the preset continuous parking time M are exemplary, and this application does not limit them. Those skilled in the art can make corresponding settings according to the actual situation to further limit the determination of parking status, thereby more accurately judging the movement status of vehicles and improving the accuracy of vehicle congestion determination.

[0095] S40. Obtain the parking status parameters of the target matched vehicle in the parking state. If the parking status parameters do not meet the preset parking threshold, send a congestion alarm. It should be noted that the parking threshold in this example includes a parking quantity threshold and a parking time threshold, and the parking status parameters include the parking quantity and parking time. The specific steps are as follows:

[0096] First, determine whether the number of target matching vehicles in a parking state is greater than a preset parking number threshold according to a preset second time interval. If so, use a timer to keep track of the time; otherwise, initialize the timer.

[0097] For example, the parking quantity threshold is set to 5, and the preset second time interval is 30 seconds, or 1 minute. That is to say, the current parking lot vehicle situation is judged every minute to determine whether the number of target matching vehicles in the parking state is greater than the parking quantity threshold. If the number of target matching vehicles in the parking state is 6, which is greater than the parking quantity threshold of 5, the timer set in the parking lot starts counting. If, after 1 minute, the parking lot vehicle situation is judged again and the number of target matching vehicles in the parking state is 4, which is less than the parking quantity threshold of 5, then the timer is initialized, that is, the timer is cleared to zero.

[0098] Secondly, the timer determines whether the parking time of the target matched vehicle in the parking state exceeds a preset parking time threshold. If so, a congestion alarm is sent.

[0099] For example, a parking timer threshold can be set to 5 minutes. When the current parking lot's vehicle status is assessed every minute, if the number of target matching vehicles in a parking state consistently exceeds the parking quantity threshold, the timer continues to count until the timer exceeds 5 minutes. That is, when the number of target matching vehicles in a parking state is greater than 5 and the parking time of the target matching vehicles in a parking state exceeds the preset parking timer threshold, congestion is considered to have occurred at the parking lot's exit or entrance, and a congestion alarm is triggered.

[0100] It should be understood that the values ​​of the above-mentioned parking quantity threshold, parking time threshold and preset second time interval are exemplary and do not constitute an improper limitation of this application. Those skilled in the art can set the corresponding parking quantity threshold, parking time threshold and preset second time interval according to the actual situation to realize congestion warning of parking lot entrance and exit conditions.

[0101] This embodiment provides a method that combines deep learning and traditional image processing to evaluate the motion state of vehicles in parking lot videos. It combines vehicle detection models, vehicle tracking models, target detection models, target tracking algorithms, and Hungarian algorithms to effectively improve the accuracy of target vehicle identification, reduce false positives, and accurately determine the congestion situation at parking lot entrances and exits, thereby improving the user's parking experience.

[0102] Another embodiment of this application provides a parking lot congestion detection system, such as... Figure 4 As shown, the system includes an image acquisition device, a vehicle detection model, a vehicle tracking model, and a controller, wherein the controller is configured as follows:

[0103] The vehicle detection model is used to extract vehicles from the vehicle images and output the target vehicles. The vehicle images are collected from parking lot videos recorded by the image acquisition device at preset first time intervals.

[0104] The vehicle tracking model is used to track and lock onto the target vehicle in multiple consecutive vehicle images;

[0105] The system determines whether each target vehicle is in a parked state based on the distance it moves within a continuous time period.

[0106] Obtain the parking status parameters of the target matching vehicle that is in the parking state. If the parking status parameters do not meet the preset parking threshold, send a congestion alarm.

[0107] This embodiment extracts target vehicles from vehicle images using a vehicle detection model and tracks and matches them using a vehicle tracking model. It further determines the parking status of each target vehicle, enabling the system to determine whether the parking lot is congested based on a preset parking threshold and trigger an alarm. This effectively improves the accuracy of target vehicle identification, reduces false positives, and achieves accurate judgment of congestion at parking lot entrances and exits. It overcomes the problems existing in the prior art, improves the user's parking experience, and has broad application prospects.

[0108] Since the congestion detection system provided in this application corresponds to the congestion detection method provided in the foregoing embodiments, the foregoing embodiments and their beneficial effects are also applicable to this embodiment. Therefore, the same parts will not be described again.

[0109] Another embodiment of this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a parking lot congestion detection method provided in the foregoing embodiments.

[0110] In practical applications, the computer-readable storage medium can be any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. For example, a computer-readable storage medium can be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination thereof. More specific examples of computer-readable storage media (a non-exhaustive list) include: an electrical connection having one or more wires, a portable computer disk, a hard disk, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage device, magnetic storage device, or any suitable combination thereof. In this embodiment, the computer-readable storage medium can be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system, apparatus, or device.

[0111] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, carrying computer-readable program code. Such propagated data signals may take various forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination thereof. Computer-readable signal media may also be any computer-readable medium other than computer-readable storage media, capable of sending, propagating, or transmitting programs for use by or in connection with an instruction execution system, apparatus, or device.

[0112] Program code contained on a computer-readable medium may be transmitted using any suitable medium, including but not limited to wireless, wire, optical fiber, RF, etc., or any suitable combination thereof.

[0113] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a local area network (LAN) or a wide area network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0114] like Figure 5 As shown, another embodiment of this application provides a structural schematic diagram of a computer device. Figure 5 The computer device 12 shown is merely an example and should not impose any limitation on the functionality and scope of use of the embodiments of this application.

[0115] like Figure 5 As shown, the computer device 12 is represented in the form of a general-purpose computing device. The components of the computer device 12 may include, but are not limited to: one or more processors or processing units 16, system memory 28, and a bus 18 connecting different system components (including system memory 28 and processing unit 16).

[0116] Bus 18 represents one or more of several bus architectures, including a memory bus or memory controller, a peripheral bus, a graphics acceleration port, a processor, or a local bus using any of the various bus architectures. For example, these architectures include, but are not limited to, the Industry Standard Architecture (ISA) bus, the Micro Channel Architecture (MAC) bus, the Enhanced ISA bus, the Video Electronics Standards Association (VESA) local bus, and the Peripheral Component Interconnect (PCI) bus.

[0117] Computer device 12 typically includes a variety of computer system readable media. These media can be any available media that can be accessed by computer device 12, including volatile and non-volatile media, removable and non-removable media.

[0118] System memory 28 may include computer system readable media in the form of volatile memory, such as random access memory (RAM) 30 and / or cache memory 32. Computer device 12 may further include other removable / non-removable, volatile / non-volatile computer system storage media. By way of example only, storage system 34 may be used to read and write non-removable, non-volatile magnetic media (…). Figure 5 Not shown; usually referred to as a "hard drive"). Although Figure 5 Not shown, a disk drive for reading and writing to a removable non-volatile disk (e.g., a "floppy disk") and an optical disk drive for reading and writing to a removable non-volatile optical disk (e.g., a CD-ROM, DVD-ROM, or other optical media) may be provided. In these cases, each drive may be connected to bus 18 via one or more data media interfaces. Memory 28 may include at least one program product having a set (e.g., at least one) of program modules configured to perform the functions of the embodiments of this application.

[0119] A program / utility 40 having a set (at least one) of program modules 42 may be stored, for example, in memory 28. Such program modules 42 include, but are not limited to, an operating system, one or more application programs, other program modules, and program data. Each or some combination of these examples may include an implementation of a network environment. Program modules 42 typically perform the functions and / or methods described in the embodiments of this application.

[0120] Computer device 12 can also communicate with one or more external devices 14 (e.g., keyboard, pointing device, display 24, etc.), and with one or more devices that enable a user to interact with the computer device 12, and / or with any device that enables the computer device 12 to communicate with one or more other computing devices (e.g., network card, modem, etc.). This communication can be performed through input / output (I / O) interface 22. Furthermore, computer device 12 can also communicate with one or more networks (e.g., local area network (LAN), wide area network (WAN), and / or public networks, such as the Internet) through network adapter 20. Figure 5 As shown, network adapter 20 communicates with other modules of computer device 12 via bus 18. It should be understood that, although... Figure 5 As not shown, it can be used in conjunction with computer device 12 with other hardware and / or software modules, including but not limited to: microcode, device drivers, redundant processing units, external disk drive arrays, RAID systems, tape drives, and data backup storage systems.

[0121] The processor unit 16 executes various functional applications and data processing by running programs stored in the system memory 28, such as implementing a parking lot congestion detection method provided in the embodiments of this application.

[0122] It should be noted that the order of steps in the parking lot congestion detection method provided in this application embodiment can be appropriately adjusted, and the steps can also be added or removed as appropriate. Any method that can be easily derived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application, and therefore will not be described in detail here.

[0123] Obviously, the above embodiments of this application are merely examples for clearly illustrating this application, and are not intended to limit the implementation of this application. For those skilled in the art, other variations or modifications can be made based on the above description. It is impossible to exhaustively list all implementation methods here. Any obvious variations or modifications derived from the technical solutions of this application are still within the protection scope of this application.

Claims

1. A method for detecting parking lot congestion, characterized in that, Used at parking lot exits or entrances, including: The vehicle detection model is used to extract vehicles from the vehicle images and output the target vehicles. The vehicle images are collected from the received parking lot video at a preset first time interval. The vehicle tracking model is used to track and lock the target vehicle in multiple consecutive vehicle images; The system determines whether each target vehicle is in a parked state based on the distance it moves within a continuous time period. Obtain the parking status parameters of the target matching vehicle that is in the parking state; if the parking status parameters do not meet the preset parking threshold, send a congestion alarm. The step of using a vehicle detection model to extract vehicles from vehicle-collected images and output the target vehicle further includes: A target detection model is used to extract vehicles from the acquired vehicle images and a rectangular box is output in the acquired vehicle images to represent the target vehicle. The step of using a vehicle tracking model to track and lock onto a target vehicle in multiple consecutive vehicle images further includes: Based on the target vehicle, a target tracking algorithm is used to predict the state of the bounding box in the next vehicle image based on the bounding boxes corresponding to at least two consecutive vehicle images to obtain the predicted bounding box. The target detection model is used to extract the vehicle from the next vehicle image to obtain the measured bounding box. Each predicted bounding box and the measured bounding box are matched to determine whether the predicted bounding box tracks the corresponding measured bounding box. If they are tracked, the target vehicle is locked as the target matching vehicle and a vehicle tracking table is established. The vehicle tracking table includes the target matching vehicle and the vehicle identifier that corresponds one-to-one with the target matching vehicle. The step of determining whether each target matching vehicle is in a parked state based on the movement distance of each target matching vehicle within a continuous time period further includes: The acquisition points of the rectangular bounding boxes of each target matching vehicle in the latest N consecutive vehicle acquisition images are obtained respectively. The acquisition points are points at predefined positions in the rectangular bounding boxes. Gaussian filtering was applied to each data acquisition point; A collection arc is generated based on the collection points of the rectangular boxes in the N consecutive vehicle collection images of each target matching vehicle. The collection arc represents the movement distance of the corresponding target matching vehicle in the time period corresponding to the N consecutive vehicle collection images. The length of each collection arc is determined using a preset parking distance threshold. If the length of the collection arc is less than or equal to the parking distance threshold, the target matching vehicle corresponding to the collection arc is determined to be in the parking state. Where N is a positive integer greater than or equal to 20; The step of determining the length of each acquisition arc using a preset parking distance threshold, and determining that the target matching vehicle corresponding to the acquisition arc is in the parking state if the acquisition arc is less than or equal to the parking distance threshold, further includes: Within a preset continuous parking time, the target matching vehicle in the parking state is judged by generating a collection arc with N collection points as the period. If the collection arc of a certain period is greater than the parking distance threshold, it is determined that the target matching vehicle is in a non-parking state.

2. The detection method according to claim 1, characterized in that, The step of matching each predicted bounding box and the measured bounding box to determine whether the predicted bounding box has tracked the corresponding measured bounding box further includes: The IOU algorithm was used to calculate the distance between each predicted bounding box and each measured bounding box. Based on the distance, the Hungarian algorithm is used to obtain the measured bounding boxes that match the predicted bounding boxes of each target vehicle.

3. The detection method according to claim 1, characterized in that, The parking threshold includes a parking quantity threshold and a parking time threshold, and the parking status parameters include the parking quantity and parking time. The step of obtaining the parking status parameters of the target matched vehicle in the parking state, and sending a congestion alarm if the parking status parameters do not meet a preset parking threshold, further includes: According to a preset second time interval, it is determined whether the number of target matching vehicles in the parking state is greater than a preset parking number threshold. If yes, a timer is used to keep track of the time; otherwise, the timer is initialized. The timer determines whether the parking time of the target vehicle in a parked state exceeds a preset parking time threshold. If so, a congestion alarm is sent.

4. A parking lot congestion detection system using the detection method according to any one of claims 1-3, characterized in that, It includes an image acquisition device, a vehicle detection model, a vehicle tracking model, and a controller, wherein the controller is configured as follows: The vehicle detection model is used to extract vehicles from the vehicle images and output the target vehicles. The vehicle images are collected from parking lot videos recorded by the image acquisition device at preset first time intervals. The vehicle tracking model is used to track and lock onto the target vehicle in multiple consecutive vehicle images; The system determines whether each target vehicle is in a parked state based on the distance it moves within a continuous time period. Obtain the parking status parameters of the target matching vehicle that is in the parking state. If the parking status parameters do not meet the preset parking threshold, send a congestion alarm.

5. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the method as described in any one of claims 1-3.

6. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the method as described in any one of claims 1-3.

Citation Information

Patent Citations

  • Parking lot exit traffic volume early-warning device

    CN108288391A

  • Early warning method, device and system against jamming of parking lot

    CN108648464A

  • Vehicle congestion early warning method and device

    CN109389833A

  • Parking detection method, parking detection device and electronic equipment

    CN112101071A

  • Parameter acquisition and evaluation method for vehicle driving congestion state of highway section

    CN113469069A