A parking space state recognition method and device, electronic equipment and storage medium

By constructing a tracking box linked list and a vehicle detection model, the problem of poor accuracy in parking space status recognition was solved, achieving cost reduction and improved recognition accuracy.

CN117152683BActive Publication Date: 2026-04-14ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
ZHEJIANG DAHUA TECH CO LTD
Filing Date
2023-08-25
Publication Date
2026-04-14

AI Technical Summary

Technical Problem

Existing technologies have poor accuracy in identifying parking space status, require significant manpower, and suffer from deficiencies in sensor sensitivity and signal detection hardware.

Method used

By acquiring video of the parking space status monitoring area, a tracking box linked list is constructed. Based on the trained vehicle detection model, the detection box of each vehicle in each frame of the video is detected. The tracking box linked list is updated according to the frame sequence. The target tracking box is obtained in response to the parking space status trigger command, and the parking space status is determined according to its coordinate information.

Benefits of technology

There is no need to install sensors in each parking space, which reduces the cost of parking space status recognition, avoids sensor hardware defects, and improves the accuracy of parking space status recognition.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117152683B_ABST
    Figure CN117152683B_ABST
Patent Text Reader

Abstract

The application discloses a parking space state recognition method and device, electronic equipment and a storage medium. Based on a video mode, a tracking frame linked list corresponding to the video is first constructed, then a trained vehicle detection model is used to detect the detection frame of each vehicle in each image frame in the video, the tracking frames in the tracking frame linked list are updated in the order of the frame sequence, when a parking space state trigger instruction is received, each target tracking frame in the tracking frame linked list is acquired, and finally the state of each parking space in the parking space state monitoring area is determined according to the coordinate information of each target tracking frame. Compared with the prior art, sensors do not need to be installed at each parking space, the cost of parking space state recognition is reduced, and the problem that the parking space state recognition is inaccurate due to the restriction of the sensitivity and signal detection of the sensors and other hardware defects is avoided, thereby improving the accuracy of the parking space state recognition.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image processing technology, and in particular to a parking space status recognition method, device, electronic device, and storage medium. Background Technology

[0002] Against the backdrop of "smart cities" and "safe cities," "smart parking" has become an integral part of people's daily lives, with convenient parking becoming a crucial indicator of residents' urban well-being. As the primary component of "smart parking," the accuracy of parking space detection is a key metric for parking management solutions, directly impacting people's travel experience. Therefore, a high-precision parking space management solution will greatly contribute to the construction of smart and safe cities. Currently, most service areas still rely on manually installed sensors to identify the occupancy status of individual parking spaces. This approach is costly in terms of manpower and is limited by hardware limitations such as sensor sensitivity and signal detection, leading to inaccurate parking space status identification. Summary of the Invention

[0003] This application provides a parking space status recognition method, device, electronic device, and storage medium to solve the problem of poor accuracy in parking space status recognition in the prior art.

[0004] Firstly, this application provides a parking space status recognition method, the method comprising:

[0005] Acquire video of the parking space status monitoring area and construct a linked list of tracking frames corresponding to the video;

[0006] The detection bounding box of each vehicle in each frame of the video is detected based on the trained vehicle detection model. The tracking boxes in the tracking box list are updated according to the frame sequence and the detection bounding box of each vehicle.

[0007] In response to a parking space status trigger command, each target tracking frame in the tracking frame chain is obtained; based on the coordinate information of each target tracking frame, the status of each parking space within the parking space status monitoring area is determined.

[0008] Secondly, this application provides a parking space status recognition device, the device comprising:

[0009] The acquisition module is used to acquire video of the parking space status monitoring area and construct a linked list of tracking frames corresponding to the video.

[0010] The detection module is used to detect the detection box of each vehicle in each frame of the video based on the trained vehicle detection model, and update the tracking boxes in the tracking box list according to the frame sequence and the detection box of each vehicle.

[0011] The identification module is used to respond to the parking space status trigger command, obtain each target tracking frame in the tracking frame chain, and determine the status of each parking space within the parking space status monitoring area based on the coordinate information of each target tracking frame.

[0012] Thirdly, this application provides an electronic device, including a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus;

[0013] Memory, used to store computer programs;

[0014] A processor, when executing a program stored in memory, implements the steps of the method described.

[0015] Fourthly, this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the method described.

[0016] This application provides a parking space status recognition method, device, electronic device, and storage medium. The method includes: acquiring a video of a parking space status monitoring area and constructing a tracking box linked list corresponding to the video; detecting the detection box of each vehicle in each frame of the video based on a trained vehicle detection model, and updating the tracking boxes in the tracking box linked list according to the frame sequence and the detection boxes of each vehicle; in response to a parking space status triggering command, acquiring each target tracking box in the tracking box linked list; and determining the status of each parking space within the parking space status monitoring area based on the coordinate information of each target tracking box.

[0017] The above technical solution has the following advantages or beneficial effects:

[0018] This application, based on video mode, first constructs a linked list of tracking boxes corresponding to the video. Then, based on a trained vehicle detection model, it detects the detection box of each vehicle in each frame of the video. The tracking boxes in the linked list are updated according to the frame sequence. When a parking space status trigger command is received, each target tracking box in the linked list is retrieved. Finally, based on the coordinate information of each target tracking box, the status of each parking space within the monitoring area is determined. Compared to existing technologies, this eliminates the need to install sensors in each parking space, reducing the cost of parking space status recognition. Furthermore, it avoids the limitations of sensor sensitivity and signal detection hardware that can lead to inaccurate parking space status recognition, thus improving the accuracy of parking space status recognition. Attached Figure Description

[0019] To more clearly illustrate the technical solutions in the embodiments of this application, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0020] Figure 1 This is a schematic diagram of the parking space status recognition process provided in this application;

[0021] Figure 2 This is a schematic diagram illustrating the positional relationship between the preset parking space state line and the candidate detection box determined by the unipolar dimensionality reduction method provided in this application.

[0022] Figure 3 A schematic diagram of the monitoring area configuration provided in this application;

[0023] Figure 4 A schematic diagram for determining the effective target provided in this application;

[0024] Figure 5 A schematic diagram of logical operation relationships provided for this application;

[0025] Figure 6 The flowchart for parking space status recognition provided in this application;

[0026] Figure 7 A schematic diagram of the parking space status recognition device provided in this application;

[0027] Figure 8 A schematic diagram of the electronic device structure provided in this application. Detailed Implementation

[0028] To make the objectives and implementation methods of this application clearer, the exemplary implementation methods of this application will be clearly and completely described below with reference to the accompanying drawings of the exemplary embodiments of this application. Obviously, the exemplary embodiments described are only some embodiments of this application, and not all embodiments.

[0029] It should be noted that the brief descriptions of terms in this application are only for the convenience of understanding the embodiments described below, and are not intended to limit the embodiments of this application. Unless otherwise stated, these terms should be understood in their ordinary and common meaning.

[0030] The terms "first," "second," "third," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar or related objects or entities, and do not necessarily imply a specific order or sequence, unless otherwise specified. It should be understood that such terms are interchangeable where appropriate.

[0031] The terms “comprising” and “having”, and any variations thereof, are intended to cover but not exclude inclusion, for example, a product or device that includes a range of components is not necessarily limited to all of the components that are clearly listed, but may include other components that are not clearly listed or that are inherent to such product or device.

[0032] The term "module" refers to any known or subsequently developed hardware, software, firmware, artificial intelligence, fuzzy logic, or combination of hardware and / or software code that is capable of performing the functions associated with that element.

[0033] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of this application, and are not intended to limit them. Although this application has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features therein. Such modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of this application.

[0034] For ease of explanation, the above description has been provided in conjunction with specific embodiments. However, the above exemplary discussion is not intended to be exhaustive or to limit the embodiments to the specific forms disclosed above. Various modifications and variations can be obtained based on the above teachings. The selection and description of the above embodiments are for the purpose of better explaining the principles and practical applications, thereby enabling those skilled in the art to better utilize the described embodiments and various different variations of embodiments suitable for specific use considerations.

[0035] Figure 1 The schematic diagram of the parking space status recognition process provided in this application includes the following steps:

[0036] S101: Obtain video of the parking space status monitoring area and construct a linked list of tracking frames corresponding to the video.

[0037] S102: Detect the detection box of each vehicle in each frame of the video based on the trained vehicle detection model, and update the tracking boxes in the tracking box list according to the frame sequence and the detection box of each vehicle.

[0038] S103: In response to the parking space status trigger command, obtain each target tracking frame in the tracking frame chain; determine the status of each parking space within the parking space status monitoring area based on the coordinate information of each target tracking frame.

[0039] The parking space status recognition method provided in this application is applied to electronic devices, which may be PCs, tablets, or servers.

[0040] After the image acquisition device installed in the monitoring area captures video of the parking space status monitoring area, it sends the video to the electronic device. The electronic device acquires the video of the parking space status monitoring area and constructs a linked list of tracking frames corresponding to the video. The linked list of tracking frames includes nodes that correspond one-to-one with each monitored parking space. Each node includes the tracking frame of the vehicle in the corresponding monitored parking space, its category, and identification information. The vehicle category is, for example, the front or rear of the vehicle, and the vehicle identification information is, for example, the vehicle's license plate number, or a tracking ID assigned to the vehicle, such as 0, 1, 2, etc.

[0041] The electronic device stores a trained vehicle detection model, which is trained based on sample images and corresponding label information in the training set. The label information is the coordinate information of the detection boxes in the corresponding sample images. The detection box can be the detection box of the entire vehicle, or it can be the detection box of the front or rear of the vehicle. Video of the parking space status monitoring area is acquired and processed frame by frame to obtain each frame of the video. The trained vehicle detection model detects the detection box of each vehicle in each frame. Based on the coordinate information of each vehicle's detection box, the node in the tracking box linked list corresponding to each vehicle is determined. Following the frame sequence, the tracking boxes of the same node in the tracking box linked list are updated according to the detection box of each vehicle. That is, the detection box of the vehicle in the current frame is used as the latest tracking box in the tracking box linked list. For the first frame of the video, the detection box of each vehicle is added to the corresponding node in the tracking box linked list based on its coordinate information, and it is used as a tracking box.

[0042] When the electronic device receives a parking space status trigger command, it retrieves each target tracking frame from the tracking frame chain in response to the command. Optionally, the latest tracking frame in the chain is selected as the target tracking frame. Based on the coordinate information of each target tracking frame, the status of each parking space within the parking space status monitoring area is determined. The target node corresponding to each target tracking frame can be determined based on its coordinate information, thus determining that the monitored parking space corresponding to the target node is occupied, while the monitored parking spaces corresponding to other nodes are empty.

[0043] This application, based on video mode, first constructs a linked list of tracking boxes corresponding to the video. Then, based on a trained vehicle detection model, it detects the detection box of each vehicle in each frame of the video. The tracking boxes in the linked list are updated according to the frame sequence. When a parking space status trigger command is received, each target tracking box in the linked list is retrieved. Finally, based on the coordinate information of each target tracking box, the status of each parking space within the monitoring area is determined. Compared to existing technologies, this eliminates the need to install sensors in each parking space, reducing the cost of parking space status recognition. Furthermore, it avoids the limitations of sensor sensitivity and signal detection hardware that can lead to inaccurate parking space status recognition, thus improving the accuracy of parking space status recognition.

[0044] Considering the issue that overlapping vehicle detection boxes between adjacent parking spaces can affect the accuracy of parking space status recognition, this application addresses the problem that detecting vehicle detection boxes in each frame of the video based on a trained vehicle detection model includes:

[0045] Based on the trained vehicle detection model, at least one of the front and rear detection boxes of each vehicle in each frame of the video is detected.

[0046] The electronic device stores a trained vehicle detection model. This model is trained based on sample images and corresponding label information from the training set. The label information consists of the coordinates of the detection boxes in the corresponding sample images. The detection boxes can be front and / or rear bounding boxes. The trained vehicle detection model detects the front bounding box of each vehicle in each frame of the video. This includes three cases: 1. Only the front bounding box is detected; 2. Only the rear bounding box is detected; 3. Both front and rear bounding boxes are detected simultaneously.

[0047] To improve the accuracy of detecting at least one of the front and rear detection boxes of each vehicle in each frame of a video, the detection of at least one of the front and rear detection boxes of each vehicle in each frame of the video based on the trained vehicle detection model includes:

[0048] Based on the trained vehicle detection model, at least one of the candidate front detection box and candidate rear detection box for each vehicle in each frame of the video is detected; the detected candidate front detection box and candidate rear detection box are used as candidate detection boxes.

[0049] For each candidate detection box, if it is determined that the candidate detection box intersects with a preset effective area and intersects with a preset parking space status line, the candidate detection box is retained as a valid detection box; otherwise, the candidate detection box is filtered out. The preset parking space status line is the center line of each parking space within the preset effective area.

[0050] The trained vehicle detection model detects each vehicle in each frame of the image. The detected bounding boxes are used as candidate front or rear vehicle bounding boxes. Both candidate front and rear bounding boxes are then used as candidate detection boxes. These candidate detection boxes are then filtered to separate valid and invalid boxes. Valid boxes are retained, while invalid boxes are discarded. Invalid boxes are considered interference.

[0051] The process of filtering candidate detection boxes is as follows:

[0052] The electronic device stores a preset effective area within the monitored area. For example, the minimum bounding rectangle or minimum bounding polygon of all parking spaces within the monitored area can be used as the preset effective area. Alternatively, the effective area can be pre-defined by the administrator based on all parking spaces within the monitored area. Furthermore, the electronic device stores the individual parking space status line for each parking space. The preset parking space status line is the center line of each parking space within the preset effective area. Parking spaces are generally rectangular, and this center line can be a center line parallel to the longer side of the parking space.

[0053] For each candidate detection box, firstly, it is determined whether the candidate detection box intersects with a preset valid region. If there is no intersection, the candidate detection box is directly filtered out as an invalid detection box. If there is an intersection, it is then determined whether there is a preset parking space status line intersecting with the candidate detection box. If there is no such line, the candidate detection box is filtered out as an invalid detection box. If such a line exists, the candidate detection box is retained as a valid detection box.

[0054] This application filters candidate detection boxes by using a preset effective area and a preset parking space status line, thereby filtering out interference and improving the accuracy of the determined detection boxes.

[0055] In this application, determining that the candidate detection box intersects with the preset parking space state line includes:

[0056] Based on the coordinate information of the candidate detection box and the coordinate information of the preset parking space status line, a single-level dimensionality reduction method is used to determine that the candidate detection box intersects with the preset parking space status line.

[0057] Figure 2 This is a schematic diagram illustrating the positional relationship between a preset parking space state line and a candidate detection box determined by a single-pole dimensionality reduction method, as provided in this application.

[0058] Assume the candidate detection box and the parking space status line are represented by a rectangle CD and a line segment AB, respectively, where the coordinates of the rectangle are represented by C(x). c ,y c ) and D(x d ,y d ), set y c <y d The coordinates of line segment AB are represented as A(x) a ,y a ) and B(x b ,y b ), set y a <y b The formula for the line containing line segment AB is:

[0059]

[0060] Points M and N are the intersections of rectangle CD along the x-axis and line AB, respectively. The coordinates of these intersections are calculated using the formula described above. Let M be the point with the largest y-value among (A, M), and N be the point with the smallest y-value among (B, N), as follows: Figure 2 Line segment MB in the diagram.

[0061] M=max_y(A,M), B=min_y(B,N);

[0062] Finally, by determining whether the mapped line segments of rectangle CD and line segment MB on the x-axis intersect, such as... Figure 2 The rectangle CD and line segment AB are considered. If the two line segments intersect, then rectangle CD and line segment AB are considered to be in an intersecting state; otherwise, they are considered to be in a separate state. The single-level dimensionality reduction method can easily and effectively calculate whether there are candidate detection boxes intersecting with the current parking space status line, thereby determining the current parking space occupancy status.

[0063] In this application, updating the tracking frames in the tracking frame chain based on the detection frames of each vehicle includes:

[0064] For each detection box, the detection box is matched with each of the most recently updated tracking boxes in the tracking box list. If a matching tracking box exists, the detection box is used to update the matching tracking box. If no matching tracking box exists, the detection box is added as a tracking box to the tracking box list.

[0065] The process of matching detection boxes and tracking boxes can be as follows: First, calculate the overlap area of ​​the detection and tracking boxes based on their coordinate information. If the overlap area exceeds a preset area threshold, the detection and tracking boxes are considered successfully matched; otherwise, the match is considered unsuccessful. Second, calculate the intersection-over-union (IoU) ratio of the detection and tracking boxes based on their coordinate information. If the IoU exceeds a preset IoU threshold, the detection and tracking boxes are considered successfully matched; otherwise, the match is considered unsuccessful. If a successfully matched tracking box exists, it is updated using the detection box. If no successfully matched tracking box exists, the detection box is added as a tracking box to the tracking box list. For example, if detection box m and tracking box n are successfully matched, then detection box m is used as the updated tracking box. For tracking box n, the image of tracking box n can be deleted, but its coordinate information, category, vehicle identification information, etc., are preserved.

[0066] The method further includes:

[0067] If a matching tracking frame is found, determine whether the tracking frame has corresponding vehicle identification information. If it does, update the vehicle identification information to the vehicle identification information corresponding to the detection frame. If not, identify the vehicle identification information based on the detection frame.

[0068] If no matching tracking frame is found, the vehicle's identification information is identified based on the detection frame.

[0069] Vehicle identification based on the detection frame can be achieved by using a license plate recognition algorithm to identify the license plate information within the detection frame and using this license plate information as the vehicle identification information corresponding to the detection frame. This way, even if the license plate is not present in the detection frame, the vehicle's identification information can still be determined based on the vehicle identification information of the successfully matched tracking frame. Furthermore, license plate recognition is not required for every detection frame during the parking process.

[0070] It should be noted that once vehicle A is detected to have left the parking space, the relevant information for vehicle A is deleted from the tracking list.

[0071] In this application, matching the detection box with each of the most recently updated tracking boxes in the tracking box list includes:

[0072] Based on the coordinate information of the detection box and the coordinate information of each tracking box, determine each tracking box that intersects with the detection box;

[0073] The distance between the diagonal vertices of the detection box and each of the intersecting tracking boxes is determined respectively, and the matching degree between the detection box and each of the intersecting tracking boxes is determined according to the distance between each diagonal vertex;

[0074] Based on the maximum matching degree, the tracking box that matches the detection box is determined.

[0075] Assume the top-left corner coordinate of each detection box (x) is (x) od_ul ,y od_ul ), lower right corner coordinates (x od_lr ,y od_lr The top-left corner coordinate of the tracking box BBox_track in the tracking box list is (x... track_ul ,y track_ul The coordinates of the lower right corner are (x track_lr ,y track_lr The calculation method for the diagonal vertex distance metric is as follows:

[0076] First, determine whether the current detection bounding box (BBox) and the tracking bounding box (BBox_track) have any intersection. The determination method is as follows:

[0077] x i =max(x od_ul ,x track_ul );

[0078] y i =max(y od_ul ,y track_ul );

[0079] x j =min(x od_lr ,x track_lr );

[0080] y j =min(y od_lr ,y track_lr );

[0081] If x is satisfied i ≤x j &&y i ≤y j If the detection box BBox and the tracking box BBox_track are in an intersecting state, the distance between their diagonal vertices is calculated as follows:

[0082]

[0083]

[0084]

[0085] The formula for the matching degree between the tracking box and the detection box is as follows:

[0086] match score =1-((Δs1+Δs2) / Δs);

[0087] If the two boxes match score greater than the set threshold match thresh If the match is successful, then the two are considered to be a match; otherwise, no matching relationship is established.

[0088] To more accurately determine the parking status of parking spaces, this application determines the status of each parking space within the parking space status monitoring area based on the coordinate information of each target tracking frame, including:

[0089] For each target tracking frame, the target parking space corresponding to the target tracking frame is determined based on the coordinate information of the target tracking frame;

[0090] The coordinate information of the tracking box of the target parking space in the image before obtaining the preset inter-frame step distance value;

[0091] Based on the coordinate information of the target tracking frame and the coordinate information of the target parking space tracking frame, the displacement distance of the vehicle in the target parking space is determined.

[0092] If the displacement distance is less than a preset distance threshold, the target parking space is determined to be occupied.

[0093] The preset inter-frame step size is, for example, 25 frames or 40 frames.

[0094] The inter-frame step size is set to Δf step If the displacement of the vehicle target tracking box within the inter-frame step distance is less than the displacement threshold s_thresh, the target vehicle is considered to be stationary, and the target parking space is determined to be occupied; otherwise, the target parking space is determined to be unoccupied. Inter-frame step distance Δf step The calculation relationship between Δf and the video frame rate f is Δf step =β*f. The sensitivity of vehicle state determination is controlled by adjusting the coefficient β.

[0095] The method further includes:

[0096] For each parking space in the parking space status monitoring area, if the parking space is occupied, a first prompt message indicating the direction the car is facing is output.

[0097] If only the front detection frame is detected, the direction in which the front of the vehicle faces the image acquisition device is determined. If only the rear detection frame is detected, the direction in which the rear of the vehicle faces the image acquisition device is determined. If both the front and rear detection frames are detected simultaneously, the direction in which the rear of the vehicle faces the image acquisition device is determined. This application is applicable to the detection of any vehicle, including small cars, medium-sized cars, and large trucks.

[0098] Based on the status of each parking space within the parking space status monitoring area, determine the number of occupied parking spaces and the number of vacant parking spaces, and output a second prompt message to represent the number of occupied parking spaces and the number of vacant parking spaces.

[0099] The following explanation uses a truck parking space monitoring scenario as an example.

[0100] This paper utilizes a deep learning network model to detect and track vehicle components within a pre-defined monitoring area. The rear of a vehicle is classified as category 0, and the front as category 1. The parking space status information (v_status) is determined by fusing the positional relationship between multi-frame tracking bounding boxes and the designated parking space status line. Occupied status value is 1, and idle status value is 0. The paper also combines the vehicle posture attribute flags (head_flag and tail_flag) of the current parking space node (parking_node) in the tracking bounding box linked list (parking_list) to output the posture information of the vehicle in the current parking space. Then, the remaining parking spaces within the current monitoring area are calculated by subtracting the summation result (p_sum) of the parking space status array (parking_array) from the array length (p_L). Finally, the posture information and remaining parking space information of the target vehicles within the designated monitoring area are reported to the system, and the reporting frequency is controlled by adjusting the sensitivity coefficient α. The main execution flow of this application is as follows:

[0101] Parameter Configuration: Within the monitoring field of view of the image acquisition device, a valid polygonal parking area (parking_area) is configured. This area is a closed region enclosed by multiple points. Each parking space within the area is configured with a numbered parking space status line (parking_line). The default status value of the parking space status line is 0 (no car), and the status value is 1 when the parking space is occupied. A parking space information reporting frequency coefficient α is set. Given a current video frame rate of f, the number of frames F triggered for parking space information reporting is set. upload The relationship with α is:

[0102] F upload =α*f.

[0103] The monitoring area configuration diagram is as follows:

[0104] Parking space tracking bounding box list / array initialization: The number N of parking space status lines configured within the effective monitoring area is the length of the parking space linked list `parking_list` and the parking space array `parking_array`. The parking space array represents the number of parking spaces within the monitoring area. Each node `parking_node` in the tracking bounding box list has vehicle attitude attribute flags, namely the head_flag flag and the tail_flag flag. When a head or tail bounding box is detected for the current parking space, the corresponding flag is set to 1. For example... Figure 3 If the third parking space from the left is associated with the rear component target, then the attitude attribute code of the corresponding parking node in parking_list is 1. The element values ​​of the parking space array parking_array represent the occupancy status of the parking spaces in the current valid area; an element value of 1 indicates that the current parking space is occupied, and 0 indicates that the parking space is vacant.

[0105] Object detection: Using deep learning object detection methods such as YOLO, but not limited to, a pre-built detection model is trained on the training data. The detection model detects and locates vehicle component targets in video images, obtaining bounding boxes (BBoxes) and category attributes. Specifically, the rear target (cartail) is classified as category 0, and the front target (carhead) is classified as category 1.

[0106] Valid target determination: A valid target meets two conditions: 1. The target detection bounding box (BBox) intersects with a preset valid region; 2. The confidence level of the BBox is greater than a set threshold (conf_thresh), which can be 0.5, 0.6, etc. Only detection boxes that meet both conditions are input to the tracking module for tracking.

[0107] Figure 4 A schematic diagram for determining the effective target provided in this application, such as Figure 4 As shown, only 4 trucks within the effective area are considered valid targets. Trucks 1, 2, and 3 outside the area are considered environmental or background targets, and their component detection boxes will be filtered out. Filtering invalid targets can effectively improve target tracking efficiency.

[0108] Target Tracking: Initialize the node information `node_info` and list length `LL` in the track list `track_list`, where `node_info` includes the target coordinates `rect`, class, and identifier `id`. The target detection box set `od_set` is matched against the tracking nodes in the current tracking list using a diagonal vertex distance metric. If a match is successful, the attribute information (coordinates and class) of the current detection box `BBox` is used to update the information of the corresponding tracking node. Attribute information includes coordinates and class. Detection boxes in the current detection set that do not match a tracking node are considered new targets, and their attribute information is initialized to the new tracking node, updated in the tracking list, and assigned a tracking ID.

[0109] Parking space status determination: The positional relationship between the preset parking space status line (parking_line) and the tracking box in the current stable state is determined by the single-level dimensionality reduction method. If the parking space status line intersects with the tracking box, it is considered that the current parking space has been occupied. The vehicle posture attributes under the corresponding parking space node (parking_node) in the parking_list are encoded according to the category attribute of the tracking box, and the parking space status p_status of the corresponding index in the parking space array (parking_array) is set to 1.

[0110] Vehicle attitude determination: Based on the logical operation relationship between the vehicle attitude attribute flags under the parking node (i.e., the head_flag and tail_flag), the vehicle attitude attribute information of the currently occupied parking space is output. A result value of 0 indicates a backward attitude and 1 indicates a forward attitude. Figure 5 The diagram illustrates the logical operation relationships provided in this application. XOR represents the exclusive OR operation, and AND represents the AND operation.

[0111] The difference between the summation result p_sum of the parking space status array parking_array and the array length p_L is used as the vehicle remaining space number Num_left. The remaining space number Num_left of the current monitoring area and the attitude attribute information of each target vehicle are reported, and the reporting frequency of the information is controlled by configuring the sensitivity coefficient α.

[0112] Figure 6The parking space status recognition flowchart provided in this application includes: loading video, parameter configuration, initialization of the parking space status linked list (initialization of the tracking box linked list), target detection, valid target determination, target tracking, and vehicle status determination. If v_static = 1, it indicates that a vehicle exists and is in a stable state, so parking space status determination is performed; otherwise, target detection continues. If v_status = 1, it indicates that the parking space is occupied, so vehicle posture determination is performed, that is, determining the vehicle's orientation, and the final result is reported; otherwise, it indicates that the parking space is unoccupied, and target tracking continues.

[0113] This application, based on video mode, combines target detection and tracking with status bit logic operations to output the attitude information and vehicle availability information of target vehicles in the monitored area. Compared with solutions relying on ground-buried geomagnetic sensors or other microwave detection devices, the video detection solution is more stable and reliable, and has better anti-interference capabilities. By detecting and tracking the front and rear components of truck targets, the association between vehicles and parking spaces can be established more accurately, effectively avoiding the "one vehicle, multiple spaces" phenomenon caused by excessively large vehicle detection boxes in dense vehicle scenes. By using a single-level dimensionality reduction method to establish the association between the target tracking box and the preset parking space lines, the parking space status p_status value can be quickly determined; and by combining the parking space array parking_array and the parking space linked list parking_list, vehicle attitude information and vehicle availability information are managed conveniently and effectively. By judging the positional relationship between the target detection box and the monitored area, valid tracking targets are identified, and multi-frame recognition results are fused to ensure the accuracy of the final reported information.

[0114] By detecting and tracking the front and rear components of the vehicle and combining this with a single-level dimensionality reduction method, the system associates the target vehicle with the parking spaces in the area and determines the parking space status value p_status. It then uses logical operations between the attitude attribute flags head_flag and tail_flag under the child node parking_node in the parking space linked list parking_list to output the target vehicle's attitude attribute information. The difference between the summation result p_sum of the parking space status array parking_array and the array length N is calculated. This difference is used as the number of available parking spaces within the monitored area, and the sensitivity coefficient α is configured to control the reporting frequency of information.

[0115] Figure 7 This is a schematic diagram of the parking space status recognition device provided in this application. The device includes:

[0116] The acquisition module 71 is used to acquire video of the parking space status monitoring area and construct a tracking frame linked list corresponding to the video.

[0117] The detection module 72 is used to detect the detection box of each vehicle in each frame of the video based on the trained vehicle detection model, and update the tracking boxes in the tracking box linked list according to the detection box of each vehicle in the order of the frame sequence.

[0118] The identification module 73 is used to respond to the parking space status trigger command, obtain each target tracking frame in the tracking frame chain, and determine the status of each parking space in the parking space status monitoring area based on the coordinate information of each target tracking frame.

[0119] The detection module 72 is used to detect at least one of the front and rear detection boxes of each vehicle in each frame of the video based on a trained vehicle detection model.

[0120] The detection module 72 is used to detect at least one of the candidate front detection boxes and candidate rear detection boxes for each vehicle in each frame of the video based on a trained vehicle detection model; the detected candidate front detection boxes and candidate rear detection boxes are used as candidate detection boxes; for each candidate detection box, if it is determined that the candidate detection box intersects with a preset effective area and that the candidate detection box intersects with a preset parking space status line, the candidate detection box is used as a valid detection box and retained; otherwise, the candidate detection box is filtered out; wherein, the preset parking space status line is the center line of each parking space within the preset effective area.

[0121] The detection module 72 is used to determine, by using a single-level dimensionality reduction method, whether the candidate detection box intersects with the preset parking space state line based on the coordinate information of the candidate detection box and the coordinate information of the preset parking space state line.

[0122] The detection module 72 is used to match each detection box with the most recently updated tracking boxes in the tracking box list. If a matching tracking box exists, the detection box is used to update the matching tracking box. If no matching tracking box exists, the detection box is added as a tracking box to the tracking box list.

[0123] The detection module 72 is further configured to, if a successfully matched tracking frame exists, determine whether the tracking frame has corresponding vehicle identification information; if so, update the vehicle identification information to the vehicle identification information corresponding to the detection frame; if not, identify the vehicle identification information based on the detection frame; if no successfully matched tracking frame exists, identify the vehicle identification information based on the detection frame.

[0124] The detection module 72 is used to determine each tracking frame that intersects with the detection frame based on the coordinate information of the detection frame and the coordinate information of each tracking frame; determine the diagonal vertex distance between the detection frame and each intersecting tracking frame respectively; determine the matching degree between the detection frame and each intersecting tracking frame based on the diagonal vertex distance respectively; and determine the tracking frame that matches the detection frame based on the maximum matching degree.

[0125] The identification module 73 is used to, for each target tracking box, determine the target parking space corresponding to the target tracking box based on the coordinate information of the target tracking box; obtain the coordinate information of the tracking box of the target parking space in the image before a preset inter-frame step value; determine the displacement distance of the vehicle in the target parking space based on the coordinate information of the target tracking box and the coordinate information of the tracking box of the target parking space; and determine that the state of the target parking space is occupied if the displacement distance is less than a preset distance threshold.

[0126] The identification module 73 is also used to output a first prompt message to indicate the direction of the car if the status of the parking space is occupied for each parking space in the parking space status monitoring area.

[0127] The identification module 73 is also used to determine the number of occupied parking spaces and the number of vacant parking spaces based on the status of each parking space in the parking space status monitoring area, and output a second prompt message to represent the number of occupied parking spaces and the number of vacant parking spaces.

[0128] This application also provides an electronic device, such as Figure 8 As shown, it includes: processor 301, communication interface 302, memory 303 and communication bus 304, wherein processor 301, communication interface 302 and memory 303 communicate with each other through communication bus 304;

[0129] The memory 303 stores a computer program, which, when executed by the processor 301, causes the processor 301 to perform any of the above method steps.

[0130] The communication bus mentioned in the above electronic devices can be a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus, etc. This communication bus can be divided into address bus, data bus, control bus, etc. For ease of illustration, only one thick line is used to represent it in the diagram, but this does not mean that there is only one bus or one type of bus.

[0131] Communication interface 302 is used for communication between the above-mentioned electronic device and other devices.

[0132] The memory may include random access memory (RAM) or non-volatile memory (NVM), such as at least one disk storage device. Optionally, the memory may also be at least one storage device located remotely from the aforementioned processor.

[0133] The processors mentioned above can be general-purpose processors, including central processing units, network processors (NPs), etc.; they can also be digital signal processors (DSPs), application-specific integrated circuits, field-programmable gate arrays or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc.

[0134] This application also provides a computer-readable storage medium storing a computer program executable by an electronic device, which, when run on the electronic device, causes the electronic device to perform any of the above method steps.

[0135] Although preferred embodiments of this application have been described, those skilled in the art, upon learning the basic inventive concept, can make other changes and modifications to these embodiments. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments as well as all changes and modifications falling within the scope of this application.

[0136] Obviously, those skilled in the art can make various modifications and variations to this application without departing from the spirit and scope of this application. Therefore, if such modifications and variations fall within the scope of the claims of this application and their equivalents, this application also intends to include such modifications and variations.

Claims

1. A method for recognizing parking space status, characterized in that, The method includes: Acquire video of the parking space status monitoring area and construct a linked list of tracking frames corresponding to the video; The detection bounding box of each vehicle in each frame of the video is detected based on the trained vehicle detection model. The tracking boxes in the tracking box list are updated according to the frame sequence and the detection bounding box of each vehicle. In response to a parking space status trigger command, each target tracking frame in the tracking frame chain is acquired; for each target tracking frame, the target parking space corresponding to the target tracking frame is determined based on the coordinate information of the target tracking frame; the coordinate information of the tracking frame of the target parking space in the image before a preset inter-frame step value is acquired; the displacement distance of the vehicle in the target parking space is determined based on the coordinate information of the target tracking frame and the coordinate information of the tracking frame of the target parking space; if the displacement distance is less than a preset distance threshold, the status of the target parking space is determined to be occupied by a vehicle. The detection of vehicle bounding boxes in each frame of the video based on the trained vehicle detection model includes: Based on a trained vehicle detection model, at least one of the front and rear detection boxes of each vehicle in each frame of the video is detected; the front and rear detection boxes are detection boxes that intersect with a preset effective area and a preset parking space status line; wherein, the preset parking space status line is the center line of each parking space within the preset effective area.

2. The method as described in claim 1, characterized in that, The method of detecting at least one of the front and rear detection boxes of each vehicle in each frame of the video based on the trained vehicle detection model includes: Based on the trained vehicle detection model, at least one of the candidate front detection box and candidate rear detection box for each vehicle in each frame of the video is detected; the detected candidate front detection box and candidate rear detection box are used as candidate detection boxes. For each candidate detection box, if it is determined that the candidate detection box intersects with a preset effective area and intersects with a preset parking space status line, the candidate detection box is retained as a valid detection box; otherwise, the candidate detection box is filtered out.

3. The method as described in claim 2, characterized in that, Determining that the candidate detection box intersects with the preset parking space status line includes: Based on the coordinate information of the candidate detection box and the coordinate information of the preset parking space status line, a single-level dimensionality reduction method is used to determine that the candidate detection box intersects with the preset parking space status line.

4. The method as described in claim 1, characterized in that, Updating the tracking frames in the tracking frame list based on the detection frames of each vehicle includes: For each detection box, the detection box is matched with each of the most recently updated tracking boxes in the tracking box list. If a matching tracking box exists, the detection box is used to update the matching tracking box. If no matching tracking box exists, the detection box is added as a tracking box to the tracking box list.

5. The method as described in claim 4, characterized in that, The method further includes: If a matching tracking frame is found, determine whether the tracking frame has corresponding vehicle identification information. If it does, update the vehicle identification information to the vehicle identification information corresponding to the detection frame. If not, identify the vehicle identification information based on the detection frame. If no matching tracking frame is found, the vehicle's identification information is identified based on the detection frame.

6. The method as described in claim 4, characterized in that, Matching the detection box with each of the most recently updated tracking boxes in the tracking box list includes: Based on the coordinate information of the detection box and the coordinate information of each tracking box, determine each tracking box that intersects with the detection box; The distance between the diagonal vertices of the detection box and each of the intersecting tracking boxes is determined respectively, and the matching degree between the detection box and each of the intersecting tracking boxes is determined according to the distance between each diagonal vertex; Based on the maximum matching degree, the tracking box that matches the detection box is determined.

7. The method as described in claim 1, characterized in that, The method further includes: For each parking space in the parking space status monitoring area, if the parking space is occupied, a first prompt message indicating the direction the car is facing is output.

8. The method according to any one of claims 1-7, characterized in that, The method further includes: Based on the status of each parking space within the parking space status monitoring area, determine the number of occupied parking spaces and the number of vacant parking spaces, and output a second prompt message to represent the number of occupied parking spaces and the number of vacant parking spaces.

9. A parking space status recognition device, characterized in that, The device includes: The acquisition module is used to acquire video of the parking space status monitoring area and construct a linked list of tracking frames corresponding to the video. The detection module is used to detect the detection box of each vehicle in each frame of the video based on the trained vehicle detection model, and update the tracking boxes in the tracking box list according to the frame sequence and the detection box of each vehicle. The recognition module is used to respond to a parking space status trigger command, acquire each target tracking frame in the tracking frame chain; for each target tracking frame, determine the target parking space corresponding to the target tracking frame based on the coordinate information of the target tracking frame; acquire the coordinate information of the tracking frame of the target parking space in the image before a preset inter-frame step value; determine the displacement distance of the vehicle in the target parking space based on the coordinate information of the target tracking frame and the tracking frame of the target parking space; if the displacement distance is less than a preset distance threshold, determine that the status of the target parking space is occupied. The detection module is specifically used to detect at least one of the front and rear detection boxes of each vehicle in each frame of the video based on a trained vehicle detection model; the front and rear detection boxes are detection boxes that intersect with a preset effective area and a preset parking space status line; wherein, the preset parking space status line is the center line of each parking space within the preset effective area.

10. An electronic device, characterized in that, It includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other through the communication bus; Memory, used to store computer programs; A processor, when executing a program stored in memory, implements the steps of the method described in any one of claims 1-8.

11. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a computer program that, when executed by a processor, implements the steps of the method described in any one of claims 1-8.

Citation Information

Patent Citations

  • Vehicle parking identification method based on edge intelligence and roadside high-position monitoring video

    CN114255428A