Parking method, terminal and computer-readable storage medium
By targeting the video frames of roadside parking lots, the vehicle's parking intention is determined and identity information is identified, the problem of low intelligent roadside parking is solved, and intelligent parking management and efficient parking are realized.
Patent Information
- Application Number
- CN202111326910.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-11-10
- Publication Date
- 2025-03-28
- Estimated Expiration
- 2041-11-10
AI Technical Summary
In the prior art, the degree of intelligence of roadside parking is low, resulting in inconvenience in parking.
By obtaining video frames, object detection is performed to obtain characteristic data of the vehicle and parking space, determine the parking intention of the vehicle, and identify the vehicle's identity information.
It realizes accurate identification of vehicle parking intentions, reduces manual maintenance, improves parking efficiency, and alleviates parking difficulties.
Smart Images

Figure CN114220040B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of vehicle tracking and identification, and in particular to a parking method, a terminal and a computer-readable storage medium. Background Art
[0002] With the development of the economy, the number of cars in my country is growing, and parking difficulties are becoming an increasingly important issue in urban travel. The traditional roadside parking industry has the problem of being "small and scattered", with a low level of intelligence and requiring manual maintenance. At present, the occupancy identification of roadside parking spaces is generally recorded manually, which increases costs. Summary of the invention
[0003] The main technical problem solved by the present invention is to provide a parking method, a terminal and a computer-readable storage medium to solve the problems of low intelligentization and inconvenient parking on the roadside in the prior art.
[0004] To solve the above technical problems, the first technical solution adopted by the present invention is: to provide a parking method, the parking method comprising: acquiring a first video frame, the first video frame including a vehicle and a parking space; performing target detection on the first video frame to obtain vehicle feature data and parking space feature data; determining the parking intention of the vehicle based on the vehicle feature data and the parking space feature data; and identifying the identity information of the vehicle in response to the vehicle having the parking intention.
[0005] Among them, performing target detection on the first video frame to obtain vehicle feature data and parking space feature data includes: performing target detection on the first video frame to obtain vehicle position information and parking space position information; determining a first feature data group of the vehicle based on the vehicle position information and the parking space position information in the first video frame; wherein the first feature data includes a longitudinal distance between the front of the vehicle and the border line of the parking space on the same side as the front of the vehicle, a longitudinal distance between the rear of the vehicle and the border line of the parking space on the same side as the rear of the vehicle, and a lateral distance between the vehicle and the border line parallel to the parking space; determining a second feature data group of the vehicle based on the vehicle position information in the first video frame and the vehicle position information in historical video frames before the first video frame; the second feature data group includes the longitudinal speed of the vehicle, the longitudinal acceleration of the vehicle, the lateral speed of the vehicle, and the lateral acceleration of the vehicle.
[0006] Wherein, determining the parking intention of the vehicle based on the vehicle characteristic data and the parking space characteristic data includes: determining whether the vehicle has the parking intention according to the first characteristic data group and the second characteristic data group through a parking intention recognition network.
[0007] Among them, the training process of the parking intention recognition network includes: obtaining a training sample set, the training sample set includes a training video stream composed of multiple continuous images containing vehicles and parking spaces, the images include the real parking intention of the labeled vehicles and the real data of influencing factors; constructing a Bayesian network according to the influencing factors; using the Bayesian network to learn the real data of the influencing factors containing the vehicle in the image, and estimating the predicted parking intention of the vehicle; iteratively training the Bayesian network according to the error between the predicted parking intention of the vehicle contained in the image and the real parking intention to obtain the parking intention recognition network.
[0008] Among them, the influencing factors include the longitudinal distance between the front of the vehicle and the border line on the same side of the parking space, the longitudinal distance between the rear of the vehicle and the border line on the same side of the parking space, the longitudinal speed of the vehicle, the longitudinal acceleration of the vehicle, the lateral distance between the vehicle and the border line parallel to the parking space, the lateral speed of the vehicle and the lateral acceleration of the vehicle.
[0009] Among them, the parking space characteristic data includes the number of vacant parking spaces and the location information of the vacant parking spaces. In response to the vehicle having the intention to park, the identity information of the vehicle is identified. It also includes: in response to the vehicle having the intention to park, the number of vacant parking spaces and the location information of the vacant parking spaces are sent to the vehicle; and the nearest vacant parking space is recommended to the vehicle.
[0010] Among them, in response to the vehicle's intention to park, the vehicle's identity information is identified, including: obtaining a second video frame, the second video frame is image information collected within a preset first time period after the first video frame; performing license plate detection on the second video frame to obtain a regional image of the vehicle containing the license plate; and identifying the regional image to obtain the license plate characters.
[0011] The step of performing license plate detection on the second video frame to obtain an image of a region of the vehicle containing the license plate includes: performing license plate detection on the second video frame through a Cascade CNN network to obtain an image of a region of the vehicle containing the license plate.
[0012] The process of recognizing the regional image to obtain the license plate characters includes: extracting the regional image, and performing feature extraction on the regional image to obtain a license plate feature map; and performing text recognition on the license plate feature map to obtain the license plate characters.
[0013] Among them, the regional image is recognized to obtain the license plate characters, and then the following includes: obtaining a third video frame, which is image information collected within a preset second time period after the second video frame; performing target detection on the third video frame to obtain a vehicle detection frame; judging whether the vehicle detection frame exceeds the preset parking space frame; if the vehicle detection frame exceeds the preset parking space frame, it is determined that the vehicle is parked illegally.
[0014] To solve the above technical problem, the second technical solution adopted by the present invention is: to provide a terminal, which includes a memory, a processor and a computer program stored in the memory and running on the processor, and the processor is used to execute program data to implement the steps in the above parking method.
[0015] In order to solve the above technical problems, the third technical solution adopted by the present invention is: providing a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps in the above parking method are implemented.
[0016] The beneficial effects of the present invention are as follows: different from the prior art, a parking method, terminal and computer-readable storage medium are provided, wherein the parking method comprises acquiring a first video frame, wherein the first video frame includes a vehicle and a parking space; performing target detection on the first video frame to obtain vehicle feature data and parking space feature data; determining the parking intention of the vehicle based on the vehicle feature data and the parking space feature data; and identifying the identity information of the vehicle in response to the vehicle having the parking intention. The present application performs target detection on the first video frame to obtain vehicle feature data and parking space feature data, accurately identifies the starting stage of vehicle parking based on the vehicle feature data and the parking space feature data, and determines the identity information of the vehicle when it is determined that the vehicle has the parking intention, so as to facilitate the subsequent automatic timing and billing of the vehicle, reduce manual maintenance, make user parking intelligent, improve parking efficiency, and alleviate the phenomenon of parking difficulties. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. 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 paying any creative work.
[0018] Figure 1 is a schematic flow chart of the parking method provided by the present invention;
[0019] Figure 2 is a flow chart of a specific embodiment of a parking method provided by the present invention;
[0020] Figure 3 yes Figure 2 A flowchart of a specific embodiment of step S201 in the parking method provided;
[0021] Figure 4 It is a parking intention recognition network provided by the present invention;
[0022] Figure 5 is a schematic diagram of the distribution of image acquisition devices provided by the present invention;
[0023] Figure 6 is a schematic diagram of a parking scene provided by the present invention;
[0024] Figure 7 It is a state diagram after the vehicle is parked;
[0025] Figure 8 is a schematic block diagram of a specific embodiment of the parking method provided by the present invention;
[0026] Fig. 9 is a schematic block diagram of an implementation manner of a terminal provided by the present invention;
[0027] Fig.10 It is a schematic block diagram of an embodiment of a computer-readable storage medium provided by the present invention. DETAILED DESCRIPTION
[0028] The scheme of the embodiment of the present application is described in detail below in conjunction with the drawings of the specification.
[0029] In the following description, for the purpose of explanation rather than limitation, specific details such as specific system structures, interfaces, and technologies are provided to facilitate a thorough understanding of the present application.
[0030] The term "and / or" in this article is only a description of the association relationship of the associated objects, indicating that there can be three relationships. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. In addition, the character " / " in this article generally indicates that the associated objects before and after are in an "or" relationship. In addition, "many" in this article means two or more than two.
[0031] In order to enable those skilled in the art to better understand the technical solution of the present invention, a parking method provided by the present invention is further described in detail below in conjunction with the accompanying drawings and specific implementation methods.
[0032] See also Figure 1 , Figure 1 is a flow chart of the parking method provided by the present invention. In this embodiment, a parking method is provided. Before and after parking, the vehicle involves at least three kinds of motion posture characteristics, specifically including a pre-parking preparation stage, a parking process stage, and a parking completion stage. The method is used to detect the parking intention of the vehicle. When it is detected that the vehicle is in the pre-parking preparation stage, it is determined that the vehicle has a parking intention. The parking method includes the following steps.
[0033] S11: Acquire the first video frame.
[0034] Specifically, a first video frame is acquired through an image acquisition device, and the first video frame includes a vehicle and a parking space.
[0035] S12: Performing target detection on the first video frame to obtain vehicle feature data and parking space feature data.
[0036] Specifically, target detection is performed on the first video frame to obtain vehicle position information and parking space position information; a first feature data group of the vehicle is determined based on the vehicle position information and the parking space position information in the first video frame; wherein the first feature data includes the longitudinal distance between the front of the vehicle and the border line on the same side of the parking space and the front of the vehicle, the longitudinal distance between the rear of the vehicle and the border line on the same side of the parking space and the rear of the vehicle, and the lateral distance between the vehicle and the border line parallel to the parking space and the vehicle; a second feature data group of the vehicle is determined based on the vehicle position information in the first video frame and the vehicle position information in historical video frames before the first video frame; the second feature data group includes the longitudinal speed of the vehicle, the longitudinal acceleration of the vehicle, the lateral speed of the vehicle and the lateral acceleration of the vehicle.
[0037] S13: Determine the parking intention of the vehicle based on the vehicle characteristic data and the parking space characteristic data.
[0038] Specifically, the parking intention recognition network determines whether the vehicle has the parking intention based on the first feature data set and the second feature data set.
[0039] S14: In response to the vehicle intending to park, identifying the vehicle's identity information.
[0040] Specifically, a second video frame is obtained, where the second video frame is image information collected within a preset first time period after the first video frame; a license plate detection is performed on the second video frame to obtain a regional image of the vehicle containing the license plate; and the regional image is recognized to obtain license plate characters.
[0041] The parking method provided in this embodiment includes acquiring a first video frame, the first video frame including a vehicle and a parking space; performing target detection on the first video frame to obtain vehicle feature data and parking space feature data; determining the parking intention of the vehicle based on the vehicle feature data and the parking space feature data; and identifying the identity information of the vehicle in response to the vehicle having the parking intention. The present application performs target detection on the first video frame to obtain vehicle feature data and parking space feature data, accurately identifies the starting stage of vehicle parking based on the vehicle feature data and the parking space feature data, and determines the identity information of the vehicle when it is determined that the vehicle has the parking intention, so as to facilitate the subsequent automatic timing and billing of the vehicle, reduce manual maintenance, make user parking intelligent, improve parking efficiency, and alleviate the phenomenon of parking difficulties.
[0042] See also Figure 2 , Figure 2: is a flow chart of a specific embodiment of a parking method provided by the present invention. In this embodiment, a parking method is provided. Before and after parking, the vehicle involves at least three kinds of motion posture characteristics, specifically including a pre-parking preparation stage, a parking process stage, and a parking completion stage. This method is used to detect the parking intention of the vehicle. When it is detected that the vehicle is in the pre-parking preparation stage, it is determined that the vehicle has a parking intention. The parking method in this embodiment includes the following steps.
[0043] S201: Train a parking intention recognition network.
[0044] Specifically, see Figure 3 , Figure 3 yes Figure 2 A flowchart of a specific embodiment of step S201 in the parking method is provided. The specific steps of training the parking intention recognition network are as follows.
[0045] S2011: Obtain a training sample set.
[0046] Specifically, the training sample set includes a training video stream composed of multiple continuous images containing vehicles and parking spaces. The training video stream may be a video data collected on the road, and the training video stream includes video data of the vehicle in the driving stage on the road, video data of the vehicle in the pre-parking preparation stage, video data of the vehicle in the parking stage, and video data of the vehicle in the parking completion stage. The video data is composed of multiple continuous video frames, and the real parking intention of the vehicle contained in the video frames is annotated, and the real data of the influencing factors of the vehicle are annotated. The influencing factors are the characteristic variables of the vehicle, and the parking state of the vehicle can be estimated based on the characteristic variables of the vehicle. The vehicle is in different states when the characteristic variables of the vehicle are different.
[0047] Among them, the influencing factors include the longitudinal distance between the front of the vehicle and the border line on the same side of the parking space, the longitudinal distance between the rear of the vehicle and the border line on the same side of the parking space, the longitudinal speed of the vehicle, the longitudinal acceleration of the vehicle, the lateral distance between the vehicle and the border line parallel to the parking space, the lateral speed of the vehicle and the lateral acceleration of the vehicle.
[0048] Specifically, by marking the real data of the influencing factors of the vehicle, that is, marking the real longitudinal distance between the front of the vehicle and the border line on the same side of the parking space, the real longitudinal distance between the rear of the vehicle and the border line on the same side of the parking space, the real longitudinal speed of the vehicle, the real longitudinal acceleration of the vehicle, the real lateral distance between the vehicle and the border line parallel to the parking space, the real lateral speed of the vehicle and the real lateral acceleration of the vehicle.
[0049] S2012: Constructing Bayesian networks based on influencing factors.
[0050] Specifically, seven characteristic parameters extracted from the characteristic variables in the parking process are used as nodes of the Bayesian network. Among them, the seven characteristic parameters include the longitudinal distance between the front of the vehicle and the border line on the same side of the parking space and the front of the vehicle, the longitudinal distance between the rear of the vehicle and the border line on the same side of the parking space and the rear of the vehicle, the longitudinal speed of the vehicle, the longitudinal acceleration of the vehicle, the lateral distance between the parking space and the border line parallel to the vehicle, the lateral speed of the vehicle and the lateral acceleration of the vehicle. The topological relationship diagram of the Bayesian network is initially constructed based on the seven characteristic parameters, that is, a directed acyclic graph is constructed. When the Bayesian network in this embodiment starts training, the connection between each node is random.
[0051] S2013: The predicted parking intention of the vehicle is estimated by learning the real data of the influencing factors of the vehicle in the image through Bayesian network.
[0052] Specifically, the Bayesian network continuously learns the real data of the influencing factors of the vehicle marked in the video frames in the training video stream to determine the predicted parking intention of the vehicle in the video frame. Based on the real data of the learned influencing factors, the predicted parking intention of the vehicle is evaluated. The connections between the nodes in the Bayesian network are continuously updated during the continuous learning process.
[0053] S2014: The parking intention recognition network is obtained by iteratively training the Bayesian network according to the error between the predicted parking intention and the actual parking intention of the vehicle contained in the image.
[0054] See also Figure 4 , Figure 4 It is the parking intention recognition network provided by the present invention. Specifically, the Bayesian network learns the real data of the vehicle in the video frame to reach the set learning times. Among them, the initial Bayesian network is recorded as X, and the next Bayesian network generated by improvement is recorded as X^. If the learning times are reached, the conditional probability distribution Q(X^|X) between the nodes of the Bayesian network is obtained by learning the real data of the influencing factors of the vehicle, and the reception probability A(X^|X) of the next Bayesian network generated by improvement is calculated according to Q(X^|X).
[0055] The calculation formula of the reception probability A(X^|X) is as follows.
[0056]
[0057] Where A(X^|X) represents the acceptance probability of the improved Bayesian network; Q(X^|X) represents the conditional probability distribution between nodes, p is the distribution probability, X^ is the next Bayesian network generated by the improvement, and X is the initial Bayesian network.
[0058] Compare the acceptance probability of the next Bayesian network with the acceptance probability of the previous Bayesian network. Based on the comparison results, determine whether to replace the previous Bayesian network with the next Bayesian network to complete the next round of search. Train the Bayesian network based on the scoring search method. Determine the qualified search strategy and scoring function to measure the quality of the parking intention recognition network, and then find a stable parking intention recognition network.
[0059] When it is determined that the next Bayesian network replaces the previous Bayesian network, the transition probability T(X^|X) corresponding to each node is:
[0060] T(X^|X)=Q(X^|X)A(X^|X) (Formula 2)
[0061] Where: T(X^|X) represents the transition probability corresponding to each node; A(X^|X) represents the acceptance probability of the improved Bayesian network; Q(X^|X) represents the conditional probability distribution between each node.
[0062] The conditional probability of each node is calculated based on the Bayesian formula. The parameter θ is used as a random variable, D is the collected roadside parking data set, P(θ) is the prior distribution of the parameter θ, and its maximum likelihood estimate is for:
[0063]
[0064] Where: i∈[1,n], n is the number of nodes in the network structure; j∈[1,q i ], q i For node X i The parent node π(X i )’s value combinations; k∈[1,r i ],r i For node X i The number of value states.
[0065] According to the above process, we first need to obtain the data of the seven key nodes of the vehicle, and then calculate the reception probability of the improved Bayesian network according to the conditional probability distribution Q(X^|X) between each node by continuously updating the iterative Bayesian network. Then, we compare the reception probability of the improved Bayesian network with that of the previous Bayesian network to determine whether to replace the improved Bayesian network with the previous Bayesian network. After the comparison is completed, we conduct the next round of search until convergence is achieved.
[0066] According to the above process, the parking intention recognition network is obtained. Among them, the parking intention recognition network is:
[0067] T = BN (G, θ, X) (Formula 4)
[0068] Among them, T is the parking intention recognition network, BN is the Bayesian network, G is the dependency relationship between the seven nodes, θ is the conditional probability of each node, and X is the eight nodes of the parking intention recognition network.
[0069] The parking intention recognition network learns the real data of the influencing factors of the vehicle in the video frame. When the probability that the predicted parking intention of the vehicle is the same as the real parking intention marked by the vehicle reaches a preset value, it is determined that a stable parking intention recognition network is obtained, that is, the training is completed.
[0070] S202: Acquire a first video frame.
[0071] See also Figure 5 , Figure 5 : is a schematic diagram of the distribution of the image acquisition device provided by the present invention. Specifically, the first video frame on the road is obtained by the image acquisition devices arranged on both sides of the road, and the first video frame includes a vehicle and a parking space. In a specific embodiment, the image acquisition device can be four cameras, two cameras are arranged on both sides of the road, and the two cameras are arranged on the same signal pole. Among them, one of the two cameras is a short-focus lens and the other is a long-focus lens. The short-focus lens is used to detect the parking space close to the camera, and the long-focus lens is used to detect the parking space far away from the camera. Among them, the parking space is adaptively divided. The road image is obtained from different perspectives by four cameras, and the first video frame is obtained by joint modeling. Even if an error occurs in a single camera, the correct image data can be obtained through the images collected by other cameras, thereby ensuring the accuracy and stability of the first video frame. The first video frame is detected, the dynamic intention of the vehicle contained in the first video frame is detected, and the pre-parking preparation stage of the vehicle is determined; after the vehicle is parked, it is necessary to detect whether the vehicle is parked in a standardized manner.
[0072] In one embodiment, in order to obtain a clearer and more accurate first video frame, the aperture size, brightness, contrast and other parameters of the image acquisition device will be adaptively adjusted according to changes in the scene environment in complex weather environments such as daytime, night, fog, and rainy days.
[0073] S203: Perform target detection on the first video frame to obtain vehicle position information and parking space position information.
[0074] Specifically, the target detection network is used to detect the vehicle and parking space contained in the first video frame, and the vehicle detection frame and the parking space detection frame are obtained, and then the vehicle position information and the parking space position information are obtained. By judging whether the parking space detection frame overlaps with the vehicle detection frame, if it is detected that the parking space detection frame overlaps with the vehicle detection frame, it is determined that the parking space in the parking space detection frame is occupied; if it is detected that the parking space detection frame does not overlap with the vehicle detection frame, it is determined that the parking space in the parking space detection frame is vacant, the number of vacant parking spaces is counted, and the position information of the vacant parking spaces is determined. In order to recommend a parking space for the vehicle when receiving the intention of the vehicle to park.
[0075] S204: Determine a first feature data set of the vehicle according to the vehicle position information and the parking space position information in the first video frame.
[0076] Specifically, the longitudinal distance Δd between the front of the vehicle and the border line on the same side of the parking space and the front of the vehicle is calculated by detecting the vehicle detection frame and the parking space detection frame. x1 , the longitudinal distance Δd between the rear of the vehicle and the border line on the same side of the parking space and the rear of the vehicle x2 The lateral distance Δd between the vehicle and the border line of the parking space parallel to the vehicle y The first characteristic data set includes Δd x1 , Δd x2 and Δd y .
[0077] S205: Determine a second feature data group of the vehicle based on the vehicle position information in the first video frame and the vehicle position information in historical video frames before the first video frame.
[0078] See also Figure 6 , Figure 6 Specifically, by detecting the position information of the vehicle in the first video frame, the position information of the vehicle detected in the previous video frame, and the time interval of the image acquisition device capturing images, the longitudinal speed v of the vehicle in the current frame is calculated. x , the longitudinal acceleration of the vehicle a x , the lateral speed of the vehicle v y and the lateral acceleration of the vehicle a y The second feature data set includes v x 、a x 、v y and a y .
[0079] S206: Determine whether the vehicle has the intention to park based on the first feature data set and the second feature data set through the parking intention recognition network.
[0080] Specifically, the first feature data and the second feature data are input into the parking intention recognition network, and the parking intention recognition network predicts the parking intention of the vehicle corresponding to the feature data, and then determines the parking intention of the vehicle.
[0081] S207: In response to the vehicle having an intention to park, recommending a parking space for the vehicle based on the parking space characteristic data.
[0082] Specifically, when the parking intention recognition network predicts that the vehicle has the intention to park, the number of current free parking spaces and the location information of the free parking spaces are sent to the vehicle, the nearest parking space is recommended for the vehicle, and the driving route is planned to achieve convenient parking of the vehicle.
[0083] The license plate of a vehicle is an important feature for identifying a vehicle. Normally, no two vehicles have the same license plate, so it is unique. The license plate is the vehicle's ID card, and the license plate of the vehicle needs to be registered to control the vehicle. Because parking spaces are closely arranged, the license plate may be obscured after the vehicle is parked, so it is necessary to identify and record it before parking is completed.
[0084] S208: Acquire a second video frame.
[0085] Specifically, the vehicle is continuously tracked by an image acquisition device, and a second video frame is acquired, and the license plate of the vehicle is detected by the second video frame, so as to realize intelligent management. The second video frame is acquired within a preset first time period after the acquired first video frame. The second video frame can be one or more.
[0086] S209: Perform license plate detection on the second video frame to obtain a license plate detection frame of the vehicle.
[0087] Specifically, in order to quickly and accurately detect the license plate of the vehicle, the license plate features can be extracted layer by layer through a convolutional neural network, and the search area can be gradually narrowed to achieve accurate positioning of the license plate. In a specific embodiment, the license plate is detected on the second video frame through CascadeCNN (Cascade Convolutional Neural Network) to obtain a license plate detection frame of the vehicle. The license plate detection frame includes an area image containing the license plate.
[0088] S210: Recognize the license plate detection frame to obtain the license plate characters.
[0089] Specifically, the regional image in the license plate detection frame is extracted, and the feature extraction of the regional image is performed to obtain the license plate feature map; the text recognition is performed on the license plate feature map to obtain the license plate characters. Then the vehicle license plate is detected, which facilitates the registration of the parked vehicle.
[0090] During the parking process, due to the driver's own skills or attention, the vehicle may exceed the parking space boundary line, occupy adjacent parking spaces, and other non-standard parking behaviors, affecting the overall efficiency of parking space use. It is necessary to further detect whether the vehicle is parked in a standardized manner, so as to improve the efficiency of parking space use.
[0091] S211: Acquire a third video frame.
[0092] Specifically, the third video frame is acquired by an image acquisition device, and the third video frame is image information acquired within a preset second time period after the second video frame. The third video frame may be one or more frames.
[0093] S212: Perform object detection on the third video frame to obtain a vehicle detection frame.
[0094] Specifically, the target detection network for performing target detection on the third video frame may be the same as or different from the target detection network for performing target detection on the first video frame.
[0095] S213: Determine whether the vehicle detection frame exceeds the preset parking space frame.
[0096] Specifically, the degree of overlap between the detected vehicle detection frame and the preset parking space frame adaptively segmented by the system is calculated, and it is determined whether the degree of overlap between the vehicle detection frame and the preset parking space frame is greater than a preset degree of overlap.
[0097] If the overlap between the vehicle detection frame and the preset parking space frame is greater than the preset overlap, directly jump to step S215; if the overlap between the vehicle detection frame and the preset parking space frame is not greater than the preset overlap, directly jump to step S214.
[0098] S214: Determine whether the vehicle is parked illegally.
[0099] Specifically, if the vehicle detection frame exceeds the preset parking space border, it is determined that the vehicle is parked illegally. In a specific embodiment, if the overlap between the vehicle detection frame and the preset parking space border is not greater than the preset overlap, it is determined that the vehicle exceeds a preset parking space border, and the owner needs to be notified to make corrections based on the associated license plate. Figure 7 , Figure 7 It is a state diagram after the vehicle is parked. When it is detected that the vehicle straddles two parking spaces, and the common edge of the two parking spaces is between the front wheels and the rear wheels, it is determined that the vehicle exceeds a preset parking space border, and the owner needs to be notified according to the associated license plate to make corrections.
[0100] S215: Determine that the vehicle is parked normally.
[0101] Specifically, if the vehicle detection frame does not exceed the preset parking space frame, it is determined that the vehicle is parked normally.
[0102] See also Figure 8 , Figure 8 : is a schematic block diagram of a specific embodiment of the parking method provided by the present invention. In a specific embodiment, an image acquisition device is installed, and the distance between the image acquisition device and the parking space is calibrated to obtain the area range of the parking space and the coordinate position of the parking space, wherein the image acquisition device includes a gun motion system. An image including a parking space and a vehicle is acquired by the image acquisition device, and the image is detected to obtain a parking space detection frame and a vehicle detection frame. The parking intention recognition network predicts the parking intention of the vehicle according to the spatiotemporal association model of the parking space detection frame and the vehicle detection frame combined with the posture feature structure and the motion intention. When it is determined that the vehicle has the intention to park, the license plate of the vehicle is recognized by CNN character recognition to determine the identity information of the vehicle with the intention to park. When it is determined that the vehicle has been parked, it is determined whether the vehicle is parked in a standardized manner. That is, whether the detection frame of the vehicle is within the range of a parking space that is adaptively divided. When it is detected that the detection frame of the vehicle is not within the area range of a parking space, the owner is queried through the license plate, and the owner is notified to correct the parking position of the vehicle. In other optional embodiments, when it is determined that the vehicle intends to park, the remaining parking space information is released to the vehicle, and a parking route is planned for the vehicle according to the owner's choice. In another optional embodiment, the vehicle is tracked through adaptive early warning triggering decisions to facilitate the detection of the vehicle's parking time and facilitate subsequent vehicles to pay for parking.
[0103] The present embodiment provides a parking method, which includes acquiring a first video frame, the first video frame including a vehicle and a parking space; performing target detection on the first video frame to obtain vehicle feature data and parking space feature data; determining the parking intention of the vehicle based on the vehicle feature data and the parking space feature data; and identifying the identity information of the vehicle in response to the vehicle having the parking intention. The present application performs target detection on the first video frame to obtain vehicle feature data and parking space feature data, accurately identifies the starting stage of vehicle parking based on the vehicle feature data and the parking space feature data, and determines the identity information of the vehicle when it is determined that the vehicle has the parking intention, so as to facilitate the subsequent automatic timing and billing of the vehicle, reduce manual maintenance, make user parking intelligent, improve parking efficiency, and alleviate the phenomenon of parking difficulties.
[0104] See also Fig. 9 , Fig. 9The terminal 70 in this embodiment includes: a processor 71, a memory 72, and a computer program stored in the memory 72 and executable on the processor 71. When the computer program is executed by the processor 71, the above parking method is implemented. To avoid repetition, it is not described one by one here.
[0105] See also Fig.10 , Fig.10 It is a schematic block diagram of an embodiment of a computer-readable storage medium provided by the present invention.
[0106] A computer-readable storage medium 90 is also provided in an embodiment of the present application. The computer-readable storage medium 90 stores a computer program 901. The computer program 901 includes program instructions. The processor executes the program instructions to implement the parking method provided in the embodiment of the present application.
[0107] The computer-readable storage medium 90 may be an internal storage unit of the computer device of the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium 90 may also be an external storage device of the computer device, such as a plug-in hard disk, a smart memory card (Smart Media Card, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), etc. equipped on the computer device.
[0108] The above are only implementation modes of the present invention, and are not intended to limit the patent protection scope of the present invention. Any equivalent structure or equivalent process transformation made using the contents of the present invention specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present invention.
Claims
1. A parking method, characterized in that: The parking method comprises: Acquire a first video frame, wherein the first video frame includes a vehicle and a parking space; Performing target detection on the first video frame to obtain vehicle feature data and parking space feature data; determining a parking intention of the vehicle based on the vehicle characteristic data and the parking space characteristic data; In response to the vehicle having an intention to park, identifying the identity information of the vehicle; The performing target detection on the first video frame to obtain vehicle feature data and parking space feature data includes: Performing target detection on the first video frame to obtain vehicle position information and parking space position information; Determine a first feature data group of the vehicle according to the vehicle position information and the parking space position information in the first video frame; wherein the first feature data includes a longitudinal distance between the front of the vehicle and the parking space and a border line on the same side of the front of the vehicle, a longitudinal distance between the rear of the vehicle and the parking space and a border line on the same side of the rear of the vehicle, and a lateral distance between the vehicle and a border line parallel to the parking space; Determine a second feature data set of the vehicle according to the vehicle position information in the first video frame and the vehicle position information in a historical video frame before the first video frame; the second feature data set includes the longitudinal speed of the vehicle, the longitudinal acceleration of the vehicle, the lateral speed of the vehicle and the lateral acceleration of the vehicle; The determining the parking intention of the vehicle based on the vehicle characteristic data and the parking space characteristic data comprises: Whether the vehicle has an intention to park is determined based on the first feature data set and the second feature data set.
2. The parking method according to claim 1, characterized in that: The determining the parking intention of the vehicle based on the vehicle characteristic data and the parking space characteristic data comprises: Whether the vehicle has the parking intention is determined based on the first feature data set and the second feature data set by a parking intention recognition network.
3. The parking method according to claim 2, characterized in that: The training process of the parking intention recognition network includes: Acquire a training sample set, the training sample set comprising a training video stream consisting of a plurality of continuous images containing the vehicle and the parking space, the images comprising real data annotating the real parking intention of the vehicle and influencing factors; Constructing a Bayesian network according to the influencing factors; Learning the real data of the influencing factors of the vehicle in the image through the Bayesian network to estimate the predicted parking intention of the vehicle; The parking intention recognition network is obtained by iteratively training the Bayesian network according to the error between the predicted parking intention and the actual parking intention of the vehicle contained in the image.
4. The parking method according to claim 3, characterized in that: The influencing factors include the longitudinal distance between the front of the vehicle and the border line on the same side of the parking space and the front of the vehicle, the longitudinal distance between the rear of the vehicle and the border line on the same side of the parking space and the rear of the vehicle, the longitudinal speed of the vehicle, the longitudinal acceleration of the vehicle, the lateral distance between the vehicle and the border line parallel to the parking space, the lateral speed of the vehicle and the lateral acceleration of the vehicle.
5. The parking method according to claim 1, characterized in that: The parking space characteristic data includes the number of vacant parking spaces and location information of the vacant parking spaces; In response to the vehicle having a parking intention, identifying the identity information of the vehicle further includes: In response to the vehicle having a parking intention, sending the number of the vacant parking spaces and the position information of the vacant parking spaces to the vehicle; The nearest vacant parking space is recommended for the vehicle.
6. The parking method according to claim 1, characterized in that: In response to the vehicle having the intention to park, identifying the identity information of the vehicle includes: Acquire a second video frame, where the second video frame is image information collected within a preset first time period after the first video frame; Performing license plate detection on the second video frame to obtain a region image of the vehicle containing the license plate; The area image is recognized to obtain license plate characters.
7. The parking method according to claim 6, characterized in that: The performing license plate detection on the second video frame to obtain a region image of the vehicle containing the license plate includes: The license plate detection is performed on the second video frame through the Cascade CNN network to obtain a regional image of the vehicle containing the license plate.
8. The parking method according to claim 7, characterized in that: The step of recognizing the area image to obtain the license plate characters includes: Extracting the regional image, and performing feature extraction on the regional image to obtain a license plate feature map; Perform text recognition on the license plate feature image to obtain license plate characters.
9. The parking method according to claim 6, characterized in that: The regional image is recognized to obtain the license plate characters, and then the following steps are included: Acquire a third video frame, where the third video frame is image information collected within a preset second time period after the second video frame; Performing target detection on the third video frame to obtain a vehicle detection frame; Determining whether the vehicle detection frame exceeds a preset parking space frame; If the vehicle detection frame exceeds the preset parking space border, it is determined that the vehicle is parked illegally.
10. A terminal, characterized in that: The terminal comprises a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor is configured to execute program data to implement the steps of the parking method according to any one of claims 1 to 9.
11. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the parking method according to any one of claims 1 to 9 are implemented.
Citation Information
Patent Citations
Parking support method and parking support device
CN108140312A
Roadside parking intelligent charging system and method based on license plate recognition and tracking technology
CN111311766A
On-road non-standard parking identification method based on video data
CN113378690A