Parking space detection methods, devices, equipment and storage media
By using a parking space corner detection network and a direction angle prediction network to determine the positions of the four corner points of a parking space, and combining this with an availability classification network to detect the occupancy status of the parking space, the accuracy and reliability issues of non-standard parking space detection are solved, enabling accurate detection and occupancy judgment of different types of parking spaces.
Patent Information
- Application Number
- CN202210825475.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-13
- Publication Date
- 2024-11-12
- Estimated Expiration
- 2042-07-13
AI Technical Summary
Existing marker-based parking space detection methods have poor accuracy and reliability when detecting non-standard parking spaces, and cannot detect whether a parking space is occupied.
A parking space corner detection network and a direction angle prediction network are used to determine the positions of the four corner points of the parking space. The parking space availability classification network is combined to detect the parking space occupancy status, which is suitable for different types of parking spaces.
It improves the accuracy and reliability of parking space detection, can adapt to different types of parking space detection, and can detect whether a parking space is occupied.
Smart Images

Figure CN115082899B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of intelligent driving technology, and in particular to a surround-view parking space detection method, device, equipment and storage medium. Background Art
[0002] In the process of autonomous driving parking, parking space perception is an indispensable link. Accurately obtaining the location of vacant parking spaces is a prerequisite for subsequent decision-making, planning and control stages.
[0003] In related technologies, a method based on marked points is often used for parking space detection. First, the marked points of the parking space are detected, and then various geometric rules based on their type, position, and direction are used to pair the marked points to form an entrance line. Finally, the last two vertices are inferred based on prior knowledge.
[0004] However, for different types of parking spaces, especially non-standard parking spaces, the above-mentioned method based on marked points may have errors in inferring the last two vertices based on prior knowledge, and the accuracy and reliability of parking space detection are poor. Moreover, the method based on marked points can only detect the location of the parking space but cannot detect whether the parking space is occupied. Summary of the invention
[0005] In view of the above problems, the present invention is proposed to provide a parking space detection method, device, equipment and storage medium that overcome the above problems or at least partially solve the above problems. By using a parking space corner point detection network and a parking space direction angle prediction network, the positions of the four corner points of the parking space can be accurately determined, which is suitable for different types of parking space detection. By using a parking space availability classification network, the occupancy of the parking space can be detected, thereby improving the accuracy and reliability of parking space detection.
[0006] In a first aspect, a parking space detection method is provided, comprising:
[0007] Acquire the image to be detected;
[0008] Extracting feature information from the image to be detected according to a pre-built parking space corner point detection network, wherein the feature information includes the position of each corner point and the position and category of each parking space head frame;
[0009] Determine the parking space information of the target parking space according to the feature information, the pre-built parking space direction angle prediction network and the pre-stored parking space depth relationship list, wherein the parking space information includes the positions of the four corner points of the target parking space and the parking space type of the target parking space;
[0010] Determining the occupancy status of the target parking space according to the parking space information of the target parking space and a pre-constructed parking space availability classification network;
[0011] When the target parking space is not occupied, the parking space information of the target parking space is output.
[0012] Optionally, determining the parking space information of the target parking space according to the feature information, a pre-built parking space direction angle prediction network and a pre-stored parking space depth relationship list includes:
[0013] Determine the positions of two entrance corner points of the target parking space and the parking space type of the target parking space according to the characteristic information, wherein the parking space type includes a vertical parking space, a parallel parking space or an inclined parking space;
[0014] Determine the direction angle of the target parking space according to the parking space type and the parking space direction angle prediction network, wherein the direction angle is the angle between the parking space entrance line and the parking space separation line of the target parking space;
[0015] According to the positions of the two entrance corner points, the direction angle of the target parking space and the parking space depth relationship list, the positions of the two remaining corner points of the target parking space are predicted.
[0016] Optionally, determining the positions of two entrance corner points of the target parking space and the parking space type of the target parking space according to the characteristic information includes:
[0017] Randomly selecting one of the parking space head frames from the image to be detected as the head frame of the target parking space;
[0018] Determine two corner points in the head frame of the target parking space as two entrance corner points of the target parking space, and determine the positions of the two entrance corner points;
[0019] Determining the parking space type of the target parking space according to the category of the parking space header frame;
[0020] The categories of the parking space head frame include right angle and non-right angle, and the parking space type of the target parking space includes vertical parking space, parallel parking space or inclined parking space.
[0021] Optionally, the determining the direction angle of the target parking space according to the parking space type and the parking space direction angle prediction network includes:
[0022] When the parking space type is a vertical parking space or a parallel parking space, determining that the direction angle of the target parking space is 90°;
[0023] When the parking space type is an inclined parking space, the head frame image of the target parking space is input into the parking space direction angle prediction network, and the parking space direction angle prediction network determines the direction angle of the target parking space.
[0024] Optionally, predicting the positions of two remaining corner points of the target parking space according to the positions of the two entrance corner points, the direction angle of the target parking space and the parking space depth relationship list includes:
[0025] Searching for a depth value corresponding to the direction angle of the target parking space from the parking space depth relationship list as the depth of the target parking space;
[0026] Determine the distance between the two entrance corner points according to the positions of the two entrance corner points as the entrance width of the target parking space;
[0027] The positions of the two remaining corner points of the target parking space are predicted according to the direction angle, depth and entrance width of the target parking space.
[0028] Optionally, when the target parking space is not occupied, outputting the parking space information of the target parking space includes:
[0029] When the target parking space is not occupied, determining whether there are other corner points in the image to be detected that match the two entrance corner points of the target parking space;
[0030] When there are no other corner points matching the two entrance corner points of the target parking space, output the parking space type of the target parking space and the position information of the four corner points;
[0031] When there are other corner points matching the two entrance corner points of the target parking space, the positions of the two remaining corner points of the target parking space are re-determined, and the parking space type of the target parking space and the position information of the re-determined four corner points are output.
[0032] Optionally, re-determining the positions of the two remaining corner points of the target parking space includes:
[0033] When there are two third corner points and a fourth corner point in the image to be detected that match the two entrance corner points of the target parking space, the position of the third corner point and the position of the fourth corner point are replaced by the positions of the two remaining corner points of the target parking space;
[0034] When there is a third corner point in the image to be detected that matches the two entrance corner points of the target parking space, the position of the fourth corner point is calculated according to the position of the third corner point and the positions of the two entrance corner points, and the position of the third corner point and the position of the fourth corner point are replaced by the positions of the two remaining corner points of the target parking space.
[0035] In a second aspect, a parking space detection device is provided, comprising:
[0036] An image acquisition module, used for acquiring an image to be detected;
[0037] A feature extraction module, used to extract feature information from the image to be detected according to a pre-built parking space corner point detection network, wherein the feature information includes the position of each corner point and the position and category of each parking space head frame;
[0038] A parking space information determination module, configured to determine the parking space information of a target parking space according to the feature information, a pre-built parking space direction angle prediction network and a pre-stored parking space depth relationship list, wherein the parking space information includes the positions of the four corner points of the target parking space and the parking space type of the target parking space;
[0039] A parking space occupancy determination module, configured to determine the occupancy of the target parking space according to the parking space information of the target parking space and a pre-constructed parking space availability classification network;
[0040] The output module is used to output the parking space information of the target parking space when the target parking space is not occupied.
[0041] In a third aspect, an electronic device is provided, comprising: a memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the parking space detection method described in the first aspect by executing the computer instructions.
[0042] In a fourth aspect, a computer-readable storage medium is provided, wherein the computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the parking space detection method described in the first aspect.
[0043] The technical solution provided in the embodiments of the present invention has at least the following technical effects or advantages:
[0044] The embodiments of the present invention provide a parking space detection method, device, equipment and storage medium. Through a pre-constructed parking space corner point detection network, feature information can be extracted from the image to be detected to determine the position of each corner point, as well as the position and category of each parking space head frame. Through a pre-constructed parking space direction angle prediction network, a pre-stored parking space depth relationship list and the extracted feature information, the four corner points and the parking space type of the target parking space can be determined. At this time, the parking space type is known, and the position determination of the four corner points can be more accurate. At the same time, by adopting a parking space availability classification network, the occupancy of the parking space can also be detected. Therefore, the detection method can adapt to different types of parking space detection and improve the accuracy and reliability of parking space detection.
[0045] The above description is only an overview of the technical solution of the present invention. In order to more clearly understand the technical means of the present invention, it can be implemented according to the contents of the specification. In order to make the above and other purposes, features and advantages of the present invention more obvious and easy to understand, the specific implementation methods of the present invention are listed below. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] Various other advantages and benefits will become apparent to those of ordinary skill in the art by reading the detailed description of the preferred embodiments below. The accompanying drawings are only for the purpose of illustrating the preferred embodiments and are not to be considered as limiting the present invention. Moreover, the same reference symbols are used throughout the accompanying drawings to represent the same components. In the accompanying drawings:
[0047] Figure 1 is a flow chart of a parking space detection method provided by an embodiment of the present invention;
[0048] Figure 2 is a flow chart of another parking space detection method provided by an embodiment of the present invention;
[0049] Figure 3 is a schematic diagram of parking space detection provided by an embodiment of the present invention;
[0050] Figure 4 It is a structural schematic diagram of a parking space detection device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0051] In order to better understand the above-mentioned technical scheme, the above-mentioned technical scheme will be described in detail below in combination with specific implementation methods. It should be understood that the embodiments of the present disclosure and the specific features in the embodiments are detailed descriptions of the technical scheme of the present application, rather than limitations on the technical scheme of the present application. In the absence of conflict, the embodiments of the present application and the technical features in the embodiments can be combined with each other.
[0052] Figure 1 is a flow chart of a parking space detection method provided by an embodiment of the present invention, such as Figure 1 As shown, the parking space detection method includes:
[0053] Step S101: Acquire an image to be detected.
[0054] Step S102: extracting feature information from the image to be detected according to the pre-built parking space corner point detection network.
[0055] The feature information includes the position of each corner point and the position and category of each parking space head frame.
[0056] Step S103: Determine the parking space information of the target parking space according to the feature information, the pre-built parking space direction angle prediction network and the pre-stored parking space depth relationship list.
[0057] The parking space information includes the positions of the four corner points of the target parking space and the parking space type of the target parking space.
[0058] In this embodiment, the parking space type includes a perpendicular parking space, a parallel parking space, or an inclined parking space.
[0059] Step S104: Determine the occupancy status of the target parking space according to the parking space information of the target parking space and the pre-constructed parking space availability classification network.
[0060] Step S105: When the target parking space is not occupied, output the parking space information of the target parking space.
[0061] The parking space detection method provided by the embodiment of the present invention can extract feature information from the image to be detected through a pre-constructed parking space corner point detection network, determine the position of each corner point, and the position and category of each parking space head frame. Through the pre-constructed parking space direction angle prediction network, the pre-stored parking space depth relationship list and the extracted feature information, the four corner points and the parking space type of the target parking space can be determined. At this time, the parking space type is known, and the position determination of the four corner points can be more accurate. At the same time, by adopting a parking space availability classification network, the occupancy of the parking space can also be detected. Therefore, the detection method can adapt to different types of parking space detection and improve the accuracy and reliability of parking space detection.
[0062] Figure 2 FIG. 1 is a flow chart of another parking space detection method provided by an embodiment of the present invention, as a further explanation of the above embodiment. Figure 2 As shown, the parking space detection method includes:
[0063] Step S201: Acquire an image to be detected.
[0064] In this embodiment, the image to be detected is a panoramic overhead parking space image, which can be acquired based on a monocular fisheye camera in an AVM (Around View Monitor, panoramic monitoring imaging system) camera, and the detected parking space image can be converted into an overhead view.
[0065] Specifically, four fisheye cameras with an azimuth field of view of at least 180° can be arranged on the vehicle. The front camera is installed below the vehicle logo on the vehicle's air intake grille, the cameras on both sides are installed below the vehicle's rearview mirrors, and the rear camera is installed above the license plate frame. The four wide-angle images of the front, back, left, and right sides of the vehicle are processed to generate a 360° seamless top-down view of the scene around the vehicle.
[0066] Step S202: extracting feature information from the image to be detected according to the pre-built parking space corner point detection network.
[0067] The feature information includes the position of each corner point and the position and category of each parking space head frame. The categories of parking space head frames include right-angle heads and non-right-angle heads.
[0068] It should be noted that before using the parking space corner detection network to extract feature information from the image to be detected, it is necessary to pre-build the parking space corner detection network. Specifically, the parking space corner detection network can be built using a deep learning method, first obtaining image training samples including various feature information, and then using the training samples to train the parking space corner detection network.
[0069] In this embodiment, a corner point detection frame may be used to detect the position of each corner point, including a T-shaped corner point and an L-shaped corner point. A parking space head detection frame may be used to detect the position of a parking space head frame. Specifically, when there are two corner points in the parking space head detection frame whose distances meet the set requirements, the two corner points in the parking space head detection frame may be determined as entry corner points, and a rectangular frame of a specified size containing the two entry corner points constitutes a parking space head frame.
[0070] It should be noted that the entrance corner point is composed of a portion of the parking space entrance line and a portion of the parking space separation line. By detecting the angle between the portion of the parking space entrance line and the portion of the parking space separation line, the type of the parking space head frame can be determined. When the angle is 90°, the parking space head frame is a right-angle head, and when the angle is not equal to 90°, the parking space head frame is a non-right-angle head.
[0071] Step S203: Determine the parking space information of the target parking space according to the feature information, the pre-built parking space direction angle prediction network and the pre-stored parking space depth relationship list.
[0072] The parking space information includes the positions of the four corner points of the target parking space and the parking space type of the target parking space, which includes a vertical parking space, a parallel parking space, or an inclined parking space.
[0073] Optionally, step S203 includes:
[0074] The first step is to determine the positions of the two entrance corner points of the target parking space and the parking space type of the target parking space based on the feature information.
[0075] Specifically, the first step may include:
[0076] Randomly select a parking space head frame from the image to be detected as the head frame of the target parking space;
[0077] Determine the two corner points in the head frame of the target parking space as the two entrance corner points of the target parking space, and determine the positions of the two entrance corner points;
[0078] The parking space type of the target parking space is determined according to the category of the parking space head frame.
[0079] It should be noted that, in this embodiment, the corner points in the head frame of the target parking space are all corner points that meet the national standard parking space size requirements, and the distance between the two corner points in the head frame of the target parking space also meets the national standard parking space size requirements.
[0080] Exemplarily, when the category of the parking space head frame is a right-angle head, the parking space type of the target parking space is determined to be a vertical parking space or a parallel parking space; when the category of the parking space head frame is a non-right-angle head, the parking space type of the target parking space is determined to be an inclined parking space.
[0081] The second step is to determine the direction angle of the target parking space based on the parking space type and parking space direction angle prediction network.
[0082] The direction angle of the target parking space is the angle between the parking space entrance line and the parking space separation line of the target parking space. It should be noted that the size of the angle can be determined by the rotation angle when the parking space entrance line is rotated to coincide with the parking space separation line. The angle is negative when rotating clockwise, and positive when rotating counterclockwise. For example, when the rotation angle of the parking space entrance line when rotating clockwise to coincide with the parking space separation line is 60°, it can be determined that the direction angle of the target parking space is -60°.
[0083] When the parking space type is a vertical parking space or a parallel parking space, the direction angle of the target parking space is determined to be 90°. When the parking space type is an inclined parking space, the head frame image of the target parking space is input into the parking space direction angle prediction network, and the parking space direction angle prediction network determines the direction angle of the target parking space.
[0084] Specifically, a parking space direction angle prediction network can be constructed using a deep learning method. First, image training samples including various feature information are obtained, and then the parking space direction angle prediction network is trained using the training samples.
[0085] Step 3: Predict the positions of the two remaining corner points of the target parking space based on the positions of the two entrance corner points, the direction angle of the target parking space, and the parking space depth relationship list.
[0086] Specifically, the third step may include:
[0087] Find the depth value corresponding to the direction angle of the target parking space from the parking space depth relationship list as the depth of the target parking space;
[0088] Determine the distance between the two entrance corner points according to their positions, and use it as the entrance width of the target parking space;
[0089] The positions of the two remaining corner points of the target parking space are predicted based on the direction angle, depth and entrance width of the target parking space.
[0090] It should be noted that, in one implementation of the present embodiment, the parking space depth relationship list can be determined by data collection. For example, the parking space type of each parking lot and the parking space depth values corresponding to parking spaces with different inclination angles can be obtained through big data sampling. When a parking space with the same inclination angle has multiple different parking space depth values, the average value of the multiple different parking space depth values can be selected as the depth value corresponding to the parking space with the inclination angle in the parking space depth relationship list. Alternatively, the maximum value or minimum value among multiple different parking space depth values can be selected, and the present invention is not limited to this.
[0091] Step S204: Determine the occupancy status of the target parking space according to the parking space information of the target parking space and the pre-constructed parking space availability classification network.
[0092] In this embodiment, similarly, a parking space availability classification network can be constructed using a deep learning method. First, image training samples are obtained, and then the parking space availability classification network is trained using the training samples.
[0093] For example, the parking space frame of the target parking space can be determined by connecting the four corner points of the target parking space. The parking space frame area image is cropped and sent to the parking space availability classification network. By detecting whether there are other objects in the parking space frame, it can be determined whether the target parking space is occupied.
[0094] Step S205: When the target parking space is not occupied, determine whether there are other corner points in the image to be detected that match the two entrance corner points of the target parking space.
[0095] Specifically, the parking space frame line of the target parking space can be expanded by an appropriate size (the specific size can be determined according to actual needs, and the present invention is not limited to this), and then it is determined whether there are other corner points in the expanded parking space frame line that can form a parking space with the two entrance corner points of the target parking space.
[0096] Step S206: When there are no other corner points matching the two entrance corner points of the target parking space, output the parking space type of the target parking space and the position information of the four corner points.
[0097] Step S207: when there are other corner points matching the two entrance corner points of the target parking space, re-determine the positions of the two remaining corner points of the target parking space, and output the parking space type of the target parking space and the position information of the re-determined four corner points.
[0098] Specifically, when there are two third corner points and fourth corner points matching the two entrance corner points of the target parking space in the image to be detected, the positions of the third corner point and the fourth corner point are replaced with the positions of the two remaining corner points of the target parking space.
[0099] When there is a third corner point in the image to be detected that matches the two entrance corner points of the target parking space, the position of the fourth corner point is calculated according to the position of the third corner point and the positions of the two entrance corner points, and the positions of the third corner point and the fourth corner point are replaced by the positions of the two remaining corner points of the target parking space.
[0100] The fourth corner point may be calculated based on the direction angle, depth and entrance width of the target parking space determined in step S203.
[0101] The positions of the four corner points determined by the above method are more accurate. By connecting the four output corner points, the real parking space frame line can be obtained.
[0102] In order to better understand the present invention, the following Figure 3 The parking space detection method provided in this embodiment is described below:
[0103] Figure 3 is a schematic diagram of parking space detection provided by an embodiment of the present invention, such as Figure 3 As shown, taking parking space P1 as the target parking space as an example, in this embodiment, according to the pre-constructed parking space corner point detection network, the position and category of the parking space head frame of parking space P1 can be obtained from the image to be detected, thereby determining the two entrance corner points A1 and A2 of parking space P1, and determining that the parking space type of parking space P1 is an inclined parking space.
[0104] Furthermore, the head area image of the target parking space P1 can be cropped and sent to the parking space direction angle prediction network to regress the direction angle of the target parking space P1 (the direction angle α of the target parking space P1 is the rotation angle when the parking space entrance line S0 is rotated counterclockwise to coincide with the parking space separation line S1). Then, the parking space depth value corresponding to the direction angle of the target parking space P1 can be found from the pre-stored parking space depth relationship list. Next, based on the distance between the two entrance corner points A1 and A2, the entrance width of the target parking space P1 can be determined. Finally, based on the known positions of the two entrance corner points A1 and A2, the positions of the two remaining corner points A3 and A4 of the target parking space P1 can be predicted according to the direction angle, depth and entrance width of the target parking space P1.
[0105] Furthermore, the parking space frame of the target parking space can be determined by connecting the four corner points A1, A2, A3 and A4. The parking space frame area image is cropped and sent to the parking space availability classification network. By detecting whether there are other objects in the parking space frame, it can be determined whether the target parking space is occupied.
[0106] When the target parking space P1 is occupied, P2 can be reselected as a new target parking space, and the above process is repeated until it is detected that the selected target parking space is not occupied.
[0107] When the target parking space P1 is not occupied, it can be determined whether there are other corner points in the image to be detected that match the two entrance corner points A1 and A2 of the target parking space P1 (i.e., can constitute a parking space that meets the national standard size). When there are no other corner points that match the two entrance corner points A1 and A2 of the target parking space P1, the parking space type (inclined parking space) of the target parking space P1 and the position information of the four corner points A1, A2, A3 and A4 are output. When there are other corner points that match the two entrance corner points A1 and A2 of the target parking space P1, the positions of the two remaining corner points of the target parking space are re-determined, and the parking space type of the target parking space P1 and the position information of the re-determined four corner points are output.
[0108] For example, when there are two third corner points A3′ and fourth corner points A4′ (not shown in the figure) in the image to be detected that match the two entrance corner points A1 and A2 of the target parking space P1, the position of the third corner point A3′ and the position of the fourth corner point A4′ replace the positions of corner points A3 and A4, and the position information of the re-determined four corner points A1, A2, A3′ and A4′ is output.
[0109] When there is a third corner point A3′ (not shown in the figure) that matches the two entrance corner points A1 and A2 of the target parking space P1 in the image to be detected, the position of the fourth corner point A4′ (not shown in the figure) is calculated according to the position of the third corner point A3′ and the positions of the two entrance corner points A1 and A2, and the positions of the third corner point A3′ and the fourth corner point A4′ replace the positions of the corner points A3 and A4, and the position information of the re-determined four corner points A1, A2, A3′ and A4′ is output.
[0110] Based on the same inventive concept, an embodiment of the present invention further provides a parking space detection device for implementing the above parking space detection method. Figure 4 is a schematic diagram of the structure of a parking space detection device provided by an embodiment of the present invention, such as Figure 4 As shown, the parking space detection device 300 includes an image acquisition module 301, a feature extraction module 302, a parking space information determination module 303, a parking space occupancy determination module 304, and an output module 305. Among them:
[0111] The image acquisition module 301 is used to acquire the image to be detected. The feature extraction module 302 is used to extract feature information from the image to be detected based on the pre-constructed parking space corner point detection network. The feature information includes the position of each corner point, and the position and category of each parking space head frame. The parking space information determination module 303 is used to determine the parking space information of the target parking space based on the feature information, the pre-constructed parking space direction angle prediction network and the pre-stored parking space depth relationship list. The parking space information includes the position of the four corner points of the target parking space and the parking space type of the target parking space. The parking space occupancy determination module 304 is used to determine the occupancy of the target parking space based on the parking space information of the target parking space and the pre-constructed parking space availability classification network. The output module 305 is used to output the parking space information of the target parking space when the target parking space is not occupied.
[0112] Optionally, the parking space information determination module 303 further includes:
[0113] a determination unit, configured to determine positions of two entrance corner points of a target parking space and a parking space type of the target parking space according to the characteristic information, wherein the parking space type includes a vertical parking space, a parallel parking space or an inclined parking space;
[0114] A direction angle determination unit is used to determine the direction angle of the target parking space according to the parking space type and the parking space direction angle prediction network. The direction angle is the angle between the parking space entrance line and the parking space separation line of the target parking space;
[0115] The corner point prediction unit is used to predict the positions of two remaining corner points of the target parking space according to the positions of the two entrance corner points, the direction angle of the target parking space and the parking space depth relationship list.
[0116] Optionally, the determination unit is used to:
[0117] Randomly select a parking space head frame from the image to be detected as the head frame of the target parking space;
[0118] Determine the two corner points in the head frame of the target parking space as the two entrance corner points of the target parking space, and determine the positions of the two entrance corner points;
[0119] The parking space type of the target parking space is determined according to the category of the parking space head frame.
[0120] The categories of the parking space head frame include right angle and non-right angle, and the parking space type of the target parking space includes vertical parking space, parallel parking space or inclined parking space.
[0121] Optionally, the direction angle determination unit is used to:
[0122] When the parking space type is a vertical parking space or a parallel parking space, the direction angle of the target parking space is determined to be 90°;
[0123] When the parking space type is an inclined parking space, the head frame image of the target parking space is input into the parking space direction angle prediction network, and the parking space direction angle prediction network determines the direction angle of the target parking space.
[0124] Optionally, the corner prediction unit is used to:
[0125] Find the depth value corresponding to the direction angle of the target parking space from the parking space depth relationship list as the depth of the target parking space;
[0126] Determine the distance between the two entrance corner points according to their positions, and use it as the entrance width of the target parking space;
[0127] The positions of the two remaining corner points of the target parking space are predicted based on the direction angle, depth and entrance width of the target parking space.
[0128] Optionally, the output module 305 is further used for:
[0129] When the target parking space is not occupied, determining whether there are other corner points in the image to be detected that match the two entrance corner points of the target parking space;
[0130] When there are no other corner points matching the two entrance corner points of the target parking space, output the parking space type of the target parking space and the position information of the four corner points;
[0131] When there are other corner points matching the two entrance corner points of the target parking space, the positions of the two remaining corner points of the target parking space are re-determined, and the parking space type of the target parking space and the position information of the re-determined four corner points are output.
[0132] Optionally, the output module 305 is further used for:
[0133] When there are two third corner points and a fourth corner point that match the two entrance corner points of the target parking space in the image to be detected, the position of the third corner point and the position of the fourth corner point are replaced by the positions of the two remaining corner points of the target parking space;
[0134] When there is a third corner point in the image to be detected that matches the two entrance corner points of the target parking space, the position of the fourth corner point is calculated according to the position of the third corner point and the positions of the two entrance corner points, and the positions of the third corner point and the fourth corner point are replaced by the positions of the two remaining corner points of the target parking space.
[0135] For the contents not introduced or described in the embodiments of the present application, please refer to the relevant introduction in the aforementioned method embodiments, which will not be repeated here.
[0136] The embodiment of the present invention also provides an electronic device, which may include a processor and a memory, wherein the processor and the memory may be connected via a bus or other means. The processor may be a central processing unit (CPU). The processor may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components and other chips, or a combination of the above-mentioned various types of chips. The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the parking space detection method in the embodiment of the present invention. The processor executes various functional applications and data processing of the processor by running the non-transient software programs, instructions and modules stored in the memory, that is, realizing the vehicle detection method in the above method embodiment.
[0137] The memory may include a program storage area and a data storage area, wherein the program storage area may store an operating system and an application required by at least one function; the data storage area may store data created by the processor, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. The one or more modules are stored in the memory, and when executed by the processor, the execution is as follows: Figure 1 The vehicle detection method in the embodiment shown. The specific details of the above electronic equipment can be referred to in Figure 1 The corresponding related descriptions and effects in the embodiments shown are understood and will not be repeated here. Those skilled in the art will understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium. When the program is executed, it may include the processes of the embodiments of the above-mentioned methods. Among them, the storage medium may be a read-only memory (ROM), a random access memory (RAM), a flash memory (Flash Memory), a hard disk (Hard Disk Drive, abbreviated as: HDD) or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above-mentioned types of memory.
[0138] The technical solutions in the above embodiments of the present application have at least the following technical effects or advantages:
[0139] The embodiments of the present invention provide a parking space detection method, device, equipment and storage medium. Through a pre-constructed parking space corner point detection network, feature information can be extracted from the image to be detected to determine the position of each corner point, as well as the position and category of each parking space head frame. Through a pre-constructed parking space direction angle prediction network, a pre-stored parking space depth relationship list and the extracted feature information, the four corner points and the parking space type of the target parking space can be determined. At this time, the parking space type is known, and the position determination of the four corner points can be more accurate. At the same time, by adopting a parking space availability classification network, the occupancy of the parking space can also be detected. Therefore, the detection method can adapt to different types of parking space detection and improve the accuracy and reliability of parking space detection.
[0140] In the description provided herein, a large number of specific details are described. However, it is understood that embodiments of the present invention can be practiced without these specific details. In some instances, well-known methods, structures and techniques are not shown in detail so as not to obscure the understanding of this description.
[0141] Similarly, it should be understood that in order to streamline the present disclosure and aid in understanding one or more of the various inventive aspects, in the above description of exemplary embodiments of the present invention, various features of the present invention are sometimes grouped together into a single embodiment, figure, or description thereof. However, this disclosed method should not be interpreted as reflecting the intention that the claimed invention requires more features than those explicitly recited in each claim. More specifically, as reflected in the claims below, inventive aspects lie in less than all the features of the individual embodiments disclosed above. Therefore, the claims that follow the specific embodiment are hereby expressly incorporated into the specific embodiment, with each claim itself serving as a separate embodiment of the present invention.
[0142] It should be noted that the above embodiments illustrate the present invention rather than limit it, and that those skilled in the art may devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference symbol between brackets shall not be construed as a limitation on the claims. The word "comprising" does not exclude the presence of components or steps not listed in the claims. The word "one" or "an" preceding a component does not exclude the presence of a plurality of such components. The present invention may be implemented by means of hardware comprising a number of different components and by means of a suitably programmed computer. In a unit claim enumerating a number of devices, several of these devices may be embodied by the same hardware item. The use of the words first, second, and third, etc., does not indicate any order. These words may be interpreted as names.
Claims
1. A parking space detection method, characterized in that: include: Acquire the image to be detected; Extracting feature information from the image to be detected according to a pre-built parking space corner point detection network, wherein the feature information includes the position of each corner point and the position and category of each parking space head frame; Determine the parking space information of the target parking space according to the feature information, the pre-built parking space direction angle prediction network and the pre-stored parking space depth relationship list, wherein the parking space information includes the positions of the four corner points of the target parking space and the parking space type of the target parking space; Determining the occupancy status of the target parking space according to the parking space information of the target parking space and a pre-constructed parking space availability classification network; When the target parking space is not occupied, outputting the parking space information of the target parking space; The determining of the parking space information of the target parking space according to the feature information, the pre-built parking space direction angle prediction network and the pre-stored parking space depth relationship list includes: Determine the positions of two entrance corner points of the target parking space and the parking space type of the target parking space according to the characteristic information, wherein the parking space type includes a vertical parking space, a parallel parking space or an inclined parking space; According to the parking space type and the parking space direction angle prediction network, the direction angle of the target parking space is determined, the direction angle is the angle between the parking space entrance line of the target parking space and the parking space separation line, the size of the angle is determined by the rotation angle when the parking space entrance line of the target parking space is rotated to coincide with the parking space separation line, and the angle is negative when rotating clockwise, and positive when rotating counterclockwise; According to the positions of the two entrance corner points, the direction angle of the target parking space and the parking space depth relationship list, the positions of the two remaining corner points of the target parking space are predicted; the parking space depth relationship list stores parking space depth values corresponding to parking spaces with different direction angles, and the parking space depth value corresponding to the parking space with each direction angle stored in the parking space depth relationship list is the average value, maximum value or minimum value of multiple different parking space depths corresponding to the parking space with each direction angle collected through big data.
2. The parking space detection method according to claim 1, characterized in that: The determining the positions of the two entrance corner points of the target parking space and the parking space type of the target parking space according to the characteristic information includes: Randomly selecting one of the parking space head frames from the image to be detected as the head frame of the target parking space; Determine two corner points in the head frame of the target parking space as two entrance corner points of the target parking space, and determine the positions of the two entrance corner points; Determining the parking space type of the target parking space according to the category of the parking space header frame; The categories of the parking space head frame include right angle and non-right angle, and the parking space type of the target parking space includes vertical parking space, parallel parking space or inclined parking space.
3. The parking space detection method according to claim 2, characterized in that: The step of determining the direction angle of the target parking space according to the parking space type and the parking space direction angle prediction network includes: When the parking space type is a vertical parking space or a parallel parking space, determining that the direction angle of the target parking space is 90°; When the parking space type is an inclined parking space, the head frame image of the target parking space is input into the parking space direction angle prediction network, and the parking space direction angle prediction network determines the direction angle of the target parking space.
4. The parking space detection method according to claim 1, characterized in that: The predicting the positions of the two remaining corner points of the target parking space according to the positions of the two entrance corner points, the direction angle of the target parking space and the parking space depth relationship list includes: Searching for a depth value corresponding to the direction angle of the target parking space from the parking space depth relationship list as the depth of the target parking space; Determine the distance between the two entrance corner points according to the positions of the two entrance corner points as the entrance width of the target parking space; The positions of the two remaining corner points of the target parking space are predicted according to the direction angle, depth and entrance width of the target parking space.
5. The parking space detection method according to claim 1, characterized in that: When the target parking space is not occupied, outputting the parking space information of the target parking space includes: When the target parking space is not occupied, determining whether there are other corner points in the image to be detected that match the two entrance corner points of the target parking space; When there are no other corner points matching the two entrance corner points of the target parking space, output the parking space type of the target parking space and the position information of the four corner points; When there are other corner points matching the two entrance corner points of the target parking space, the positions of the two remaining corner points of the target parking space are re-determined, and the parking space type of the target parking space and the position information of the re-determined four corner points are output.
6. The parking space detection method according to claim 5, characterized in that: The re-determining the positions of the two remaining corner points of the target parking space includes: When there are two third corner points and a fourth corner point in the image to be detected that match the two entrance corner points of the target parking space, the position of the third corner point and the position of the fourth corner point are replaced by the positions of the two remaining corner points of the target parking space; When there is a third corner point in the image to be detected that matches the two entrance corner points of the target parking space, the position of the fourth corner point is calculated according to the position of the third corner point and the positions of the two entrance corner points, and the position of the third corner point and the position of the fourth corner point are replaced by the positions of the two remaining corner points of the target parking space.
7. A parking space detection device, characterized in that: include: An image acquisition module, used for acquiring an image to be detected; A feature extraction module, used to extract feature information from the image to be detected according to a pre-built parking space corner point detection network, wherein the feature information includes the position of each corner point and the position and category of each parking space head frame; A parking space information determination module, configured to determine the parking space information of a target parking space according to the feature information, a pre-built parking space direction angle prediction network and a pre-stored parking space depth relationship list, wherein the parking space information includes the positions of the four corner points of the target parking space and the parking space type of the target parking space; A parking space occupancy determination module, configured to determine the occupancy of the target parking space according to the parking space information of the target parking space and a pre-constructed parking space availability classification network; An output module, used for outputting parking space information of the target parking space when the target parking space is not occupied; The parking space information determination module is also used for: Determine the positions of two entrance corner points of the target parking space and the parking space type of the target parking space according to the characteristic information, wherein the parking space type includes a vertical parking space, a parallel parking space or an inclined parking space; According to the parking space type and the parking space direction angle prediction network, the direction angle of the target parking space is determined, the direction angle is the angle between the parking space entrance line of the target parking space and the parking space separation line, the size of the angle is determined by the rotation angle when the parking space entrance line of the target parking space is rotated to coincide with the parking space separation line, and the angle is negative when rotating clockwise, and positive when rotating counterclockwise; According to the positions of the two entrance corner points, the direction angle of the target parking space and the parking space depth relationship list, the positions of the two remaining corner points of the target parking space are predicted; the parking space depth relationship list stores parking space depth values corresponding to parking spaces with different direction angles, and the parking space depth value corresponding to the parking space with each direction angle stored in the parking space depth relationship list is the average value, maximum value or minimum value of multiple different parking space depths corresponding to the parking space with each direction angle collected through big data.
8. An electronic device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the parking space detection method according to any one of claims 1 to 6 by executing the computer instructions.
9. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable the computer to execute the parking space detection method according to any one of claims 1 to 6.
