Parking space occupancy identification method, device, computer equipment and storage medium

By acquiring the surveillance equipment images in real time, determining the parking space line and detection frame, and using neural network models to judge the parking space occupation status, the problem of low accuracy of parking space occupation recognition in the existing technology is solved, and automated and highly accurate parking space occupation recognition is achieved.

CN118628986BActive Publication Date: 2024-11-05ZHEJIANG DAHUA TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411104385.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-13
Publication Date
2024-11-05
Estimated Expiration
2044-08-13

AI Technical Summary

Technical Problem

The existing parking space occupation identification technology has false or missed detection, resulting in low recognition accuracy and lack of effective solutions.

Method used

By obtaining the parking area images taken by the monitoring equipment in real time, determining the detection frame and anchor points of the main parking space line and the target object, determining the coordinates of the main parking space in the preset recognition space based on the anchor points, and then determining the occupation status of the main parking space, using nerves Network models such as LaneATT and YOLOv5 are image-processed to improve accuracy.

Benefits of technology

It realizes automatic identification of parking space occupation, improves recognition accuracy, reduces false or missed inspections caused by manual intervention, and improves the accuracy of parking space occupation identification.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118628986B_ABST
    Figure CN118628986B_ABST
Patent Text Reader

Abstract

The present application relates to a parking space occupancy identification method, device, computer equipment and storage medium, wherein the method includes: obtaining a monitoring image of a parking area captured by a monitoring device in real time; the monitoring device is fixedly arranged around the parking area; based on the monitoring image, determining the main parking space line and the first target detection frame of the target object in the parking area, and the anchor point corresponding to the main parking space; the main parking space is determined by the main parking space line and the anchor point; based on the anchor point, determining the main parking space coordinates corresponding to the main parking space in a preset identification space; in the identification space, determining the occupancy status of the main parking space according to the first target detection frame and the main parking space coordinates. Through the present application, the problem of false detection or missed detection in the related technology, which leads to low accuracy of parking space occupancy identification, is solved, automatic identification of parking space occupancy is achieved, and the identification accuracy is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of image processing technology, and in particular to a parking space occupancy recognition method, device, computer equipment and storage medium. Background Art

[0002] With the rapid development and application of computer vision algorithms, computer vision algorithms are widely used in parking space identification. The current parking space occupancy identification scheme is: based on computer vision algorithms to identify ground representations to extract parking space distribution images, record the image pixel values ​​of idle and occupied parking spaces to distinguish whether the parking space is occupied, and then combine manual methods to adjust the misjudgment situation and optimize the occupancy judgment logic. The disadvantage of this scheme is that it relies on the change of pixel values ​​in the parking area and manual adjustment at the same time, and there are false detections or missed detections, resulting in low parking space occupancy recognition accuracy.

[0003] There are false detections or missed detections in related technologies, resulting in low accuracy in parking space occupancy recognition, and no effective solution has been proposed so far. Summary of the invention

[0004] In this embodiment, a parking space occupancy recognition method, apparatus, computer equipment and storage medium are provided to solve the problem of false detection or missed detection in related technologies, resulting in low accuracy of parking space occupancy recognition.

[0005] In a first aspect, a parking space occupancy identification method is provided in this embodiment, comprising:

[0006] Acquire monitoring images of the parking area captured in real time by a monitoring device; the monitoring device is fixedly arranged around the parking area;

[0007] Based on the monitoring image, determining a main parking space line and a first target detection frame of a target object in the parking area, and an anchor point corresponding to the main parking space; the main parking space is determined by the main parking space line and the anchor point;

[0008] Based on the anchor point, determining the main parking space coordinates corresponding to the main parking space in a preset recognition space;

[0009] In the recognition space, the occupancy state of the main parking space is determined according to the first target detection frame and the coordinates of the main parking space.

[0010] In some of the embodiments, determining the main parking space line and the first target detection frame of the target object in the parking area, and the anchor point corresponding to the main parking space based on the monitoring image includes:

[0011] Recognize the monitoring image to obtain a vertical parking space line and a first target detection frame of a target object in the parking area;

[0012] Determine the main parking space line based on the coordinate position of the bottom in the monitoring image and the vertical parking space line;

[0013] Extending the main parking space line, and using the extended intersection point as the vanishing point of the main parking space;

[0014] Based on the vanishing point, an anchor point of the main parking space is determined.

[0015] In some of the embodiments, determining the anchor point of the main parking space based on the vanishing point includes:

[0016] Based on the angle formed by the main parking space line and the vanishing point, determining a connecting line passing through the vanishing point; the connecting line bisects the angle;

[0017] Draw a vertical line from the main parking space line to the connecting line, and use the intersection of the shortest and longest vertical lines with the main parking space line as the anchor point.

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

[0019] Recording the position information of the vanishing point;

[0020] Based on the position information, performing deviation detection on the vanishing point to obtain a detection result;

[0021] When the detection result is that the vanishing point is deviated, the occupation state of the main parking space corresponding to the vanishing point is re-identified.

[0022] In some embodiments, the monitoring image is recognized to obtain a vertical parking space line and a first target detection frame of a target object in the parking area, including:

[0023] Inputting the monitoring image into the well-trained LaneATT network model to obtain the vertical parking space lines in the parking area;

[0024] The monitoring image is input into a well-trained YOLOv5 network model to obtain a first target detection frame of the target object.

[0025] In some of the embodiments, determining the main parking space coordinates corresponding to the main parking space in a preset identification space based on the anchor point includes:

[0026] Determine a transformation matrix between the space where the monitoring image is located and a preset recognition space according to a preset anchor point position and the anchor point; the anchor point position is determined by the deformation shape of the main parking space in the recognition space;

[0027] Based on the transformation matrix, the main parking space is transformed into the identification space to obtain the corresponding coordinates of the main parking space.

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

[0029] After determining the occupancy status of the main parking space, determining whether there is a corresponding main parking space in the monitoring image;

[0030] If there is no corresponding main parking space in the monitoring image, re-perform parking space occupancy identification;

[0031] If there is a corresponding main parking space in the monitoring image, a second target detection frame of the target object is determined; and in the recognition space, the occupancy state of the main parking space is determined according to the transformation matrix and the second target detection frame.

[0032] In some of the embodiments, in the recognition space, determining the occupation state of the main parking space according to the first target detection frame and the main parking space coordinates includes:

[0033] According to the transformation matrix, the first target detection frame is transformed into the recognition space to obtain the coordinates of the first target detection frame;

[0034] In the recognition space, the coordinates of the first target detection frame are compared with the coordinates of the main parking space to determine the occupancy status of the main parking space.

[0035] In some of the embodiments, obtaining a monitoring image of a parking area captured in real time by a monitoring device includes:

[0036] Obtain surveillance video of the parking area captured by surveillance equipment in real time;

[0037] The monitoring video is processed to obtain a monitoring image.

[0038] In a second aspect, a parking space occupancy identification device is provided in this embodiment, including: an acquisition module, a first processing module, a second processing module and a first identification module;

[0039] The acquisition module is used to acquire the monitoring image of the parking area captured by the monitoring device in real time; the monitoring device is fixedly arranged around the parking area;

[0040] The first processing module is used to determine the main parking space line and the first target detection frame of the target object in the parking area, and the anchor point corresponding to the main parking space based on the monitoring image; the main parking space is determined by the main parking space line and the anchor point;

[0041] The second processing module is used to determine the main parking space coordinates corresponding to the main parking space in a preset identification space based on the anchor point;

[0042] The first recognition module is used to determine the occupancy status of the main parking space according to the first target detection frame and the main parking space coordinates in the recognition space.

[0043] In a third aspect, a computer device is provided in this embodiment, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the parking space occupancy identification method described in the first aspect when executing the computer program.

[0044] In a fourth aspect, a storage medium is provided in this embodiment, on which a computer program is stored, and when the program is executed by a processor, the parking space occupancy identification method described in the first aspect is implemented.

[0045] Compared with the related art, the parking space occupancy identification method, device, computer equipment and storage medium provided in the present embodiment obtain a monitoring image of the parking area captured in real time by a monitoring device; the monitoring device is fixedly arranged around the parking area; based on the monitoring image, the main parking space line and the first target detection frame of the target object in the parking area, and the anchor point corresponding to the main parking space are determined; the main parking space is determined by the main parking space line and the anchor point; based on the anchor point, the main parking space coordinates corresponding to the main parking space in a preset identification space are determined; in the identification space, the occupancy status of the main parking space is determined according to the first target detection frame and the main parking space coordinates, which solves the problem of false detection or missed detection in the related art, resulting in low parking space occupancy identification accuracy, realizes automatic identification of parking space occupancy, and improves identification accuracy.

[0046] Details of one or more embodiments of the present application are set forth in the following drawings and description to make other features, objects, and advantages of the present application more readily apparent. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:

[0048] Figure 1 This is a hardware structure block diagram of a terminal device of a parking space occupancy identification method provided in an embodiment of the present application;

[0049] Figure 2 is a flow chart of a parking space occupancy identification method provided by an embodiment of the present application;

[0050] Figure 3 is a flowchart of step S220;

[0051] Figure 4 It is a schematic diagram of the vanishing point, anchor point and vanishing point of the main parking space provided by an embodiment of the present application;

[0052] Figure 5 It is a structural block diagram of a parking space occupancy identification device provided in one embodiment of the present application.

[0053] In the figure: 102, processor; 104, memory; 106, transmission device; 108, input and output device; 210, acquisition module; 220, first processing module; 230, second processing module; 240, first identification module. DETAILED DESCRIPTION

[0054] In order to more clearly understand the purpose, technical solutions and advantages of the present application, the present application is described and illustrated below in conjunction with the accompanying drawings and embodiments.

[0055] Unless otherwise defined, the technical terms or scientific terms involved in this application shall have the general meaning understood by people with general skills in the technical field to which this application belongs. The words "one", "a", "the", "these" and the like in this application do not indicate a quantitative limitation, and they may be singular or plural. The terms "include", "comprise", "have" and any variants thereof involved in this application are intended to cover non-exclusive inclusions; for example, a process, method and system, product or device comprising a series of steps or modules (units) is not limited to the listed steps or modules (units), but may include unlisted steps or modules (units), or may include other steps or modules (units) inherent to these processes, methods, products or devices. The words "connect", "connected", "coupled" and the like involved in this application are not limited to physical or mechanical connections, but may include electrical connections, whether direct or indirect. The "multiple" involved in this application refers to two or more. "And / or" describes the association relationship of associated objects, indicating that there may be three relationships, for example, "A and / or B" may mean: A exists alone, A and B exist at the same time, and B exists alone. Generally, the character " / " indicates that the objects associated with each other are in an "or" relationship. The terms "first", "second", "third", etc. in this application are only used to distinguish similar objects and do not represent a specific ordering of the objects.

[0056] The method embodiment provided in this embodiment can be executed in a terminal, a computer or a similar computing device. For example, running on a terminal, Figure 1 FIG. 1 is a hardware structure diagram of a terminal of the parking space occupancy identification method of this embodiment. Figure 1 As shown, the terminal may include one or more ( Figure 1Only one is shown in the figure) a processor 102 and a memory 104 for storing data, wherein the processor 102 may include but is not limited to a processing device such as a microprocessor MCU or a programmable logic device FPGA. The above terminal may also include a transmission device 106 and an input and output device 108 for communication functions. It can be understood by those skilled in the art that Figure 1 The structure shown is only for illustration and does not limit the structure of the above terminal. Figure 1 More or fewer components as shown, or with Figure 1 Different configurations shown.

[0057] The memory 104 can be used to store computer programs, for example, software programs and modules of application software, such as the computer program corresponding to the parking space occupancy identification method in this embodiment. The processor 102 executes various functional applications and data processing by running the computer program stored in the memory 104, that is, to implement the above method. The memory 104 may include a high-speed random access memory, and may also include a non-volatile memory, such as one or more magnetic storage devices, flash memory, or other non-volatile solid-state memory. In some examples, the memory 104 may further include a memory remotely arranged relative to the processor 102, and these remote memories may be connected to the terminal via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0058] The transmission device 106 is used to receive or send data via a network. The above network includes a wireless network provided by a communication provider of the terminal. In one example, the transmission device 106 includes a network adapter (Network Interface Controller, referred to as NIC), which can be connected to other network devices through a base station so as to communicate with the Internet. In one example, the transmission device 106 can be a radio frequency (Radio Frequency, referred to as RF) module, which is used to communicate with the Internet wirelessly.

[0059] In this embodiment, a parking space occupancy identification method is provided. Figure 2 is a flow chart of the parking space occupancy identification method of this embodiment. Figure 2 As shown, the process includes the following steps:

[0060] Step S210, obtaining a monitoring image of the parking area captured in real time by a monitoring device; the monitoring device is fixedly arranged around the parking area;

[0061] Step S220, based on the monitoring image, determining a main parking space line and a first target detection frame of the target object in the parking area, and an anchor point corresponding to the main parking space; the main parking space is determined by the main parking space line and the anchor point;

[0062] Step S230, determining the main parking space coordinates corresponding to the main parking space in a preset recognition space based on the anchor point;

[0063] Step S240: in the recognition space, determine the occupancy status of the main parking space according to the first target detection frame and the main parking space coordinates.

[0064] Specifically, the parking space occupancy identification method provided in this embodiment is applicable to a parking space occupancy identification system, which includes a monitoring device and a processor; wherein the monitoring device is fixedly arranged around the parking area, connected to the processor, and used to capture the monitoring image of the parking area in real time, and transmit the real-time monitoring image to the processor; the processor is used to obtain the monitoring image and execute the parking space occupancy identification method of each embodiment. Specifically, the monitoring device can be set on objects such as walls and pillars around the parking area. It is necessary to ensure that the parking area is within the field of view of the monitoring device, and there is no restriction on the installation location of the monitoring device. The monitoring device includes but is not limited to cameras, video cameras, and gun cameras, etc., and there is no restriction on this.

[0065] Among them, the parking area can be pre-set; for example: the user specifies a parking area, and sets the monitoring device in a suitable position so that the area is within the field of view of the monitoring device. Another example: designate an area as the parking area in the area photographed by the monitoring device. The parking area may include one or more parking spaces; for each parking space, the above-mentioned parking space occupancy identification method can be executed to complete the parking space occupancy identification of a single parking space. Of course, in order to improve the identification efficiency, the above-mentioned parking space occupancy identification method can be used in parallel to simultaneously complete the parking space occupancy identification of multiple parking spaces.

[0066] The parking space occupancy recognition is performed in real time, and the occupancy status of the main parking space in the monitoring image at that time can be recognized for each monitoring image acquired in real time. The main parking space refers to the parking space recognized by the current parking space occupancy recognition method in the parking area.

[0067] In this embodiment, the process of determining the occupied state of the main parking space is as follows: first, the monitoring image is processed by using an image processing algorithm, a neural network model, etc., to determine the main parking space line and the first target detection frame of the target object in the parking area, and the anchor point corresponding to the main parking space; wherein the anchor point is the intersection of the main parking space line (vertical line) and the secondary parking space line (horizontal line) on the main parking space, and the parking space line in the longitudinal direction of the anchor point is the main parking space line; the parking space line in the horizontal direction of the anchor point is the secondary parking space line, and the main parking space line plus the secondary parking space line is the main parking space; then, based on the anchor point, the main parking space coordinates corresponding to the main parking space in the preset recognition space are determined; since the monitoring image is obtained by real-time photography of the parking area by the monitoring device, the main parking space coordinates corresponding to the main parking space can always be identified for an empty parking space. Finally, in the recognition space, the occupancy status of the main parking space is determined according to the first target detection frame and the main parking space coordinates, and then the occupancy status of the main parking space is automatically recognized without human intervention to avoid false detection or missed detection caused by human factors and improve the recognition accuracy; thereby solving the problem of false detection or missed detection in related technologies, resulting in low accuracy of parking space occupancy recognition.

[0068] The above process is described in detail below:

[0069] In some of the embodiments, Figure 3 As shown, the process of determining the main parking space line and the first target detection frame of the target object in the parking area and the anchor point corresponding to the main parking space based on the monitoring image in step S220 includes the following steps:

[0070] Step S221, identifying the monitoring image to obtain the vertical parking space lines and the first target detection frame of the target object in the parking area;

[0071] Step S222, determining the main parking space line based on the coordinate position of the bottom and the vertical parking space line in the monitoring image;

[0072] Step S223, extending the main parking space line, and taking the extended intersection point as the vanishing point of the main parking space;

[0073] Step S224: determining the anchor point of the main parking space based on the vanishing point.

[0074] Specifically, the monitoring image is identified by using image processing algorithms, neural network models, etc., to obtain the vertical parking space lines and the first target detection frame of the target object in the parking area. The target object may be a vehicle, and the first target detection frame may be a rear detection frame or a front detection frame. For example, when the rear of the vehicle enters the main parking space, the first target detection frame is the rear detection frame. When the front of the vehicle enters the main parking space, the first target detection frame is the front detection frame.

[0075] After obtaining the vertical parking lines in the parking area, select the midpoint of the bottom of the monitoring image; calculate the distance between each vertical parking line and the midpoint, and use the two vertical parking lines with the shortest distance as the main parking lines. Extend the two main parking lines so that the extended main parking lines intersect, and the intersection point is used as the vanishing point of the main parking space. Determine the connecting line passing through the vanishing point based on the angle formed by the vanishing point and the two main parking lines; the connecting line bisects the angle; draw a vertical line from the main parking line to the connecting line, and use the intersection point of the shortest and longest vertical lines with the main parking line as the anchor point, so as to quickly calculate the anchor point; reduce the impact of the height of the monitoring image pixels on its calculation. Figure 4 As shown, the main parking lines are L1 and L2; the vanishing point is M; and the anchor points are A1, A2, A3, and A4. In other embodiments, a screening rule may be set to determine the main parking lines. The screening rule may be based on the length of the parking lines, which is not limited.

[0076] Through this embodiment, the main parking space line and the first target detection frame of the target object in the parking area in the monitoring image, as well as the anchor point corresponding to the main parking space can be quickly and accurately identified to ensure the smooth execution of subsequent processes.

[0077] In some embodiments, the parking space occupancy identification method further includes the following steps:

[0078] Record the location information of the vanishing point;

[0079] Based on the position information, the vanishing point is detected for deviation to obtain the detection result;

[0080] When the detection result is that the vanishing point is deviated, the occupation state of the main parking space corresponding to the vanishing point is re-identified.

[0081] Specifically, after step S223, the position information of the vanishing point is recorded; since the installation position of the camera and the parking area are fixed, the position information of the vanishing point is also fixed. Therefore, based on the position information, the vanishing point can be detected for deviation to obtain the detection result. For example, if the position information of the vanishing point recorded twice is inconsistent, the detection result is considered to be a vanishing point deviation. At this time, the main parking space, the vanishing point, the transformation matrix and other related information can be cleared; then steps S210 to S240 are re-executed to re-identify the occupancy status of the main parking space corresponding to the vanishing point.

[0082] Through this embodiment, the deviation detection of the position information of the vanishing point is used to introduce automatic deviation correction of the parking area; when the monitoring device moves and causes the parking space to move, it can be identified and corrected in time.

[0083] In some embodiments, the step S221 of identifying the monitoring image to obtain the vertical parking space line and the first target detection frame of the target object in the parking area includes the following steps:

[0084] The surveillance image is input into the well-trained LaneATT network model to obtain the vertical parking space lines in the parking area;

[0085] The surveillance image is input into the well-trained YOLOv5 network model to obtain the first target detection box of the target object.

[0086] In this embodiment, a neural network model is used to realize the processing of monitoring images. Among them, for the recognition of parking lines, a fully trained LaneATT network model is used, and the result obtained is the vertical parking lines in the parking area. Among them, the LaneATT network model includes a feature extraction module, an attention module and a fully connected layer; the pre-prepared training samples are input into the LaneATT network model, and the feature extraction module extracts the parking line features from the training samples; the attention module generates global features; the parking line features and the global features are fused to solve the problem that the parking lines cannot be detected due to occlusion, lighting and other reasons; the fused parking line features are used as the input of the fully connected layer, and the fully connected layer outputs the vertical parking lines and the corresponding confidence. The confidence that meets the requirements is output as the final vertical parking line.

[0087] Among them, for the recognition of the target detection frame, a well-trained YOLOv5 network model is used, and the result obtained is the first target detection frame of the target object. Specifically, the YOLOv5 network model can be trained using a related model training method and pre-prepared training samples. In other embodiments, other neural network models or image processing algorithms can be used instead for the recognition of surveillance images, which is not limited.

[0088] Through this embodiment, a well-trained LaneATT network model or a YOLOv5 network model is used to avoid partial occlusion of the target object, realize the extraction of the first target detection frame, and improve the recognition efficiency and accuracy.

[0089] In some of the embodiments, determining the coordinates of the main parking space corresponding to the main parking space in the preset identification space based on the anchor point includes the following steps:

[0090] According to the preset anchor point position and anchor point, a transformation matrix between the space where the monitoring image is located and the preset recognition space is determined; the anchor point position is determined by the deformation shape of the main parking space in the recognition space;

[0091] Based on the transformation matrix, the main parking space is converted to the recognition space to obtain the corresponding main parking space coordinates.

[0092] Specifically, the anchor point position is determined by the deformed shape of the main parking space in the recognition space; wherein the deformed shape can be a trapezoid, a parallelogram, a square, etc. For example: the anchor point position is four points, and the deformed shape is a trapezoid, then the anchor point position can be considered as the four points of the trapezoid. For the deformed shape, it can be determined by calibrating the monitoring equipment and the parking area. Among them, the recognition space is a calculation space constructed in the world coordinate system or the third coordinate system, which can be set by the user and there is no restriction on this.

[0093] In this embodiment, the transformation matrix between the space where the monitoring image is located and the preset recognition space can be determined according to the preset anchor point position and anchor point, and the transformation matrix includes an offset matrix and a rotation matrix. Using the transformation matrix, the main parking space can be converted to the recognition space to obtain the corresponding main parking space coordinates.

[0094] Through this embodiment, the coordinates of the main parking space in the identification space are calculated in a quick and simple manner, thereby improving the accuracy of parking space occupancy identification.

[0095] Regarding the change matrix, it should be noted that it is calculated using the perspective transformation principle. The perspective transformation uses homogeneous coordinates to represent two-dimensional vectors:

[0096]

[0097] Where (x, y) represents the coordinates in the monitoring image (before transformation); (x', y') represents the coordinates in the recognition space (after transformation); t i Represents the scaling factor.

[0098] Among them, the transformation matrix M is a 3×3 matrix, that is, ; The letters (a1 to a4; b1 to b2; c1 to c2) are the parameters of the transformation matrix M.

[0099] Substituting the four anchor points on the same plane in the monitoring image and the positions of the four preset anchor points into the above formula, the parameters of the transformation matrix M can be obtained.

[0100] In some embodiments, the parking space occupancy identification method further includes the following steps:

[0101] After determining the occupancy status of the main parking space, determining whether there is a corresponding main parking space in the monitoring image;

[0102] If there is no corresponding main parking space in the monitoring image, the parking space occupancy identification is performed again;

[0103] If there is a corresponding main parking space in the monitoring image, a second target detection frame of the target object is determined; and in the recognition space, the occupancy state of the main parking space is determined according to the transformation matrix and the second target detection frame.

[0104] Specifically, when identifying the occupancy status of the main parking space for the first time, it is necessary to start from step S210 and end at step S240, and after the execution is completed, record the main parking space and the transformation matrix. When identifying the occupancy status of the main parking space for the second time, it is possible to directly determine whether there is a corresponding main parking space in the monitoring image; if there is no corresponding main parking space in the monitoring image, return to step S210 to re-identify the parking space occupancy; if there is a corresponding main parking space in the monitoring image, return to step S240 to determine the second target detection frame of the target object; based on the transformation matrix, convert the second target detection frame to the recognition space; in the recognition space, compare the second target detection frame with the main parking space coordinates to determine the occupancy status of the main parking space. Among them, the second target detection frame of the target object includes a front target frame or a rear target frame; the difference between it and the first target detection frame is only the different number of recognitions.

[0105] Through this embodiment, the process of secondary parking space occupancy identification is simplified and the identification efficiency is improved.

[0106] In some embodiments, determining the occupancy state of the main parking space according to the first target detection frame and the main parking space coordinates in step S240 includes the following steps:

[0107] According to the transformation matrix, the first target detection frame is transformed into the recognition space to obtain the coordinates of the first target detection frame;

[0108] In the recognition space, the coordinates of the first target detection frame are compared with the coordinates of the main parking space to determine the occupancy status of the main parking space.

[0109] Specifically, the first target detection frame is first converted to the recognition space according to the transformation matrix, and the first target detection frame coordinates are compared with the main parking space coordinates to achieve comparison between the first target detection frame and the main parking space in the same recognition space. If the midpoint of the bottom of the first target detection frame is outside the main parking space, the parking space is considered to be vacant and continuously monitored; if the midpoint of the bottom of the first target detection frame is inside the main parking space, the parking space is considered to be occupied, reported to an external device, and continuously monitored. In other embodiments, the first target detection frame and the main parking space may be converted to the world coordinate system for comparison, and this is not limited. In other embodiments, the intersection and union of the first target detection frame and the main parking space may also be calculated, and the occupancy status of the main parking space may be determined based on the intersection and union, and this is not limited.

[0110] Through this embodiment, the occupancy status of the main parking space can be quickly identified.

[0111] In some embodiments, obtaining the monitoring image of the parking area captured by the monitoring device in real time in step S210 includes the following steps:

[0112] Step S211, obtaining a monitoring video of the parking area captured by a monitoring device in real time;

[0113] Step S212, processing the surveillance video to obtain a surveillance image.

[0114] Specifically, first obtain the monitoring video of the parking area captured by the monitoring equipment in real time; then process the monitoring video according to the preset sampling threshold to obtain the monitoring image. The sampling threshold can be set according to the usage scenario to reduce the processing volume and improve the recognition efficiency while ensuring the recognition accuracy.

[0115] It should be noted that the steps shown in the above process or the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0116] In this embodiment, a parking space occupancy identification device is also provided, which is used to implement the above-mentioned embodiments and preferred implementation modes, and the descriptions that have been made will not be repeated. The terms "module", "unit", "subunit", etc. used below can implement a combination of software and / or hardware of predetermined functions. Although the devices described in the following embodiments are preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0117] Figure 5 is a structural block diagram of the parking space occupancy identification device of this embodiment. Figure 5 As shown, the device includes: an acquisition module 210, a first processing module 220, a second processing module 230 and a first identification module 240;

[0118] The acquisition module 210 is used to acquire the monitoring image of the parking area captured by the monitoring device in real time; the monitoring device is fixedly arranged around the parking area;

[0119] The first processing module 220 is used to determine the main parking space line and the first target detection frame of the target object in the parking area and the anchor point corresponding to the main parking space based on the monitoring image; the main parking space is determined by the main parking space line and the anchor point;

[0120] The second processing module 230 is used to determine the main parking space coordinates corresponding to the main parking space in the preset recognition space based on the anchor point;

[0121] The first recognition module 240 is used to determine the occupancy state of the main parking space according to the first target detection frame and the main parking space coordinates in the recognition space.

[0122] The above device solves the problem of false detection or missed detection in the related technology, which leads to low accuracy of parking space occupancy recognition, realizes automatic recognition of parking space occupancy, and improves the recognition accuracy.

[0123] In some of the embodiments, the first processing module 220 is further used to identify the monitoring image to obtain the vertical parking space line and the first target detection frame of the target object in the parking area;

[0124] Determine the main parking space line based on the coordinate position of the bottom and the vertical parking space line in the monitoring image;

[0125] Extend the main parking space line and use the extended intersection point as the vanishing point of the main parking space;

[0126] Based on the vanishing point, determine the anchor point of the main parking space.

[0127] In some of the embodiments, the first processing module 220 is further configured to determine a connecting line passing through the vanishing point based on the angle formed by the main parking space line and the vanishing point; the connecting line bisects the angle;

[0128] Draw a vertical line from the main parking space line to the connecting line, and use the intersection of the shortest and longest vertical lines with the main parking space line as the anchor point.

[0129] In some of the embodiments, the parking space occupancy identification device further includes a deviation detection module;

[0130] A deviation detection module is used to record the position information of the vanishing point;

[0131] Based on the position information, the vanishing point is detected for deviation to obtain the detection result;

[0132] When the detection result is that the vanishing point is deviated, the occupation state of the main parking space corresponding to the vanishing point is re-identified.

[0133] In some of the embodiments, the first processing module 220 is further used to input the surveillance image into the well-trained LaneATT network model to obtain the vertical parking space lines in the parking area;

[0134] The surveillance image is input into the well-trained YOLOv5 network model to obtain the first target detection box of the target object.

[0135] In some of the embodiments, the second processing module 230 is further used to determine the transformation matrix between the space where the monitoring image is located and the preset recognition space according to the preset anchor point position and the anchor point; the anchor point position is determined by the deformation shape of the main parking space in the recognition space;

[0136] Based on the transformation matrix, the main parking space is converted to the recognition space to obtain the corresponding main parking space coordinates.

[0137] In some of the embodiments, the parking space occupancy identification device further includes a judgment module;

[0138] A judgment module, used to judge whether there is a corresponding main parking space in the monitoring image after determining the occupancy status of the main parking space;

[0139] If there is no corresponding main parking space in the monitoring image, the parking space occupancy identification is performed again;

[0140] If there is a corresponding main parking space in the monitoring image, a second target detection frame of the target object is determined; and in the recognition space, the occupancy state of the main parking space is determined according to the transformation matrix and the second target detection frame.

[0141] In some of the embodiments, the first recognition module is further used to transform the first target detection frame into the recognition space according to the transformation matrix to obtain the coordinates of the first target detection frame;

[0142] In the recognition space, the coordinates of the first target detection frame are compared with the coordinates of the main parking space to determine the occupancy status of the main parking space.

[0143] In some of the embodiments, the acquisition module 210 is also used to obtain a monitoring video of the parking area captured in real time by a monitoring device;

[0144] The surveillance video is processed to obtain a surveillance image.

[0145] It should be noted that the above modules can be functional modules or program modules, and can be implemented by software or hardware. For modules implemented by hardware, the above modules can be located in the same processor; or the above modules can be located in different processors in any combination.

[0146] In this embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps in any one of the above method embodiments.

[0147] Optionally, the computer device may further include a transmission device and an input / output device, wherein the transmission device is connected to the processor, and the input / output device is connected to the processor.

[0148] Optionally, in this embodiment, the processor may be configured to perform the following steps through a computer program:

[0149] S1, obtaining a monitoring image of the parking area captured in real time by a monitoring device; the monitoring device is fixedly arranged around the parking area;

[0150] S2, based on the monitoring image, determining a main parking space line and a first target detection frame of the target object in the parking area, and an anchor point corresponding to the main parking space; the main parking space is determined by the main parking space line and the anchor point;

[0151] S3, based on the anchor point, determining the coordinates of the main parking space corresponding to the main parking space in the preset recognition space;

[0152] S4: In the recognition space, determine the occupancy state of the main parking space according to the first target detection frame and the coordinates of the main parking space.

[0153] It should be noted that the specific examples in this embodiment can refer to the examples described in the above embodiments and optional implementation modes, and will not be repeated in this embodiment.

[0154] In addition, in combination with the parking space occupancy identification method provided in the above embodiments, a storage medium may be provided in this embodiment to implement the parking space occupancy identification method. The storage medium stores a computer program; when the computer program is executed by a processor, any parking space occupancy identification method in the above embodiments is implemented.

[0155] It should be understood that the specific embodiments described herein are only used to explain the application, rather than to limit it. Based on the embodiments provided in this application, all other embodiments obtained by ordinary technicians in this field without creative work are within the protection scope of this application.

[0156] Obviously, the drawings are only some examples or embodiments of the present application. For ordinary technicians in the field, the present application can also be applied to other similar situations based on these drawings without creative work. In addition, it is understandable that although the work done in this development process may be complicated and lengthy, for ordinary technicians in the field, certain changes in design, manufacturing or production based on the technical content disclosed in this application are only conventional technical means and should not be regarded as insufficient content disclosed in this application.

[0157] The term "embodiment" in this application refers to a specific feature, structure or characteristic described in conjunction with the embodiment that can be included in at least one embodiment of the present application. The appearance of this phrase in various locations in the specification does not necessarily mean the same embodiment, nor does it mean that it is mutually exclusive with other embodiments and is independent or optional. It is clearly or implicitly understood by those of ordinary skill in the art that the embodiments described in this application can be combined with other embodiments without conflict.

[0158] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of patent protection. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the scope of protection of the present application. Therefore, the scope of protection of the present application shall be subject to the attached claims.

Claims

1. A parking space occupancy identification method, characterized in that: include: Obtain monitoring images of the parking area captured by monitoring equipment in real time; The monitoring device is fixedly arranged around the parking area; Based on the monitoring image, determining a main parking space line and a first target detection frame of a target object in the parking area, and an anchor point corresponding to the main parking space; The main parking space is determined by the main parking space line and the anchor point; Based on the anchor point, determining the main parking space coordinates corresponding to the main parking space in a preset recognition space; In the recognition space, determining the occupancy state of the main parking space according to the first target detection frame and the coordinates of the main parking space; Wherein, based on the anchor point, determining the main parking space coordinates corresponding to the main parking space in a preset identification space includes: Determine a transformation matrix between the space where the monitoring image is located and a preset recognition space according to a preset anchor point position and the anchor point; the anchor point position is determined by the deformation shape of the main parking space in the recognition space; Based on the transformation matrix, the main parking space is converted into the identification space to obtain the corresponding coordinates of the main parking space; Wherein, based on the monitoring image, determining the main parking space line and the first target detection frame of the target object in the parking area, and the anchor point corresponding to the main parking space includes: Recognize the monitoring image to obtain a vertical parking space line and a first target detection frame of a target object in the parking area; Determine the main parking space line based on the coordinate position of the bottom in the monitoring image and the vertical parking space line; Extending the main parking space line, and using the extended intersection point as the vanishing point of the main parking space; Based on the vanishing point, determining an anchor point of the main parking space; Wherein, determining the anchor point of the main parking space based on the vanishing point includes: Based on the angle formed by the main parking space line and the vanishing point, determining a connecting line passing through the vanishing point; the connecting line bisects the angle; Draw a vertical line from the main parking space line to the connecting line, and use the intersection of the shortest and longest vertical lines with the main parking space line as the anchor point.

2. The parking space occupancy identification method according to claim 1, characterized in that: The method further comprises: Recording the position information of the vanishing point; Based on the position information, performing deviation detection on the vanishing point to obtain a detection result; When the detection result is that the vanishing point is deviated, the occupation state of the main parking space corresponding to the vanishing point is re-identified.

3. The parking space occupancy identification method according to claim 1, characterized in that: Recognizing the monitoring image to obtain a vertical parking space line and a first target detection frame of a target object in the parking area includes: Inputting the monitoring image into the well-trained LaneATT network model to obtain the vertical parking space lines in the parking area; The monitoring image is input into a well-trained YOLOv5 network model to obtain a first target detection frame of the target object.

4. The parking space occupancy identification method according to claim 1, characterized in that: The method further comprises: After determining the occupancy status of the main parking space, determining whether there is a corresponding main parking space in the monitoring image; If there is no corresponding main parking space in the monitoring image, re-perform parking space occupancy identification; If there is a corresponding main parking space in the monitoring image, a second target detection frame of the target object is determined; and in the recognition space, the occupancy state of the main parking space is determined according to the transformation matrix and the second target detection frame.

5. The parking space occupancy identification method according to claim 1, characterized in that: In the recognition space, determining the occupancy state of the main parking space according to the first target detection frame and the main parking space coordinates includes: According to the transformation matrix, the first target detection frame is transformed into the recognition space to obtain the coordinates of the first target detection frame; In the recognition space, the coordinates of the first target detection frame are compared with the coordinates of the main parking space to determine the occupancy status of the main parking space.

6. The parking space occupancy identification method according to claim 1, characterized in that: Obtain monitoring images of the parking area captured by monitoring equipment in real time, including: Obtain surveillance video of the parking area captured by surveillance equipment in real time; The monitoring video is processed to obtain a monitoring image.

7. A parking space occupancy identification device, characterized in that: include: An acquisition module, a first processing module, a second processing module and a first identification module; The acquisition module is used to acquire the monitoring image of the parking area captured by the monitoring device in real time; the monitoring device is fixedly arranged around the parking area; The first processing module is used to determine the main parking space line and the first target detection frame of the target object in the parking area, and the anchor point corresponding to the main parking space based on the monitoring image; The main parking space is determined by the main parking space line and the anchor point; The first processing module is further used to identify the monitoring image to obtain the vertical parking space lines and the first target detection frame of the target object in the parking area; Determine the main parking space line based on the coordinate position of the bottom in the monitoring image and the vertical parking space line; Extending the main parking space line, and using the extended intersection point as the vanishing point of the main parking space; Based on the vanishing point, determining an anchor point of the main parking space; The first processing module is further configured to determine a line passing through the vanishing point based on an angle formed by the main parking space line and the vanishing point; The connecting line bisects the angle; Draw a vertical line from the main parking space line to the connecting line, and use the intersection of the shortest and longest vertical lines and the main parking space line as an anchor point; The second processing module is used to determine the main parking space coordinates corresponding to the main parking space in a preset identification space based on the anchor point; The second processing module is further used to determine a transformation matrix between the space where the monitoring image is located and a preset recognition space according to a preset anchor point position and the anchor point; the anchor point position is determined by the deformation shape of the main parking space in the recognition space; Based on the transformation matrix, the main parking space is converted into the identification space to obtain the corresponding coordinates of the main parking space; The first recognition module is used to determine the occupancy status of the main parking space according to the first target detection frame and the main parking space coordinates in the recognition space.

8. A computer device comprising a memory and a processor, characterized in that: A computer program is stored in the memory, and the processor is configured to run the computer program to execute the steps of the parking space occupancy identification method according to any one of claims 1 to 6.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the parking space occupancy identification method according to any one of claims 1 to 6 are implemented.