Parking status detection method, system and device for parking space

By extracting and clustering vehicle component features from parking area images through a deep learning network, the accuracy problem of parking space status detection in complex parking scenarios is solved, and efficient parking space status detection in various complex scenarios is achieved.

CN117095367BActive Publication Date: 2025-09-09ZHEJIANG DAHUA TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202310936077.9
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-07-27
Publication Date
2025-09-09
Estimated Expiration
2043-07-27

AI Technical Summary

Technical Problem

Existing video surveillance technology has difficulty in accurately detecting parking space status in complex parking scenarios, is prone to missed detections, and is unable to cope with complex situations such as congestion and obstruction.

Method used

The vehicle component target image features of the parking area image are extracted through a deep learning network, the similarity matrix is ​​calculated and clustered, and the parking space status is judged based on the position information of the vehicle component target image to improve the detection accuracy.

Benefits of technology

It achieves accurate detection of parking space status in complex parking scenarios, broadens the application scenarios of detection, and improves the accuracy of detection.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117095367B_ABST
    Figure CN117095367B_ABST
Patent Text Reader

Abstract

This application discloses a parking space parking status detection method, system, and device for detecting the parking status of parking spaces in complex parking scenarios, thereby improving detection accuracy. The parking space parking status detection method provided by this application comprises inputting an acquired parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image. The image features of the at least one vehicle component target image are then used to calculate the similarity between the respective vehicle component target images to obtain a similarity matrix. Based on the similarity matrix, the at least one vehicle component target image is clustered into a corresponding vehicle category, and the vehicle component target images within each category are associated. The parking status of each parking space is determined based on the position information of any vehicle component target image in each associated relationship and the position information of the parking space frame of each parking space in the parking area image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of intelligent transportation technology, and in particular to a method, system and device for detecting the parking status of a parking space. Background Art

[0002] With the increasing number of motor vehicles nationwide, parking spaces in various public places have become a popular resource. Maintaining order in parking areas is crucial for smooth traffic flow and road traffic, while also reducing safety hazards. Therefore, it is necessary to monitor parking conditions in public parking areas in real time. Currently, parking status determination is primarily achieved by installing ground-sensing coils in parking spaces or by installing surveillance cameras near parking spaces. The former uses the current changes in the coils caused by vehicles entering and exiting parking spaces to determine parking space availability; the latter uses a neural network model running on a camera or smart box (server) to detect vehicles in real time, obtain vehicle coordinates, and then compare them with the parking area for determination. Due to the ease of installation and low site modification costs of surveillance cameras, video surveillance has become the mainstream solution for parking status detection. However, current video surveillance technologies rely on specific vehicle components and are unable to detect parking status in complex parking scenarios such as congestion and obstruction. This is prone to missed detections, and accuracy needs to be improved. Summary of the Invention

[0003] The embodiments of the present application provide a method, system, and device for detecting the parking status of a parking space, so as to realize the detection of the parking status of a parking space in complex parking scenarios and improve the detection accuracy.

[0004] The present invention provides a method for detecting the parking status of a parking space, including:

[0005] Acquire the collected parking area image;

[0006] Inputting the parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image, calculating similarities between the vehicle component target images using the image features of the at least one vehicle component target image to obtain a similarity matrix, clustering the at least one vehicle component target image based on the similarity matrix, classifying the vehicle component target images belonging to the same vehicle into the same category, and associating the vehicle component target images in each category;

[0007] The parking state of each parking space is determined according to the position information of any vehicle component target image in each of the association relationships and the parking space frame position information of each parking space in the parking area image.

[0008] Through this method, a collected parking area image is obtained; the parking area image is input into a pre-trained deep learning network to obtain image features of at least one vehicle component target image; the image features of the at least one vehicle component target image are used to calculate the similarity between each of the vehicle component target images to obtain a similarity matrix; the at least one vehicle component target image is clustered based on the similarity matrix, the vehicle component target images belonging to the same vehicle are classified into the same category, and the vehicle component target images in each category are associated; based on the position information of any vehicle component target image in each of the associated relationships and the parking space frame position information of each parking space in the parking area image, the parking status of each parking space is determined, thereby realizing the detection of the parking status of parking spaces in complex scenarios and improving accuracy.

[0009] In some embodiments, obtaining the similarity matrix specifically includes:

[0010] Inputting the parking area image into the feature extraction layer of the deep learning network to obtain a classification feature map and a positioning feature map of at least one vehicle component target image;

[0011] Splicing and fusing the classification feature map and the positioning feature map of the at least one vehicle component target image through a preset function to obtain a spliced ​​fusion feature map;

[0012] Inputting the spliced ​​fusion feature map into the feature mapping layer of the deep learning network to obtain a similarity feature map;

[0013] Based on the similarity feature graph, the similarity between each of the vehicle component target images is calculated to obtain a similarity matrix.

[0014] Through this method, the image features of component target images of the same vehicle are made as similar as possible, and the image features of component target images of different vehicles are made as different as possible, thereby improving the accuracy of subsequent clustering.

[0015] In some embodiments, obtaining the spliced ​​fusion feature map specifically includes:

[0016] splicing the classification feature maps of each of the vehicle component target images to obtain a spliced ​​classification feature map; and splicing the positioning feature maps of each of the vehicle component target images to obtain a spliced ​​positioning feature map;

[0017] The spliced ​​classification feature map is fused with the spliced ​​positioning feature map to obtain a spliced ​​fusion feature map.

[0018] Through this method, the vehicle component target image has a higher degree of recognition, which facilitates the subsequent calculation of the similarity between the target images of various vehicle components.

[0019] In some embodiments, the pre-trained deep learning network is trained using a method that includes:

[0020] Inputting the vehicle component images in the training data set into a pre-built deep learning network to obtain a similarity feature map of the vehicle component images, and determining a similarity matrix based on the similarity feature map of the vehicle component images;

[0021] Pre-generating an all-zero matrix with the same dimension as the similarity matrix;

[0022] Calculate the similarity label value between each vehicle component using the following formula 1, and fill each similarity label value into the corresponding position of the all-zero matrix to obtain a similarity label matrix;

[0023]

[0024] in, represents the similarity label value between the i-th vehicle component and the j-th vehicle component, corresponding to the similarity label value of the i-th row and j-th column in the similarity label matrix; P i represents the i-th vehicle component image; P j Represents the jth vehicle component image; Car n Head represents the vehicle detection frame of the nth vehicle detected; n Indicates the front detection frame of the nth vehicle detected; Tail n Represents the rear detection frame of the nth vehicle detected; Roof n represents the detected roof detection frame of the nth vehicle; N represents the number of vehicle component images;

[0025] Using the similarity label matrix and the similarity matrix, calculate the contrast loss using the following formula 2, and use the contrast loss to train the pre-built deep learning network to obtain a trained deep learning network;

[0026]

[0027] Among them, Loss contra represents contrast loss; M simi,j Represents the similarity value of the i-th row and j-th column in the similarity matrix.

[0028] Through this method, a converged deep learning network is achieved, which improves the accuracy of detecting vehicle component target images.

[0029] In some embodiments, clustering the at least one vehicle component target image based on the similarity matrix to classify the vehicle component target images belonging to the same vehicle into the same category includes:

[0030] Clustering vehicle component target images belonging to the same vehicle based on the similarity matrix to obtain at least one cluster center;

[0031] When each of the cluster centers meets a preset condition, each of the vehicle component target images is determined to be assigned to a corresponding cluster center, ie, a vehicle category.

[0032] Through this method, the target images of different vehicle components can be clustered into corresponding vehicle categories, which facilitates the subsequent detection of the parking status of parking spaces.

[0033] In some embodiments, the preset conditions include:

[0034] The number of vehicle component target images in the cluster center is greater than or equal to 2 and less than or equal to a preset value, and the number of vehicle component target images of each category in the cluster center is less than or equal to 1.

[0035] In some embodiments, determining the parking status of the parking space based on the position relationship includes:

[0036] determining a positional relationship between the vehicle and the parking space in the parking area image based on the position information of any vehicle component target image in each of the associated relationships and the parking space frame position information of each parking space in the parking area image, and determining whether the vehicle in the parking area image is located in the parking space based on the positional relationship;

[0037] If so, determining the parking status of the parking space as occupied;

[0038] Otherwise, it is determined that the parking status of the parking space is vacant.

[0039] Through this method, the parking status of parking spaces in various complex parking scenarios can be detected, which broadens the application scenarios of the detection.

[0040] In some embodiments, the method further comprises:

[0041] Based on the detection results of the parking status of each parking space in the collected multiple consecutive frames of parking area images, when the parking status of each parking space is determined to be occupied or idle for a preset number of times, a notification message is issued indicating that the parking status of the parking space is occupied or idle.

[0042] The present invention provides a parking space parking status detection system, comprising:

[0043] An image acquisition module, used to acquire images of the parking area;

[0044] a vehicle recognition module configured to input the parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image, calculate similarities between the vehicle component target images using the image features of the at least one vehicle component target image to obtain a similarity matrix, cluster the at least one vehicle component target image based on the similarity matrix, classify the vehicle component target images belonging to the same vehicle into the same category, and associate the vehicle component target images within each category;

[0045] The state detection module is used to determine the parking state of each parking space according to the position information of any vehicle component target image in each of the association relationships and the parking space frame position information of each parking space in the parking area image.

[0046] Through this system, the parking status of parking spaces in complex parking scenarios can be detected, improving detection accuracy.

[0047] Another embodiment of the present application provides a parking space parking status detection device, which includes a memory and a processor, wherein the memory is used to store program instructions, and the processor is used to call the program instructions stored in the memory and execute any of the above methods according to the obtained program.

[0048] Furthermore, according to an embodiment, a computer program product for a computer is provided, for example, comprising software code portions for executing the steps of the method defined above when the product is executed on the computer. The computer program product may include a computer-readable medium having the software code portions stored thereon. Furthermore, the computer program product may be directly loaded into the internal memory of the computer and / or transmitted via a network through at least one of an upload process, a download process, and a push process.

[0049] Another embodiment of the present application provides a computer-readable storage medium, wherein the computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute any of the above methods. BRIEF DESCRIPTION OF THE DRAWINGS

[0050] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0051] Figure 1 A schematic diagram of a roadside parking scenario provided in an embodiment of the present application;

[0052] Figure 2 A schematic diagram of a parking scene captured by a side-mounted camera of a monitoring device provided in an embodiment of the present application;

[0053] Figure 3 A schematic diagram of the overall process of a parking space parking status detection method provided in an embodiment of the present application;

[0054] Figure 4 A schematic diagram of a target image of a vehicle component provided in an embodiment of the present application;

[0055] Figure 5 A schematic diagram of the structure of a detection model for identifying vehicles in parking areas provided in an embodiment of the present application;

[0056] Figure 6 A schematic diagram of the structure of a parking space parking status detection system provided in an embodiment of the present application;

[0057] Figure 7 A schematic diagram of a specific process of a parking space parking status detection method provided in an embodiment of the present application;

[0058] Figure 8 A schematic diagram of a specific process of another parking space parking status detection method provided in an embodiment of the present application;

[0059] Figure 9 A schematic diagram of a specific process of a deep learning network training method provided in an embodiment of the present application;

[0060] Figure 10 A schematic structural diagram of a parking space parking status detection device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0061] The following is a clear and complete description of the technical solutions in the embodiments of this application in conjunction with the drawings in the embodiments of this application. Obviously, the embodiments described are only part of the embodiments of this application and not all of the embodiments. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0062] The embodiments of the present application provide a method, system, and device for detecting the parking status of a parking space, so as to realize the detection of the parking status of a parking space in complex parking scenarios and improve the detection accuracy.

[0063] Among them, the method and the device are based on the same application concept. Since the principles of solving problems by the method and the device are similar, the implementation of the device and the method can refer to each other, and the repeated parts will not be repeated.

[0064] The terms "first", "second", etc. (if any) in the specification and claims of the embodiments of the present application and the above-mentioned drawings are used to distinguish similar objects and are not necessarily used to describe a specific order or sequential order. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0065] The following examples and embodiments are to be understood as illustrative examples only. Although this specification may refer to "one," "an," or "some" examples or embodiments at several places, this does not mean that each such reference relates to the same example or embodiment, nor does it mean that the feature applies only to a single example or embodiment. Individual features of different embodiments may also be combined to provide further embodiments. Furthermore, terms such as "comprises" and "comprising" should be understood as not limiting the described embodiments to consisting only of those features already mentioned; such examples and embodiments may also include features, structures, units, modules, etc. that are not specifically mentioned.

[0066] The following describes in detail the various embodiments of the present application in conjunction with the accompanying drawings. It should be noted that the order in which the embodiments of the present application are presented only represents the order of the embodiments, and does not represent the advantages or disadvantages of the technical solutions provided by the embodiments.

[0067] It should be noted that the technical solution provided in the embodiment of the present application obtains the image features of the vehicle component target image by inputting the collected parking area image into the deep learning network, calculates the similarity of each vehicle component target image using the image features of each vehicle component target image to obtain a similarity matrix, and clusters each vehicle component target image into the corresponding vehicle category based on the similarity matrix, and then uses the position information of any vehicle component target image in each category to determine the parking status of the corresponding parking space for illustration, but is not limited to this.

[0068] At present, the parking status of parking spaces is mainly determined by installing ground sensor coils on the parking spaces or installing surveillance cameras near the parking spaces. The former determines the vacancy of parking spaces by the change in the internal current of the coil caused by the vehicle entering and exiting the parking space; the latter detects the motor vehicle in the picture in real time through the neural network model running on the camera or smart box (server), obtains the coordinate information of the motor vehicle, and then compares it with the parking area for judgment. However, the current video surveillance technology solution relies on specific types of vehicle components and cannot cope with the detection of parking status in complex parking scenarios such as congestion and occlusion. For example Figure 1 As shown, it is also not suitable for side-mounted camera scenarios, such as Figure 2 As shown, missed detection is likely to occur and the accuracy needs to be improved.

[0069] To address the aforementioned issues, embodiments of the present application provide a parking space parking status detection method that can be applied to any terminal device, such as a monitoring device. First, vehicle component target detection is performed on the acquired parking area image, and image features of the vehicle component target images are extracted. A similarity matrix is ​​calculated based on the image features of each vehicle component target image. Based on the similarity matrix, each vehicle component target image is clustered into a corresponding vehicle category. The location information of any vehicle component target image in each category is used to determine the parking status of the corresponding parking space. This method enables parking space parking status detection in complex parking scenarios, improving detection accuracy.

[0070] See also Figure 3 , an embodiment of the present application provides a method for detecting a parking status of a parking space, comprising:

[0071] Step S101: Acquire a captured parking area image;

[0072] The parking area may be, for example, a parking lot in a public place; and the parking area image may be, for example, an image of the parking lot that is collected in real time by monitoring equipment installed in the parking lot and that can fully capture vehicle information (i.e., the vehicle does not appear at the edge of the image, causing truncation).

[0073] Step S102: Inputting the parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image; using the image features of the at least one vehicle component target image, calculating similarities between the vehicle component target images to obtain a similarity matrix; clustering the at least one vehicle component target image based on the similarity matrix, classifying the vehicle component target images belonging to the same vehicle into the same category, and associating the vehicle component target images within each category;

[0074] The vehicle components include, for example, a vehicle frame, a front frame, a roof frame, and a rear frame; the image features include, for example, the category of the vehicle component target image (belonging to the vehicle frame, the front frame, the roof frame, and the rear frame), and location information (the coordinates of the predicted frame of the vehicle component target image predicted by the deep learning network); the similarity includes, for example, cosine similarity; and the category refers to the vehicle component target images belonging to the same vehicle being classified into one category.

[0075] The acquired parking area image is input into the deep learning network for target detection, and the classification feature map of each vehicle component target image is output. and positioning feature maps H represents the height, W represents the width, C1 and C2 represent the number of channels, C1 = A × (num_cls + 1), C2 = 4A, where A is the number of anchors laid out for each grid on the feature map, and num_cls represents the number of vehicle component categories. In the embodiment of the present application, the vehicle component categories include, for example, four categories: vehicle frame (Car), head frame (Head), tail frame (Tail), and roof frame (Roof). Figure 4 shown.

[0076] After the parking area image is input into the deep learning network, the deep learning network draws a rectangular box, i.e., a prediction box, on the detected vehicle component target image. For each vehicle component target image, the deep learning network predicts multiple prediction boxes, but the prediction boxes are not necessarily accurate. For example, some prediction boxes only cover less than 1 / 2 of the vehicle component target image. Therefore, the prediction boxes need to be screened to filter out the prediction boxes with lower accuracy. By setting the confidence threshold thres_conf and the intersection-over-union threshold IoUthres_iou, the prediction boxes of vehicle component target images with confidence lower than the preset confidence threshold can be suppressed, i.e., NMS (non-maximum suppression) processing. At the same time, the vehicle component target image is compared with the manually annotated vehicle component image for intersection-over-union calculation, and the prediction boxes with intersection-over-union values ​​lower than the preset intersection-over-union threshold are filtered out, retaining only the best prediction box for each vehicle component target image.

[0077] The parking area image is input into the deep learning network, and the output is the image features of N vehicle component target images, denoted as Parts = {P1, P2, ..., P N}. Calculate the classification loss Loss through the loss function respectively cls and positioning loss Loss box , optimize the parameters of the deep learning network to improve the accuracy of the deep learning network in detecting vehicle component targets.

[0078] From F cls and F boxExtract the classification feature map and positioning feature map corresponding to the N vehicle component target images, splice the classification feature maps of the N vehicle component target images together to obtain a spliced ​​classification feature map, and splice the positioning feature maps of the N vehicle component target images together to obtain a spliced ​​positioning feature map, and then fuse the spliced ​​classification feature map with the spliced ​​positioning feature map to form a spliced ​​fusion feature map. Finally, the concatenated fusion feature map is input into the feature mapping layer (such as the fully connected layer) of the deep learning network, and the similarity feature map is output. M represents a preset constant. The main purpose of the feature mapping layer here is to learn implicit features such as the color and shape of vehicle component images, and at the same time give these features different weights so that F sim The representation is more comprehensive and accurate, which is generally achieved through a multi-layer perceptron (the basic algorithm of deep learning networks).

[0079] It's generally believed that the classification feature map contains the color and shape characteristics of the target object image. Passing the classification feature map through a fully connected layer and then maximizing it yields the target object's category. Meanwhile, the localization feature map contains information about the target object's location. The combined features of these two feature maps can be considered a fusion of multiple attributes, such as location, category, and color, making the target object more recognizable. This also facilitates the subsequent calculation of similarity between target images of different vehicle components (e.g., measuring across multiple dimensions).

[0080] Based on the similarity feature map, the similarity between the target images of each vehicle component is calculated to obtain a similarity matrix. Specifically, for example, the matrix F corresponding to the similarity feature map is converted into sim Transpose and get the transposed matrix F sim T , and then the matrix F corresponding to the similarity feature map sim and the transposed matrix F sim T Perform matrix multiplication to obtain the similarity matrix M sim =F sim ·F sim T ,For example Figure 5 As shown, the values ​​on the diagonal position of each row of the similarity matrix represent the similarity between the vehicle component target image and itself, and the other values ​​represent the cosine similarity between the vehicle component target image and the other (N-1) vehicle component target images. If a similarity value in the similarity matrix is ​​greater than a preset threshold (e.g., 0.6, depending on actual needs), it indicates that the two vehicle component target images belong to the same vehicle. It should be noted that other existing methods can also be used to calculate the similarity between vehicle component target images, and this embodiment of the application does not impose any restrictions on this.

[0081] In the process of training the above-mentioned trained deep learning network, the total loss of the deep learning network is continuously calculated through the total loss function, and the relevant parameters of the deep learning network are optimized according to the total loss, so that the similarity feature map of the parking area image output by the deep learning network is more accurate. Specifically, the vehicle component images in the prepared training data set are input into the pre-built deep learning network, and the similarity feature map is output and the classification loss Loss is calculated. cls , Positioning loss Loss box ; Calculate the similarity of each vehicle component image based on the similarity feature map to obtain a similarity matrix; generate an all-zero matrix with the same dimension as the similarity matrix (for example, an N×N all-zero matrix), and calculate the similarity label value between each vehicle component using the following formula 1 (for example, Figure 5 As shown, C, H, T, and R represent the vehicle frame, front frame, rear frame, and roof frame respectively. C1, H1, and T1 indicate that these three components belong to the first vehicle. The similarity label value of two vehicle components belonging to the same vehicle is 1. The similarity label values ​​of C1 and C1, C1 and H1, C1 and T1, H1 and H1, H1 and T1, T1 and T1, C2 and C2, and R N With R N The similarity label value of two vehicle components belonging to different vehicles is 0, C1 and C2, C1 and R N , H1 and C2, H1 and R N , C2 and T1, C2 and R N , T1 and R N etc.), and fill each similarity label value (i.e. 1 or 0) calculated into the corresponding position of the all-zero matrix to obtain the similarity label matrix (e.g. Figure 5 GT shown);

[0082]

[0083] in, represents the similarity label value between the i-th vehicle component and the j-th vehicle component, corresponding to the similarity label value of the i-th row and j-th column in the similarity label matrix; P i represents the i-th vehicle component image; P j Represents the jth vehicle component image; Car n Head represents the vehicle detection frame of the nth vehicle detected; n Indicates the front detection frame of the nth vehicle detected; Tail n Represents the rear detection frame of the nth vehicle detected; Roof n represents the detected roof detection frame of the nth vehicle; N represents the number of vehicle component images;

[0084] Using the similarity label matrix and the corresponding values ​​of the similarity matrix, for example, the similarity label value in the first row and first column of the similarity label matrix and the similarity value in the first row and first column of the similarity matrix, the contrast loss Loss is calculated by the following formula 2 contra Then, using contrast loss, classification loss, and positioning loss, the total loss of the deep learning network is calculated using Formula 3: total ,The deep learning network continuously optimizes the relevant parameters of the network according to the ,total loss, thereby improving the target detection accuracy, and ,at the same time it can also gradually improve the similarity of the ,vehicle component images belonging to the same vehicle;

[0085]

[0086] Loss total =α(Loss cls +Loss box )+(1-α)Loss contra Formula 3

[0087] Among them, M simi,j Represents the similarity value of the i-th row and j-th column in the similarity matrix.

[0088] In some embodiments, based on the similarity matrix M sim , the vehicle component target images can be clustered to the corresponding cluster centers by using clustering algorithms such as k-means, and the vehicle component target images in each cluster center are associated. Specifically, the number of cluster centers, that is, the number of vehicles, is first determined. Generally, a vehicle can detect at least two types of vehicle component target images. Assuming that N vehicle component target images are detected, if each vehicle only detects two types of vehicle component target images, then the number of cluster centers is (round up); if each vehicle has a preset value (for example, 4) of vehicle component target images and they are all detected, then the number of cluster centers is (For example )(round up). Start traversing to For example, using the above cosine similarity as the distance metric, the vehicle component target images belonging to the same vehicle are clustered into one cluster center. After clustering, the number of vehicle component target images num in each cluster center satisfies 2≤num≤4, and the number of each type of vehicle component target image does not exceed 1. In this case, all detected vehicle component target images have been assigned to the corresponding vehicle:

[0089] For example Figure 5 As shown, it is assumed that a total of N vehicle component target images are detected by the deep learning network, and the numbers are C1, H1, C2, T1, ..., R N. The elements in the i-th row and j-th column of the similarity matrix represent the similarity between the i-th vehicle component target image and the j-th vehicle component target image. C, H, T, and R represent the vehicle frame, front frame, rear frame, and roof frame, respectively. C1, H1, and T1 indicate that these three vehicle component target images all belong to the first vehicle. Because we only know that there are N vehicle component target images, but we don’t know how many types of vehicle component target images are detected for each vehicle, we don’t know the number of vehicles. The first step in clustering is to determine the number of cluster centers (i.e., the number of vehicles). Assuming that only 2 types of vehicle component target images are detected for each vehicle, the number of vehicles at this time is the largest, which is Assuming that all four vehicle component target images of each vehicle are detected, the number of vehicles is the minimum, which is Then the number of cluster centers is Start executing the clustering algorithm, subtract 1 each time, that is ..., if the value x is obtained, the number of vehicle component target images in each cluster center obtained by clustering is [2, 4], and the number of target images of each vehicle component does not exceed 1 (for example, {{C1, H1}, {C2, H2, R2}, {T3, R3}, {C4, H4, T4, R4}...}), then the clustering algorithm is stopped and the number of vehicles obtained is x.

[0090] After the clustering algorithm is executed, the clustering results are output. When each cluster is traversed, when a vehicle component target image exists in a cluster center, it is considered that a vehicle is detected. The vehicle component target images in the cluster center are associated to facilitate the subsequent use of this association relationship to detect the parking status of the corresponding parking space.

[0091] Step S103: determining the parking status of each parking space according to the position information of any vehicle component target image in each of the association relationships and the parking space frame position information of each parking space in the parking area image;

[0092] The position information is, for example, the coordinates of the prediction box of the vehicle component target image predicted by the deep learning network;

[0093] In this step, for example, the coordinates of the prediction box of any vehicle component target image in each cluster center and the coordinates of the parking space box of the parking space in the parking area image are used to match the parking space with the vehicle, and the correspondence between the vehicle and the parking space in the parking area image is obtained. Then, the correspondence is used to determine whether the vehicle in the parking area image is located in the parking space (for example, whether the center point of the prediction box of the vehicle component target image is within the parking space box). If so, the parking space is determined to be occupied; if not, the parking space is determined to be vacant.

[0094] If a preset number of frames of parking area images captured continuously or within a preset time period determine that a certain parking space is occupied, a notification message indicating that the parking space is occupied is sent to the parking lot manager; correspondingly, if a preset number of frames of parking area images captures that a certain parking space is free, a notification message indicating that the parking space is free is sent to the parking lot manager.

[0095] To improve the accuracy of subsequent clustering, in some embodiments, obtaining the similarity matrix specifically includes:

[0096] The parking area image is input into the feature extraction layer of the deep learning network to obtain a classification feature map of at least one vehicle component target image (such as the above-mentioned F cls ) and the positioning feature map (such as the above F box );

[0097] The classification feature map and the positioning feature map of the at least one vehicle component target image are spliced ​​and fused through a preset function (such as the torch.cat() function) to obtain a spliced ​​fusion feature map (such as the above-mentioned F det );

[0098] The spliced ​​fusion feature map is input into the feature mapping layer of the deep learning network to obtain a similarity feature map (such as the above-mentioned F sim );

[0099] Based on the similarity feature map, the similarity between each of the vehicle component target images is calculated to obtain a similarity matrix (such as the above-mentioned M sim ).

[0100] In order to make the vehicle component target image more recognizable and facilitate the subsequent calculation of the similarity between the vehicle component target images, in some embodiments, obtaining the spliced ​​fusion feature map specifically includes:

[0101] splicing the classification feature maps of each of the vehicle component target images to obtain a spliced ​​classification feature map; and splicing the positioning feature maps of each of the vehicle component target images to obtain a spliced ​​positioning feature map;

[0102] The spliced ​​classification feature map is fused with the spliced ​​positioning feature map to obtain a spliced ​​fusion feature map.

[0103] To improve the accuracy of detecting vehicle component target images, in some embodiments, the pre-trained deep learning network is trained by:

[0104] Inputting the vehicle component images in the training data set into a pre-built deep learning network to obtain a similarity feature map of the vehicle component images, and determining a similarity matrix based on the similarity feature map of the vehicle component images;

[0105] Pre-generating an all-zero matrix with the same dimension as the similarity matrix;

[0106] Calculate the similarity label value between each vehicle component using the following formula 1, and fill each similarity label value into the corresponding position of the all-zero matrix to obtain a similarity label matrix;

[0107]

[0108] in, represents the similarity label value between the i-th vehicle component and the j-th vehicle component, corresponding to the similarity label value of the i-th row and j-th column in the similarity label matrix; P i represents the i-th vehicle component image; P j Represents the jth vehicle component image; Car n Head represents the vehicle detection frame of the nth vehicle detected; n Indicates the front detection frame of the nth vehicle detected; Tail n Represents the rear detection frame of the nth vehicle detected; Roof n represents the detected roof detection frame of the nth vehicle; N represents the number of vehicle component images;

[0109] Using the similarity label matrix and the similarity matrix, calculate the contrast loss using the following formula 2, and use the contrast loss to train the pre-built deep learning network to obtain a trained deep learning network;

[0110]

[0111] Among them, Loss contra represents contrast loss; M simi,j Represents the similarity value of the i-th row and j-th column in the similarity matrix.

[0112] To cluster different vehicle component target images into corresponding vehicle categories and facilitate subsequent parking status detection of parking spaces, in some embodiments, clustering the at least one vehicle component target image based on the similarity matrix and classifying the vehicle component target images belonging to the same vehicle into the same category includes:

[0113] Clustering vehicle component target images belonging to the same vehicle based on the similarity matrix to obtain at least one cluster center;

[0114] When each of the cluster centers meets the preset conditions (for example, the total number of vehicle component target images in the cluster center is greater than or equal to 2 and less than or equal to 4, and the number of each vehicle component target image does not exceed 1), it is determined that each of the vehicle component target images is assigned to the corresponding cluster center, i.e., the vehicle category.

[0115] In some embodiments, the preset conditions include:

[0116] The number of vehicle component target images in the cluster center is greater than or equal to 2 and less than or equal to a preset value (for example, 4), and the number of vehicle component target images of each category in the cluster center is less than or equal to 1.

[0117] To enable detection of the parking status of a parking space in various complex parking scenarios and broaden the application scenarios of detection, in some embodiments, determining the parking status of the parking space based on the positional relationship includes:

[0118] determining a positional relationship between the vehicle and the parking space in the parking area image based on the position information of any vehicle component target image in each of the associated relationships and the parking space frame position information of each parking space in the parking area image, and determining whether the vehicle in the parking area image is located in the parking space based on the positional relationship;

[0119] If so, determining the parking status of the parking space as occupied;

[0120] Otherwise, it is determined that the parking status of the parking space is vacant.

[0121] In some embodiments, the method further comprises:

[0122] Based on the detection results of the parking status of each parking space in the collected continuous multiple frames (or multiple frames collected within a preset time period) of the parking area image, when the parking status of each of the parking spaces is determined to be occupied or idle for a preset number of times (for example, 6 frames out of 10 frames), a notification message is issued indicating that the parking status of the parking space is occupied or idle.

[0123] See also Figure 6 , an embodiment of the present application provides a parking space parking status detection system, comprising:

[0124] The image acquisition module 100 is used to acquire the collected parking area image;

[0125] The vehicle recognition module 200 is configured to input the parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image, calculate similarities between the at least one vehicle component target image using the image features of the at least one vehicle component target image to obtain a similarity matrix, cluster the at least one vehicle component target image based on the similarity matrix, classify the vehicle component target images belonging to the same vehicle into the same category, and associate the vehicle component target images within each category;

[0126] The state detection module 300 is configured to determine the parking state of each parking space according to the position information of any vehicle component target image in each of the association relationships and the position information of the parking space frame of each parking space in the parking area image.

[0127] Several specific method flow examples are given below.

[0128] Example 1:

[0129] See also Figure 7 , an embodiment of the present application provides a method for detecting a parking status of a parking space, comprising:

[0130] Step S201: Acquire parking area images collected by parking lot monitoring equipment;

[0131] Step S202: Input the parking area image into the feature extraction layer of a pre-trained deep learning network, and output a classification feature map and a positioning feature map of at least one vehicle component target image;

[0132] Step S203: splicing the classification feature maps of each vehicle component target image using a preset function to obtain a spliced ​​classification feature map, and splicing the positioning feature maps of each vehicle component target image to obtain a spliced ​​positioning feature map;

[0133] Step S204: Fusing the spliced ​​classification feature map with the spliced ​​positioning feature map to obtain a spliced ​​fusion feature map;

[0134] Step S205: input the spliced ​​fusion feature map into the feature mapping layer of the pre-trained deep learning network, and output a similarity feature map;

[0135] Step S206: Calculate the similarity between the target images of each vehicle component based on the similarity feature graph to obtain a similarity matrix;

[0136] Step S207: Based on the similarity matrix, each vehicle component target image is assigned to a corresponding vehicle category (i.e., a cluster center) through a clustering algorithm, and an association relationship between the vehicle component target images in each vehicle category is established;

[0137] Step S208: Determine the corresponding parking space and the parking status of the parking space according to the position information of any vehicle component target image in the association relationship obtained in step S207.

[0138] Example 2:

[0139] See also Figure 8 , an embodiment of the present application provides a method for detecting a parking status of a parking space, comprising:

[0140] Step S301: Acquire multiple frames of parking area images continuously captured by parking lot monitoring equipment;

[0141] Step S302: Input the multiple frames of parking area images obtained in step S301 into, for example, the above-mentioned parking space parking status detection system, and output a detection result of the parking status of each parking space in each frame of the parking area image;

[0142] Step S303: Based on the parking status detection results of each parking space in each parking area image frame, determine whether there are a predetermined number of parking area image frames in which the parking status of each parking space is always vacant or occupied. If so, proceed to step S304; if not, proceed to step S301.

[0143] For example, for parking space No. 1 in the parking lot, 10 frames of images are continuously collected, and 6 frames of images detect that the parking space is in an idle state, then the parking space is determined to be idle;

[0144] Step S304: Sending a notification message indicating whether a parking space is vacant or occupied to the terminal user interface of the parking lot manager via a system message;

[0145] Parking lot managers can use the user interface to monitor the parking status of each parking space in real time, ensure good management order of parking spaces in the parking lot, and reduce safety hazards.

[0146] Example 3:

[0147] See also Figure 9 , an embodiment of the present application provides a training method for a deep learning network, comprising:

[0148] Step S401: Create a data set required for training a deep learning network, where the data set includes images of several vehicle components.

[0149] Step S402: Input the vehicle component images in the training data set into a pre-built deep learning network to obtain a similarity feature map, and calculate the classification loss and positioning loss;

[0150] Step S403: Calculate the similarity between the vehicle component images based on the similarity feature graph to obtain a similarity matrix;

[0151] Step S404: Generate an all-zero matrix with the same dimension as the similarity matrix, calculate the similarity label values ​​between each vehicle component, and fill the similarity label values ​​into the corresponding positions of the all-zero matrix to obtain a similarity label matrix;

[0152] The similarity label value between two vehicle components belonging to the same vehicle is recorded as 1, and the similarity label value between two vehicle components belonging to different vehicles is recorded as 0, and the 0 at the corresponding position of the all-zero matrix is ​​replaced with 1 or 0;

[0153] Step S405: Calculate the contrast loss using the similarity matrix and the similarity label matrix, and then use the contrast loss to calculate the total loss of the deep learning network;

[0154] Find the value in the similarity matrix and the similarity label matrix, for example, the value in the first row and first column of the two matrices, calculate the contrast loss using the above formula 2, and then use the contrast loss and the classification loss and positioning loss calculated in step S402 to calculate the total loss using the above formula 3;

[0155] Step S406: Adjust the relevant parameters of the deep learning network according to the total loss, and then use the data set to train the adjusted deep learning network until the total loss tends to be stable, thereby obtaining a trained deep learning network.

[0156] The following is an introduction to the equipment or device provided in the embodiments of the present application, in which the explanations or examples of technical features that are the same as or corresponding to those described in the above method are not repeated hereafter.

[0157] See also Figure 10 , an embodiment of the present application provides a parking space parking status detection device, comprising:

[0158] The processor 600 is configured to read the program in the memory 620 and execute the following process:

[0159] Acquire the collected parking area image;

[0160] Inputting the parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image, calculating similarities between the vehicle component target images using the image features of the at least one vehicle component target image to obtain a similarity matrix, clustering the at least one vehicle component target image based on the similarity matrix, classifying the vehicle component target images belonging to the same vehicle into the same category, and associating the vehicle component target images in each category;

[0161] The parking state of each parking space is determined according to the position information of any vehicle component target image in each of the association relationships and the parking space frame position information of each parking space in the parking area image.

[0162] In some embodiments, obtaining the similarity matrix specifically includes:

[0163] Inputting the parking area image into the feature extraction layer of the deep learning network to obtain a classification feature map and a positioning feature map of at least one vehicle component target image;

[0164] Splicing and fusing the classification feature map and the positioning feature map of the at least one vehicle component target image through a preset function to obtain a spliced ​​fusion feature map;

[0165] Inputting the spliced ​​fusion feature map into the feature mapping layer of the deep learning network to obtain a similarity feature map;

[0166] Based on the similarity feature graph, the similarity between each of the vehicle component target images is calculated to obtain a similarity matrix.

[0167] In some embodiments, obtaining the spliced ​​fusion feature map specifically includes:

[0168] splicing the classification feature maps of each of the vehicle component target images to obtain a spliced ​​classification feature map; and splicing the positioning feature maps of each of the vehicle component target images to obtain a spliced ​​positioning feature map;

[0169] The spliced ​​classification feature map is fused with the spliced ​​positioning feature map to obtain a spliced ​​fusion feature map.

[0170] In some embodiments, the pre-trained deep learning network, the processor 600 is further configured to read a program in the memory 620 and perform the following training process:

[0171] Inputting the vehicle component images in the training data set into a pre-built deep learning network to obtain a similarity feature map of the vehicle component images, and determining a similarity matrix based on the similarity feature map of the vehicle component images;

[0172] Pre-generating an all-zero matrix with the same dimension as the similarity matrix;

[0173] Calculate the similarity label value between each vehicle component using the following formula 1, and fill each similarity label value into the corresponding position of the all-zero matrix to obtain a similarity label matrix;

[0174]

[0175] in, represents the similarity label value between the i-th vehicle component and the j-th vehicle component, corresponding to the similarity label value of the i-th row and j-th column in the similarity label matrix; P i represents the i-th vehicle component image; P j Represents the jth vehicle component image; Car n Head represents the vehicle detection frame of the nth vehicle detected; n Indicates the front detection frame of the nth vehicle detected; Tail n Represents the rear detection frame of the nth vehicle detected; Roof n represents the detected roof detection frame of the nth vehicle; N represents the number of vehicle component images;

[0176] Using the similarity label matrix and the similarity matrix, calculate the contrast loss using the following formula 2, and use the contrast loss to train the pre-built deep learning network to obtain a trained deep learning network;

[0177]

[0178] Among them, Loss contra represents contrast loss; M simi,j Represents the similarity value of the i-th row and j-th column in the similarity matrix.

[0179] In some embodiments, clustering the at least one vehicle component target image based on the similarity matrix to classify the vehicle component target images belonging to the same vehicle into the same category includes:

[0180] Clustering vehicle component target images belonging to the same vehicle based on the similarity matrix to obtain at least one cluster center;

[0181] When each of the cluster centers meets a preset condition, each of the vehicle component target images is determined to be assigned to a corresponding cluster center, ie, a vehicle category.

[0182] In some embodiments, the preset conditions include:

[0183] The number of vehicle component target images in the cluster center is greater than or equal to 2 and less than or equal to a preset value, and the number of vehicle component target images of each category in the cluster center is less than or equal to 1.

[0184] In some embodiments, determining the parking status of the parking space based on the position relationship includes:

[0185] determining a positional relationship between the vehicle and the parking space in the parking area image based on the position information of any vehicle component target image in each of the associated relationships and the parking space frame position information of each parking space in the parking area image, and determining whether the vehicle in the parking area image is located in the parking space based on the positional relationship;

[0186] If so, determining the parking status of the parking space as occupied;

[0187] Otherwise, it is determined that the parking status of the parking space is vacant.

[0188] In some embodiments, the processor 600 is further configured to read a program in the memory 620 and execute:

[0189] Based on the detection results of the parking status of each parking space in the collected multiple consecutive frames of parking area images, when the parking status of each parking space is determined to be occupied or idle for a preset number of times, a notification message is issued indicating that the parking status of the parking space is occupied or idle.

[0190] In some embodiments, the parking space parking status detection device provided in the embodiments of the present application further includes a transceiver 610 for receiving images captured by the monitoring device and sending data to a terminal user interface under the control of the processor 600 .

[0191] Among them, Figure 10 In the embodiment of the present invention, the bus architecture can include any number of interconnected buses and bridges, specifically linking various circuits such as one or more processors represented by processor 600 and memory represented by memory 620. The bus architecture can also link various other circuits such as peripheral devices, voltage regulators, and power management circuits, which are well known in the art and therefore not further described herein. The bus interface provides an interface. The transceiver 610 can be multiple components, namely, a transmitter and a receiver, providing a unit for communicating with various other devices over a transmission medium.

[0192] In some embodiments, the parking space parking status detection device provided in the embodiment of the present application also includes a user interface 630. The user interface 630 can be an interface that can be connected to required external and internal devices. The connected devices include but are not limited to a keypad, display, speaker, microphone, joystick, etc.

[0193] The processor 600 is responsible for managing the bus architecture and general processing, and the memory 620 can store data used by the processor 600 when performing operations.

[0194] In some embodiments, the processor 600 may be a CPU (central processing unit), an ASIC (Application Specific Integrated Circuit), an FPGA (Field-Programmable Gate Array), or a CPLD (Complex Programmable Logic Device).

[0195] An embodiment of the present application provides a computing device, which may specifically be a desktop computer, a portable computer, a smart phone, a tablet computer, a personal digital assistant (PDA), etc. The computing device may include a central processing unit (CPU), a memory, input / output devices, etc. The input devices may include a keyboard, a mouse, a touch screen, etc., and the output devices may include a display device such as a liquid crystal display (LCD) or a cathode ray tube (CRT).

[0196] The memory may include a read-only memory (ROM) and a random access memory (RAM), and provides program instructions and data stored in the memory to the processor. In an embodiment of the present application, the memory may be used to store the program of any of the methods provided in the embodiments of the present application.

[0197] The processor calls the program instructions stored in the memory, and the processor is used to execute any of the methods provided in the embodiments of the present application according to the obtained program instructions.

[0198] The present application embodiment also provides a computer program product or computer program, which includes computer instructions, which are stored in a computer-readable storage medium. The processor of the computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions so that the computer device performs any of the methods described in the above embodiments. The program product can adopt any combination of one or more readable media. The readable medium can be a readable signal medium or a readable storage medium. The readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples of readable storage media (non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above.

[0199] The present invention provides a computer-readable storage medium for storing computer program instructions used by the apparatus provided in the above embodiments of the present invention, which includes a program for executing any of the methods provided in the above embodiments of the present invention. The computer-readable storage medium may be a non-transitory computer-readable medium.

[0200] The computer-readable storage medium can be any available medium or data storage device that can be accessed by a computer, including but not limited to magnetic storage (such as floppy disks, hard disks, magnetic tapes, magneto-optical disks (MO), etc.), optical storage (such as CDs, DVDs, BDs, HVDs, etc.), and semiconductor storage (such as ROMs, EPROMs, EEPROMs, non-volatile memories (NANDFLASH), solid-state drives (SSDs)), etc.

[0201] Those skilled in the art will appreciate that the embodiments of the present application can be provided as methods, systems, or computer program products. Therefore, the present application can adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application can adopt the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0202] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the present application. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0203] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing device to work in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1 The function specified in one or more boxes.

[0204] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operational steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing the instructions executed on the computer or other programmable device for implementing the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.

[0205] Obviously, those skilled in the art may make various changes and modifications to this application without departing from the spirit and scope of this application. Thus, if these modifications and variations of this application fall within the scope of the claims of this application and their equivalents, this application is intended to include these modifications and variations.

Claims

1. A parking space parking status detection method, characterized in that: The method comprises: Acquire the collected parking area image; Inputting the parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image, calculating similarities between the vehicle component target images using the image features of the at least one vehicle component target image to obtain a similarity matrix, clustering the at least one vehicle component target image based on the similarity matrix, classifying the vehicle component target images belonging to the same vehicle into the same category, and associating the vehicle component target images in each category; determining the parking status of each parking space according to the position information of any vehicle component target image in each of the associated relationships and the parking space frame position information of each parking space in the parking area image; The clustering of the at least one vehicle component target image based on the similarity matrix to classify the vehicle component target images belonging to the same vehicle into the same category includes: Clustering vehicle component target images belonging to the same vehicle based on the similarity matrix to obtain at least one cluster center; When each of the cluster centers meets a preset condition, determining to assign each of the vehicle component target images to a corresponding cluster center, i.e., a vehicle category; The preset conditions include: The number of vehicle component target images in the cluster center is greater than or equal to 2 and less than or equal to a preset value, and the number of vehicle component target images of each category in the cluster center is less than or equal to 1.

2. The method according to claim 1, characterized in that The obtaining of the similarity matrix specifically includes: Inputting the parking area image into the feature extraction layer of the deep learning network to obtain a classification feature map and a positioning feature map of at least one vehicle component target image; Splicing and fusing the classification feature map and the positioning feature map of the at least one vehicle component target image through a preset function to obtain a spliced ​​fusion feature map; Inputting the spliced ​​fusion feature map into the feature mapping layer of the deep learning network to obtain a similarity feature map; Based on the similarity feature graph, the similarity between each of the vehicle component target images is calculated to obtain a similarity matrix.

3. The method according to claim 2, characterized in that The obtaining of the spliced ​​fusion feature map specifically includes: splicing the classification feature maps of each of the vehicle component target images to obtain a spliced ​​classification feature map; and splicing the positioning feature maps of each of the vehicle component target images to obtain a spliced ​​positioning feature map; The spliced ​​classification feature map is fused with the spliced ​​positioning feature map to obtain a spliced ​​fusion feature map.

4. The method according to claim 1, wherein The specific training method of the pre-trained deep learning network includes: Inputting the vehicle component images in the training data set into a pre-built deep learning network to obtain a similarity feature map of the vehicle component images, and determining a similarity matrix based on the similarity feature map of the vehicle component images; Pre-generating an all-zero matrix with the same dimension as the similarity matrix; Calculate the similarity label value between each vehicle component using the following formula 1, and fill each similarity label value into the corresponding position of the all-zero matrix to obtain a similarity label matrix; in, represents the similarity label value between the i-th vehicle component and the j-th vehicle component, corresponding to the similarity label value of the i-th row and j-th column in the similarity label matrix; P i represents the i-th vehicle component image; P j Represents the jth vehicle component image; Car n Head represents the vehicle detection frame of the nth vehicle detected; n Indicates the front detection frame of the nth vehicle detected; Tail n Represents the rear detection frame of the nth vehicle detected; Roof n represents the detected roof detection frame of the nth vehicle; N represents the number of vehicle component images; Using the similarity label matrix and the similarity matrix, calculate the contrast loss using the following formula 2, and use the contrast loss to train the pre-built deep learning network to obtain a trained deep learning network; Among them, Loss contra represents contrast loss; Represents the similarity value of the i-th row and j-th column in the similarity matrix.

5. The method according to claim 1, wherein The determining the parking status of the parking space based on the position relationship includes: determining a positional relationship between the vehicle and the parking space in the parking area image based on the position information of any vehicle component target image in each of the associated relationships and the parking space frame position information of each parking space in the parking area image, and determining whether the vehicle in the parking area image is located in the parking space based on the positional relationship; If so, determining the parking status of the parking space as occupied; Otherwise, it is determined that the parking status of the parking space is vacant.

6. The method according to claim 1, characterized in that The method further comprises: Based on the detection results of the parking status of each parking space in the collected multiple consecutive frames of parking area images, when the parking status of each parking space is determined to be occupied or idle for a preset number of times, a notification message is issued indicating that the parking status of the parking space is occupied or idle.

7. A parking space parking status detection system, characterized in that: include: An image acquisition module, used to acquire images of the parking area; a vehicle recognition module configured to input the parking area image into a pre-trained deep learning network to obtain image features of at least one vehicle component target image, calculate similarities between the vehicle component target images using the image features of the at least one vehicle component target image to obtain a similarity matrix, cluster the at least one vehicle component target image based on the similarity matrix, classify the vehicle component target images belonging to the same vehicle into the same category, and associate the vehicle component target images within each category; a state detection module, configured to determine the parking state of each parking space according to the position information of the target image of any vehicle component in each of the associated relationships and the position information of the parking space frame of each parking space in the parking area image; The clustering of the at least one vehicle component target image based on the similarity matrix to classify the vehicle component target images belonging to the same vehicle into the same category includes: Clustering vehicle component target images belonging to the same vehicle based on the similarity matrix to obtain at least one cluster center; When each of the cluster centers meets a preset condition, determining to assign each of the vehicle component target images to a corresponding cluster center, i.e., a vehicle category; The preset conditions include: The number of vehicle component target images in the cluster center is greater than or equal to 2 and less than or equal to a preset value, and the number of vehicle component target images of each category in the cluster center is less than or equal to 1.

8. A parking space parking status detection device, characterized in that: include: a memory for storing program instructions; A processor, configured to call the program instructions stored in the memory and execute the method according to any one of claims 1 to 6 according to the obtained program.

9. A computer program product for a computer, characterized in that The invention comprises a software code portion for executing the method according to any one of claims 1 to 6 when the product is run on the computer.

10. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are used to enable the computer to execute the method according to any one of claims 1 to 6.

Citation Information

Patent Citations

  • Parking space guiding method and device

    CN114038228A