A method, device, equipment and medium for identifying vehicles entering and exiting a parking space
By combining license plate information, vehicle characteristics and position information, and using video analysis technology to match vehicles in and out, the problem of low matching accuracy of target matching of vehicles in and out in the existing technology is solved, and higher recognition accuracy and parking management efficiency are achieved.
Patent Information
- Application Number
- CN202211367405.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-02
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2042-11-02
AI Technical Summary
The existing high-position video parking system is prone to mismatch and mismatch during the matching of vehicle targets at entry and exit. Especially in the diversified vehicle posture and complex parking environment, it cannot meet the needs of high-precision parking algorithms under a single feature condition.
By obtaining the in-position and out-position surveillance video captured by the preset camera, combining license plate information, vehicle characteristics and position information for matching, the trained license plate recognition algorithm and vehicle re-identification network for feature extraction and matching, and cosine value calculation and The preset feature similarity threshold determines the vehicle features, and adjusts the feature similarity threshold based on the position interleaving ratio and lighting conditions difference to improve matching accuracy.
It effectively avoids mismatch and mismatch caused by single information identification, improves the accuracy of vehicle matching in and out, forms a complete parking evidence link, and improves the management level of high-position video parking system.
Smart Images

Figure CN115762172B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and in particular to a method, device, equipment and medium for identifying vehicles entering and exiting a parking space. Background Art
[0002] With the rapid growth of the number of vehicles in cities, roadside parking management is a major problem in urban road traffic management. The high-position video parking system based on pure video analysis has the advantages of non-sensing entry and exit, unattended, equipment not easily damaged, automatic billing, etc., which can effectively improve the level of roadside parking management and has been widely praised by the market. At present, the application scale of the system in urban parking management is also gradually expanding. The high-position video parking system usually captures the vehicle entry and exit behavior information and vehicle identity information, matches the vehicle entry and exit targets, forms a complete parking evidence order, and realizes automatic roadside parking charges. Due to its charging nature, missed matching and mismatching of entry and exit behaviors will greatly reduce the efficiency of parking management. How to improve the accuracy of vehicle entry and exit target matching is a key problem to be solved by the high-position video parking system. The relevant technology tracks the vehicle target to determine whether the vehicle has entry and exit behavior, and obtains the vehicle identity information by setting the first position, the second position, and the third position during the vehicle entry and exit process. The vehicle identity information includes information such as the license plate number, the model, and the body color, and then the vehicle entry and exit target is matched according to the vehicle identity information. However, in the current vehicle target matching process, on the one hand, the diversity of vehicle postures can easily lead to problems such as missed detection, missed recognition, and misrecognition of license plates. If vehicle target matching is based solely on license plate information, it will lead to missed matching and mismatching of vehicle targets. On the other hand, in the face of complex parking environments, vehicle target matching under a single feature condition cannot meet the requirements of high-precision parking algorithms. In summary, how to avoid missed matching and mismatching caused by using a single piece of information for identification during the process of vehicle identification and improve the accuracy of vehicle matching in and out of parking spaces needs to be further solved. Summary of the invention
[0003] In view of this, the purpose of the present invention is to provide a method, device, equipment and medium for identifying vehicles entering and exiting a parking space, which can avoid missing matches and mismatches caused by using a single piece of information for identification during the process of identifying vehicles entering and exiting a parking space and improve the accuracy of matching vehicles entering and exiting the parking space. The specific scheme is as follows:
[0004] In a first aspect, the present application discloses a method for identifying vehicles entering and exiting a parking space, comprising:
[0005] Obtaining a monitoring video of a target vehicle entering a target parking space captured by a preset camera, and obtaining a monitoring video of a target vehicle leaving the target parking space captured by the preset camera;
[0006] Determine the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video;
[0007] According to the license plate information matching result, the vehicle feature matching result and the position information matching result, it is determined whether the vehicles in the entry monitoring video and the exit monitoring video are the same vehicle, so as to complete the identification and matching of vehicles entering and exiting the parking space.
[0008] Optionally, determining the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video includes:
[0009] Inputting the in-position monitoring video and the out-position monitoring video into the trained license plate recognition algorithm model to obtain the vehicle in-position license plate and the vehicle out-position license plate, and matching the vehicle in-position license plate with the vehicle out-position license plate to obtain a license plate information matching result;
[0010] The entry position information and the exit position information of the target vehicle are determined according to the entry monitoring video and the exit monitoring video, and the position information matching result is determined according to the entry position information and the exit position information.
[0011] Optionally, determining the entry position information and the exit position information of the target vehicle according to the entry monitoring video and the exit monitoring video, and determining the position information matching result according to the entry position information and the exit position information, includes:
[0012] Determine the in-position position information and the out-position position information of the target vehicle according to the in-position monitoring video and the out-position monitoring video, and determine the intersection-and-joint ratio of the in-position and out-position vehicle positions according to the in-position position information and the out-position position information;
[0013] The position information matching result is determined according to the comparison result of the intersection-over-combination ratio of the vehicle positions and a preset position similarity threshold.
[0014] Optionally, determining the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video includes:
[0015] The in-place monitoring video and the out-of-place monitoring video are input into the trained vehicle re-identification network to extract vehicle features to obtain in-place vehicle features and out-of-place vehicle features, and a vehicle feature matching result is determined based on the in-place vehicle features and the out-of-place vehicle features.
[0016] Optionally, the step of inputting the in-place monitoring video and the out-of-place monitoring video into a trained vehicle re-identification network to extract vehicle features to obtain in-place vehicle features and out-of-place vehicle features, and determining a vehicle feature matching result according to the in-place vehicle features and the out-of-place vehicle features, includes:
[0017] Determine a rectangular target detection frame corresponding to the target vehicle in the monitoring video according to the in-position monitoring video and the out-position monitoring video;
[0018] Extracting a preset number of target vehicle images in the surveillance video according to the angle of the rectangular target detection frame and a preset angle threshold division rule;
[0019] Input the target vehicle image into the trained vehicle re-identification network to extract vehicle features to obtain in-position vehicle features and out-position vehicle features, and calculate the in-position vehicle features and out-position vehicle features by cosine value to obtain the in-position vehicle features and out-position vehicle features similarity;
[0020] The vehicle feature matching result is determined according to a comparison result between the vehicle feature similarity and a preset feature similarity threshold.
[0021] Optionally, before determining the vehicle feature matching result according to the comparison result between the vehicle feature similarity and a preset feature similarity threshold, the method further includes:
[0022] Determine an in-position grayscale value corresponding to the in-position monitoring video according to the in-position monitoring video, and determine an out-position grayscale value corresponding to the out-position monitoring video according to the out-position monitoring video;
[0023] The preset feature similarity threshold is determined based on a difference between the in-place grayscale value and the out-of-place grayscale value.
[0024] Optionally, judging whether the vehicles in the parking entry monitoring video and the parking exit monitoring video are the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, so as to complete the identification and matching of vehicles entering and exiting the parking space, includes:
[0025] Based on the preset vehicle matching judgment rules and according to the license plate matching level corresponding to the license plate information matching result, the feature matching level corresponding to the vehicle feature matching result and the position matching level corresponding to the position information matching result, it is judged whether the vehicles in the entry monitoring video and the exit monitoring video are the same vehicle, so as to complete the identification and matching of vehicles entering and exiting the parking space.
[0026] In a second aspect, the present application discloses a vehicle identification device for entering and exiting a parking space, comprising:
[0027] A monitoring video acquisition module is used to acquire a monitoring video of a target vehicle entering a target parking space captured by a preset camera, and to acquire a monitoring video of a target vehicle leaving the target parking space captured by the preset camera;
[0028] A matching result determination module is used to determine the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video;
[0029] The parking space entry and exit vehicle identification module is used to determine whether the vehicle in the entry monitoring video and the exit monitoring video is the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, so as to complete the identification and matching of the vehicle entering and exiting the parking space.
[0030] In a third aspect, the present application discloses an electronic device, comprising:
[0031] Memory, used to store computer programs;
[0032] The processor is used to execute the computer program to implement the steps of the method for identifying vehicles entering and exiting a parking space disclosed above.
[0033] In a fourth aspect, the present application discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the steps of the aforementioned method for identifying vehicles entering and exiting a parking space are implemented.
[0034] When identifying vehicles entering and exiting a parking space, the present application first obtains an entry monitoring video of a target vehicle parked in a target parking space captured by a preset camera, and obtains an exit monitoring video of the target vehicle driving out of the target parking space captured by the preset camera. According to the entry monitoring video and the exit monitoring video, the license plate information matching results, the vehicle feature matching results and the position information matching results of the target vehicle entering and exiting the parking space are determined. According to the license plate information matching results, the vehicle feature matching results and the position information matching results, it is determined whether the vehicles in the entry monitoring video and the exit monitoring video are the same vehicle, so as to complete the identification and matching of vehicles entering and exiting the parking space. It can be seen that when the present application is identifying vehicles entering and exiting a parking space, it first obtains the entry monitoring video captured by a preset camera during the process of the target vehicle parking in the target parking space, and obtains the exit monitoring video corresponding to the process of the target vehicle leaving the target parking space captured by the preset camera, and further determines the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the parking space based on the entry monitoring video and the exit monitoring video, and further determines whether the vehicles in the entry video and the exit video are the same vehicle based on the license plate information matching result, vehicle feature matching result and position information matching result, and completes the identification and matching of vehicles entering and exiting the parking space. It can be seen that when the present application is identifying vehicles entering and exiting a parking space, it obtains the entry monitoring video and the exit monitoring video, and determines the license plate information, vehicle features and location information of the vehicles entering and exiting the parking space based on the entry monitoring video and the exit monitoring video, and further determines the matching results of the license plate information, vehicle feature matching results and location information matching results of the vehicles entering and exiting the parking space, and jointly determines whether the vehicles entering and exiting the parking space are the same vehicle based on the license plate information matching results, vehicle feature matching results and location information matching results, and identifies and matches vehicles through the three aspects of license plate, vehicle features and location information, thereby improving the accuracy of vehicle target identification and matching, thereby forming a complete parking evidence chain and avoiding missed matches and mismatches of vehicle targets entering and exiting the parking space caused by relying solely on license plate information for vehicle target matching. In summary, the present application can avoid missed matches and mismatches caused by using a single piece of information for identification during the process of identifying vehicles entering and exiting a parking space, and improve the accuracy of matching vehicles entering and exiting the parking space. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on the provided drawings without paying creative work.
[0036] Figure 1A flow chart of a method for identifying vehicles entering and exiting a parking space provided in this application;
[0037] Figure 2 A specific flow chart of a method for identifying vehicles entering and exiting a parking space provided in this application;
[0038] Figure 3 A schematic diagram of a vehicle target frame for vehicle detection provided in this application;
[0039] Figure 4 A schematic diagram of the structure of a vehicle identification device for entering and exiting a parking space provided in this application;
[0040] Figure 5 A structural diagram of an electronic device provided for this application. DETAILED DESCRIPTION
[0041] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] The related technology tracks the vehicle target to determine whether the vehicle has any entry and exit behavior, and during the vehicle entry and exit process, the vehicle identity information is obtained by setting the first position, the second position, and the third position. The vehicle identity information includes information such as the license plate number, the model of the vehicle, and the body color, and then the vehicle target is matched according to the vehicle identity information. However, in the current process of matching the vehicle targets entering and exiting, on the one hand, the diversity of vehicle postures can easily cause problems such as missed detection, missed recognition, and misrecognition of license plates. If the vehicle target matching only relies on the license plate information, it will cause missed matching and mismatching of the vehicle targets entering and exiting; on the other hand, facing a complex parking environment, vehicle target matching under a single feature condition cannot meet the requirements of a high-precision parking algorithm. To this end, the present application provides a method for identifying vehicles entering and exiting a parking space, which can avoid missed matching and mismatching caused by using a single information for identification during the process of identifying vehicles entering and exiting a parking space, and improve the accuracy of matching vehicles entering and exiting the parking space.
[0043] The embodiment of the present invention discloses a method for identifying vehicles entering and exiting a parking space. Figure 1 As shown, the method includes:
[0044] Step S11: obtaining a monitoring video of a target vehicle entering a target parking space captured by a preset camera, and obtaining a monitoring video of a target vehicle leaving the target parking space captured by the preset camera.
[0045] In this embodiment, a monitoring video of the target vehicle entering the target parking space captured by a preset camera is obtained, and a monitoring video of the target vehicle leaving the target parking space captured by the preset camera is obtained. Specifically, the monitoring video of the target vehicle entering the target parking space captured by the preset camera is obtained, and the corresponding monitoring video of the target vehicle leaving the target parking space captured by the preset camera is obtained. It can be understood that when a new vehicle target is detected, the vehicle target is tracked. If the vehicle target enters the parking area and remains stationary in the parking area for a time greater than the set parking time, it is determined that the vehicle has completed the parking behavior. When the vehicle detection frame in the parking area partially exceeds the parking area, the vehicle target is tracked. After a certain period of time, the vehicle position completely leaves the parking area and eventually disappears in the video image, and it is determined that the vehicle has completed the exit behavior. In the high-position video parking system, a preset camera shoots the parking behavior of the target vehicle, and analyzes and matches the in-position monitoring video with the corresponding out-position monitoring video to identify whether the in-position monitoring video and the out-position monitoring video are the same vehicle, so as to form a complete parking evidence chain and perform automated parking fee management. Through the above technical solution, the in-position monitoring video and the out-position monitoring video are obtained, so that the vehicles in the in-position monitoring video and the out-position monitoring video can be identified and matched later through the in-position monitoring video and the out-position monitoring video.
[0046] Step S12: determining the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video.
[0047] In this embodiment, the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting are determined according to the entry monitoring video and the exit monitoring video. Specifically, the entry license plate information, entry vehicle feature information and entry vehicle position information are determined according to the entry monitoring video, and the exit license plate information, exit vehicle feature information and exit vehicle position information are determined according to the exit monitoring video. The entry license plate information is further matched with the exit license plate information to obtain the license plate information matching result; the entry vehicle feature information is matched with the exit vehicle feature information to obtain the vehicle feature matching result; the entry vehicle position information is matched with the exit vehicle position information to obtain the position information matching result. Through the above technical scheme, the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting are determined, so as to facilitate the subsequent judgment of whether the vehicles in the entry monitoring video and the exit monitoring video are the same vehicle according to the license plate information matching result, the vehicle feature matching result and the position information matching result.
[0048] Step S13: judging whether the vehicles in the parking entry monitoring video and the parking exit monitoring video are the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, so as to complete the identification and matching of vehicles entering and exiting the parking space.
[0049] In this embodiment, the vehicle in the parking space entry monitoring video and the vehicle in the parking space exit monitoring video are judged to be the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, so as to complete the identification and matching of vehicles entering and exiting the parking space. Specifically, the vehicle in the parking space entry monitoring video and the vehicle in the parking space exit monitoring video are judged to be the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, so as to form a complete parking evidence chain and perform automated parking fee management. Through the above technical scheme, the vehicle in and out of the parking space is judged to be the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, and the vehicle is identified and matched through the three aspects of the license plate, the vehicle feature and the position information, thereby improving the accuracy of vehicle target identification and matching, thereby forming a complete parking evidence chain and avoiding missed matching and erroneous matching of vehicle targets in and out of the parking space caused by relying only on the license plate information for vehicle target matching.
[0050] It can be seen that when the present embodiment is identifying vehicles entering and exiting a parking space, it first obtains an entry monitoring video captured by a preset camera during the process of the target vehicle parking in the target parking space, and obtains an exit monitoring video corresponding to the process of the target vehicle leaving the target parking space captured by the preset camera. The license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the parking space are further determined based on the entry monitoring video and the exit monitoring video. The license plate information matching result, vehicle feature matching result and position information matching result are further determined based on the license plate information matching result, vehicle feature matching result and position information matching result. Whether the vehicles in the entry video and the exit video are the same vehicle is determined, and the identification and matching of vehicles entering and exiting the parking space is completed. It can be seen that when the present application is identifying vehicles entering and exiting a parking space, it obtains the entry monitoring video and the exit monitoring video, and determines the license plate information, vehicle features and location information of the vehicles entering and exiting the parking space based on the entry monitoring video and the exit monitoring video, and further determines the matching results of the license plate information, vehicle feature matching results and location information matching results of the vehicles entering and exiting the parking space, and jointly determines whether the vehicles entering and exiting the parking space are the same vehicle based on the license plate information matching results, vehicle feature matching results and location information matching results, and identifies and matches vehicles through the three aspects of license plate, vehicle features and location information, thereby improving the accuracy of vehicle target identification and matching, thereby forming a complete parking evidence chain and avoiding missed matches and mismatches of vehicle targets entering and exiting the parking space caused by relying solely on license plate information for vehicle target matching. In summary, the present application can avoid missed matches and mismatches caused by using a single piece of information for identification during the process of identifying vehicles entering and exiting a parking space, and improve the accuracy of matching vehicles entering and exiting the parking space.
[0051] See also Figure 2 As shown, the embodiment of the present invention discloses a specific method for identifying vehicles entering and exiting a parking space. Compared with the previous embodiment, this embodiment further illustrates and optimizes the technical solution.
[0052] Step S21: obtaining a monitoring video of a target vehicle entering a target parking space captured by a preset camera, and obtaining a monitoring video of a target vehicle leaving the target parking space captured by the preset camera.
[0053] Step S22: Input the entry monitoring video and the exit monitoring video into the trained license plate recognition algorithm model to obtain the vehicle entry license plate and the vehicle exit license plate, and match the vehicle entry license plate with the vehicle exit license plate to obtain a license plate information matching result.
[0054] In this embodiment, the in-place monitoring video and the out-place monitoring video are input into the trained license plate recognition algorithm model to obtain the vehicle in-place license plate and the vehicle out-place license plate, and the vehicle in-place license plate and the vehicle out-place license plate are matched for license plate information to obtain a license plate information matching result. Specifically, during the vehicle in-place and out-place process, the corresponding license plate number is selected by the trained license plate recognition algorithm model, which are respectively recorded as the vehicle in-place license plate CarInPlate and the vehicle out-place license plate CarOutPlat. In a specific embodiment, the license plate information matching result CarInOutPlate is calculated by matching the license plate fields one by one. If the characters of CarInPlate and CarOutPlate are completely matched, the license plate information matching result CarInOutPlate is recorded as A; if there is one or two characters that do not match between CarInPlate and CarOutPlate, the license plate information matching result CarInOutPlate is recorded as B; in other cases, the license plate information matching result CarInOutPlate is recorded as C. Furthermore, if there is no vehicle entry / exit license plate result during the entry / exit process, or if more than two characters do not match, the license plate information matching result CarInOutPlate is recorded as C.
[0055] Step S23: Input the in-place monitoring video and the out-of-place monitoring video into the trained vehicle re-identification network to extract vehicle features to obtain in-place vehicle features and out-of-place vehicle features, and determine vehicle feature matching results based on the in-place vehicle features and the out-of-place vehicle features.
[0056] In this embodiment, the in-place monitoring video and the out-of-place monitoring video are input into the trained vehicle re-identification network to extract vehicle features to obtain in-place vehicle features and out-of-place vehicle features, and the vehicle feature matching result is determined based on the in-place vehicle features and the out-of-place vehicle features. Specifically, a rectangular target detection frame corresponding to the target vehicle in the monitoring video is determined based on the in-place monitoring video and the out-of-place monitoring video; a preset number of target vehicle images in the monitoring video are extracted based on the angle of the rectangular target detection frame and the preset angle threshold division rule; the target vehicle image is input into the trained vehicle re-identification network to extract vehicle features to obtain in-place vehicle features and out-of-place vehicle features, and the in-place vehicle features and the out-of-place vehicle features are calculated through cosine values to obtain the in-place and out-of-place vehicle feature similarity; the vehicle feature matching result is determined based on the comparison result of the vehicle feature similarity and the preset feature similarity threshold. In a specific implementation, the in-position and out-position vehicle features are extracted using a trained vehicle re-identification network (i.e., reid network) to obtain in-position vehicle features CarInFeature = {Inf1, ..., InfN} and out-position vehicle features CarOutFeature = {Outf1, ..., OutfN}. The vehicle feature similarity CarInOutSimilarity between the in-position vehicle features and the out-position vehicle features is calculated by the cosine value, as shown in the following formula:
[0057] CarInOutSimilarity=Max((Infi*Outfj) / (||Infi||*||Outfj||));
[0058] Among them, i,j∈(1,N). Then the vehicle matching result CarInOutFea is:
[0059]
[0060] Wherein, Vthres0 and Vthres1 are preset feature similarity thresholds, and Vthres0>Vthres1.
[0061] In a specific implementation, the in-place grayscale value corresponding to the in-place monitoring video is determined according to the in-place monitoring video, and the out-of-place grayscale value corresponding to the out-of-place monitoring video is determined according to the out-of-place monitoring video; the preset feature similarity threshold is determined based on the difference between the in-place grayscale value and the out-of-place grayscale value. Specifically, affected by the diversity of postures during the vehicle's in-and-out process, the similarity of vehicle features under different postures will be affected. At the same time, since the in-place and out-of-place behaviors may be distributed in different time periods such as daytime and nighttime, the similarity of vehicle features will also be affected under the interference of different lighting conditions. Therefore, on the basis of the matching scheme integrating license plates, vehicle features, and vehicle positions, the present invention introduces methods such as posture optimization and scene judgment into vehicle feature matching to improve the matching degree of vehicle features. Different from the traditional vehicle detection that outputs a vehicle target frame, the present embodiment uses a deep network of detection and fixed points for vehicle target detection. When outputting the vehicle position information, the coordinate information of the four vertices (A, B, C, D) in front and behind the vehicle chassis is output at the same time. The vehicle detection vehicle target frame is as follows: Figure 3 As shown. The vehicle posture is represented by calculating the angle α between the side AB or CD of the vehicle and the vertical direction. By setting N α thresholds, the reid network is used to extract the feature value of the vehicle target under the corresponding vehicle posture during the vehicle entry and exit process, avoiding the extraction of multiple vehicle features under a single posture, while ensuring that the same posture can be extracted during the entry and exit process, reducing the risk of large vehicle similarity due to vehicle posture differences. Among them, the vehicle feature value is a one-dimensional vector, and the vector length is a preset length, including but not limited to 128, 256, and 512. Due to different lighting conditions at different times, when the lighting conditions at the entry and exit time are poor, the similarity value of the same vehicle target is small. If the same vehicle target in a time period with similar lighting conditions uses the same preset feature similarity threshold, it is easy to cause missed matching problems. Therefore, this embodiment introduces scene lighting difference judgment and sets different preset feature similarity thresholds to improve matching accuracy. Select the monitoring screen under the corresponding posture to calculate the average grayscale value Gray of the entire image, and judge different scenes by the grayscale value. The grayscale calculation formula is as follows,
[0062] Gray=(R*30+G*59+B*11) / 100;
[0063] Among them, R, G, and B are the corresponding RGB pixel values in the image. Furthermore, the average grayscale value of N images in the process of in-position and out-position is used to obtain the in-position grayscale value InGray and the out-position grayscale value OutGray. If |InGray-OutGray|>70, the lighting conditions of the in-position and out-position scenes are very different. Otherwise, it is considered that the lighting conditions of the in-position and out-position scenes are similar. Then the vehicle feature similarity threshold setting method is shown in the following formula:
[0064]
[0065]
[0066] Among them, a, b, and c represent similarity values, and a>b>c. It can be understood that when the lighting conditions of the entry scene and the exit scene are greatly different, the preset feature similarity threshold is adjusted according to actual needs to improve the accuracy of vehicle exit and entry recognition and matching. Through the above technical solution, the introduction of scene difference judgment such as vehicle posture and lighting conditions improves the accuracy of apparent feature matching, ensures high precision of vehicle target matching, and improves the management level of high-position video parking system.
[0067] Step S24: determining the entry position information and the exit position information of the target vehicle according to the entry monitoring video and the exit monitoring video, and determining the position information matching result according to the entry position information and the exit position information.
[0068] In this embodiment, the entry position information and the exit position information of the target vehicle are determined according to the entry monitoring video and the exit monitoring video, and the position information matching result is determined according to the entry position information and the exit position information, including: determining the entry position information and the exit position information of the target vehicle according to the entry monitoring video and the exit monitoring video, and determining the intersection-and-union ratio of the entry and exit vehicle positions according to the entry position information and the exit position information; determining the position information matching result according to the comparison result of the vehicle position intersection-and-union ratio and a preset position similarity threshold. Specifically, the vehicle position information after the vehicle enters and stops in the parking space is taken as the vehicle entry position information, and the entry position information is represented by CarInLoc, and the entry position information CarInLoc={x0, y0, w0, h0}, where x0, y0 are the coordinates of the upper left point of the vehicle detection frame, and w0, h0 are the width and height of the coordinate frame; the vehicle position information when the vehicle is from the stable state to the vehicle target just driving out of the parking space is taken, and the exit position information is represented by CarOutLoc, and the exit position information CarOutLoc={x1, y1, w1, h1} is obtained, where x1, y1 are the coordinates of the upper left point of the vehicle detection frame, and w1, h1 are the width and height of the coordinate frame. Calculate the intersection and union ratio of the entry and exit vehicle positions:
[0069] CarInOutIou=(CarInLoc∩CarOutLoc) / (CarInLoc∪CarOutLoc);
[0070] The location information matching result CarInOutLoc is:
[0071]
[0072] Among them, Ithres0 and Ithres1 are preset position similarity thresholds, and Ithres0>Ithres1. Through the above technical solution, the position information matching result is determined according to the entry position information and the exit position information, so as to judge whether the vehicles in the entry monitoring video and the exit monitoring video are the same vehicle according to the license plate information matching result, the vehicle feature matching result and the position information matching result.
[0073] Step S25: judging whether the vehicles in the parking entry monitoring video and the parking exit monitoring video are the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, so as to complete the identification and matching of vehicles entering and exiting the parking space.
[0074] In this embodiment, based on the preset vehicle matching judgment rules and according to the license plate matching level corresponding to the license plate information matching result, the feature matching level corresponding to the vehicle feature matching result, and the position matching level corresponding to the position information matching result, it is judged whether the vehicles in the parking space entry monitoring video and the parking space exit monitoring video are the same vehicle, so as to complete the identification and matching of vehicles entering and exiting the parking space. Specifically, if the target matching values of the parking space entry and exit vehicles satisfy CarInOutLoc=A or CarInOutFea=A or CarInOutPlate=A, then the group of parking space entry and exit vehicles are judged to be the same vehicle, and a chain of evidence can be formed; if there are two Bs or more in the values of the three variables CarInOutLoc, CarInOutFea and CarInOutPlate, the group of parking space entry and exit vehicles are also judged to be the same vehicle, and a chain of evidence can be formed; in other cases, it is judged that the corresponding parking space entry and exit vehicles are not the same vehicle, and no chain of evidence is formed.
[0075] It can be seen that in this embodiment, the introduction of scene difference judgments such as vehicle posture and lighting conditions improves the accuracy of apparent feature matching, ensures the high precision of vehicle target matching, and improves the management level of the high-position video parking system. The license plate information matching results, vehicle feature matching results and position information matching results are used to jointly determine whether the vehicles entering and exiting the parking space are the same vehicle. The vehicle is identified and matched through license plates, vehicle features and position information, thereby improving the accuracy of vehicle target identification and matching, thereby forming a complete parking evidence chain and avoiding missed matching and erroneous matching of vehicle targets entering and exiting the parking space caused by relying solely on license plate information for vehicle target matching.
[0076] See also Figure 4 As shown, the embodiment of the present application discloses a vehicle identification device for entering and exiting a parking space, comprising:
[0077] The monitoring video acquisition module 11 is used to acquire the target vehicle parking into the target parking space captured by a preset camera, and acquire the target vehicle leaving the target parking space captured by the preset camera;
[0078] A matching result determination module 12 is used to determine the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video;
[0079] The parking entry and exit vehicle identification module 13 is used to determine whether the vehicles in the entry monitoring video and the exit monitoring video are the same vehicle based on the license plate information matching result, the vehicle feature matching result and the position information matching result, so as to complete the identification and matching of the vehicles entering and exiting the parking space.
[0080] It can be seen that when the present embodiment is identifying vehicles entering and exiting a parking space, it first obtains an entry monitoring video captured by a preset camera during the process of the target vehicle parking in the target parking space, and obtains an exit monitoring video corresponding to the process of the target vehicle leaving the target parking space captured by the preset camera. The license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the parking space are further determined based on the entry monitoring video and the exit monitoring video. The license plate information matching result, vehicle feature matching result and position information matching result are further determined based on the license plate information matching result, vehicle feature matching result and position information matching result. Whether the vehicles in the entry video and the exit video are the same vehicle is determined, and the identification and matching of vehicles entering and exiting the parking space is completed. It can be seen that when the present application is identifying vehicles entering and exiting a parking space, it obtains the entry monitoring video and the exit monitoring video, and determines the license plate information, vehicle features and location information of the vehicles entering and exiting the parking space based on the entry monitoring video and the exit monitoring video, and further determines the matching results of the license plate information, vehicle feature matching results and location information matching results of the vehicles entering and exiting the parking space, and jointly determines whether the vehicles entering and exiting the parking space are the same vehicle based on the license plate information matching results, vehicle feature matching results and location information matching results, and identifies and matches vehicles through the three aspects of license plate, vehicle features and location information, thereby improving the accuracy of vehicle target identification and matching, thereby forming a complete parking evidence chain and avoiding missed matches and mismatches of vehicle targets entering and exiting the parking space caused by relying solely on license plate information for vehicle target matching. In summary, the present application can avoid missed matches and mismatches caused by using a single piece of information for identification during the process of identifying vehicles entering and exiting a parking space, and improve the accuracy of matching vehicles entering and exiting the parking space.
[0081] In some specific embodiments, the matching result determination module 12 specifically includes:
[0082] A license plate information matching unit is used to input the in-position monitoring video and the out-position monitoring video into the trained license plate recognition algorithm model to obtain the vehicle in-position license plate and the vehicle out-position license plate, and perform license plate information matching on the vehicle in-position license plate and the vehicle out-position license plate to obtain a license plate information matching result;
[0083] The position information matching unit is used to determine the entry position information and the exit position information of the target vehicle according to the entry monitoring video and the exit monitoring video, and determine the position information matching result according to the entry position information and the exit position information.
[0084] In some specific embodiments, the position information matching unit is specifically used to: determine the entry position information and the exit position information of the target vehicle based on the entry monitoring video and the exit monitoring video, and determine the intersection-and-union ratio of the entry and exit vehicle positions based on the entry position information and the exit position information; determine the position information matching result based on the comparison result of the vehicle position intersection-and-union ratio and a preset position similarity threshold.
[0085] In some specific embodiments, the matching result determination module 12 specifically includes:
[0086] The vehicle feature matching unit is used to input the in-place monitoring video and the out-of-place monitoring video into the trained vehicle re-identification network to extract vehicle features to obtain in-place vehicle features and out-of-place vehicle features, and determine the vehicle feature matching result according to the in-place vehicle features and the out-of-place vehicle features.
[0087] In some specific embodiments, the vehicle feature matching unit is specifically used to: determine a rectangular target detection frame corresponding to the target vehicle in the monitoring video based on the in-place monitoring video and the out-of-place monitoring video; extract a preset number of target vehicle images in the monitoring video based on the angle of the rectangular target detection frame and a preset angle threshold division rule; input the target vehicle image into the trained vehicle re-identification network to extract vehicle features to obtain in-place vehicle features and out-of-place vehicle features, and calculate the in-place vehicle features and the out-of-place vehicle features through cosine values to obtain the in-place and out-of-place vehicle feature similarity; determine the vehicle feature matching result based on the comparison result of the vehicle feature similarity and a preset feature similarity threshold.
[0088] In some specific embodiments, the vehicle identification device for entering and exiting a parking space further includes:
[0089] A grayscale value determination module, used to determine an in-place grayscale value corresponding to the in-place monitoring video according to the in-place monitoring video, and to determine an out-of-place grayscale value corresponding to the out-of-place monitoring video according to the out-of-place monitoring video;
[0090] The preset feature similarity threshold determination module is used to determine the preset feature similarity threshold based on the difference between the in-position grayscale value and the out-position grayscale value.
[0091] In some specific embodiments, the parking space entry and exit vehicle identification module 13 is specifically used to: based on preset vehicle matching judgment rules and according to the license plate matching level corresponding to the license plate information matching result, the feature matching level corresponding to the vehicle feature matching result and the position matching level corresponding to the position information matching result, determine whether the vehicle in the entry monitoring video and the exit monitoring video are the same vehicle, so as to complete the identification and matching of the vehicle entering and exiting the parking space.
[0092] Figure 5 The electronic device 20 provided in an embodiment of the present application is shown. The electronic device 20 may further include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 is used to store a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the method for identifying a vehicle entering and exiting a parking space disclosed in any of the aforementioned embodiments. In addition, the electronic device 20 in this embodiment may be specifically an electronic computer.
[0093] In this embodiment, the power supply 23 is used to provide voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and the external device, and the communication protocol it follows is any communication protocol that can be applied to the technical solution of the present application, and is not specifically limited here; the input and output interface 25 is used to obtain external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs and is not specifically limited here.
[0094] In addition, the memory 22, as a carrier for storing resources, can be a read-only memory, a random access memory, a disk or an optical disk, etc. The resources stored thereon can include an operating system 221, a computer program 222, etc., and the storage method can be temporary storage or permanent storage.
[0095] The operating system 221 is used to manage and control the hardware devices on the electronic device 20 and the computer program 222, which can be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program that can be used to complete the vehicle identification method for entering and exiting a parking space executed by the electronic device 20 disclosed in any of the aforementioned embodiments, the computer program 222 can further include a computer program that can be used to complete other specific tasks.
[0096] Furthermore, the present application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, the aforementioned disclosed method for identifying vehicles entering and exiting a parking space is implemented. The specific steps of the method can be referred to the corresponding contents disclosed in the aforementioned embodiments, and will not be repeated here.
[0097] Finally, it should be noted that, in this article, relational terms such as first and second, etc. are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Moreover, the terms "include", "comprise" or any other variants thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, the elements defined by the sentence "comprise a ..." do not exclude the presence of other identical elements in the process, method, article or device including the elements.
[0098] The above is a detailed introduction to a method, device, equipment and medium for identifying vehicles entering and exiting a parking space provided by the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea; at the same time, for a general technician in this field, according to the idea of the present invention, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
Claims
1. A method for identifying vehicles entering and exiting a parking space, characterized in that: include: Obtaining a monitoring video of a target vehicle entering a target parking space captured by a preset camera, and obtaining a monitoring video of a target vehicle leaving the target parking space captured by the preset camera; Determine the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video; Based on the preset vehicle matching judgment rules and according to the license plate matching level corresponding to the license plate information matching result, the feature matching level corresponding to the vehicle feature matching result, and the position matching level corresponding to the position information matching result, it is judged whether the vehicles in the entry monitoring video and the exit monitoring video are the same vehicle, so as to complete the identification and matching of the vehicles entering and exiting the parking space; Among them, the location information matching result CarInOutLoc is: ; Wherein, Ithres0 and Ithres1 are preset position similarity thresholds, and Ithres0>Ithres1; Among them, the vehicle matching result CarInOutFea is: ; Wherein, Vthres0 and Vthres1 are preset feature similarity thresholds, and Vthres0>Vthres1; CarInOutSimilarity is vehicle feature similarity; The vehicle entry license plate is recorded as CarInPlate, and the vehicle exit license plate is recorded as CarOutPlat; if the characters of CarInPlate and CarOutPlate are completely matched, the license plate information matching result CarInOutPlate is recorded as A; if there is one or two characters that do not match between CarInPlate and CarOutPlate, the license plate information matching result CarInOutPlate is recorded as B; in other cases, the license plate information matching result CarInOutPlate is recorded as C. Furthermore, if there is no vehicle entry / exit license plate result during the entry and exit process, or if there are more than two characters that do not match, the license plate information matching result CarInOutPlate is recorded as C; Among them, if the location information matching result CarInOutLoc=A or the vehicle feature matching result CarInOutFea=A or the license plate information matching result CarInOutPlate=A, then the group of vehicles entering and leaving the position are determined to be the same vehicle; if two or more of the values of the three variables CarInOutLoc, CarInOutFea and CarInOutPlate are B, the group of vehicles entering and leaving the position are also determined to be the same vehicle; in other cases, the corresponding vehicles entering and leaving the position are determined to be different vehicles; Wherein, the determining of the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video includes: The in-position monitoring video and the out-position monitoring video are input into the trained vehicle re-identification network to extract vehicle features to obtain in-position vehicle features and out-position vehicle features, and the vehicle feature matching result is determined according to the in-position vehicle features and the out-position vehicle features; wherein the four vertices of the front and rear of the vehicle chassis are recorded as A, B, C, and D; the angle between the side AB or CD of the vehicle and the vertical direction is calculated To represent the vehicle posture; set N Threshold, during the vehicle entry and exit process, the vehicle re-identification network is used to extract the vehicle features corresponding to the vehicle posture.
2. The method for identifying vehicles entering and exiting a parking space according to claim 1, characterized in that: The determining of the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video includes: Inputting the in-position monitoring video and the out-position monitoring video into the trained license plate recognition algorithm model to obtain the vehicle in-position license plate and the vehicle out-position license plate, and matching the vehicle in-position license plate with the vehicle out-position license plate to obtain a license plate information matching result; The entry position information and the exit position information of the target vehicle are determined according to the entry monitoring video and the exit monitoring video, and the position information matching result is determined according to the entry position information and the exit position information.
3. The method for identifying vehicles entering and exiting a parking space according to claim 2, characterized in that: The determining of the entry position information and the exit position information of the target vehicle according to the entry monitoring video and the exit monitoring video, and determining the position information matching result according to the entry position information and the exit position information, includes: Determine the in-position position information and the out-position position information of the target vehicle according to the in-position monitoring video and the out-position monitoring video, and determine the intersection-and-joint ratio of the in-position and out-position vehicle positions according to the in-position position information and the out-position position information; The position information matching result is determined according to the comparison result of the intersection-over-combination ratio of the vehicle positions and a preset position similarity threshold.
4. The method for identifying vehicles entering and exiting a parking space according to claim 1, characterized in that: The step of inputting the in-position monitoring video and the out-position monitoring video into the trained vehicle re-identification network to extract vehicle features to obtain in-position vehicle features and out-position vehicle features, and determining a vehicle feature matching result according to the in-position vehicle features and the out-position vehicle features, comprises: Determine a rectangular target detection frame corresponding to the target vehicle in the monitoring video according to the in-position monitoring video and the out-position monitoring video; Extracting a preset number of target vehicle images in the surveillance video according to the angle of the rectangular target detection frame and a preset angle threshold division rule; Input the target vehicle image into the trained vehicle re-identification network to extract vehicle features to obtain in-position vehicle features and out-position vehicle features, and calculate the in-position vehicle features and out-position vehicle features by cosine value to obtain the in-position vehicle features and out-position vehicle features similarity; The vehicle feature matching result is determined according to a comparison result between the vehicle feature similarity and a preset feature similarity threshold.
5. The method for identifying vehicles entering and exiting a parking space according to claim 4, characterized in that: Before determining the vehicle feature matching result according to the comparison result between the vehicle feature similarity and the preset feature similarity threshold, the method further includes: Determine an in-position grayscale value corresponding to the in-position monitoring video according to the in-position monitoring video, and determine an out-position grayscale value corresponding to the out-position monitoring video according to the out-position monitoring video; The preset feature similarity threshold is determined based on a difference between the in-place grayscale value and the out-of-place grayscale value.
6. A vehicle identification device for entering and exiting a parking space, characterized in that: include: A monitoring video acquisition module is used to acquire a monitoring video of a target vehicle entering a target parking space captured by a preset camera, and to acquire a monitoring video of a target vehicle leaving the target parking space captured by the preset camera; A matching result determination module is used to determine the license plate information matching result, vehicle feature matching result and position information matching result of the target vehicle entering and exiting the position according to the entry monitoring video and the exit monitoring video; The parking space entry and exit vehicle recognition module is used to judge whether the vehicle in the parking space entry monitoring video and the parking space exit monitoring video is the same vehicle based on the preset vehicle matching judgment rules and according to the license plate matching level corresponding to the license plate information matching result, the feature matching level corresponding to the vehicle feature matching result, and the position matching level corresponding to the position information matching result, so as to complete the recognition and matching of the parking space entry and exit vehicle; Among them, the location information matching result CarInOutLoc is: ; Wherein, Ithres0 and Ithres1 are preset position similarity thresholds, and Ithres0>Ithres1; Among them, the vehicle matching result CarInOutFea is: ; Wherein, Vthres0 and Vthres1 are preset feature similarity thresholds, and Vthres0>Vthres1; CarInOutSimilarity is vehicle feature similarity; The vehicle entry license plate is recorded as CarInPlate, and the vehicle exit license plate is recorded as CarOutPlat; if the characters of CarInPlate and CarOutPlate are completely matched, the license plate information matching result CarInOutPlate is recorded as A; if there is one or two characters that do not match between CarInPlate and CarOutPlate, the license plate information matching result CarInOutPlate is recorded as B; in other cases, the license plate information matching result CarInOutPlate is recorded as C. Furthermore, if there is no vehicle entry / exit license plate result during the entry and exit process, or if there are more than two characters that do not match, the license plate information matching result CarInOutPlate is recorded as C; Among them, if the location information matching result CarInOutLoc=A or the vehicle feature matching result CarInOutFea=A or the license plate information matching result CarInOutPlate=A, then the group of vehicles entering and leaving the position are determined to be the same vehicle; if two or more of the values of the three variables CarInOutLoc, CarInOutFea and CarInOutPlate are B, the group of vehicles entering and leaving the position are also determined to be the same vehicle; in other cases, the corresponding vehicles entering and leaving the position are determined to be different vehicles; Wherein, the matching result determination module includes: The vehicle feature matching unit is used to input the in-position monitoring video and the out-position monitoring video into the trained vehicle re-identification network to extract vehicle features to obtain in-position vehicle features and out-position vehicle features, and determine the vehicle feature matching result according to the in-position vehicle features and the out-position vehicle features; wherein the four vertices of the front and rear of the vehicle chassis are recorded as A, B, C, and D; the angle between the side AB or CD of the vehicle and the vertical direction is calculated To represent the vehicle posture; set N Threshold, during the vehicle entry and exit process, the vehicle re-identification network is used to extract the vehicle features corresponding to the vehicle posture.
7. An electronic device, characterized in that: include: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the method for identifying vehicles entering and exiting a parking space as described in any one of claims 1 to 5.
8. A computer-readable storage medium, characterized in that: Used to store computer programs; wherein, when the computer program is executed by a processor, the steps of the method for identifying vehicles entering and exiting a parking space as described in any one of claims 1 to 5 are implemented.
