Parking space identification method and device, vehicle and storage medium
By using the target detection model to determine the thermal map of the key points of the parking space center and grounding line in mechanical parking space recognition, the inaccuracy problem caused by the reliance on parking plane characteristics of mechanical parking space recognition is solved, and more accurate parking space recognition results are achieved.
Patent Information
- Application Number
- CN202411223922.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-02
- Publication Date
- 2025-01-17
AI Technical Summary
The identification of mechanical parking spaces The prior art relies on the characteristics of the parking plane of mechanical parking spaces, resulting in inaccurate identification.
By obtaining the target top image of the mechanical parking space to be identified, the target detection model is used to determine the central heat map of the parking space, the center point of the grounding line and the key point of the grounding line, and predict the central point of the parking space, the center point of the grounding line and the key point, and then determine the central point of the parking space, the center point of the grounding line, and the key point of the further determination The parking space direction achieves more accurate parking space identification.
Since the predicted key points and center points of the grounding line are points on the parking space grounding line, there is no projection error when projected on the world coordinate system, the resulting parking space direction is more accurate, improving the accuracy of parking space recognition.
Smart Images

Figure CN119323774A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of intelligent driving technology, and more specifically, to a parking space recognition method, device, vehicle and computer-readable storage medium. Background Art
[0002] At present, the recognition of mechanical parking spaces usually relies on the features of the parking plane of the mechanical parking spaces, such as the plane corner points and plane raised edge lines of the mechanical parking spaces; however, the features such as the plane corner points and plane raised edge lines are features on the parking plane of the mechanical parking spaces, not features on the ground, resulting in the mechanical parking spaces identified based on these features being not accurate enough. Summary of the invention
[0003] The present application proposes a parking space recognition method, device, vehicle and computer-readable storage medium to improve the above-mentioned defects.
[0004] In a first aspect, an embodiment of the present application provides a parking space recognition method, the method comprising:
[0005] Obtain a target overhead image of the mechanical parking space to be identified;
[0006] The target detection model is used to determine the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map according to the target overhead image; the parking space center heat map is used to indicate the confidence of the parking space center point of the mechanical parking space to be identified at different predicted positions, the grounding line center point heat map is used to indicate the confidence of the grounding line center point on the parking space grounding line of the mechanical parking space to be identified at different predicted positions, and the grounding line key point heat map is used to indicate the confidence of the grounding line key points on the parking space grounding line at different predicted positions; the grounding line key points are points on the parking space grounding line that are different from the grounding line center;
[0007] According to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map, the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the mechanical parking space to be identified are determined;
[0008] Determine the predicted parking space direction of the mechanical parking space to be identified according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point;
[0009] The parking space recognition result of the mechanical parking space to be identified is determined based on the predicted grounding line key points and the predicted parking space direction.
[0010] In a second aspect, an embodiment of the present application further provides a parking space recognition device, the device comprising:
[0011] An acquisition module is used to acquire a target overhead image of a mechanical parking space to be identified;
[0012] The model determination module is used to determine the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map according to the target overhead image through the target detection model; the parking space center heat map is used to indicate the confidence of the parking space center point of the mechanical parking space to be identified at different predicted positions, the grounding line center point heat map is used to indicate the confidence of the grounding line center point on the parking space grounding line of the mechanical parking space to be identified at different predicted positions, and the grounding line key point heat map is used to indicate the confidence of the grounding line key points on the parking space grounding line at different predicted positions; the grounding line key points are points on the parking space grounding line that are different from the grounding line center;
[0013] A point determination module is used to determine the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the mechanical parking space to be identified according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map;
[0014] A direction determination module, used to determine the predicted parking space direction of the mechanical parking space to be identified according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point;
[0015] The parking space determination module is used to determine the parking space identification result of the mechanical parking space to be identified based on the predicted grounding line key points and the predicted parking space direction.
[0016] In a third aspect, an embodiment of the present application also provides a vehicle, characterized in that it includes: one or more processors; a memory; one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more programs are configured to execute the above method.
[0017] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, which stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the above method.
[0018] The present application provides a parking space identification method, device, vehicle and computer-readable storage medium. In the present application, according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map, the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the mechanical parking space to be identified are determined; according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point, the predicted parking space direction of the mechanical parking space to be identified is determined; according to the predicted grounding line key point and the predicted parking space direction, the parking space identification result of the mechanical parking space to be identified is determined. Since the predicted grounding line key point and the predicted grounding line center point are both points on the parking space grounding line where the slope of the mechanical parking space to be identified contacts the ground, rather than corner points on the parking plane of the mechanical parking space to be identified, there is no projection error when projecting them into the world coordinate system. Then, when the predicted parking space direction is determined in combination with the predicted parking space center point, the predicted grounding line key point and the predicted grounding line center point, the obtained predicted parking space direction is more accurate, so that the obtained parking space identification result is more accurate. At the same time, the technical path for identifying mechanical parking spaces through overhead views is consistent with that for identifying ordinary parking spaces, which facilitates integration with ordinary parking space detection software modules.
[0019] Other features and advantages of the embodiments of the present application will be described in the subsequent description, and partly become apparent from the description, or can be understood by practicing the embodiments of the present application. The purposes and other advantages of the embodiments of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0020] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.
[0021] Figure 1 A schematic diagram of a vehicle hardware environment suitable for an embodiment of the present application is shown.
[0022] Figure 2 A flow chart of a parking space identification method proposed according to an embodiment of the present application is shown.
[0023] Figure 3 A schematic diagram of a mechanical parking space to be identified in an embodiment of the present application is shown.
[0024] Figure 4 A schematic diagram of a predicted position in an embodiment of the present application is shown.
[0025] Figure 5A flow chart of a parking space recognition method proposed according to another embodiment of the present application is shown.
[0026] Figure 6 A flowchart of a parking space identification method proposed according to another embodiment of the present application is shown.
[0027] Figure 7 A schematic diagram of a first prediction direction, a second prediction direction and a third prediction direction in an embodiment of the present application is shown.
[0028] Figure 8 A flowchart of a parking space identification method proposed according to yet another embodiment of the present application is shown.
[0029] Fig. 9 A structural block diagram of a parking space recognition device proposed in an embodiment of the present application is shown. DETAILED DESCRIPTION
[0030] In order to make those skilled in the art better understand the present application scheme, the technical scheme in the present application embodiment will be clearly and completely described below in conjunction with the drawings in the present application embodiment. Obviously, the described embodiment is only a part of the present application embodiment, rather than all the embodiments. The components of the present application embodiment usually described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the present application for protection, but merely represents the selected embodiment of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0031] It should be noted that similar reference numerals and letters represent similar items in the following drawings, so once an item is defined in one drawing, it does not need to be further defined and explained in subsequent drawings. At the same time, in the description of this application, the terms "first", "second", etc. are only used to distinguish the description and cannot be understood as indicating or implying relative importance.
[0032] See also Figure 1 , Figure 1 A schematic diagram of a vehicle hardware environment applicable to an embodiment of the present application is shown, where a vehicle 100 includes an image acquisition device 110 , a processor 111 and a memory 112 .
[0033] The image acquisition device 110 is used to acquire images of the vehicle's surroundings, and may be a panoramic camera, etc. The images acquired by the panoramic camera are fisheye images.
[0034] The processor 111 may be a microcontroller unit (MCU) having a built-in memory 112 . The memory 112 stores a program that can execute the contents of the following embodiments, and the processor 111 may execute the program stored in the memory 112 .
[0035] The processor 111 may include one or more processors. The processor 111 uses various interfaces and lines to connect various parts of the entire vehicle 100, and executes various functions of the vehicle 100 and processes data by running or executing instructions, programs, code sets or instruction sets stored in the memory 112, and calling data stored in the memory 112.
[0036] The memory 112 may include a random access memory (RAM) or a read-only memory (ROM). The memory 112 may be used to store instructions, programs, codes, code sets or instruction sets. The memory 112 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for implementing at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the following various method embodiments, etc.
[0037] See also Figure 2 , Figure 2 A flow chart of a parking space recognition method proposed in one embodiment of the present application is shown, which is used for a vehicle. The method includes:
[0038] S101, obtaining a target overhead image of a mechanical parking space to be identified.
[0039] Among them, the mechanical parking space is a mobile, non-independent space, and the use of individual parking spaces must rely on the overall operation of the machinery and the exchange of space. The parking center point of the mechanical parking space, the grounding center point of the parking space grounding wire, and the grounding key points are all characteristics of the mechanical parking space. The parking space grounding wire is the line where the slope of the mechanical parking space contacts the ground.
[0040] Figure 3 shows a schematic diagram of a mechanical parking space to be identified, Figure 3 310 in the middle is the vehicle that is undergoing parking space recognition. Figure 3 320 in the figure is the mechanical parking space to be identified. Figure 3 330 is the parking space ground wire. Figure 3 A is the center point of the parking space. Figure 3 B is the center point of the grounding wire. Figure 3 C and D are the key points of the grounding wire.
[0041] The target bird's-eye view image refers to an image when the mechanical parking space to be identified is observed from above the mechanical parking space to be identified in a vertical downward direction.
[0042] In some embodiments, the target overhead view image can be a target overhead view image of the mechanical parking space to be identified obtained by a camera of a vehicle located near the mechanical vehicle to be identified, or a target overhead view image of the mechanical parking space to be identified obtained by a camera of other vehicles (such as mobile phones, tablet computers, and laptop computers, etc.), or an image obtained after normalization, denoising, and other processing of the image taken by a camera (a vehicle's camera or a camera of other vehicles) of the mechanical parking space to be identified, as the target overhead view image.
[0043] S102, determining a parking space center heat map, a grounding line center point heat map, and a grounding line key point heat map according to the target overhead image through a target detection model.
[0044] Among them, the parking space center heat map is used to indicate the confidence of the parking space center point of the mechanical parking space to be identified at different predicted positions, the grounding line center point heat map is used to indicate the confidence of the grounding line center point on the parking space grounding line of the mechanical parking space at different predicted positions, and the grounding line key point heat map is used to indicate the confidence of the grounding line key points on the parking space grounding line at different predicted positions; the grounding line key points are points on the parking space grounding line that are different from the grounding line center points.
[0045] The predicted position refers to a pixel area in the target overhead image. The predicted position may include at least one pixel in the target overhead image. Different predicted positions may include the same number of pixels, and the pixel areas constituted by the pixels included in different predicted positions may be the same. For example, each predicted position is a square pixel area consisting of 16×16 pixels.
[0046] For example, the target overhead image is divided into 40×40 pixel areas, each pixel area is used as a prediction position, and the parking space center heat map, the grounding line center point heat map, and the grounding line key point heat map all include the confidence of each 40×40 prediction position.
[0047] The heat map is a grid map of a fixed size, each grid in the grid map has a heat value, one grid corresponds to a predicted position, and the heat value in each grid indicates the confidence of the predicted position corresponding to the grid.
[0048] For example, Figure 4 A schematic diagram of a prediction position is shown, where the target overhead image is divided into 6×6 prediction positions. Figure 4 A grid in represents a predicted position, and a predicted position includes at least one pixel in the target overhead image. Figure 4The predicted position shown, the confidence of the predicted position represented by the black grid in the heat map (any one of the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map) is (2,4).
[0049] Among them, the thermal value in each grid in the heat map represents the confidence of the grid, the thermal value of each grid in the parking space center heat map refers to the confidence that the predicted position corresponding to the grid is the parking space center point of the mechanical parking space to be identified (that is, the probability that the predicted position corresponding to the grid is the parking space center point of the mechanical parking space to be identified), the thermal value of each grid in the grounding line center point heat map refers to the confidence that the predicted position corresponding to the grid is the grounding line center point of the mechanical parking space to be identified (that is, the probability that the predicted position corresponding to the grid is the grounding line center point of the mechanical parking space to be identified), and the thermal value of each grid in the grounding line key point heat map refers to the confidence that the predicted position corresponding to the grid is the grounding line key point of the mechanical parking space to be identified (that is, the probability that the predicted position corresponding to the grid is the grounding line key point of the mechanical parking space to be identified).
[0050] Among them, the target detection model can be a pre-trained neural network model, and the target detection model is a fully convolutional structure, including a feature extraction module, a feature fusion module and an output module.
[0051] In some embodiments, the training process of the target detection model includes: obtaining a sample overhead view image and location information of a sample mechanical parking space; inputting the sample overhead view image into the initial detection model to obtain a sample parking space center heat map, a sample grounding line center point heat map, and a sample grounding line key point heat map; determining a parking space recognition result of the sample mechanical parking space based on the sample parking space center heat map, the sample grounding line center point heat map, and the sample grounding line key point heat map, the parking space recognition result of the sample mechanical parking space includes the predicted location information of the sample mechanical parking space; calculating the parking space prediction loss based on the predicted location information of the sample mechanical parking space and the location information of the sample mechanical parking space; adjusting the parameters of the initial detection model based on the parking space prediction loss until the training end conditions are met to obtain the target detection model.
[0052] The loss function for calculating the parking space prediction loss may be a mean square error (MSE), a root mean square error (RMSE), a cross-entropy loss, etc., and there is no specific restriction, and it can be selected according to needs. The training end condition may be that the parking space prediction loss is lower than a certain threshold, the number of iterations reaches an upper limit, etc.
[0053] Among them, the number of output channels of the trained target detection model can be set according to needs. For example, the target detection model has 3 output channels, the first output channel outputs the parking space center heat map, the second output channel outputs the grounding line center point heat map, and the third output channel outputs the grounding key point heat map.
[0054] S103, determining the predicted parking space center point, predicted grounding line center point and predicted grounding line key point corresponding to the to-be-identified mechanical parking space according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map.
[0055] In some embodiments, the predicted position in the parking space center heat map where the thermal value exceeds a certain threshold can be obtained as the predicted parking space center point, the predicted position corresponding to the local peak point in the parking space center heat map can be obtained as the predicted parking space center point, and the predicted position with the largest thermal value in the parking space center heat map can also be obtained as the predicted parking space center point. The specific selection can be based on needs and is not limited here.
[0056] Among them, the local peak point is a point in the thermal map whose thermal value is greater than the thermal value of the adjacent points.
[0057] Correspondingly, the predicted grounding line center is determined according to the thermal values of each predicted position in the grounding line center point heat map and the relative position of each predicted position to the predicted parking space center; and the predicted grounding line key points are determined according to the thermal values of each predicted position in the grounding line key point heat map and the relative position of each predicted position to the predicted parking space center.
[0058] For example, the predicted position closest to the predicted parking space center among the predicted positions whose thermal values in the grounding line center point heat map are greater than a certain threshold is obtained as the predicted grounding line center point; and the predicted position closest to the predicted parking space center among the predicted positions whose thermal values in the grounding line key point heat map are greater than a certain threshold is obtained as the predicted grounding line key point.
[0059] The number of predicted grounding line key points is the same as the number of grounding line key point heat maps output by the target detection model. For example, the predicted grounding line key point M is determined based on the grounding line key point heat map corresponding to M, and the predicted grounding line key point N is determined based on the grounding line key point heat map corresponding to N.
[0060] S104, determining the predicted parking space direction of the mechanical parking space to be identified according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point.
[0061] In some embodiments, if there is one predicted grounding line key point, based on the relationship between the two normal vectors of the grounding line formed by the predicted grounding line key point and the predicted grounding line center point and the vector from the predicted grounding line center point to the predicted parking space center point, the direction of a normal vector is determined from the two normal vectors as the predicted parking space direction.
[0062] Among them, the condition for determining the direction of a normal vector from two normal vectors as the predicted parking space direction can be that the direction of the normal vector whose angle with the vector from the center point of the predicted grounding line to the center point of the predicted parking space is close to 0° is determined from the two normal vectors as the predicted parking space direction.
[0063] In other embodiments, if there are at least two predicted grounding line key points, the direction of a normal vector is determined from the two normal vectors as the predicted parking space direction according to the relationship between the two normal vectors of the grounding line formed by the at least two predicted grounding line key points and the vector from the center point of the predicted grounding line to the center point of the predicted parking space. Correspondingly, the number of output channels of the target detection model is at least 4, the first output channel outputs a parking space center heat map, the second output channel outputs a grounding line center point heat map, and the other output channels all output grounding key point heat maps.
[0064] S105. Determine a parking space recognition result of the mechanical parking space to be recognized according to the predicted grounding line key points and the predicted parking space direction.
[0065] In some embodiments, if there is one predicted grounding line key point, the predicted parking space grounding line of the mechanical parking space to be identified is determined on a straight line formed by the predicted grounding line key point and the predicted grounding line center point according to the preset size of the mechanical parking space and the predicted grounding line center point.
[0066] For example, according to the width of the preset size of the mechanical parking space to be identified, two points with a preset width of 1 / 2 from the center point of the predicted grounding line are selected as the endpoints of the predicted parking space grounding line on the straight line formed by the key points of the predicted grounding line and the center point of the predicted grounding line, thereby determining the predicted parking space grounding line.
[0067] Among them, the preset dimensions of the mechanical parking space to be identified include a preset length and a preset width. Here, only the preset width needs to be considered. Generally, the width of a mechanical parking space ranges from 2.3 meters to 2.6 meters. The preset width can be the minimum width of 2.3 meters, or it can be determined based on the width and width margin of the vehicle being identified.
[0068] In other embodiments, if there are at least two predicted grounding line key points, the grounding line key point heat map output by the target detection model can be considered as the endpoint heat map of the predicted parking space grounding line, that is, the grounding line key points obtained through the grounding line key point heat map include at least the two endpoints of the predicted parking space grounding line, and the predicted parking space grounding line can be directly determined based on the two endpoints of the predicted parking space grounding line.
[0069] After obtaining the predicted parking space grounding line of the mechanical parking space to be identified, the predicted parking space grounding line and the predicted parking space direction are projected into the world coordinate system to obtain the parking space identification result of the mechanical parking space to be identified, and then the vehicle parking is controlled according to the parking space identification result.
[0070] In some embodiments, the predicted position information includes a predicted parking space grounding line and a predicted parking space direction, and the position information includes a sample parking space grounding line and a sample parking space direction; during the training process of the target detection model, the parking space prediction loss is calculated based on the predicted position information of the sample mechanical parking space and the position information of the sample mechanical parking space, which may include: calculating the grounding line loss based on the predicted parking space grounding line of the sample mechanical parking space and the sample parking space grounding line of the sample mechanical parking space; calculating the parking space direction loss based on the predicted parking space direction and the sample parking space direction.
[0071] Among them, the loss functions for calculating the ground wire loss and the loss for calculating the parking space direction loss may be the same or different, and may be selected according to specific needs.
[0072] Correspondingly, according to the parking space prediction loss, the parameters of the initial detection model are adjusted until the training end conditions are met to obtain the target detection model, including: according to the grounding wire loss and the calculated parking space direction loss, the parameters of the initial detection model are adjusted until the training end conditions are met to obtain the target detection model.
[0073] In this embodiment, a target overhead image of a mechanical parking space to be identified is obtained; a parking space center heat map, a grounding line center point heat map and a grounding line key point heat map are determined according to the target overhead image through a target detection model; the parking space center heat map is used to indicate the confidence of the parking space center point of the mechanical parking space to be identified at different predicted positions, the grounding line center point heat map is used to indicate the confidence of the grounding line center point of the parking space grounding line of the mechanical parking space to be identified at different predicted positions, and the grounding line key point heat map is used to indicate the confidence of the grounding line key points of the parking space grounding line at different predicted positions; the grounding line key point is a point on the parking space grounding line that is different from the grounding line center; according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map, the predicted parking space center point corresponding to the mechanical parking space to be identified is determined. , predicted grounding line center point and predicted grounding line key point; according to the predicted parking space center point, predicted grounding line center point and predicted grounding line key point, determine the predicted parking space direction of the mechanical parking space to be identified; according to the predicted grounding line key point and predicted parking space direction, determine the parking space identification result of the mechanical parking space to be identified. In this application, since the predicted grounding line key point and the predicted grounding line center point are both points on the parking space grounding line where the slope of the mechanical parking space to be identified contacts the ground, rather than corner points on the parking plane of the mechanical parking space to be identified, there is no projection error when projecting it into the world coordinate system. Then, when the predicted parking space direction is determined by combining the predicted parking space center point, predicted grounding line key point and predicted grounding line center point, the obtained predicted parking space direction is more accurate, making the obtained parking space identification result more accurate. At the same time, the technical path of identifying mechanical parking spaces through top views is consistent with that of identifying ordinary parking spaces, which is convenient for integration with ordinary parking space detection software modules.
[0074] In one embodiment, before S103, the method further includes: determining the offset of the key point of the grounding wire according to the target overhead image by using a target detection model.
[0075] The grounding line key point offsets include the offset values of the grounding line key points at different predicted positions, and the number of grounding line key point offsets is the same as the number of grounding line key point heat maps.
[0076] Taking the prediction of two grounding key points as an example, the target detection model has 8 output channels. The first output channel outputs the parking space center heat map, the second output channel outputs the grounding center point heat map, the 3rd-4th output channels output the grounding key point heat map, and the 5th-8th output channels output the grounding key point offset.
[0077] In some embodiments, only the offset of the grounding line key point in the target prediction position can be obtained. For example, the local peak point in the grounding line key point heat map is the target prediction position of the grounding line key point, and the corresponding offset value is the offset value of all local peak points.
[0078] Correspondingly, S103 includes: determining the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the mechanical parking space to be identified according to the grounding line key point offset, the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map.
[0079] In some embodiments, based on the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map, the predicted parking space center point, the predicted grounding line center point and the initial predicted grounding line key point corresponding to the mechanical parking space to be identified are determined; based on the initial predicted grounding line key point and the grounding line key point offset, the predicted grounding line key point is determined.
[0080] Among them, the specific process of determining the predicted parking space center point, predicted grounding line center point and initial predicted grounding line key point corresponding to the mechanical parking space to be identified according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map can be found in the specific description of S103 and will not be repeated here.
[0081] After obtaining the offset of the grounding wire key point, the predicted grounding wire key point is obtained according to the offset of the grounding wire key point and the initial predicted grounding wire key point.
[0082] For example, the initial predicted grounding key point is (x1, y1), the grounding line key point offset is (△x, △y), and the predicted grounding line key point is (x1+△x, y1+△y).
[0083] In one embodiment, if Figure 5 As shown, according to the grounding line key point offset, the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map, determining the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the mechanical parking space to be identified includes S201-S206, which are specifically as follows:
[0084] S201. Determine the predicted parking space center point according to the thermal values of each predicted position in the parking space center heat map.
[0085] In some embodiments, S201 includes: obtaining local peak points in the parking space center heat map based on the thermal values of each predicted position in the parking space center heat map; extracting local peak points whose thermal values are greater than a first preset threshold from the local peak points in the parking space center heat map as predicted parking space center points.
[0086] If the number of local peak points whose thermal values are greater than the first preset threshold is greater than the first quantity threshold, the local peak points whose thermal values are greater than the first preset threshold are arranged in descending order according to the thermal values, and the first preset number of local peak points whose thermal values are greater than the first preset threshold are obtained from front to back as the predicted parking space center.
[0087] The first preset threshold and the first preset number can be set according to requirements. For example, the first preset threshold is 0.3, and the first preset number is 10.
[0088] S202. Determine a first predicted grounding line center point according to the thermal values of each predicted position in the grounding line center point thermal map.
[0089] In some embodiments, S202 includes: obtaining local peak points in the grounding line center point heat map based on the thermal values of each predicted position in the grounding line center point heat map; extracting local peak points whose thermal values are greater than a second preset threshold from the local peak points in the grounding line center point heat map as the first predicted grounding line center point.
[0090] If the number of local peak points whose thermal values are greater than the second preset threshold is greater than the second number threshold, the local peak points whose thermal values are greater than the second preset threshold are arranged in descending order according to the thermal values, and a second preset number of local peak points whose thermal values are greater than the second preset threshold are obtained from front to back as the first predicted grounding line center point.
[0091] The second preset threshold value may be the same as or different from the first preset threshold value, and the second preset number may be the same as or different from the first preset number, and may be set specifically according to requirements.
[0092] S203. Determine a first predicted grounding line key point according to the thermal values of each predicted position in the grounding line key point thermal map.
[0093] In some embodiments, S203 includes: obtaining local peak points in the grounding line key point heat map based on the thermal values of each predicted position in the grounding line key point heat map; extracting local peak points whose thermal values are greater than a third preset threshold from the local peak points in the grounding line key point heat map as the first predicted grounding line key point.
[0094] If the number of local peak points whose thermal values are greater than the third preset threshold is greater than the third number threshold, the local peak points whose thermal values are greater than the third preset threshold are arranged in descending order according to the thermal values, and the third preset number of local peak points whose thermal values are greater than the third preset threshold are obtained from front to back as the first predicted grounding line key points.
[0095] Among them, the third preset threshold, the second preset threshold and the first preset threshold can be the same or different, the third preset number, the second preset number and the first preset number can be the same or different, and can be set according to specific needs.
[0096] In some embodiments, if there are multiple grounding line key point heat maps output by the target detection model, for each grounding line key point heat map, the first predicted grounding line key point in the grounding line key point heat map is determined according to the heat values of each predicted position in the grounding line key point heat map. The first predicted grounding line key point is the predicted position where the predicted grounding line key point in the grounding line key point heat map may be.
[0097] S204: Determine a second predicted grounding line key point corresponding to the first predicted grounding line key point according to the first predicted grounding line key point and the offset value of the first predicted grounding line key point in the grounding line key point offset.
[0098] Among them, a first predicted grounding line key point corresponds to a second predicted grounding line key point. The grounding line key point offset is the same as the number of the grounding line key point heat map, and an offset value in the grounding line key point offset corresponds to a first predicted grounding line key point.
[0099] For example, the first predicted grounding key point is (x2, y2), the grounding key point offset is (△x1, △y1), and the second predicted grounding key point is (x2+△x1, y2+△y1).
[0100] S205. Determine the predicted grounding line center point from the first predicted grounding line center points according to the relative position between the predicted parking space center point and the first predicted grounding line center point.
[0101] In some implementations, S205 includes: selecting, from among the first predicted grounding line center points, a first predicted grounding line center point that is closest to the predicted parking space center point as the predicted grounding line center point.
[0102] In some embodiments, if there are multiple predicted parking space center points, for each predicted parking space center point, the first predicted grounding line center point closest to the predicted parking space center point is selected from the first predicted grounding line center points as the predicted grounding line center point that matches the predicted parking space center point. In this way, for each predicted parking space center point, the corresponding predicted grounding line center point is determined.
[0103] S206: Determine a predicted grounding line key point from the second predicted grounding line key points according to a relative position between the predicted parking space center point and the second predicted grounding line key point.
[0104] In some implementations, S206 includes: selecting, from the second predicted grounding line key points, a second predicted grounding line key point that is closest to the predicted parking space center point as the predicted grounding line key point.
[0105] In some implementations, if there are multiple predicted parking space center points, for each predicted parking space center point, the second predicted grounding line key point closest to the predicted parking space center point is selected from the second predicted grounding line key points as the predicted grounding line key point that matches the predicted parking space center point. In this way, for each predicted parking space center point, the corresponding predicted grounding line key point is determined.
[0106] If there are multiple grounding line key point heat maps output by the target detection model, for each grounding line key point heat map, a predicted grounding line key point that matches the center point of each predicted parking space is selected from the second predicted grounding line key points corresponding to each first predicted grounding line key point in the grounding line key point heat map.
[0107] For example, there are three predicted parking space center points (A1, A2 and A3), and there are two grounding line key point heat maps. According to each grounding line key point heat map, 8 second predicted grounding line key points are obtained (for the convenience of description, 8 second predicted grounding line key points are obtained according to the two grounding line key point heat maps, which are called second predicted grounding line key point sets E1 and E2). For the predicted parking space center point A1, the second predicted grounding line key point closest to A1 is selected from the second predicted grounding line key point set E1 as a predicted grounding line key point matching A1, and the second predicted grounding line key point closest to A1 is selected from the second predicted grounding line key point set E2 as another predicted grounding line key point matching A1. Similarly, two predicted grounding line key points matching A2 and A3 respectively can be determined from the second predicted grounding line key point sets E1 and E2.
[0108] The two predicted grounding line key points determined to match A1, A2 and A3 respectively may be completely the same, partially the same, or completely different.
[0109] In this embodiment, when there are multiple predicted parking space center points, S104 includes: determining the predicted parking space direction of the mechanical parking space to be identified under each predicted parking space center point according to each predicted parking space center point, the predicted grounding line center point matching each predicted parking space center point, and the predicted grounding line key point.
[0110] Among them, one predicted parking space center point corresponds to one predicted parking space direction, and usually the difference between the predicted parking space directions of the mechanical parking spaces to be identified under the predicted parking space center points is not large.
[0111] When there are two predicted grounding line key points, such as Figure 6 As shown, S104 includes S301-S304, which are as follows:
[0112] S301. Determine the predicted parking space grounding line of the mechanical parking space to be identified according to two predicted grounding line key points.
[0113] In some implementations, the predicted parking space grounding line of the to-be-identified mechanical parking space is determined based on the positional relationship between two predicted grounding line key points on the parking space grounding line.
[0114] For example, if two predicted grounding wire key points are the endpoints of the parking space grounding wire, directly connect the two predicted grounding wire key points to obtain the predicted parking space grounding wire; if two predicted grounding wire key points are points on the parking space grounding wire that are respectively at a preset length away from the endpoints, connect the two predicted grounding wire key points and add twice the preset length to obtain the predicted parking space grounding wire.
[0115] In some embodiments, if there are multiple predicted parking space center points, the predicted parking space grounding line of the mechanical parking space to be identified under each predicted parking space center point is determined based on the positional relationship between two predicted grounding line key points matching each predicted parking space center point on the parking space grounding line.
[0116] S302: Determine a first prediction direction and a second prediction direction perpendicular to the predicted parking space grounding line.
[0117] The first prediction direction is opposite to the second prediction direction.
[0118] In some embodiments, the predicted direction of each predicted parking space center point may be represented by the direction of the normal vector of the predicted parking space grounding line, for example, Figure 7 The direction of the normal vector p1 of the center ground line 601 is the first predicted direction under the center point A of the predicted parking space, and the direction of the normal vector p2 is the second predicted direction under the center point A of the predicted parking space.
[0119] S303: Determine a third predicted direction according to the predicted parking space center point and the predicted ground line center point.
[0120] The third predicted direction may also be represented by the direction of a vector, which is a vector from the center point of the predicted grounding line to the center point of each predicted parking space.
[0121] like Figure 7 As shown, Figure 7 The midpoint vector p3 is a vector from the predicted ground line center point B to the predicted parking space center point A, and the direction of the vector p3 is the third predicted direction.
[0122] In some embodiments, if there are multiple predicted parking space center points, a first predicted direction and a second predicted direction perpendicular to the predicted parking space grounding line under each predicted parking space center point are determined; based on each predicted parking space center point and the predicted grounding line center point matching each predicted parking space center point, a third predicted direction under each predicted parking space center point is determined.
[0123] S304: According to the difference between the first prediction direction and the third prediction direction, and the difference between the second prediction direction and the third prediction direction, select the predicted parking space direction of the to-be-identified mechanical parking space from the first prediction direction and the second prediction direction.
[0124] like Figure 7 As shown, Figure 7 The directions of vector p1 and vector p3 are opposite, while the directions of vector p2 and vector p3 are the same, so the direction of vector p2 is determined to be the mechanical parking space to be identified.
[0125] In some embodiments, the difference between the first prediction direction and the third prediction direction can be represented by the cosine distance between the vector representing the first prediction direction and the vector representing the third prediction direction, and the difference between the first prediction direction and the third prediction direction can be represented by the cosine distance between the vector representing the second prediction direction and the vector representing the third prediction direction.
[0126] Specifically, in some embodiments, S304 includes: calculating the cosine distance between the first predicted direction and the third predicted direction as the difference between the first predicted direction and the third predicted direction; calculating the cosine distance between the second predicted direction at the center point of the predicted parking space and the third predicted direction at the center point of the predicted parking space as the difference between the second predicted direction and the third predicted direction at the center point of the predicted parking space; if the difference between the first predicted direction and the third predicted direction is less than zero, determining the first predicted direction as the predicted parking space direction of the mechanical parking space to be identified; if the difference between the second predicted direction and the third predicted direction is less than zero, determining the second predicted direction as the predicted parking space direction of the mechanical parking space to be identified.
[0127] Still taking vectors p1, p2 and p3 as an example, the cosine distance cos(p1, p3)<0, cos(p2, p3)>0, from which the direction of p2 is selected as the predicted parking space direction of the mechanical parking space to be identified under the predicted parking space center point A.
[0128] In some embodiments, if there are multiple predicted parking space center points, the predicted parking space direction of the mechanical parking space to be identified under each predicted parking space center point is selected from the first predicted direction and the second predicted direction under each predicted parking space center point according to the difference between the first predicted direction and the third predicted direction under each predicted parking space center point, and the difference between the second predicted direction and the third predicted direction under each predicted parking space center point.
[0129] Correspondingly, in S105, the parking space recognition results of the mechanical parking spaces to be recognized include the parking space recognition results of the mechanical parking spaces to be recognized under the center points of each predicted parking space, and the number of the parking space recognition results of the mechanical parking spaces to be recognized is the same as the number of the center points of the predicted parking spaces.
[0130] Still taking the example of predicting that there are three parking space center points (A1, A2 and A3), the parking space recognition results finally output include the parking space recognition result corresponding to A1, the parking space recognition result corresponding to A2 and the parking space recognition result corresponding to A3.
[0131] After obtaining the parking space recognition results of the mechanical parking spaces to be recognized under the center points of each predicted parking space, each parking space recognition result is displayed on the panoramic interface of the vehicle. The driver selects a parking space recognition result as the target parking space recognition result according to the actual parking situation and controls the parking of the vehicle.
[0132] In this embodiment, the first predicted grounding line key point determined according to the grounding line key point heat map is corrected by the grounding line key point offset to obtain a more accurate predicted grounding line key point, and then the predicted parking space direction obtained according to the predicted grounding line key point is more accurate, and the obtained parking space recognition result is more accurate. In addition, when there are multiple predicted parking space center points, a parking space recognition result is determined for each predicted parking space center point, and the user can select a parking space recognition result as the target parking space recognition result according to the needs to control the parking of the vehicle, thereby improving the user's parking experience.
[0133] In one embodiment, if Figure 8 As shown, before S101, the method further includes:
[0134] S401, obtaining a plurality of fisheye images of a to-be-identified mechanical parking space from a panoramic camera.
[0135] Since the panoramic camera has an ultra-wide-angle feature, the images it captures will produce strong image distortion. Therefore, after acquiring multiple fisheye images, the fisheye images are subjected to distortion correction.
[0136] In some embodiments, a corresponding distortion model (e.g., equidistant projection, equi-stereoscopic projection, etc.) is established based on the physical characteristics of the panoramic camera; the distortion parameters of the distortion model are determined by an optimization algorithm based on a known calibration image; the fisheye image is distortion corrected according to the distortion parameters to obtain a corrected fisheye image, so that the corrected fisheye image will be closer to the real scene and reduce the stitching error caused by the distortion.
[0137] Among them, the fisheye image directly collected by the panoramic camera is in YUV format, and it is necessary to convert the fisheye image in YUV format into RGB format. The format conversion process can be performed before distortion correction or after distortion correction.
[0138] S402: stitching multiple fisheye images to obtain an initial bird's-eye view image.
[0139] In some embodiments, S402 includes: extracting feature points from the fisheye image after the distortion is corrected through a feature point detection algorithm; searching for matching feature points between the fisheye images through a feature point matching algorithm (such as FLANN, BFMarcher, etc.) to form feature point pairs; calculating the transformation matrix between the fisheye images based on the matching feature point pairs; performing a perspective transformation on the fisheye image based on the transformation matrix, and splicing the fisheye images after the perspective transformation in a preset order to obtain an initial overhead view image.
[0140] Among them, feature point detection algorithms include Scale-Invariant Feature Transform (SIFT), Speeded-Up Robust Features (SURF), Oriented FAST and Rotated BRIEF (ORB) combined with FAST corner detection algorithm and BRIEF descriptor algorithm, and feature point matching algorithms include Fast Library for Approximate Nearest Neighbors (FLANN), Brute-Force Matcher (BFMarcher), etc., which can be selected according to specific needs.
[0141] In some embodiments, before calculating the transformation matrix between fisheye images based on the matched feature point pairs, the incorrectly matched feature point pairs may be eliminated. This process may be achieved through algorithms such as Random Sample Consensus (RANSAC) to improve the accuracy and robustness of the matching.
[0142] In some implementations, an image fusion algorithm (such as multi-band fusion, etc.) may be used to optimize and correct the initial top-view image, so that the stitched initial top-view image will be more natural, smooth, and without obvious seams.
[0143] S403 , normalizing the initial bird's-eye view image according to the average value and standard deviation of each color channel in the initial bird's-eye view image to obtain a target bird's-eye view image of the mechanical parking space to be identified.
[0144] In some implementations, the initial top view image may be scaled to a resolution required by the target detection model, such as 640×640.
[0145] After obtaining the scaled initial overhead image, the average value and standard deviation of each color channel of the initial overhead image in RGB format at the resolution required by the target detection model are calculated. Then, the initial overhead image is normalized according to formula (1) to obtain the target overhead image. Formula (1) is as follows:
[0146]
[0147] Among them, z iR is the normalized value of the pixel value of pixel i in the R color channel, x iR is the pixel value of pixel i in the R color channel, μ R is the mean value of the R color channel, σ R is the standard deviation of the R color channel, z iG is the normalized value of the pixel value of pixel i in the G color channel, x iG is the pixel value of pixel i in the G color channel, μ G is the average value of the G color channel, σ G is the standard deviation of the G color channel, z iB is the normalized value of the pixel value of pixel i in the B color channel, x iB is the pixel value of pixel i in the B color channel, μ B is the average value of the B color channel, σ B is the standard deviation of the B color channel.
[0148] In this embodiment, multiple fisheye images taken by a panoramic camera for the mechanical parking space to be identified are subjected to image stitching and normalization, so as to convert the multiple fisheye images into a target bird's-eye view image that can be input into the target detection model.
[0149] See attached Fig. 9 , Fig. 9 The following is a block diagram of a parking space recognition device according to an embodiment of the present application. The parking space recognition device 600 for a vehicle includes:
[0150] An acquisition module 610 is used to acquire a target overhead image of a mechanical parking space to be identified;
[0151] The model determination module 620 is used to determine the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map according to the target overhead image through the target detection model; the parking space center heat map is used to indicate the confidence of the parking space center point of the mechanical parking space to be identified at different predicted positions, the grounding line center point heat map is used to indicate the confidence of the grounding line center point on the parking space grounding line of the mechanical parking space to be identified at different predicted positions, and the grounding line key point heat map is used to indicate the confidence of the grounding line key point on the parking space grounding line at different predicted positions; the grounding line key point is a point different from the grounding line center;
[0152] A point determination module 630 is used to determine the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the mechanical parking space to be identified according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map;
[0153] A direction determination module 640, for determining the predicted parking space direction of the mechanical parking space to be identified according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point;
[0154] The parking space determination module 650 is used to determine the parking space identification result of the mechanical parking space to be identified according to the predicted grounding line key points and the predicted parking space direction.
[0155] Optionally, the parking space recognition device 600 further includes: an offset correction module, which is used to determine the offset of the grounding wire key point according to the target overhead image through the target detection model; the grounding wire key point offset includes the offset value of the grounding wire key point at different predicted positions.
[0156] Optionally, the point determination module 630 is also used to determine the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the mechanical parking space to be identified based on the grounding line key point offset, the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map.
[0157] Optionally, the point determination module 630 is also used to determine the predicted parking space center point according to the thermal values of each predicted position in the parking space center heat map; determine the first predicted grounding line center point according to the thermal values of each predicted position in the grounding line center point heat map; determine the first predicted grounding line key point according to the thermal values of each predicted position in the grounding line key point heat map; determine the second predicted grounding line key point corresponding to each first predicted grounding line key point according to the first predicted grounding line key point and the offset value of the first predicted grounding line key point in the grounding line key point offset; one first predicted grounding line key point corresponds to one second predicted grounding line key point; determine the predicted grounding line center point from the first predicted grounding line center point according to the relative position between the predicted parking space center point and the first predicted grounding line center point; determine the predicted grounding line key point from the second predicted grounding line key point according to the relative position between the predicted parking space center point and the second predicted grounding line key point.
[0158] Optionally, there are two predicted grounding line key points; the direction determination module 640 is also used to determine the predicted parking space grounding line of the mechanical parking space to be identified based on the two predicted grounding line key points; determine a first predicted direction and a second predicted direction perpendicular to the predicted parking space grounding line; the first predicted direction is opposite to the second predicted direction; determine a third predicted direction based on the predicted parking space center point and the predicted grounding line center point; select the predicted parking space direction of the mechanical parking space to be identified from the first predicted direction and the second predicted direction based on the difference between the first predicted direction and the third predicted direction, and the difference between the second predicted direction and the third predicted direction.
[0159] Optionally, the direction determination module 640 is also used to calculate the cosine distance between the first predicted direction and the third predicted direction as the difference between the first predicted direction and the third predicted direction; calculate the cosine distance between the second predicted direction at the center point of the predicted parking space and the third predicted direction at the center point of the predicted parking space as the difference between the second predicted direction and the third predicted direction at the center point of the predicted parking space; if the difference between the first predicted direction and the third predicted direction is less than zero, determine the first predicted direction as the predicted parking space direction of the mechanical parking space to be identified; if the difference between the second predicted direction and the third predicted direction is less than zero, determine the second predicted direction as the predicted parking space direction of the mechanical parking space to be identified.
[0160] Optionally, the point determination module 630 is further configured to select, from among the second predicted grounding line key points, a second predicted grounding line key point that is closest to the predicted parking space center point as the predicted grounding line key point.
[0161] Optionally, the acquisition module 610 is also used to obtain multiple fisheye images of the mechanical parking space to be identified by the panoramic camera; stitch the multiple fisheye images to obtain an initial overhead view image; normalize the initial overhead view image according to the average value and standard deviation of each color channel in the initial overhead view image to obtain a target overhead view image of the mechanical parking space to be identified.
[0162] Those skilled in the art can clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here.
[0163] In addition, each function in each embodiment of the present application can be integrated into one processing module, or each module can exist physically separately, or two or more modules can be integrated into one module. The above integrated modules can be implemented in the form of hardware or software function modules.
[0164] On the other hand, the present application also provides a computer-readable storage medium, in which program code is stored. The program code can be called by a processor to execute the method described in the above method embodiment.
[0165] The computer readable storage medium may be an electronic memory such as a flash memory, an EEPROM (electrically erasable programmable read-only memory), an EPROM, a hard disk, or a cluster of ROMs. Optionally, the computer readable storage medium comprises a non-transitory computer-readable storage medium. The computer readable storage medium has storage space for program codes that execute any of the method steps in the above method. These program codes can be read from or written to one or more computer program products. The program code can be compressed, for example, in an appropriate form.
[0166] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit it. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. However, these modifications or replacements do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present application.
Claims
1. A parking space recognition method, characterized in that: include: Obtain a target overhead image of the mechanical parking space to be identified; Determine the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map according to the target overhead image through the target detection model; the parking space center heat map is used to indicate the confidence of the parking space center point of the mechanical parking space to be identified at different predicted positions, the grounding line center point heat map is used to indicate the confidence of the grounding line center point on the parking space grounding line of the mechanical parking space to be identified at different predicted positions, and the grounding line key point heat map is used to indicate the confidence of the grounding line key point on the parking space grounding line at different predicted positions; the grounding line key point is a point different from the grounding line center; Determine the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the to-be-identified mechanical parking space according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map; Determining the predicted parking space direction of the to-be-identified mechanical parking space according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point; The parking space recognition result of the mechanical parking space to be recognized is determined according to the predicted grounding line key point and the predicted parking space direction.
2. The method according to claim 1, characterized in that Before determining the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the to-be-identified mechanical parking space according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map, the method further includes: Determine the grounding line key point offset according to the target overhead image through the target detection model; the grounding line key point offset includes the offset value of the grounding line key point at different predicted positions; The step of determining the predicted parking space center point, the predicted grounding line center point, and the predicted grounding line key point corresponding to the to-be-identified mechanical parking space according to the parking space center heat map, the grounding line center point heat map, and the grounding line key point heat map includes: According to the grounding wire key point offset, the parking space center heat map, the grounding wire center point heat map and the grounding wire key point heat map, the predicted parking space center point, the predicted grounding wire center point and the predicted grounding wire key point corresponding to the mechanical parking space to be identified are determined.
3. The method according to claim 2, characterized in that The step of determining the predicted parking space center point, the predicted grounding line center point, and the predicted grounding line key point corresponding to the to-be-identified mechanical parking space according to the grounding line key point offset, the parking space center heat map, the grounding line center point heat map, and the grounding line key point heat map includes: Determine the predicted parking space center point according to the thermal values of each predicted position in the parking space center thermal map; Determine a first predicted grounding line center point according to the thermal values of each predicted position in the grounding line center point thermal map; Determine a first predicted grounding line key point according to the thermal values of each predicted position in the grounding line key point thermal map; According to the first predicted grounding line key point and the offset value of the first predicted grounding line key point in the grounding line key point offset, determine the second predicted grounding line key point corresponding to the first predicted grounding line key point; a first predicted grounding line key point corresponds to a second predicted grounding line key point; Determining a predicted grounding line center point from among the first predicted grounding line center points according to a relative position between the predicted parking space center point and the first predicted grounding line center point; According to the relative position between the predicted parking space center point and the second predicted grounding line key point, the predicted grounding line key point is determined from the second predicted grounding line key points.
4. The method according to claim 3, characterized in that The step of determining the predicted grounding line key point from the second predicted grounding line key points according to the relative position between the predicted parking space center point and the second predicted grounding line key point comprises: A second predicted grounding line key point closest to the predicted parking space center point is selected from the second predicted grounding line key points as the predicted grounding line key point.
5. The method according to claim 1, characterized in that There are two predicted grounding line key points; determining the predicted parking space direction of the to-be-identified mechanical parking space according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key points, including: Determining the predicted parking space grounding line of the to-be-identified mechanical parking space according to the two predicted grounding line key points; Determine a first predicted direction and a second predicted direction perpendicular to the predicted parking space ground line; the first predicted direction is opposite to the second predicted direction; Determining a third predicted direction according to the predicted parking space center point and the predicted ground line center point; According to the difference between the first prediction direction and the third prediction direction, and the difference between the second prediction direction and the third prediction direction, the predicted parking space direction of the to-be-identified mechanical parking space is selected from the first prediction direction and the second prediction direction.
6. The method according to claim 5, characterized in that The selecting the predicted parking space direction of the to-be-identified mechanical parking space from the first predicted direction and the second predicted direction according to the difference between the first predicted direction and the third predicted direction, and the difference between the second predicted direction and the third predicted direction, comprises: calculating a cosine distance between the first prediction direction and the third prediction direction as a difference between the first prediction direction and the third prediction direction; Calculating a cosine distance between a second predicted direction at the center point of the predicted parking space and a third predicted direction at the center point of the predicted parking space as a difference between the second predicted direction at the center point of the predicted parking space and the third predicted direction; If the difference between the first predicted direction and the third predicted direction is less than zero, determining the first predicted direction as the predicted parking space direction of the to-be-identified mechanical parking space; If the difference between the second predicted direction and the third predicted direction is less than zero, the second predicted direction is determined to be the predicted parking space direction of the to-be-identified mechanical parking space.
7. The method according to claim 1, characterized in that The step of obtaining a target overhead image of a mechanical parking space to be identified includes: Acquire a plurality of fisheye images of the to-be-identified mechanical parking space by a panoramic camera; Performing image stitching on the multiple fisheye images to obtain an initial bird's-eye view image; The initial bird's-eye view image is normalized according to the average value and standard deviation of each color channel in the initial bird's-eye view image to obtain the target bird's-eye view image of the to-be-identified mechanical parking space.
8. A parking space recognition device, characterized in that: include: An acquisition module is used to acquire a target overhead image of a mechanical parking space to be identified; A model determination module, used to determine a parking space center heat map, a grounding line center point heat map and a grounding line key point heat map according to the target overhead image through a target detection model; the parking space center heat map is used to indicate the confidence of the parking space center point of the mechanical parking space to be identified at different predicted positions, the grounding line center point heat map is used to indicate the confidence of the grounding line center point on the parking space grounding line of the mechanical parking space to be identified at different predicted positions, and the grounding line key point heat map is used to indicate the confidence of the grounding line key point on the parking space grounding line at different predicted positions; the grounding line key point is a point on the parking space grounding line that is different from the grounding line center; A point determination module, used to determine the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point corresponding to the to-be-identified mechanical parking space according to the parking space center heat map, the grounding line center point heat map and the grounding line key point heat map; A direction determination module, used to determine the predicted parking space direction of the to-be-identified mechanical parking space according to the predicted parking space center point, the predicted grounding line center point and the predicted grounding line key point; The parking space determination module is used to determine the parking space identification result of the mechanical parking space to be identified according to the predicted grounding line key point and the predicted parking space direction.
9. A vehicle, characterized in that: include: one or more processors; Memory; One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the one or more processors, and the one or more applications are configured to execute the method according to any one of claims 1-7.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a program code executable by a processor, and when the program code is executed by the processor, the processor executes the method according to any one of claims 1 to 7.