Method and device for counting remaining parking spaces in parking lot
By real-time identification of the driving direction and characteristics in the parking lot vehicle photos, and combining whether the vehicle is a motor vehicle, the problem of low accuracy in the counting of remaining parking spaces in the parking lot in the prior art is solved, and more accurate parking spaces are achieved.
Patent Information
- Application Number
- CN202411160762.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-22
- Publication Date
- 2025-01-14
AI Technical Summary
The existing parking lot counting method has the problem of low accuracy, especially when the parking lot running time increases and the phenomenon of following the car, the counting results will drop significantly or even be displayed as 0.
By obtaining vehicle photos of parking lot entry and exit channels in real time, identifying the vehicle's driving direction and characteristics, and confirming the vehicle's entry and exit status based on whether the vehicle is a motor vehicle, and calculating the remaining number of parking spaces.
Improve the accuracy of the counting of remaining parking spaces in the parking lot, avoid counting errors caused by inaccurate parking of vehicles and vehicles, and ensure the authenticity of the counting results.
Smart Images

Figure CN119314240A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of parking, and in particular to a method and a device for counting remaining parking spaces in a parking lot. Background Art
[0002] At present, there are three ways to calculate the remaining number of parking spaces in a parking lot on the market:
[0003] 1. The vehicles are counted by the coils on the gate. When the vehicles pass through the gate coils, it is defaulted that when entering the parking lot, the remaining number of parking spaces = the total number of parking spaces - 1, and when leaving the parking lot, the remaining number of parking spaces = the total number of parking spaces + 1.
[0004] However, as the parking lot operation time increases, the accuracy of the remaining parking spaces decreases significantly.
[0005] 2. Count the number of vehicles in the parking lot, and calculate the real-time remaining number of parking spaces by dividing the total number of parking spaces by the total number of vehicles in the parking lot.
[0006] However, there are many cases of vehicles following the vehicle during the opening process, which results in the remaining number of parking spaces being smaller than the actual number of remaining parking spaces. In addition, as the parking lot operation time increases and the number of vehicles following the vehicle increases, the accuracy of the remaining number of parking spaces decreases significantly, and may even be directly displayed as 0.
[0007] 3. Use the reverse car search video to identify whether there is a car in each parking space and calculate the number of remaining parking spaces. The number of remaining parking spaces = the total number of current real-time free parking spaces;
[0008] However, reverse vehicle search is costly, has a small applicable parking lot range, and is only suitable for pure underground parking lots; and there are situations where vehicles are not parked according to parking spaces, resulting in reduced accuracy.
[0009] That is, the existing methods for counting remaining parking spaces in parking lots all have the problem of low accuracy. Summary of the invention
[0010] In order to solve the above problems in the prior art, the present invention provides a method and device for counting remaining parking spaces in a parking lot, so as to improve the counting accuracy of the remaining parking spaces in the parking lot.
[0011] In order to achieve the above object, the technical solution adopted by the present invention is:
[0012] In a first aspect, the present invention provides a method for counting remaining parking spaces in a parking lot, comprising the steps of:
[0013] S1. Obtain photos of vehicles entering and exiting the parking lot in real time;
[0014] S2. Identifying the driving direction and features of the vehicle through the vehicle photo;
[0015] S3. Confirming the entry and exit of the vehicle according to the driving direction of the vehicle and the characteristics of the vehicle to count the remaining parking spaces.
[0016] The beneficial effect of the present invention is that: the present embodiment confirms the actual entry and exit of the vehicle through the two elements of the vehicle's driving direction and the vehicle's characteristics, so as to accurately count the number of remaining parking spaces.
[0017] Optionally, step S2 includes:
[0018] Determine whether the vehicle in the vehicle photo is in motion. If so, determine the vehicle's driving direction by the moving direction of the vehicle detection frame. Otherwise, determine whether the vehicle is facing the camera by the vehicle orientation classification model, thereby determining the vehicle's driving direction.
[0019] A target detection model is used to identify vehicle attributes in the vehicle photo, where the vehicle attributes include motor vehicles and non-motor vehicles.
[0020] Optionally, step S3 includes:
[0021] When the vehicle is traveling in the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles entering the parking lot is increased by one to obtain the number of vehicles currently entering the parking lot;
[0022] When the vehicle is traveling in the direction of leaving the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles leaving the parking lot is increased by one to obtain the number of vehicles currently leaving the parking lot;
[0023] The remaining parking spaces are counted according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot.
[0024] According to the above description, different identification methods are selected by judging the vehicle status to ensure the accuracy of the vehicle's driving direction identification, and by identifying whether the vehicle is a motor vehicle, the remaining parking spaces are accurately counted by combining the two factors of the vehicle's driving direction and whether the vehicle is a motor vehicle.
[0025] Optionally, counting the remaining parking spaces according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot includes:
[0026] The number of vehicles currently entering the parking lot is subtracted from the total number of parking spaces in the parking lot, and then the number of vehicles currently leaving the parking lot is added to obtain the number of remaining parking spaces.
[0027] In a second aspect, the present invention provides a device for counting remaining parking spaces in a parking lot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the following steps when executing the computer program:
[0028] S1. Obtain photos of vehicles entering and exiting the parking lot in real time;
[0029] S2. Identifying the driving direction and features of the vehicle through the vehicle photo;
[0030] S3. Confirming the entry and exit of the vehicle according to the driving direction of the vehicle and the characteristics of the vehicle to count the remaining parking spaces.
[0031] Optionally, step S2 includes:
[0032] Determine whether the vehicle in the vehicle photo is in motion. If so, determine the vehicle's driving direction by the moving direction of the vehicle detection frame. Otherwise, determine whether the vehicle is facing the camera by the vehicle orientation classification model, thereby determining the vehicle's driving direction.
[0033] A target detection model is used to identify vehicle attributes in the vehicle photo, where the vehicle attributes include motor vehicles and non-motor vehicles.
[0034] Optionally, step S3 includes:
[0035] When the vehicle is traveling in the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles entering the parking lot is increased by one to obtain the number of vehicles currently entering the parking lot;
[0036] When the vehicle is traveling in the direction of leaving the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles leaving the parking lot is increased by one to obtain the number of vehicles currently leaving the parking lot;
[0037] The remaining parking spaces are counted according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot.
[0038] Optionally, counting the remaining parking spaces according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot includes:
[0039] The number of vehicles currently entering the parking lot is subtracted from the total number of parking spaces in the parking lot, and then the number of vehicles currently leaving the parking lot is added to obtain the number of remaining parking spaces.
[0040] Among them, the technical effect corresponding to the device for counting remaining parking spaces in a parking lot provided by the second aspect refers to the relevant description of the method for counting remaining parking spaces in a parking lot provided by the first aspect. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] Figure 1 A schematic diagram of the main flow of a method for counting remaining parking spaces in a parking lot according to an embodiment of the present invention;
[0042] Figure 2 The present invention is a schematic diagram of the framework of a device for counting remaining parking spaces in a parking lot according to an embodiment of the present invention.
[0043] Description of reference numerals:
[0044] 1. A device for counting remaining parking spaces in a parking lot;
[0045] 2. Processor;
[0046] 3. Memory. DETAILED DESCRIPTION
[0047] In order to better understand the above technical solution, exemplary embodiments of the present invention will be described in more detail below with reference to the accompanying drawings. Although exemplary embodiments of the present invention are shown in the accompanying drawings, it should be understood that the present invention can be implemented in various forms and should not be limited by the embodiments described herein. On the contrary, these embodiments are provided to enable a clearer and more thorough understanding of the present invention and to fully convey the scope of the present invention to those skilled in the art.
[0048] Embodiment 1
[0049] This embodiment is suitable for application scenarios where parking is required. In particular, services such as car reservation and staggered parking that require accurate number of remaining parking spaces in the parking lot are carried out. Existing methods for counting remaining parking spaces in parking lots are inaccurate. This embodiment counts the remaining parking spaces based on the direction of the vehicle and the determination that the vehicle is a motor vehicle, thereby improving the accuracy of counting the remaining parking spaces in the parking lot. See the following description for details.
[0050] Please refer to Figure 1 A method for counting remaining parking spaces in a parking lot comprises the steps of:
[0051] S1. Obtain photos of vehicles entering and exiting the parking lot in real time;
[0052] In this embodiment, the AI camera located at the entrance and exit of the parking lot identifies the traffic conditions of vehicles in the passage in real time and takes photos to obtain vehicle photos.
[0053] S2, identifying the driving direction and vehicle features of the vehicle through the vehicle photo;
[0054] In this embodiment, step S2 includes:
[0055] S21, determining whether the vehicle in the vehicle photo is in motion, if so, determining the vehicle's driving direction by the moving direction of the vehicle detection frame, otherwise determining whether the vehicle is facing the camera by the vehicle orientation classification model, and thus determining the vehicle's driving direction;
[0056] Among them, by identifying the vehicle in the vehicle photo, a vehicle detection frame is obtained, and the vehicle's driving direction is known according to the moving direction of the vehicle detection frame in different time frames.
[0057] However, if the vehicle stops in the lane to pay the fee, the vehicle is stationary at this time. Therefore, the existing pre-trained vehicle orientation classification model is used to identify whether the vehicle is facing the camera at this time, the front or the rear of the vehicle, so as to determine the vehicle direction. This is because the entrances and exits of many existing parking lots are located at roadside parking spaces or beside municipal roads. There are cases where some vehicles are located in the lane when reversing, which causes the parking lot camera to misidentify and determine the actual entry and exit of the vehicle.
[0058] S22. Use the target detection model to identify vehicle attributes in the vehicle photo, where the vehicle attributes include motor vehicles and non-motor vehicles.
[0059] Among them, the existing pre-trained target detection model is used to identify whether the vehicle in the vehicle photo is a motor vehicle or a non-motor vehicle.
[0060] S3. Confirm the entry and exit of vehicles according to the driving direction and characteristics of the vehicles to count the remaining parking spaces.
[0061] In this embodiment, step S3 includes:
[0062] S31. When the vehicle is traveling in the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles entering the parking lot is increased by one to obtain the number of vehicles currently entering the parking lot;
[0063] S32, when the vehicle is traveling in the direction of leaving the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles leaving the parking lot is increased by one to obtain the number of vehicles currently leaving the parking lot;
[0064] That is, in step S31 and step S32, only vehicles with the vehicle attribute of motor vehicles are counted for entry and exit, thereby avoiding the problem of inaccurate parking space technology caused by non-motor vehicles.
[0065] S33. Count the remaining parking spaces according to the number of vehicles currently entering the parking lot and the number of vehicles currently leaving the parking lot.
[0066] Wherein, step S3 comprises:
[0067] Subtract the number of vehicles currently entering the parking lot from the total number of parking spaces in the parking lot, then add the number of vehicles currently leaving the parking lot to get the number of remaining parking spaces.
[0068] Therefore, this embodiment selects different identification methods by judging the vehicle status to ensure the accuracy of identifying the vehicle's driving direction, and by identifying whether the vehicle is a motor vehicle, the remaining parking spaces are accurately counted by combining the two factors of the vehicle's driving direction and whether the vehicle is a motor vehicle.
[0069] Embodiment 2
[0070] Please refer to Figure 2A device 1 for counting remaining parking spaces in a parking lot includes a memory 3, a processor 2, and a computer program stored in the memory 3 and executable on the processor 2. When the processor 2 executes the computer program, the steps in the above-mentioned embodiment 1 are implemented.
[0071] Since the system / device described in the above embodiments of the present invention is a system / device used to implement the method of the above embodiments of the present invention, a person skilled in the art can understand the specific structure and deformation of the system / device based on the method described in the above embodiments of the present invention, and thus will not be described in detail here. All systems / devices used in the method of the above embodiments of the present invention belong to the scope of protection of the present invention.
[0072] It will be appreciated by those skilled in the art that embodiments of the present invention may be provided as methods, devices or computer program products. Therefore, the present invention may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0073] The present invention is described with reference to the flowcharts and / or block diagrams of the methods, devices (apparatus) and computer program products according to the embodiments of the present invention. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions.
[0074] It should be noted that in the claims, any reference numerals placed between brackets shall not be construed as limiting the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "a" or "an" preceding a component does not exclude the presence of a plurality of such components. The invention may be implemented by means of hardware comprising several different components and by means of a suitably programmed computer. In the claims enumerating several means, several of these means may be embodied by the same hardware. The use of the words first, second, third, etc., is for convenience of expression only and does not indicate any order. These words may be understood as part of the component name.
[0075] In addition, it should be noted that, in the description of this specification, the description of the terms "one embodiment", "some embodiments", "embodiment", "example", "specific example" or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or more embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, unless they are contradictory.
[0076] Although the preferred embodiments of the present invention have been described, those skilled in the art may make other changes and modifications to these embodiments after knowing the basic creative concept. Therefore, the claims should be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present invention.
[0077] Obviously, those skilled in the art can make various modifications and variations to the present invention without departing from the spirit and scope of the present invention. Thus, if these modifications and variations of the present invention fall within the scope of the claims of the present invention and their equivalents, the present invention should also include these modifications and variations.
Claims
1. A method for counting remaining parking spaces in a parking lot, characterized in that: Includes steps: S1. Obtain photos of vehicles entering and exiting the parking lot in real time; S2. Identifying the driving direction and features of the vehicle through the vehicle photo; S3. Confirming the entry and exit of the vehicle according to the driving direction of the vehicle and the characteristics of the vehicle to count the remaining parking spaces.
2. A method for counting remaining parking spaces in a parking lot according to claim 1, characterized in that: The step S2 comprises: Determine whether the vehicle in the vehicle photo is in motion. If so, determine the vehicle's driving direction by the moving direction of the vehicle detection frame. Otherwise, determine whether the vehicle is facing the camera by the vehicle orientation classification model, thereby determining the vehicle's driving direction. A target detection model is used to identify vehicle attributes in the vehicle photo, where the vehicle attributes include motor vehicles and non-motor vehicles.
3. A method for counting remaining parking spaces in a parking lot according to claim 2, characterized in that: The step S3 comprises: When the vehicle is traveling in the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles entering the parking lot is increased by one to obtain the number of vehicles currently entering the parking lot; When the vehicle is traveling in the direction of leaving the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles leaving the parking lot is increased by one to obtain the number of vehicles currently leaving the parking lot; The remaining parking spaces are counted according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot.
4. A method for counting remaining parking spaces in a parking lot according to claim 3, characterized in that: The counting of remaining parking spaces according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot comprises: The number of vehicles currently entering the parking lot is subtracted from the total number of parking spaces in the parking lot, and then the number of vehicles currently leaving the parking lot is added to obtain the number of remaining parking spaces.
5. A device for counting remaining parking spaces in a parking lot, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the following steps are implemented: S1. Obtain photos of vehicles entering and exiting the parking lot in real time; S2. Identifying the driving direction and features of the vehicle through the vehicle photo; S3. Confirming the entry and exit of the vehicle according to the driving direction of the vehicle and the characteristics of the vehicle to count the remaining parking spaces.
6. The device for counting remaining parking spaces in a parking lot according to claim 5, characterized in that: The step S2 comprises: Determine whether the vehicle in the vehicle photo is in motion. If so, determine the vehicle's driving direction by the moving direction of the vehicle detection frame. Otherwise, determine whether the vehicle is facing the camera by the vehicle orientation classification model, thereby determining the vehicle's driving direction. A target detection model is used to identify vehicle attributes in the vehicle photo, where the vehicle attributes include motor vehicles and non-motor vehicles.
7. A device for counting remaining parking spaces in a parking lot according to claim 6, characterized in that: The step S3 comprises: When the vehicle is traveling in the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles entering the parking lot is increased by one to obtain the number of vehicles currently entering the parking lot; When the vehicle is traveling in the direction of leaving the parking lot and the vehicle attribute is a motor vehicle, the number of vehicles leaving the parking lot is increased by one to obtain the number of vehicles currently leaving the parking lot; The remaining parking spaces are counted according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot.
8. The device for counting remaining parking spaces in a parking lot according to claim 7, characterized in that: The counting of remaining parking spaces according to the current number of vehicles entering the parking lot and the current number of vehicles leaving the parking lot comprises: The number of vehicles currently entering the parking lot is subtracted from the total number of parking spaces in the parking lot, and then the number of vehicles currently leaving the parking lot is added to obtain the number of remaining parking spaces.