Disclosure of Invention
In view of the above, the present invention provides a parking recognition method, a parking recognition device and an electronic device, so as to solve the problem of low vehicle detectable rate of the current management system.
In order to solve the technical problems, the invention adopts the following technical scheme:
a parking identification method, comprising:
obtaining a long-range view, a short-range view and a first vehicle identification result of a target vehicle, which are sent by a vehicle shooting and identification system; the long-range view comprises an image of a target vehicle, the short-range view comprises an image of a license plate number of the target vehicle, and the first vehicle identification result is obtained by shooting and detecting the vehicle by an identification system based on the long-range view and the short-range view by adopting a first target detection algorithm;
detecting by adopting a second target detection algorithm to obtain a second vehicle identification result of the target vehicle based on the distant view and the close view;
determining a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result.
Preferably, determining a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result includes:
and when the overlapping rate of the position data of the target vehicle in the first vehicle identification result and the position data of the target vehicle in the second vehicle identification result is smaller than a preset value, setting the final vehicle identification result as no vehicle.
Preferably, determining a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result includes:
and when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, taking the second vehicle identification result as the final vehicle identification result.
Preferably, when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, after taking the second vehicle identification result as the final vehicle identification result, the method further includes:
and sending the final vehicle identification result to a parking management system so that the parking management system generates a parking push message according to the final vehicle identification result and pushes the parking push message to user equipment.
Preferably, determining a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result includes:
when the first vehicle identification result comprises a result that the target vehicle has driven out of the parking space and the second vehicle identification result is a result that the target vehicle has not driven out of the parking space, acquiring a vehicle long-range view, a vehicle short-range view and a third vehicle identification result of the next vehicle for parking in the parking space, which are sent by the vehicle shooting and identification system;
based on the vehicle long-range view and the vehicle short-range view, detecting by adopting the second target detection algorithm to obtain a fourth vehicle identification result of the next vehicle;
and when the license plate number data of the next vehicle in the fourth vehicle identification result is the same as the license plate number data of the target vehicle in the first vehicle identification result, taking the second vehicle identification result as the final vehicle identification result.
A parking recognition device comprising:
the system comprises an acquisition module, a storage module and a display module, wherein the acquisition module is used for acquiring a long-range view, a short-range view and a first vehicle identification result of a target vehicle, which are sent by a vehicle shooting and identification system; the long-range view comprises an image of a target vehicle, the short-range view comprises an image of a license plate number of the target vehicle, and the first vehicle identification result is obtained by shooting and detecting the vehicle by an identification system based on the long-range view and the short-range view by adopting a first target detection algorithm;
the detection module is used for detecting and obtaining a second vehicle identification result of the target vehicle by adopting a second target detection algorithm based on the long-range view and the short-range view;
a result determination module to determine a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result.
Preferably, the result determination module comprises:
the first determining submodule is used for setting the final vehicle identification result as no vehicle when the overlapping rate of the position data of the target vehicle in the first vehicle identification result and the position data of the target vehicle in the second vehicle identification result is smaller than a preset value.
Preferably, the result determination module comprises:
and the second determining submodule is used for taking the second vehicle identification result as the final vehicle identification result when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result.
Preferably, the method further comprises the following steps:
and the pushing module is used for the second determining submodule to send the final vehicle identification result to the parking management system after the second vehicle identification result is taken as the final vehicle identification result when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, so that the parking management system generates a parking pushing message according to the final vehicle identification result and pushes the parking pushing message to the user equipment.
Preferably, the result determination module comprises:
the obtaining sub-module is used for obtaining a vehicle long-range view, a vehicle short-range view and a third vehicle recognition result of a next vehicle for parking in the parking space, which are sent by the vehicle shooting and recognition system, when the first vehicle recognition result comprises a result that the target vehicle has driven out of the parking space and the second vehicle recognition result is a result that the target vehicle has not driven out of the parking space;
the detection submodule is used for detecting and obtaining a fourth vehicle identification result of the next vehicle by adopting the second target detection algorithm based on the vehicle long-range view and the vehicle short-range view;
and the third determining submodule is used for taking the second vehicle identification result as the final vehicle identification result when the license plate number data of the next vehicle in the fourth vehicle identification result is the same as the license plate number data of the target vehicle in the first vehicle identification result.
An electronic device, comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to invoke a program, wherein the program is configured to:
obtaining a long-range view, a short-range view and a first vehicle identification result of a target vehicle, which are sent by a vehicle shooting and identification system; the long-range view comprises an image of a target vehicle, the short-range view comprises an image of a license plate number of the target vehicle, and the first vehicle identification result is obtained by shooting and detecting the vehicle by an identification system based on the long-range view and the short-range view by adopting a first target detection algorithm;
detecting by adopting a second target detection algorithm to obtain a second vehicle identification result of the target vehicle based on the distant view and the close view;
determining a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result.
Compared with the prior art, the invention has the following beneficial effects:
the invention provides a parking recognition method, a parking recognition device and electronic equipment, wherein when a final vehicle recognition result of a target vehicle is determined, a second vehicle recognition result of the target vehicle is obtained by adopting a second target detection algorithm based on a long-range view and a close-range view instead of a first vehicle recognition result detected by a vehicle shooting and recognition system through a first target detection algorithm, and two recognition results are obtained through different methods, so that the probability that other objects which are not vehicles are mistaken as vehicles can be reduced, and the detection rate of the vehicles can be improved.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
The invention provides a parking identification method, which can comprise the following steps with reference to fig. 1:
s11, obtaining a long-range view, a short-range view and a first vehicle identification result of the target vehicle, which are sent by the vehicle shooting and identification system;
the long-range view comprises an image of a target vehicle, the short-range view comprises an image of a license plate number of the target vehicle, and the first vehicle identification result is obtained by shooting and detecting the vehicle by an identification system based on the long-range view and the short-range view by adopting a first target detection algorithm.
Specifically, the long-range view and the short-range view of the target vehicle are captured by a camera in the vehicle capturing and recognizing system, and the camera may be a dome camera, a gun-type camera, or a gun-and-ball all-in-one machine.
The camera can shoot the target vehicle when the target vehicle just drives into a parking space on one side of the road, so that a long-range view is obtained. The perspective view may include a parking space where the target vehicle stops and at least one parking space adjacent to the parking space where the target vehicle stops.
After the camera shoots to obtain the distant view, a recognition device in the vehicle shooting and recognition system, such as a recognition host, can use a first target detection algorithm to detect and obtain position data of the target vehicle in the distant view, and the camera further captures license plate information of the vehicle based on the position data of the target vehicle in the distant view to obtain the near view. The first target detection algorithm is a detection algorithm constructed based on machine learning and deep learning principles.
And the recognition host adopts a first target recognition algorithm to recognize and obtain a license plate recognition result and the confidence coefficient of the license plate recognition result, a license plate position detection result and the confidence coefficient of the license plate position detection result according to the close shot image.
In addition, the recognition host can also obtain the position data of the target vehicle and the confidence degree of the position data according to the long-range view analysis. The identification host can also acquire serial number information of vehicle detection, equipment identity identification number (ID) information of the camera, parking lot information and parking space number information.
The recognition host collects the position data and the confidence coefficient of the position data of the target vehicle, the confidence coefficient of the license plate recognition result and the license plate recognition result, the confidence coefficient of the license plate position detection result, serial number information, equipment ID information of the camera, parking lot information and parking space number information to obtain a first vehicle recognition result.
Thereafter, the identification host stores the first vehicle identification result in a specific coding manner, and then sends the first vehicle identification result to an executor of the parking identification method in this embodiment, such as a secondary identification system.
The secondary identification system decodes the data by adopting a corresponding decoding method to obtain a first vehicle identification result.
The first target detection result is processed by encoding and decoding to prevent data from being acquired by a hacker or other lawless persons, and to compress data to reduce the data amount during data transmission.
S12, based on the distant view and the close view, detecting by adopting a second target detection algorithm to obtain a second vehicle identification result of the target vehicle;
wherein the second target detection algorithm may be a fast-cnn target detection algorithm. The second vehicle identification result comprises position data of the target vehicle, license plate number data of the target vehicle and license plate position data.
The position data of the target vehicle is obtained based on distant view detection, and the license plate number data and the license plate position data of the target vehicle are obtained based on near view detection.
S13, determining a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result.
In this embodiment, when determining the final vehicle identification result of the target vehicle, not only the first vehicle identification result detected by the first target detection algorithm through the vehicle shooting and identification system, but also the second vehicle identification result of the target vehicle detected by the second target detection algorithm based on the long-range view and the short-range view is obtained, and the two identification results are obtained through different methods, so that the probability that other objects which are not vehicles are mistaken for the vehicle can be reduced, that is, the detection rate of the vehicle can be improved.
Optionally, on the basis of the above embodiment, the first vehicle identification result and the second vehicle identification result may be divided into three cases, and the three cases are described in turn.
In the first case, step S13 may include:
and when the overlapping rate of the position data of the target vehicle in the first vehicle identification result and the position data of the target vehicle in the second vehicle identification result is smaller than a preset value, setting the final vehicle identification result as no vehicle.
Specifically, the first vehicle identification result may display position data of the target vehicle, and the position data may also be referred to as position data of a detection frame indicating a position of the vehicle. And meanwhile, the position data of the target vehicle can be displayed in the second vehicle identification result, when the overlapping area of the two position data is smaller than a preset value, namely the overlapping area is smaller, the position of the vehicle in the first vehicle identification result is indicated, and the vehicle is not detected at the corresponding position in the second vehicle identification result, so that the situation belongs to a false alarm, the position of the vehicle in the first vehicle identification result is not the vehicle, and at the moment, the final vehicle identification result is set to be no vehicle.
Further, the validity of the first vehicle identification result and the validity of the second vehicle identification result are set to be invalid.
In the second case, step S13 may include:
and when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, taking the second vehicle identification result as the final vehicle identification result.
Specifically, when the license plate number data detected by the two vehicle identification results are different, the second vehicle identification result is preferentially adopted as the final vehicle identification result. The reason is that the detection accuracy and the detection accuracy of the secondary recognition system are higher than those of the vehicle photographing and recognition system.
Optionally, on the basis of this embodiment, when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, taking the second vehicle identification result as the final vehicle identification result may include:
and sending the final vehicle identification result to a parking management system so that the parking management system generates a parking push message according to the final vehicle identification result and pushes the parking push message to user equipment.
Specifically, the parking management system receives the final vehicle identification result and generates a parking push message according to the final vehicle identification result, wherein the parking push message comprises parking time, parking space, and a close view and a far view of parking.
And pushing the parking push message to user equipment, wherein the user equipment can be a mobile phone, a tablet, a notebook and the like.
In a third case, referring to fig. 2, step S13 may include:
s21, when the first vehicle identification result comprises a result that the target vehicle has driven out of the parking space and the second vehicle identification result is a result that the target vehicle has not driven out of the parking space, acquiring a vehicle long-range view, a vehicle short-range view and a third vehicle identification result of the next vehicle for parking in the parking space, which are sent by the vehicle shooting and identification system;
specifically, when the first vehicle identification result includes a result that the target vehicle has driven out of the parking space, the target vehicle is indicated to have driven out of the parking space when the target vehicle does not exist in the perspective view.
When the perspective view is detected in the secondary recognition system, the target vehicle is found to be still in the parking space in the perspective view, which indicates that the target vehicle is not driven out of the parking space.
In this way, when the first recognition result and the second recognition result are different and it cannot be determined whether the target vehicle is driving out of the parking space, the vehicle long-range view, the vehicle short-range view, and the third vehicle recognition result of the next vehicle for parking in the parking space, which are transmitted by the vehicle photographing and recognition system, should be used. It should be noted that the next vehicle may or may not be the target vehicle.
Specifically, the vehicle shooting and recognition system collects a distant view and a close view of the target vehicle in real time, and obtains a vehicle recognition result according to the distant view and the close view. In this embodiment, it is only necessary to obtain the vehicle long-range view, the vehicle short-range view, and the third vehicle identification result of the next vehicle in the parking space, which are sent by the vehicle shooting and identification system.
S22, based on the vehicle long-range view and the vehicle short-range view, adopting the second target detection algorithm to detect and obtain a fourth vehicle identification result of the next vehicle;
specifically, the process of obtaining the fourth vehicle identification result of the next vehicle by using the second target detection algorithm is the same as the process of obtaining the second vehicle identification result of the target vehicle by using the second target detection algorithm, please refer to the corresponding description in the above embodiment.
And S23, when the license plate number data of the next vehicle in the fourth vehicle identification result is the same as the license plate number data of the target vehicle in the first vehicle identification result, taking the second vehicle identification result as the final vehicle identification result.
Specifically, when the license plate number data of the next vehicle in the fourth vehicle identification result is the same as the license plate number data of the target vehicle in the first vehicle identification result, it indicates that the target vehicle is not driven out of the parking space, and at this time, it indicates that the parking event of the target vehicle is split into a plurality of parking events, and the first vehicle identification result and the fourth vehicle identification result are invalid data, and it is necessary to set validity of the first vehicle identification result and validity of the fourth vehicle identification result to be invalid. The second vehicle identification result is not sent to the parking management system, and the parking management system does not push a message to the user.
In the embodiment, the possibility that one parking event is divided into a plurality of parking data can be greatly reduced by carrying out secondary identification and judgment on the pictures of the same parking space twice; and the final license plate recognition result is subjected to secondary verification, so that the wrong license plate recognition result can be prevented from being pushed to a user, information fed back to the user and the parking management system is more accurate and reliable, the stability of the system is enhanced, in addition, the system also provides more accurate information management real-time data for the traffic management department, the unified management of parking charging standards by the government and financial department becomes possible, the system is beneficial to the nation and the people, and the human beings can enter the automatic traffic management era more quickly.
Optionally, on the basis of the above embodiment of the parking recognition method, another embodiment of the present invention provides a parking recognition apparatus, referring to fig. 3, which may include:
the system comprises anacquisition module 101, a first vehicle identification module and a second vehicle identification module, wherein the acquisition module is used for acquiring a long-range view, a short-range view and a first vehicle identification result of a target vehicle, which are sent by a vehicle shooting and identification system; the long-range view comprises an image of a target vehicle, the short-range view comprises an image of a license plate number of the target vehicle, and the first vehicle identification result is obtained by shooting and detecting the vehicle by an identification system based on the long-range view and the short-range view by adopting a first target detection algorithm;
thedetection module 102 is configured to detect, based on the distant view and the close view, a second vehicle identification result of the target vehicle by using a second target detection algorithm;
aresult determination module 103, configured to determine a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result.
In this embodiment, when determining the final vehicle identification result of the target vehicle, not only the first vehicle identification result detected by the first target detection algorithm through the vehicle shooting and identification system, but also the second vehicle identification result of the target vehicle detected by the second target detection algorithm based on the long-range view and the short-range view is obtained, and the two identification results are obtained through different methods, so that the probability that other objects which are not vehicles are mistaken for the vehicle can be reduced, that is, the detection rate of the vehicle can be improved.
It should be noted that, for the working process of each module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the above embodiment of the parking recognition apparatus, the result determination module includes:
the first determining submodule is used for setting the final vehicle identification result as no vehicle when the overlapping rate of the position data of the target vehicle in the first vehicle identification result and the position data of the target vehicle in the second vehicle identification result is smaller than a preset value.
Further, the result determination module includes:
and the second determining submodule is used for taking the second vehicle identification result as the final vehicle identification result when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result.
Further, still include:
and the pushing module is used for the second determining submodule to send the final vehicle identification result to the parking management system after the second vehicle identification result is taken as the final vehicle identification result when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, so that the parking management system generates a parking pushing message according to the final vehicle identification result and pushes the parking pushing message to the user equipment.
Further, the result determination module includes:
the obtaining sub-module is used for obtaining a vehicle long-range view, a vehicle short-range view and a third vehicle recognition result of a next vehicle for parking in the parking space, which are sent by the vehicle shooting and recognition system, when the first vehicle recognition result comprises a result that the target vehicle has driven out of the parking space and the second vehicle recognition result is a result that the target vehicle has not driven out of the parking space;
the detection submodule is used for detecting and obtaining a fourth vehicle identification result of the next vehicle by adopting the second target detection algorithm based on the vehicle long-range view and the vehicle short-range view;
and the third determining submodule is used for taking the second vehicle identification result as the final vehicle identification result when the license plate number data of the next vehicle in the fourth vehicle identification result is the same as the license plate number data of the target vehicle in the first vehicle identification result.
In the embodiment, the possibility that one parking event is divided into a plurality of parking data can be greatly reduced by carrying out secondary identification and judgment on the pictures of the same parking space twice; and the final license plate recognition result is subjected to secondary verification, so that the wrong license plate recognition result can be prevented from being pushed to a user, information fed back to the user and the parking management system is more accurate and reliable, the stability of the system is enhanced, in addition, the system also provides more accurate information management real-time data for the traffic management department, the unified management of parking charging standards by the government and financial department becomes possible, the system is beneficial to the nation and the people, and the human beings can enter the automatic traffic management era more quickly.
It should be noted that, for the working processes of each module and sub-module in this embodiment, please refer to the corresponding description in the above embodiments, which is not described herein again.
Optionally, on the basis of the embodiments of the parking recognition method and apparatus, another embodiment of the present invention provides an electronic device, which is characterized by comprising: a memory and a processor;
wherein the memory is used for storing programs;
the processor is configured to invoke a program, wherein the program is configured to:
obtaining a long-range view, a short-range view and a first vehicle identification result of a target vehicle, which are sent by a vehicle shooting and identification system; the long-range view comprises an image of a target vehicle, the short-range view comprises an image of a license plate number of the target vehicle, and the first vehicle identification result is obtained by shooting and detecting the vehicle by an identification system based on the long-range view and the short-range view by adopting a first target detection algorithm;
detecting by adopting a second target detection algorithm to obtain a second vehicle identification result of the target vehicle based on the distant view and the close view;
determining a final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result.
Further, the processor is configured to, when determining the final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result, specifically:
and when the overlapping rate of the position data of the target vehicle in the first vehicle identification result and the position data of the target vehicle in the second vehicle identification result is smaller than a preset value, setting the final vehicle identification result as no vehicle.
Further, the processor is configured to, when determining the final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result, specifically:
and when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, taking the second vehicle identification result as the final vehicle identification result.
Further, the processor is configured to, when the license plate number data of the target vehicle in the first vehicle identification result is different from the license plate number data of the target vehicle in the second vehicle identification result, after taking the second vehicle identification result as the final vehicle identification result, further:
and sending the final vehicle identification result to a parking management system so that the parking management system generates a parking push message according to the final vehicle identification result and pushes the parking push message to user equipment.
Further, the processor is configured to, when determining the final vehicle identification result of the target vehicle based on the first vehicle identification result and the second vehicle identification result, specifically:
when the first vehicle identification result comprises a result that the target vehicle has driven out of the parking space and the second vehicle identification result is a result that the target vehicle has not driven out of the parking space, acquiring a vehicle long-range view, a vehicle short-range view and a third vehicle identification result of the next vehicle for parking in the parking space, which are sent by the vehicle shooting and identification system;
based on the vehicle long-range view and the vehicle short-range view, detecting by adopting the second target detection algorithm to obtain a fourth vehicle identification result of the next vehicle;
and when the license plate number data of the next vehicle in the fourth vehicle identification result is the same as the license plate number data of the target vehicle in the first vehicle identification result, taking the second vehicle identification result as the final vehicle identification result.
In this embodiment, when determining the final vehicle identification result of the target vehicle, not only the first vehicle identification result detected by the first target detection algorithm through the vehicle shooting and identification system, but also the second vehicle identification result of the target vehicle detected by the second target detection algorithm based on the long-range view and the short-range view is obtained, and the two identification results are obtained through different methods, so that the probability that other objects which are not vehicles are mistaken for the vehicle can be reduced, that is, the detection rate of the vehicle can be improved.
The previous description of the disclosed embodiments is provided to enable any person skilled in the art to make or use the present invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the generic principles defined herein may be applied to other embodiments without departing from the spirit or scope of the invention. Thus, the present invention is not intended to be limited to the embodiments shown herein but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.