Region detection method and device and electronic equipment
By determining the bird's-eye view of the target parking space in the intelligent vehicle and combining the parking space detection model and the driving area model, the problem of inaccurate parking space detection in smart vehicles when the light and parking space lines change is solved, achieving higher parking space detection accuracy and efficiency.
Patent Information
- Application Number
- CN202311811764.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-26
- Publication Date
- 2025-06-27
AI Technical Summary
When the light intensity and parking space line shape of smart vehicles change, traditional image processing and deep learning parking space line detection algorithms lead to inaccurate parking space detection and making it difficult to accurately determine parking spaces.
By determining the bird's-eye view of the target parking space, enter the parking space detection model to obtain the parking space rotation frame set, and enter the driving area model to obtain the driving area results. Combined with the preset logic algorithm, the accuracy of parking space detection is improved.
It improves the accuracy and efficiency of intelligent vehicles in determining parking spaces, reduces the probability of misidentification, and ensures the accuracy of parking space detection results.
Smart Images

Figure CN120220103A_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of intelligent driving technology, and particularly to a method, device, and electronic device for area detection. Background Art
[0002] With the increase in intelligent vehicles, in order for intelligent vehicles to accurately detect parking spaces, the main parking space detection methods used are traditional image processing detection algorithms and deep learning parking space line detection algorithms. The specific detection process is as follows:
[0003] In traditional image processing detection algorithms, an intelligent vehicle sensor determines a target line object. When the target line object meets the line object of the preset parking space line characteristics, and when the width of the target line object is not less than the preset width threshold, if there is no feature identifier in the area between the target line objects, and when the target line object meets the preset parking space construction conditions, a virtual parking space is constructed based on the target line object.
[0004] In the deep learning parking space line detection algorithm, an intelligent vehicle sensor acquires a first image containing parking space corner points and the parking space lines corresponding to the parking space corner points, inputs the first image into a detection model, obtains a heat map of the position information of the parking space corner points based on the heat map prediction branch in the detection model, and obtains a feature map containing the direction information of the parking space lines based on the direction prediction branch in the detection model. Then, the position information of the parking space corner points is obtained according to the heat map, and the parking space lines of the parking space corner points are obtained according to the feature map.
[0005] Based on the above description, when the light intensity and the shape of the parking space lines change, it will cause the target line object and the first image determined by the intelligent vehicle sensor to be inaccurate, resulting in parking space detection failure. Therefore, how to accurately determine the parking space of an intelligent vehicle has become the main problem to be solved currently. Summary of the Invention
[0006] This application provides a method, device, and electronic device for area detection to improve the accuracy of the parking space detection result determined by an intelligent vehicle.
[0007] In a first aspect, this application provides a method for area detection, the method including:
[0008] Determine a target parking space bird's-eye view, where the target parking space bird's-eye view includes at least one parking space to be detected of an intelligent vehicle;
[0009] Input the target parking space bird's-eye view into a parking space detection model, and output a set of parking space rotation frames corresponding to the target parking space bird's-eye view;
[0010] Input the target parking space bird's-eye view into a drivable area model, and output the drivable area result in the target parking space bird's-eye view;
[0011] Input the set of parking space rotation frames and the drivable area result into a preset logical algorithm to obtain the parking space detection result corresponding to the bird's-eye view of the target parking space.
[0012] Through the above method, a set of parking space rotation frames with parking space features is determined in the bird's-eye view of the target parking space by the parking space detection model, and the area contour without obstacles blocking the driving of the intelligent vehicle is determined in the bird's-eye view of the target parking space by the drivable area model, ensuring the accuracy of the intelligent vehicle in determining the parking space detection result.
[0013] In a possible design, before determining the bird's-eye view of the target parking space, it further includes:
[0014] Obtain N bird's-eye views of parking spaces, where N is a positive integer greater than 1;
[0015] Mark the labels corresponding to all the feature regions to be detected in each bird's-eye view of the parking space, and use each bird's-eye view of the parking space and the corresponding all labels as the parking space detection training data set;
[0016] Input the parking space detection training data set into the target detection model for training to obtain the mean average precision value MAP corresponding to each iteration;
[0017] Select the maximum MAP value from all the MAP values, and use the target detection model corresponding to the maximum MAP value as the parking space detection model.
[0018] Through the above method, the target detection model is trained, and the target detection model with the maximum MAP value is selected as the parking space detection model, ensuring the accuracy of the parking space detection model in determining the set of parking space rotation frames.
[0019] In a possible design, before determining the bird's-eye view of the target parking space, it further includes:
[0020] Obtain M bird's-eye views of parking spaces, and mark all the labels corresponding to the drivable areas in each bird's-eye view of the parking space, where M is a positive integer greater than 1;
[0021] Input each bird's-eye view of the parking space and all the labels corresponding to each bird's-eye view of the parking space into the semantic segmentation model for training to obtain the mean intersection over union value MIOU corresponding to each iteration;
[0022] Select the maximum MIOU value from all the MIOU values, and use the semantic segmentation model corresponding to the maximum MIOU value as the drivable area model.
[0023] Through the above method, the semantic segmentation model is trained, and the semantic segmentation model corresponding to the maximum MIOU value is selected as the drivable area model, ensuring the accuracy of the drivable area model in determining the contour of the area without obstacles.
[0024] In a possible design, the step of inputting the target parking space bird's-eye view into the parking space detection model and outputting a set of parking space rotation boxes corresponding to the target parking space bird's-eye view includes:
[0025] The set of rotation boxes at least includes a parking space overall area box, a parking space entrance area box, a parking space line area box, a parking space corner point area box, and a ground lock area box.
[0026] Through the above method, all the rotation boxes with parking space features are placed in the set of parking space rotation boxes, ensuring the diversity and accuracy of the parking space rotation boxes in the set of parking space rotation boxes.
[0027] In a possible design, the step of inputting the set of parking space rotation boxes and the drivable area result into a preset logic algorithm to obtain a parking space detection result corresponding to the target parking space bird's-eye view includes:
[0028] Determine whether there is a parking space entrance area box in each parking space overall area box in the set of parking space rotation boxes;
[0029] If there is a parking space entrance area box in the parking space overall area box, determine that there is a first corner point and a second corner point in the parking space entrance area box. When the length of the line segment between the first corner point and the second corner point does not meet the preset entrance line segment length, take the parking space overall area corresponding to the parking space overall area box as an invalid area as the parking space detection result;
[0030] If there is no parking space entrance area box in the parking space overall area box, determine that the length value of the parking space overall area box is not within the preset length range value, and / or the width value of the parking space overall area box is not within the preset width range value, and take the parking space overall area corresponding to the parking space overall area box as an invalid area as the parking space detection result.
[0031] Through the above method, a parking space detection result with the parking space overall area as an invalid area is determined, narrowing the range for the intelligent vehicle to determine the parking space, which is beneficial for the intelligent vehicle to more accurately determine the parking space.
[0032] In a possible design, after there is a parking space entrance area box in the parking space overall area box, it further includes:
[0033] When the length of the line segment between the third corner point and the fourth corner point at the vehicle tail meets the preset entrance line segment length, determine 2 parking space tail corner points corresponding to the parking space overall area box;
[0034] Take the first corner point, the second corner point, the third corner point, and the fourth corner point in the overall parking space area frame, as well as the coordinates of the first corner point, the coordinates of the second corner point, the coordinates of the third corner point, and the coordinates of the fourth corner point as the parking space detection result.
[0035] Through the above method, two tail corner points corresponding to the overall parking space area frame are determined, so that the parking space area can be determined based on the first corner point, the second corner point, the third corner point, and the fourth corner point, improving the accuracy of determining the parking space.
[0036] In a possible design, after there is no parking space entrance area frame in the overall parking space area frame, it further includes:
[0037] Determine that the length value of the overall parking space area frame is within a preset length range value, and the width value of the overall parking space area frame is within a preset width range value;
[0038] Take the coordinates of the first corner point, the coordinates of the second corner point, the coordinates of the third corner point, and the coordinates of the fourth corner point in the overall parking space area frame as the parking space detection result.
[0039] Through the above method, by judging the length value and width value of the overall parking space area frame, it is determined that the overall parking space area is the parking space area, which is beneficial to determining the accuracy of the parkable parking space.
[0040] In a possible design, after the length of the line segment between the first corner point and the second corner point meets the preset entrance line segment length, it further includes:
[0041] Determine the parking scores corresponding to the overall parking space area frame and the drivable area result respectively, and the ground lock state in the ground lock area frame;
[0042] Determine the parking space detection result based on the parking scores of the drivable area result and the overall parking space area frame respectively and the ground lock state.
[0043] Through the above method, the parking space detection result is determined by the parkable attributes of the overall parking space area frame and the drivable area result and the ground lock state, which includes various scenarios in the process of an intelligent vehicle determining a parking space, making the applicable scenarios for determining the parking space detection result more extensive.
[0044] In a possible design, the determining the parking space detection result based on the parking scores of the drivable area result and the overall parking space area frame respectively and the ground lock state includes:
[0045] If it is determined that the areas corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point are all drivable areas, and the states of all the ground locks are closed states, then the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as a parkable parking space as the parking space detection result; or
[0046] If it is determined that there are non-drivable areas in the areas corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point, and the states of all the ground locks are open states, then the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as an unparkable parking space as the parking space detection result.
[0047] Through the above method, the parking space detection result is determined based on the parkable attribute of the overall area frame of the parking space and the result of the drivable area and the ground lock state, and the parking space area is subdivided into parkable parking spaces and unparkable parking spaces, which improves the accuracy of the intelligent vehicle to determine the parkable parking space.
[0048] In a possible design, after determining the parking space detection result based on the respective parking scores of the drivable area result and the overall area frame of the parking space and the ground lock state, it further includes:
[0049] Determine the first score of the overall area frame of the parking space and the second score of the ground lock area frame, and determine the third score of the drivable parking space result;
[0050] Calculate the first product of the first score, the second score, and the third score. When the first product exceeds the preset parking threshold, the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as a parkable parking space as the parking space detection result; or
[0051] When the first product does not exceed the preset parking threshold, the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as an unparkable parking space as the parking space detection result.
[0052] Through the above method, the parking space detection result is determined by the first product, and whether the parking space area is parkable is determined by the scores, which improves the accuracy of the parking space detection result and improves the accuracy of the intelligent vehicle to determine the parkable parking space.
[0053] In a second aspect, the present application provides a region detection device, and the device includes:
[0054] A determination module, configured to determine a bird's-eye view of a target parking space;
[0055] A rotation module, configured to input the bird's-eye view of the target parking space into a parking space detection model, and output a set of parking space rotation frames corresponding to the bird's-eye view of the target parking space;
[0056] An area module, configured to input the bird's-eye view of the target parking space into a drivable area model, and output a drivable area result in the bird's-eye view of the target parking space;
[0057] A logic module, configured to input the set of parking space rotation frames and the drivable area result into a preset logic algorithm to obtain a parking space detection result corresponding to the bird's-eye view of the target parking space.
[0058] In a possible design, the determination module is specifically configured to obtain N bird's-eye views of parking spaces, label the labels corresponding to all the to-be-detected feature regions in each bird's-eye view of the parking space, use each bird's-eye view of the parking space and the corresponding all labels as a parking space detection training data set, input the parking space detection training data set into a target detection model for training to obtain the mean average precision value MAP corresponding to each iteration, screen out the maximum MAP value from all the MAP values, and use the target detection model corresponding to the maximum MAP value as the parking space detection model.
[0059] In a possible design, the determination module is further configured to obtain M bird's-eye views of parking spaces, label all the labels corresponding to the drivable areas in each bird's-eye view of the parking space, input each bird's-eye view of the parking space and all the labels corresponding to each bird's-eye view of the parking space into a semantic segmentation model for training to obtain the mean intersection over union value MIOU corresponding to each iteration, screen out the maximum MIOU value from all the MIOU values, and use the semantic segmentation model corresponding to the maximum MIOU value as the drivable area model.
[0060] In a possible design, the rotation module is specifically configured to the set of rotation frames at least includes a parking space overall area frame, a parking space entrance area frame, a parking space line area frame, a parking space corner point area frame, and a ground lock area frame.
[0061] In a possible design, the logic module is specifically configured to determine whether there is a parking space entrance area frame in each parking space overall area frame in the set of parking space rotation frames. If there is a parking space entrance area frame in the parking space overall area frame, determine that there are a first corner point and a second corner point in the parking space entrance area frame. When the length of the line segment between the first corner point and the second corner point does not meet the preset entrance line segment length, use the parking space overall area corresponding to the parking space overall area frame as an invalid area as the parking space detection result. If there is no parking space entrance area frame in the parking space overall area frame, determine that the length value of the parking space overall area frame is not within the preset length range value, and / or the width value of the parking space overall area frame is not within the preset width range value, and use the parking space overall area corresponding to the parking space overall area frame as an invalid area as the parking space detection result.
[0062] In a possible design, the logic module is further configured to, when the length of the line segment between the third corner point and the fourth corner point at the rear of the vehicle meets a preset entrance line segment length, determine two parking space tail corner points corresponding to the overall parking space area frame, and use the first corner point, the second corner point, the third corner point, and the fourth corner point in the overall parking space area frame, as well as the coordinates of the first corner point, the coordinates of the second corner point, the coordinates of the third corner point, and the coordinates of the fourth corner point as the parking space detection result.
[0063] In a possible design, the logic module is further configured to determine that the length value of the overall parking space area frame is within a preset length range value, and the width value of the overall parking space area frame is within a preset width range value, and use the coordinates of the first corner point, the coordinates of the second corner point, the coordinates of the third corner point, and the coordinates of the fourth corner point in the overall parking space area frame as the parking space detection result.
[0064] In a possible design, the logic module is further configured to determine the parking scores corresponding to the overall parking space area frame and the drivable area result respectively, as well as the ground lock state in the ground lock area frame, and determine the parking space detection result based on the respective parking scores of the drivable area result and the overall parking space area frame and the ground lock state.
[0065] In a possible design, the logic module is further configured to determine that the area corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point is all drivable area, and each ground lock state is in the closed state, then use the overall parking space area corresponding to the overall parking space area frame as a parkable parking space as the parking space detection result, or determine that there is a non-drivable area in the area corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point, and each ground lock state is in the open state, then use the overall parking space area corresponding to the overall parking space area frame as a non-parkable parking space as the parking space detection result.
[0066] In a possible design, the logic module is further configured to determine a first score of the overall parking space area frame and a second score of the ground lock area frame, and determine a third score of the drivable parking space result, calculate a first product of the first score, the second score, and the third score, when the first product exceeds a preset parking threshold, use the overall parking space area corresponding to the overall parking space area frame as a parkable parking space as the parking space detection result, or when the first product does not exceed the preset parking threshold, use the overall parking space area corresponding to the overall parking space area frame as a non-parkable parking space as the parking space detection result.
[0067] In a third aspect, the present application provides an electronic device, including:
[0068] A memory for storing a computer program;
[0069] A processor, when executing the computer program stored on the memory, implements the steps of the above-mentioned area detection method.
[0070] In a fourth aspect, a computer-readable storage medium stores a computer program therein, and when the computer program is executed by a processor, the steps of the above-mentioned area detection method are implemented.
[0071] For the various aspects in the above-mentioned first aspect to fourth aspect and the possible technical effects that each aspect may achieve, please refer to the description of the possible technical effects that can be achieved for the first aspect or various possible solutions in the first aspect above, and details will not be repeated here. Description of the Drawings
[0072] Figure 1 It is a flowchart of the steps of an area detection method provided by this application;
[0073] Figure 2 It is a training flowchart of a parking space detection model provided by this application;
[0074] Figure 3 It is a training flowchart of a drivable area model provided by this application;
[0075] Figure 4 It is a schematic diagram of the parking space structure provided by this application;
[0076] Figure 5 It is a schematic diagram of a set of parking space rotation frames in an aerial view of a target parking space provided by this application;
[0077] Figure 6 It is a logical schematic diagram of the parking space detection result provided by this application;
[0078] Figure 7 It is a schematic diagram of the structure of a parking space detection device provided by this application;
[0079] Figure 8 It is a schematic diagram of the process flow of a parking space detection method provided by this application;
[0080] Figure 9 It is a schematic diagram of the structure of an area detection device provided by this application;
[0081] Figure 10 It is a schematic diagram of the structure of an electronic device provided by this application. Detailed Embodiments
[0082] To make the objectives, technical solutions, and advantages of this application clearer, the following will further describe this application in detail with reference to the accompanying drawings. The specific operation methods in the method embodiments can also be applied to the device embodiments or system embodiments. It should be noted that in the description of this application, "a plurality of" is understood as "at least two". "And / or" describes the association relationship of associated objects and indicates that three relationships can exist. For example, A and / or B can represent: A exists alone, A and B exist simultaneously, and B exists alone. The connection between A and B can represent: the direct connection between A and B and the connection between A and B through C. In addition, in the description of this application, terms such as "first" and "second" are only used for the purpose of distinguishing descriptions and cannot be understood as indicating or implying relative importance, nor can they be understood as indicating or implying order.
[0083] In the prior art, in order to determine the parking space of an intelligent vehicle, traditional image processing detection algorithms and parking space line detection algorithms are mainly used. Since the traditional image processing detection algorithm will obtain the target line object, and the parking space detection algorithm will obtain the first image including the parking space corner points and the parking space lines corresponding to the parking space corner points, when the light intensity and the shape of the parking space lines change, the target line object and the first image determined by the intelligent vehicle sensor will be inaccurate, resulting in the failure of parking space detection. Therefore, how to accurately determine the parking space of the intelligent vehicle has become the main problem to be solved currently.
[0084] To solve the above problems, the embodiments of this application provide a region detection method to accurately determine the parking space detection result from the detected region, thereby improving the efficiency of the intelligent vehicle in determining the parking space. Among them, the methods and devices in the embodiments of this application are based on the same technical concept. Since the principles of the problems solved by the methods and devices are similar, the embodiments of the device and the method can be referred to each other, and the repeated parts will not be elaborated.
[0085] The following will describe the embodiments of this application in detail with reference to the accompanying drawings.
[0086] Refer to Figure 1 , this application provides a region detection method, which can improve the efficiency and accuracy of the intelligent vehicle in determining the parking space. The implementation process of this method is as follows:
[0087] Step S1: Determine the bird's-eye view of the target parking space.
[0088] Before determining the bird's-eye view of the target parking space, in order to determine the efficiency and accuracy of the intelligent vehicle in detecting the parking space, an accurate parking space detection model and a drivable area detection model need to be obtained. The specific process of obtaining the accurate parking space detection model and the drivable area detection model is as follows:
[0089] The training flowchart of the parking space detection model is as Figure 2As shown in the figure, the process of obtaining the parking space detection model is as follows:
[0090] Step S21: First, obtain N bird's-eye view images of parking spaces (English full name: Bird's-Eye View, abbreviated as: BEV), where N is a positive integer greater than 1, and label all the corresponding labels for the areas to be detected in each bird's-eye view image of the parking space. The area to be detected can be the overall area of the parking space, the entrance area of the parking space, the corner point area of the parking space, the line area of the parking space, the ground lock area, etc. The label can be the name of the area to be detected, such as: the overall area frame of the parking space, the entrance area frame of the parking space, the corner point area frame of the parking space, the line area frame of the parking space, etc. The bird's-eye view image of the parking space is stitched together from the images collected by the fish-eye sensors of the intelligent vehicle in different orientations. Since stitching multiple images into a bird's-eye view image of the parking space is a well-known technology to those skilled in the art, therefore, no further elaboration will be made here.
[0091] Take each bird's-eye view image of the parking space and all the corresponding labels of each bird's-eye view image of the parking space as the parking space detection training data set.
[0092] Step S22: Build an object detection model.
[0093] Since building an object detection model is a well-known technology to those skilled in the art, therefore, no further elaboration will be made here. The object detection model can be the yolov7-obb model.
[0094] Step S23: Input the parking space detection training data set into the object detection model for training to obtain the parking space detection model.
[0095] Input the above parking space detection training data set into the object detection model for training, obtain the mean average precision value (English full name: mean average precision, abbreviated as: MAP) corresponding to each iteration during the training process, then determine the maximum MAP value from all the MAP values, determine the object detection model corresponding to the maximum MAP value, and use this object detection model as the parking space detection model.
[0096] The training flow chart of the drivable area model is as Figure 3 shown, and the process of obtaining the drivable area model is as follows:
[0097] Step S31: Obtain M bird's-eye view images of parking spaces, and label all the corresponding labels for the drivable area in each bird's-eye view image of the parking space.
[0098] The intelligent vehicle server needs to obtain multiple images through the fish-eye sensors of the intelligent vehicle and stitch the multiple images to obtain the bird's-eye view image of the parking space. The training of the drivable area model requires obtaining M bird's-eye view images of the parking space and labeling all the corresponding labels for the drivable area from each bird's-eye view image of the parking space. The drivable area is the area without obstacles in the bird's-eye view image of the parking space.
[0099] Step S32: Build a semantic segmentation model.
[0100] Since building a semantic segmentation model is a well-known technology to those skilled in the art, no further elaboration will be made here. The semantic segmentation model can be an Encoder-Decoder (abbreviated as N-Uet) model.
[0101] Step S33: Input each bird's-eye view of the parking space and all the labels corresponding to each bird's-eye view of the parking space into the semantic segmentation model for training to obtain a drivable area model.
[0102] Input each of the above-mentioned bird's-eye views of the parking space and all the labels corresponding to each bird's-eye view of the parking space into the semantic segmentation model for training, obtain the Mean Intersection over Union (MOIU) corresponding to each iteration during the training process, screen out the maximum MIOU value from all the MOIU values, and use the semantic segmentation model corresponding to the maximum MIOU value as the drivable area model.
[0103] Since the parking space detection model corresponding to the maximum MAP value and the drivable area model corresponding to the maximum MIOU value are obtained in the above process, it can ensure that the parking space detection results obtained based on the parking space detection model and the drivable area model are more accurate, thereby reducing the probability of misidentifying the parking space by the intelligent vehicle.
[0104] During the process of the intelligent vehicle determining the parking space, it is necessary to obtain a bird's-eye view of the target parking space, which at least includes a parking space to be detected by the intelligent vehicle. The intelligent vehicle needs to identify the area corresponding to the parking space from the area corresponding to the bird's-eye view of the target parking space.
[0105] Step S2: Input the bird's-eye view of the target parking space into the parking space detection model and output a set of rotated bounding boxes of the parking space corresponding to the bird's-eye view of the target parking space.
[0106] After obtaining the bird's-eye view of the target parking space, input the bird's-eye view of the target parking space into the parking space detection model and output a set of rotated bounding boxes of the parking space corresponding to the bird's-eye view of the target parking space. The set of rotated bounding boxes of the parking space at least includes: a bounding box of the overall parking space area, a bounding box of the parking space entrance area, a bounding box of the parking space line area, a bounding box of the parking space corner point area, and a bounding box of the ground lock area; the set of rotated bounding boxes of the parking space is the detection result of the parking space feature area. Usually, the schematic diagram of the parking space structure is as Figure 4 shown, in Figure 4Among them, different positions of the parking space have their own names. The lines forming the parking space are usually divided into an entrance line, a dividing line, and a tail line of the garage. There are usually 4 parking space lines. The entrance line is the parking space line indicating the entry of the intelligent vehicle when parking, and it is also the parking space line restricting the rear boundary of the intelligent vehicle when parking. The other parking space lines except the entrance line and the tail line among the 4 parking space lines are called dividing lines. The corner points are the inner corner points where the parking space lines intersect. Figure 4 Both B and E in it are entrance corner points, and both C and D are tail corner points.
[0107] Thus, after annotating the parking space features in the bird's-eye view of the target parking space, the schematic diagram of the set of parking space rotation frames in the bird's-eye view of the target parking space is as Figure 5 shown. In Figure 5 Among them, the forward direction of the parking space is the direction in which the intelligent vehicle moves along the dividing line from the entrance line to the tail line. Figure 5 The rotation frames with parking space features in the set of parking space rotation frames are described in. The overall parking space area frame is a rectangular frame surrounding the outside of the parking space; the parking space entrance area frame is a rectangular frame surrounding the entrance of the parking space; the parking space corner point area frame is Figure 5 the rectangular frame surrounding the inner corner points of the parking space in; the parking space line area frame is a rectangular frame surrounding the parking space lines; the parking space ground lock area frame is a rectangular frame surrounding the ground lock. Figure 5 In, BE is the parking space entrance line, and CD is the parking space tail line. When the intelligent vehicle parks in the garage, the intelligent vehicle first passes through the first parking space entrance corner point B; the line segment be in the overall parking space area frame can be a candidate corner point of the parking space. The line segment be is the parking space entrance line, and the line segment cd is the parking space tail line; for other rotation frames with parking space features, refer to Figure 5 the examples in, and they will not be elaborated one by one here.
[0108] It should be noted that the overall parking space area frame and the parking space ground lock area frame have a parking attribute, and this parking attribute is specifically parkable and non-parkable. Parkable means that there are no obstacles in the parking space affecting parking, and the parking space can be used; non-parkable means that there are obstacles in the parking space affecting parking, and the parking space cannot be used.
[0109] Based on the method described above, the set of parking space rotation frames is determined in the bird's-eye view of the target parking space, and all the rotation frames with parking space features in the bird's-eye view of the target parking space are annotated, ensuring that the intelligent vehicle will not miss the parking spaces in the bird's-eye view of the target parking space during the process of detecting parking spaces, and improving the accuracy of the intelligent vehicle in detecting parking spaces.
[0110] Step S3: Input the bird's-eye view of the target parking space into the drivable area model, and output the drivable area result in the bird's-eye view of the target parking space.
[0111] After determining the set of parking space rotation frames in the bird's-eye view of the target parking space, it is also necessary to determine the area where the intelligent vehicle can travel in the bird's-eye view of the target parking space. Therefore, it is necessary to input the bird's-eye view of the target parking space into the drivable area model, and the drivable area model will output the drivable area result corresponding to the bird's-eye view of the target parking space.
[0112] Based on the above method, by determining the drivable area result in the bird's-eye view of the target parking space, the drivable area and non-drivable area in the bird's-eye view of the target parking space can be obtained, which is beneficial for the intelligent vehicle to determine the available parking spaces.
[0113] Step S4: Input the set of parking space rotation frames and the drivable area result into a preset logic algorithm to obtain the parking space detection result corresponding to the bird's-eye view of the target parking space.
[0114] After obtaining the set of parking space rotation frames and the drivable area result, in order to obtain the parking space detection result of the area to be detected in the bird's-eye view of the target parking space, it is necessary to input the set of parking space rotation frames and the drivable area result into a preset logic algorithm. The specific process of determining the parking space detection result through the preset logic algorithm is as follows:
[0115] The intelligent vehicle server will traverse all the overall parking space frames in the set of parking space rotation frames and match a parking space entrance area frame for each overall parking space frame. Since the process of matching a parking space entrance area frame for each overall parking space frame is the same, here only one overall parking space frame matching a parking space entrance area frame will be used as an example for illustration.
[0116] It is necessary to calculate the first ratio of the intersecting area between the overall parking space frame and the parking space entrance area frame to the area of the parking space entrance area frame. When the first ratio is greater than or equal to the preset first ratio, the parking space entrance head frame matching the overall parking space frame can be determined. When the first ratio is less than the preset first ratio, it means that the parking space entrance area frame does not match the overall parking space frame; when multiple parking space entrance area frames are marked in the bird's-eye view of the target parking space, it is necessary to calculate the first ratio between each parking space entrance area frame and the overall parking space frame, and select the largest first ratio from all the first ratios, and use the parking space entrance area frame corresponding to the largest first ratio as the rotation frame matching the overall parking space frame.
[0117] The intelligent vehicle server needs to determine whether there is a parking space entrance area frame in the overall area frame of each parking space. When it is determined that there is a parking space entrance area frame in the overall area frame of the parking space, the parking space lines and the parking space direction need to be determined from all the parking space line area frames marked in the bird's-eye view of the target parking space. The intelligent vehicle server needs to traverse all the parking space line area frames, calculate the intersection area between the overall area frame of the parking space and the parking space line area frame and the second ratio of the parking space line area frame, and calculate the included angle between the long side direction of the parking space line area frame and the long side directions of bc, cd, de, and be. This included angle is called the first included angle. It also needs to calculate the first distance from the midline of the parking space line area frame to the long side directions of bc, cd, de, and be. If the second ratio exceeds the preset second ratio, and the first included angle does not exceed the preset first included angle, and the first distance does not exceed the preset first pixel, then the parking space line area frame is regarded as the actual parking space line of the parking space.
[0118] When the number of matched parking space line area frames is greater than 1, the parking space line in the longest parking space line area frame among the matched parking space line area frames is used as the actual parking space line; in the process of determining the parking space direction, when there are BC or ED lines, the longest side of BC and ED is used as the parking space direction; when neither BC nor ED is matched with a parking space line area frame, bc is used as the parking space direction.
[0119] Since a parking space can be determined according to the four parking space corner points, the intelligent vehicle server expands the length and width of the parking space entrance area frame by a preset multiple, and this preset multiple can be 5; all the parking space corner point area frames are determined in the parking space entrance area frame, and the distance from the corner point in each parking space corner point area frame to the long side of ED is calculated. If this distance does not exceed the preset distance, then this corner point is used as the parking space corner point; if there are multiple corner points that do not exceed the preset distance, then the corner point with the smallest distance to the long side of ED is used as the parking space corner point; otherwise, point E does not exist, that is, the second corner point does not exist; in order to confirm whether the first corner point exists, the distance from the corner point in each parking space corner point area frame to the long side of BC needs to be calculated. If this distance does not exceed the preset distance, then this corner point is used as the parking space corner point; if there are multiple corner points that do not exceed the preset distance, then the corner point with the smallest distance to the long side of BC is used as the parking space corner point; otherwise, point B does not exist, that is, the first corner point does not exist.
[0120] When point B does not exist and the parking space line area frames corresponding to BE and BC both exist, the intersection point is obtained by finding the intersection of the inner boundaries of the parking space line area frame of BE and the parking space line area frame of BC to get point B; when point E does not exist and the parking space line area frames corresponding to BE and ED both exist, the intersection point is obtained by finding the intersection of the inner boundaries of the parking space line area frame corresponding to BE and the parking space line area frame corresponding to ED to get point E.
[0121] When it is determined that the first corner point and the second corner point exist, calculate the length of the line segment between the first corner point and the second corner point. If the length of this line segment does not meet the preset entrance line segment length, then the overall parking space area corresponding to the overall parking space area frame is regarded as an invalid area as the parking space detection result.
[0122] When the intelligent vehicle server determines that there is no parking space entrance area frame in the overall parking space area frame, calculate whether the length value of the overall parking space area frame meets the preset length range value, and whether the width value in the overall parking space area frame meets the preset width range value. When the length value does not meet the preset length range, and / or the width value does not meet the preset width range, then the overall parking space area corresponding to the overall parking space area frame is regarded as an invalid area as the parking space detection result.
[0123] Furthermore, when the length value of the overall parking space area frame is within the preset length range value, and the width value of the overall parking space area frame is within the preset width range value, take the coordinates of the first corner point, the second corner point, the third corner point, and the fourth corner point in the overall parking space area frame as the parking space detection result, that is, determine that the overall parking space area corresponding to the overall parking space area frame is the parking space area.
[0124] When the intelligent vehicle server detects that there are a first corner point and a second corner point in the parking space entrance area frame, in order to determine the third corner point and the fourth corner point, it is necessary to extend the BE point along the parking space direction by a preset length to obtain the CD point, that is, obtain the third corner point and the fourth corner point at the rear of the intelligent vehicle. The preset length is determined according to the length of the line segment between the first corner point and the second corner point. For example: if the length of the line segment between the first corner point and the second corner point is between [2m, 2.5m], then the preset length is 5.5 meters; if the length of this line segment is between [5m, 6m], then the preset length is 2.5m. The line segment length and the preset length can both be adjusted according to the length and width of the actual parking space, and no more explanation is given here.
[0125] After the third corner point and the fourth corner point are determined, calculate the length of the line segment between the third corner point and the fourth corner point. When the length of the line segment between the third corner point and the fourth corner point meets the preset entrance line segment length, determine that the third corner point and the fourth corner point are the two rear corner points of the intelligent vehicle. Then take the first corner point, the second corner point, the third corner point, and the fourth corner point in the overall parking space area frame, and the coordinates of the first corner point, the second corner point, the third corner point, and the fourth corner point as the parking space detection result, that is, determine that the overall parking space area corresponding to the overall parking space area frame is the parking space area.
[0126] To confirm whether the parking space corresponding to the intelligent vehicle can be parked, it is also necessary to determine the parking scores corresponding to the overall area frame of the parking space and the drivable area result respectively, as well as the ground lock state in the ground lock area frame. When the areas corresponding to the first corner point, the second corner point, the third corner point and the fourth corner point are all drivable areas, and each ground lock state is in the closed state, the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as a parkable parking space as the parking space detection result.
[0127] When it is determined that there are non-drivable areas in the areas corresponding to the first corner point, the second corner point, the third corner point and the fourth corner point, and each ground lock state is in the open state, the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as a non-parkable parking space as the parking space detection result.
[0128] In addition to the two cases described above, it is also possible to determine the first score of the overall area frame of the parking space, the second score of the ground lock area frame, and the third score of the drivable parking space result, and multiply the first score, the second score and the third score to obtain the first product; when the first product exceeds the preset parking threshold, the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as a parkable parking space as the parking space detection result; when the first product does not exceed the preset parking threshold, the overall area of the parking space corresponding to the overall area frame of the parking space is regarded as a non-parkable parking space as the parking space detection result.
[0129] For example: The logical schematic diagram of the parking space detection result is as Figure 6 shown. The set of parking space rotation frames and the drivable area result are used as the input of the preset logical algorithm. All the overall area frames of the parking space in the set of parking space rotation frames are traversed, and a parking space entrance area frame is matched for this overall area frame of the parking space. When there is a parking space entrance area frame, the parking space line and the parking space direction are determined, and then it is determined whether both point B and point E of the parking space entrance exist. When both point B and point E exist, and the line segment length of BE meets the preset entrance line segment length, the tail corner points C and D of the intelligent vehicle are determined, and the parking space detection result is determined by the respective parking scores and the ground lock state of the drivable area result and the overall area frame of the parking space; when the line segment length of BE does not meet the preset entrance line segment length, the overall area of the parking space corresponding to the overall area frame of the parking space is determined as an invalid area.
[0130] When there is no parking space entrance area frame, and it is determined that both point B and point E do not exist, then it is further determined whether the length value of the overall parking space area frame meets the requirements. When the length value of the overall parking space area frame conforms to the preset length range value, and the width value of the overall parking space area frame conforms to the preset width range value, it is determined that the overall parking space area frame meets the requirements, and the parking space detection result is determined through the respective parking scores of the drivable area result and the overall parking space area frame and the ground lock state; when the length value of the overall parking space area frame does not conform to the preset length range value, and the width value of the overall parking space area frame does not conform to the preset width range value, it is determined that the overall parking space area frame does not meet the requirements, and it is determined that the overall parking space area corresponding to the overall parking space area frame is an invalid area.
[0131] The embodiments of the present application can also be completed by the detection device of the intelligent vehicle. The structural schematic diagram of the parking space detection device is as Figure 7 shown. In Figure 7 it, the image stitching module is used to obtain the bird's-eye view of the target parking space, the freespace detection module is used to obtain the drivable area result, the parking space detection module is used to obtain the set of parking space rotation frames, and the logic post-processing module is used to output the parking space detection result.
[0132] The schematic flow chart of the parking space detection method corresponding to the embodiments of the present application is as Figure 8 shown. In Figure 8 it, the bird's-eye view of the target parking space is respectively input into the parking space detection model and the drivable area model. The drivable area model can be a freespace model or a U-Net model. The parking space detection model will output the set of parking space rotation frames corresponding to the bird's-eye view of the target parking space, and the drivable area model outputs the drivable area result corresponding to the bird's-eye view of the target parking space. Then, the set of parking space rotation frames and the drivable area result are input into the preset logic algorithm to obtain the parking space detection result. The parking space detection result at least includes: the overall parking space area frame, the coordinates of the four parking space corner points, and the parkability of the parking space.
[0133] Based on the above method, the set of parking space rotation frames with parking space characteristics in the bird's-eye view of the target parking space is determined through the parking space detection model, avoiding the problem of inaccurate parking space detection results caused by the occlusion of parking space characteristics. And the area contour where there is no obstacle blocking the driving of the intelligent vehicle in the bird's-eye view of the target parking space is determined through the drivable area model, making the parking space detection results of parkable and non-parkable parking spaces determined by the intelligent vehicle more accurate, ensuring that the parking space detection result output by the preset logic algorithm is more accurate.
[0134] Based on the same inventive concept, an area detection device is also provided in the embodiments of the present application. The area detection device is used to implement the function of an area detection method. Referring to Figure 9 , the device includes:
[0135] Determination module 901, configured to determine an aerial view of a target parking space;
[0136] Rotation module 902, configured to input the aerial view of the target parking space into a parking space detection model, and output a set of parking space rotation bounding boxes corresponding to the aerial view of the target parking space;
[0137] Region module 903, configured to input the aerial view of the target parking space into a drivable region model, and output a drivable region result in the aerial view of the target parking space;
[0138] Logic module 904, configured to input the set of parking space rotation bounding boxes and the drivable region result into a preset logic algorithm to obtain a parking space detection result corresponding to the aerial view of the target parking space.
[0139] In a possible design, the determination module 901 is specifically configured to obtain N aerial views of parking spaces, label the labels corresponding to all the to-be-detected feature regions in each aerial view of the parking space respectively, use each aerial view of the parking space and the corresponding all labels as a parking space detection training data set, input the parking space detection training data set into a target detection model for training, obtain the mean average precision value MAP corresponding to each iteration, screen out the maximum MAP value from all the MAP values, and use the target detection model corresponding to the maximum MAP value as the parking space detection model.
[0140] In a possible design, the determination module 901 is further configured to obtain M aerial views of parking spaces, label all the labels corresponding to the drivable regions in each aerial view of the parking space, input each aerial view of the parking space and all the labels corresponding to each aerial view of the parking space into a semantic segmentation model for training, obtain the mean intersection over union value MIOU corresponding to each iteration, screen out the maximum MIOU value from all the MIOU values, and use the semantic segmentation model corresponding to the maximum MIOU value as the drivable region model.
[0141] In a possible design, the rotation module 902 is specifically configured to the set of rotation bounding boxes at least includes a parking space overall region bounding box, a parking space entrance region bounding box, a parking space line region bounding box, a parking space corner point region bounding box, and a ground lock region bounding box.
[0142] In a possible design, the logic module 904 is specifically configured to determine whether there is a parking space entrance area box in each parking space overall area box in the parking space rotation box set. If there is a parking space entrance area box in the parking space overall area box, the first corner point and the second corner point in the parking space entrance area box are determined. When the line segment length between the first corner point and the second corner point does not meet the preset entrance line segment length, the parking space overall area corresponding to the parking space overall area box is regarded as an invalid area as the parking space detection result. If there is no parking space entrance area box in the parking space overall area box, it is determined that the length value of the parking space overall area box is not within the preset length range value, and / or the width value of the parking space overall area box is not within the preset width range value. The parking space overall area corresponding to the parking space overall area box is regarded as an invalid area as the parking space detection result.
[0143] In a possible design, the logic module 904 is further configured to, when the line segment length between the third corner point and the fourth corner point at the vehicle tail meets the preset entrance line segment length, determine two parking space tail corner points corresponding to the parking space overall area box, and use the first corner point, the second corner point, the third corner point, and the fourth corner point in the parking space overall area box, as well as the first corner point coordinates, the second corner point coordinates, the third corner point coordinates, and the fourth corner point coordinates as the parking space detection result.
[0144] In a possible design, the logic module 904 is further configured to determine that the length value of the parking space overall area box is within the preset length range value, and the width value of the parking space overall area box is within the preset width range value, and use the first corner point coordinates, the second corner point coordinates, the third corner point coordinates, and the fourth corner point coordinates in the parking space overall area box as the parking space detection result.
[0145] In a possible design, the logic module 904 is further configured to determine the parking scores corresponding to the parking space overall area box and the drivable area result respectively, as well as the ground lock state in the ground lock area box, and determine the parking space detection result based on the respective parking scores of the drivable area result and the parking space overall area box and the ground lock state.
[0146] In a possible design, the logic module 904 is further configured to determine that the areas corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point are all drivable areas, and the states of all the ground locks are closed states, and then use the parking space corresponding to the overall area frame of the parking space as a parkable parking space as the parking space detection result. Or, it is determined that there are non-drivable areas in the areas corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point, and the states of all the ground locks are open states, and then use the parking space corresponding to the overall area frame of the parking space as a non-parkable parking space as the parking space detection result.
[0147] In a possible design, the logic module 904 is further configured to determine a first score of the overall area frame of the parking space, a second score of the ground lock area frame, and a third score of the drivable parking space result, calculate a first product of the first score, the second score, and the third score, and when the first product exceeds a preset parking threshold, use the parking space corresponding to the overall area frame of the parking space as a parkable parking space as the parking space detection result. Or, when the first product does not exceed the preset parking threshold, use the parking space corresponding to the overall area frame of the parking space as a non-parkable parking space as the parking space detection result.
[0148] Based on the same inventive concept, an electronic device is further provided in an embodiment of the present application. The electronic device can implement the functions of the foregoing area detection device. Refer to Figure 10 , the electronic device includes:
[0149] At least one processor 1001, and a memory 1002 connected to the at least one processor 1001. In the embodiment of the present application, the specific connection medium between the processor 1001 and the memory 1002 is not limited. Figure 10 In Figure 10 , it is taken as an example that the processor 1001 and the memory 1002 are connected through a bus 1000. The bus 1000 is represented by a thick line in Figure 10 . The connection manners between other components are only for illustrative purposes and are not limited thereto. The bus 1000 can be divided into an address bus, a data bus, a control bus, etc. For the sake of convenience of representation,
[0150] In the embodiment of the present application, the memory 1002 stores instructions executable by the at least one processor 1001. The at least one processor 1001 can execute the area detection method described above by executing the instructions stored in the memory 1002. The processor 1001 can implement Figure 9 the functions of each module in the device shown in
[0151] Among them, the processor 1001 is the control center of the device. It can connect various parts of the entire control device through various interfaces and lines. By running or executing the instructions stored in the memory 1002 and calling the data stored in the memory 1002, various functions of the device and data processing are performed, thereby overall monitoring the device.
[0152] In a possible design, the processor 1001 may include one or more processing units. The processor 1001 may integrate an application processor and a modem processor. Among them, the application processor mainly processes the operating system, user interface, application programs, etc., and the modem processor mainly processes wireless communication. It can be understood that the above-mentioned modem processor may not be integrated into the processor 1001 either. In some embodiments, the processor 1001 and the memory 1002 may be implemented on the same chip. In some embodiments, they may also be separately implemented on independent chips.
[0153] The processor 1001 may be a general-purpose processor, such as a central processing unit (CPU), a digital signal processor, an application-specific integrated circuit, a field programmable gate array, or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, and can implement or execute the various methods, steps, and logic block diagrams disclosed in the embodiments of the present application. The general-purpose processor may be a microprocessor or any conventional processor, etc. The steps of a region detection method disclosed in combination with the embodiments of the present application can be directly embodied as being executed by a hardware processor, or executed by a combination of hardware and software modules in the processor.
[0154] The memory 1002, as a non-volatile computer-readable storage medium, can be used to store non-volatile software programs, non-volatile computer-executable programs, and modules. The memory 1002 can include at least one type of storage medium. For example, it can include flash memory, hard disk, multimedia card, card-type memory, random access memory (RAM), static random access memory (SRAM), programmable read-only memory (PROM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), magnetic memory, magnetic disk, optical disc, and so on. The memory 1002 is any other medium that can be used to carry or store the desired program code in the form of instructions or data structures and can be accessed by a computer, but is not limited thereto. The memory 1002 in the embodiments of the present application can also be a circuit or any other device capable of implementing a storage function, for storing program instructions and / or data.
[0155] By designing and programming the processor 1001, the code corresponding to the area detection method introduced in the foregoing embodiments can be solidified into the chip, so that the chip can execute Figure 1 the area detection steps of the embodiments shown. How to design and program the processor 1001 is a well-known technology to those skilled in the art and will not be elaborated here.
[0156] Based on the same inventive concept, the embodiments of the present application also provide a storage medium storing computer instructions, which when run on a computer, cause the computer to execute an area detection method described above.
[0157] In some possible implementation manners, each aspect of the area detection method provided in the present application can also be implemented in the form of a program product, which includes program code that, when the program product runs on a device, is used to cause the control device to execute the steps in an area detection method according to various exemplary embodiments of the present application described above in this specification.
[0158] Those skilled in the art should understand that the embodiments of the present application can be provided as a method, a system, or a computer program product. Therefore, the present application can take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware aspects. Moreover, the present application can take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.
[0159] The present application is described with reference to the flowcharts and / or block diagrams of methods, apparatuses (systems), and computer program products according to the present application. It should be understood that each flow and / or block in the flowchart and / or block diagram, as well as the combination of flows and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to the processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing devices to generate a machine, such that the instructions executed by the processor of the computer or other programmable data processing devices generate means for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0160] These computer program instructions can also be stored in a computer-readable memory that can direct a computer or other programmable data processing device to work in a specific manner, such that the instructions stored in the computer-readable memory generate a manufactured article including instruction means that implement the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0161] These computer program instructions can also be loaded onto a computer or other programmable data processing device, such that a series of operation steps are executed on the computer or other programmable device to generate a computer-implemented process, and thus the instructions executed on the computer or other programmable device provide steps for implementing the functions specified in Figure 1 one flow or multiple flows and / or blocks Figure 1 one block or multiple blocks.
[0162] Obviously, those skilled in the art can make various modifications and variations to the present application without departing from the spirit and scope of the present application. Thus, if these modifications and variations of the present application fall within the scope of the claims of the present application and their equivalent technologies, the present application is also intended to include these modifications and variations.
Claims
1. A method for area detection, characterized in that, Including: Determine an aerial view of a target parking space, where the aerial view of the target parking space includes at least one parking space to be detected for an intelligent vehicle; Input the aerial view of the target parking space into a parking space detection model, and output a set of rotated bounding boxes of the parking spaces corresponding to the aerial view of the target parking space; Input the aerial view of the target parking space into a drivable area model, and output the drivable area result in the aerial view of the target parking space; Input the set of rotated bounding boxes of the parking spaces and the drivable area result into a preset logic algorithm to obtain the parking space detection result corresponding to the aerial view of the target parking space.
2. The method according to claim 1, wherein Before determining the aerial view of the target parking space, it further includes: Obtain N aerial views of parking spaces, where N is a positive integer greater than 1; Label the labels corresponding to all the feature regions to be detected in each aerial view of the parking space, and use each aerial view of the parking space and the corresponding all labels as a parking space detection training data set; Input the parking space detection training data set into a target detection model for training to obtain the mean average precision value MAP corresponding to each iteration; Select the maximum MAP value from all the MAP values, and use the target detection model corresponding to the maximum MAP value as the parking space detection model.
3. The method according to claim 1, characterized in that Before determining the aerial view of the target parking space, it further includes: Obtain M aerial views of parking spaces, and label all the labels corresponding to the drivable areas in each aerial view of the parking space, where M is a positive integer greater than 1; Input each aerial view of the parking space and all the labels corresponding to each aerial view of the parking space into a semantic segmentation model for training to obtain the mean intersection over union value MIOU corresponding to each iteration; Select the maximum MIOU value from all the MIOU values, and use the semantic segmentation model corresponding to the maximum MIOU value as the drivable area model.
4. The method according to claim 1, wherein The step of inputting the aerial view of the target parking space into a parking space detection model and outputting a set of rotated bounding boxes of the parking spaces corresponding to the aerial view of the target parking space includes: The set of rotated bounding boxes at least includes a bounding box for the overall parking space area, a bounding box for the parking space entrance area, a bounding box for the parking space line area, a bounding box for the parking space corner area, and a bounding box for the ground lock area.
5. The method according to claim 1, characterized in that, The step of inputting the set of rotated bounding boxes of the parking spaces and the drivable area result into a preset logic algorithm to obtain the parking space detection result corresponding to the aerial view of the target parking space includes: Judge whether there is a bounding box for the parking space entrance area in each bounding box for the overall parking space area in the set of rotated bounding boxes of the parking spaces; If there is a bounding box for the parking space entrance area in the bounding box for the overall parking space area, determine that there is a first corner point and a second corner point in the bounding box for the parking space entrance area. When the length of the line segment between the first corner point and the second corner point does not conform to the preset entrance line segment length, use the overall parking space area corresponding to the bounding box for the overall parking space area as an invalid area as the parking space detection result; If there is no bounding box for the parking space entrance area in the bounding box for the overall parking space area, determine that the length value of the bounding box for the overall parking space area is not within the preset length range value, and / or the width value of the bounding box for the overall parking space area is not within the preset width range value, and use the overall parking space area corresponding to the bounding box for the overall parking space area as an invalid area as the parking space detection result.
6. The method according to claim 5, characterized in that, After there is a bounding box for the parking space entrance area in the bounding box for the overall parking space area, it further includes: When the length of the line segment between the third corner point and the fourth corner point at the rear of the vehicle meets the preset entrance line segment length, determine the 2 parking space rear corner points corresponding to the overall parking space area frame; Use the first corner point, the second corner point, the third corner point, and the fourth corner point in the overall parking space area frame, as well as the coordinates of the first corner point, the coordinates of the second corner point, the coordinates of the third corner point, and the coordinates of the fourth corner point as the parking space detection result.
7. The method according to claim 5, wherein After there is no parking space entrance area frame in the overall parking space area frame, it further includes: Determine that the length value of the overall parking space area frame is within the preset length range value, and the width value of the overall parking space area frame is within the preset width range value; Use the coordinates of the first corner point, the coordinates of the second corner point, the coordinates of the third corner point, and the coordinates of the fourth corner point in the overall parking space area frame as the parking space detection result.
8. The method according to claim 5, wherein After the length of the line segment between the first corner point and the second corner point meets the preset entrance line segment length, it further includes: Determine the parking scores corresponding to the overall parking space area frame and the drivable area result respectively, and the ground lock state in the ground lock area frame; Determine the parking space detection result based on the parking scores of the drivable area result and the overall parking space area frame respectively, and the ground lock state.
9. The method according to any one of claims 7-8, characterized in that, The determining the parking space detection result based on the parking scores of the drivable area result and the overall parking space area frame respectively, and the ground lock state includes: Determine that the areas corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point are all drivable areas, and each ground lock state is in the closed state, then use the overall parking space area corresponding to the overall parking space area frame as a parkable parking space as the parking space detection result; or Determine that there are non-drivable areas in the areas corresponding to the first corner point, the second corner point, the third corner point, and the fourth corner point, and each ground lock state is in the open state, then use the overall parking space area corresponding to the overall parking space area frame as a non-parkable parking space as the parking space detection result.
10. The method according to claim 8, wherein After determining the parking space detection result based on the parking scores of the drivable area result and the overall parking space area frame respectively, and the ground lock state, it further includes: Determine the first score of the overall parking space area frame and the second score of the ground lock area frame, and determine the third score of the drivable parking space result; Calculate the first product of the first score, the second score, and the third score. When the first product exceeds the preset parking threshold, use the overall parking space area corresponding to the overall parking space area frame as a parkable parking space as the parking space detection result; or When the first product does not exceed the preset parking threshold, use the overall parking space area corresponding to the overall parking space area frame as a non-parkable parking space as the parking space detection result.
11. A parking space detection device, characterized in that, It includes: A determination module for determining the bird's-eye view of the target parking space; A rotation module for inputting the bird's-eye view of the target parking space into the parking space detection model and outputting the set of parking space rotation frames corresponding to the bird's-eye view of the target parking space; A region module for inputting the bird's-eye view of the target parking space into the drivable area model and outputting the drivable area result in the bird's-eye view of the target parking space; A logic module, configured to input the parking space rotation frame set and the drivable area result into a preset logic algorithm to obtain a parking space detection result corresponding to the bird's-eye view of the target parking space.
12. An electronic device, characterized in that, It includes: A memory for storing computer programs; A processor, when executing the computer programs stored on the memory, implements the method steps described in any one of claims 1-10.
13. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer programs, and when the computer programs are executed by the processor, the method steps described in any one of claims 1-10 are implemented.