Empty parking space detection method, device and equipment and storage medium
Through data annotation and feature pyramid construction of vehicle surround images, combined with target detection and semantic segmentation processing, the problem of low image clarity or low detection accuracy when blocked in the existing technology is solved, and a more accurate and stable empty parking space is achieved. detection.
Patent Information
- Application Number
- CN202410540568.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-30
- Publication Date
- 2024-08-23
AI Technical Summary
Existing empty parking space detection methods have low detection accuracy when the image clarity is low or occlusion occurs, and cannot effectively detect parking space occupancy.
By obtaining the vehicle surround image, perform data annotation and feature extraction, build a feature pyramid, and perform target detection and semantic segmentation processing. Finally, polygon fitting is performed on the result to obtain the empty parking space detection result.
It improves the accuracy and robustness of detection, generates more accurate and stable parking space frames, and improves detection performance and monitoring speed.
Smart Images

Figure CN118537836A
Abstract
Description
Technical Field
[0001] The present application relates to the field of visual detection technology, and in particular to an empty parking space detection method, device, equipment and storage medium. Background Art
[0002] Parking space detection is one of the most important components in the automatic parking system, and its detection performance can directly determine the final parking effect. Therefore, the research on empty parking space detection is the top priority for realizing automatic parking.
[0003] At present, empty parking space detection mainly uses methods based on visual recognition, which uses fisheye cameras equipped on vehicles to capture images, and uses edge detection, color detection, shape matching and other algorithms based on the captured images to detect empty parking spaces. However, these methods rely on the clarity of the captured images. When the parking space lines or corners are unclear or there are occlusions, the existing empty parking space detection algorithms have low detection accuracy or even fail to detect. When the image clarity is low, some detection algorithms classify the parking space occupancy by the parking space markings, but this method is cumbersome and the detection speed is not fast enough.
[0004] The above contents are only used to assist in understanding the technical solution of the present application and do not constitute an admission that the above contents are prior art. Summary of the invention
[0005] The main purpose of the present application is to provide a method, device, equipment and storage medium for detecting an empty parking space, aiming to solve the technical problem of low detection accuracy of the detection method in the prior art when the image clarity is low or occlusion occurs.
[0006] To achieve the above objectives, the present application proposes a method for detecting an empty parking space, the method comprising:
[0007] Acquire a vehicle surround view image containing surrounding environment information;
[0008] Performing data annotation on the vehicle surround view image to obtain a marked vehicle surround view image;
[0009] Extracting features from the marked vehicle surround image, and constructing a feature pyramid based on the extracted image features;
[0010] Performing target detection and semantic segmentation processing according to the feature pyramid to obtain feature processing results;
[0011] Polygon fitting is performed on the feature processing result to obtain an empty parking space detection result.
[0012] In one embodiment, the step of performing target detection and semantic segmentation processing according to the feature pyramid to obtain a feature processing result includes:
[0013] Determine a valid feature layer based on the feature pyramid, and determine a feature layer size of the valid feature layer;
[0014] Setting a feature detection priori frame according to the feature layer size;
[0015] Performing feature detection on the effective feature layer according to the feature detection prior frame to obtain a feature detection candidate frame including a candidate empty parking space;
[0016] The effective feature layer is intercepted and adjusted according to the feature detection candidate frame to obtain a feature processing result.
[0017] In one embodiment, the step of performing feature detection on the effective feature layer according to the feature detection prior frame to obtain a feature detection candidate frame including a candidate empty parking space includes:
[0018] Inputting the effective feature layer into a region generation network, determining a target feature detection priori frame including a candidate empty parking space and adjustment parameters of the target feature detection priori frame in the feature detection priori frame;
[0019] The target feature detection prior frame is adjusted according to the adjustment parameters to obtain a feature detection candidate frame.
[0020] In one embodiment, the step of intercepting and adjusting the effective feature layer according to the feature detection candidate frame to obtain a feature processing result includes:
[0021] The effective feature layer is intercepted by the feature detection candidate frame to obtain a local feature layer;
[0022] Inputting the local feature layer into a classification and bounding box regression model to determine a target feature detection candidate box where a real empty parking space exists;
[0023] The local feature layer is intercepted and adjusted through the target feature detection candidate frame to obtain a feature processing result.
[0024] In one embodiment, the step of acquiring the vehicle surround view image containing surrounding environment information includes:
[0025] Acquire an environmental image containing surrounding environment information through a fisheye camera;
[0026] The environment image is subjected to fisheye distortion correction, bird's-eye view transformation and image stitching to obtain a vehicle surround view image.
[0027] In one embodiment, the step of performing polygon fitting on the feature processing result to obtain an empty parking space detection result includes:
[0028] Determine a parking space semantic segmentation contour curve according to the feature processing result;
[0029] Determining a chord of the parking space semantic segmentation contour curve;
[0030] Determine, on the parking space semantic segmentation contour curve, a segmentation point having a maximum distance from the chord, and a straight-line distance between the segmentation point and the chord;
[0031] Processing the parking space semantic segmentation contour curve according to the straight-line distance to obtain a parking space fitting result;
[0032] An empty parking space detection result is determined based on the parking space fitting result.
[0033] In one embodiment, the step of processing the parking space semantic segmentation contour curve according to the straight-line distance to obtain a parking space fitting result includes:
[0034] Get the preset distance threshold;
[0035] If the straight-line distance is not less than the preset distance threshold, segmenting the parking space semantic segmentation contour curve based on the segmentation point, and returning to the step of determining the chord of the parking space semantic segmentation contour curve to process the two segmented curves;
[0036] If the straight-line distance is less than the preset distance threshold, the chord is used as an approximation of the parking space semantic segmentation contour curve to obtain a parking space fitting result.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes an empty parking space detection device, the empty parking space detection device comprising:
[0038] An image acquisition module, used to acquire a vehicle surround view image containing surrounding environment information;
[0039] A data standard module, used for performing data annotation on the vehicle surround view image to obtain a marked vehicle surround view image;
[0040] A feature extraction module is used to extract features from the marked vehicle surround image and construct a feature pyramid based on the extracted image features;
[0041] A detection and segmentation module is used to perform target detection and semantic segmentation processing according to the feature pyramid to obtain feature processing results;
[0042] The result fitting module is used to perform polygon fitting on the feature processing result to obtain an empty parking space detection result.
[0043] In addition, to achieve the above-mentioned purpose, the present application also proposes an empty parking space detection device, which includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, and the computer program is configured to implement the steps of the empty parking space detection method described above.
[0044] In addition, to achieve the above-mentioned purpose, the present application also proposes a storage medium, which is a computer-readable storage medium, and a computer program is stored on the storage medium. When the computer program is executed by a processor, the steps of the empty parking space detection method described above are implemented.
[0045] In addition, to achieve the above-mentioned purpose, the present application also provides a computer program product, which includes a computer program, and when the computer program is executed by a processor, the steps of the empty parking space detection method described above are implemented.
[0046] One or more technical solutions proposed in this application have at least the following technical effects:
[0047] This application obtains a vehicle surround view image containing surrounding environment information; performs data annotation on the vehicle surround view image to obtain a marked vehicle surround view image; performs feature extraction on the marked vehicle surround view image and constructs a feature pyramid based on the extracted image features; performs target detection and semantic segmentation processing based on the feature pyramid to obtain feature processing results; performs polygon fitting on the feature processing results to obtain empty parking space detection results. Since the vehicle surround view image is extracted and the feature pyramid is constructed, the semantic information of the features is enhanced and the detection performance of the model is improved; by performing polygon fitting on the feature processing results obtained by target detection and speech segmentation processing, a more accurate and stable parking space frame can be generated, which improves the accuracy and robustness of the detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present application and, together with the description, serve to explain the principles of the present application.
[0049] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, for ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative labor.
[0050] Figure 1 A schematic diagram of a flow chart provided for the first embodiment of the empty parking space detection method of the present application;
[0051] Figure 2A schematic diagram of a process for obtaining a vehicle surround view image in one embodiment of the present application;
[0052] Figure 3 A schematic diagram of a flow chart provided for Embodiment 2 of the empty parking space detection method of the present application;
[0053] Figure 4 A schematic diagram of a flow chart provided for Embodiment 3 of the empty parking space detection method of the present application;
[0054] Figure 5 This is a schematic diagram of the module structure of the empty parking space detection device according to an embodiment of the present application;
[0055] Figure 6 Schematic diagram of the device structure of the hardware operating environment involved in the empty parking space detection method in the embodiment of the present application.
[0056] The purpose, features and advantages of this application will be further described in conjunction with the embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION
[0057] It should be understood that the specific embodiments described herein are only used to explain the technical solutions of the present application and are not used to limit the present application.
[0058] In order to better understand the technical solution of the present application, a detailed description will be given below in conjunction with the accompanying drawings and specific implementation methods.
[0059] The main solutions of the embodiments of the present application are: obtaining a vehicle surround view image containing surrounding environment information; performing data annotation on the vehicle surround view image to obtain a marked vehicle surround view image; performing feature extraction on the marked vehicle surround view image, and constructing a feature pyramid based on the extracted image features; performing target detection and semantic segmentation processing based on the feature pyramid to obtain a feature processing result; performing polygon fitting on the feature processing result to obtain an empty parking space detection result.
[0060] At present, the existing technology performs parking space detection on the captured images through detection technologies involving edge detection, color segmentation or shape matching.
[0061] Among them, edge detection is a technology used to detect the boundaries of objects in an image. It determines the boundaries of objects based on the changes in grayscale values in an image. Common edge detection algorithms include the Sobel operator and the Canny operator. These algorithms calculate the gradient or edge strength of pixel points in an image and find the location where the grayscale value changes the most in the image, thereby determining the boundaries of objects. Edge detection algorithms are sensitive to noise in images and are easily affected by factors such as lighting changes and shadows, resulting in unstable empty parking space detection results.
[0062] Color segmentation is an image processing technology based on pixel color information. It achieves object segmentation by classifying pixels in the image according to color features. In parking space recognition, the color information of the parking area can be extracted by setting a color threshold, and then it can be distinguished from the background to achieve parking space segmentation. The color segmentation algorithm is sensitive to changes in lighting conditions, which may cause the accuracy of color segmentation to decrease. If the color of the vehicle and the background are similar, color segmentation may be inaccurate, resulting in incorrect segmentation results.
[0063] Shape matching is a technique used to find specific shapes in an image. It compares the target shape with the candidate regions in the image to find the region that is most similar to the target shape. In parking space recognition, methods such as template matching can be used to find the shape of the parking space. Template matching is a method that compares a template with an image and determines the best matching region by calculating the similarity. Shape matching algorithms are sensitive to the rotation and scale changes of the target. If the target is rotated or scaled in the image, the matching may fail. Shape matching algorithms usually need to calculate a large number of feature points or feature descriptors, which has a high computational complexity and may affect real-time performance.
[0064] These methods require accurate parking space marking information in the collected images. If the parking space lines and corners are unclear or blocked, the empty parking space detection accuracy may be low or even impossible to detect. In real scenes, the parking space lines and corners may be unclear or blocked due to light, rain or stitching algorithms.
[0065] The present application provides a solution, which is to annotate the obtained vehicle surround view image and establish a feature pyramid representing the vehicle surround view image; perform target detection and semantic segmentation on the feature pyramid, and then perform polygon fitting on the feature processing results to obtain the empty parking space detection result. Compared with the prior art solutions, this solution regards the empty parking space as a whole target, performs semantic segmentation while performing target detection, and then performs polygon fitting on the semantic segmentation results to obtain the final empty parking space, thereby improving the detection performance of the empty parking space detection method, increasing the monitoring speed, and increasing the applicable scenarios of the automatic parking system.
[0066] It should be noted that the execution subject of this embodiment can be a vehicle-mounted computer, or a computing service device with image acquisition, data processing and program running functions, such as a cloud service device, a road-side service device, etc., or an empty parking space detection device that can achieve the above functions, etc. This embodiment does not specifically limit this. The following takes the empty parking space detection device (hereinafter referred to as the detection device) as an example of the execution subject to illustrate this embodiment and the following embodiments.
[0067] Based on this, the present application embodiment provides a method for detecting an empty parking space. Figure 1 , Figure 1 This is a flow chart of the first embodiment of the empty parking space detection method of the present application.
[0068] In this embodiment, the empty parking space detection method includes steps S10 to S50:
[0069] Step S10, obtaining a vehicle surround view image including surrounding environment information.
[0070] It is understandable that multiple cameras can be installed around the vehicle body to capture images, and the captured images are transmitted to the on-board data processing equipment for image correction, stitching and fusion, so as to generate a full-range vehicle surround view image containing surrounding environment information.
[0071] It should be understood that when performing image acquisition, a fisheye camera, a wide-angle camera, etc. may be used, and the embodiments of the present application are not limited to this.
[0072] In one implementation of the embodiment of the present application, the step of obtaining the vehicle surround view image may be as follows: Figure 2 As shown, the step of obtaining the vehicle surround view image containing surrounding environment information includes:
[0073] Step S11: Acquire an environment image containing surrounding environment information through a fisheye camera;
[0074] Step S12: performing fisheye distortion correction, top-view transformation and image stitching on the environment image to obtain a vehicle surround view image.
[0075] It is understandable that since the fisheye camera has a larger viewing angle, it can obtain more complete information about the surrounding environment, but its imaging is often accompanied by severe distortion. Therefore, it is necessary to perform fisheye image distortion correction on the fisheye camera image input to restore the image to a state closer to the real world.
[0076] It should be understood that the bird's-eye view transformation can convert the distortion-corrected fisheye image from the original perspective to an effect closer to a bird's-eye view, so that the detection equipment can better understand the relationship between the vehicle and the surrounding environment. By performing a bird's-eye view transformation on the distortion-corrected language image, the transformed image can more accurately reflect the actual situation around the vehicle.
[0077] It is understandable that since fisheye cameras can usually be installed at multiple different locations on a vehicle, each fisheye camera will capture images of different areas around the vehicle. In order to obtain a complete vehicle surround view image, it is necessary to perform image registration, image fusion and other operations on the images obtained by these fisheye cameras, and then achieve image stitching, so as to integrate the environmental images obtained by different fisheye cameras, thereby obtaining a vehicle surround view image output.
[0078] In a specific implementation, the detection device of the embodiment of the present application obtains an environmental image containing surrounding environment information through a fisheye camera; and performs fisheye image distortion correction, top-view transformation, and image stitching on the environmental image to obtain a vehicle surround view image. Since fisheye image distortion correction, top-view transformation, and image stitching are performed on the environmental image obtained by the fisheye camera, a high-quality, all-round vehicle surround view information is provided for empty parking space detection, thereby improving the accuracy of empty parking space detection.
[0079] Step S20, data annotation is performed on the vehicle surround view image to obtain a marked vehicle surround view image.
[0080] It should be noted that by annotating the vehicle surround view data, it is possible to accurately identify and locate specific information in the image (such as vehicles, parking spaces, etc.), thereby providing necessary input and reference for subsequent image processing and target detection.
[0081] In one implementation of the embodiment of the present application, the position, size, direction, vehicle and other information of the parking space in the vehicle surround view image may be annotated to obtain a marked vehicle surround view image.
[0082] Step S30: extracting features from the marked vehicle surround image and constructing a feature pyramid based on the extracted image features.
[0083] It should be noted that in order to enable the detection method to detect empty parking spaces when the parking space lines and corner points are unclear or blocked, the embodiment of the present application regards the entire empty parking space as a whole target for target detection and semantic segmentation. In the process of empty parking space detection, features are first extracted and feature pyramids are constructed, and then classification, bounding box regression and semantic segmentation are performed, and finally polygon fitting is performed on the semantic segmentation results to obtain the parking space frame.
[0084] It should be explained that due to the computing performance limitations of vehicle-mounted equipment, there are certain requirements for the storage space and computing power of the network model, and the model needs to be more lightweight. The embodiment of the present application uses MobileNetV3 for feature extraction. Compared with the traditional solution of feature extraction through ResNet-101, the solution of the embodiment of the present application greatly reduces the amount of parameters extracted, which is more in line with the actual situation of vehicle-mounted equipment.
[0085] Specifically, the MobileNetV3 model uses depthwise separable convolution to replace ordinary convolution, which can effectively reduce model parameters. Depthwise separable convolution includes depthwise convolution and pointwise convolution. For a convolution with C input channels, C' output channels, and K convolution kernel size, the parameters of depthwise convolution and pointwise convolution are calculated respectively, and the number of parameters of depthwise separable convolution is calculated to be less than that of ordinary convolution:
[0086]
[0087] It can be seen from the above formula that depthwise separable convolution can greatly reduce the number of network parameters. The larger the output channel or the larger the convolution kernel size, the more the number of parameters is reduced, thereby achieving a lightweight network model.
[0088] It should be noted that the feature extraction of the annotated vehicle surround image is performed through the MobileNetV3 feature extraction network to obtain a feature layer (image feature), and a feature pyramid can be constructed based on the feature layer.
[0089] In a specific implementation, the detection device of the embodiment of the present application annotates data on the vehicle surround view image to obtain a marked vehicle surround view image; and extracts features from the marked vehicle surround view image, and constructs a feature pyramid based on the extracted image features. Since data annotation is performed on the vehicle surround view image, the accuracy of detection is improved; the feature extraction of the marked vehicle surround view image is performed through the MobileNetV3 feature extraction network, which reduces the number of detection parameters and the computational complexity of the system. The feature pyramid is constructed based on the obtained image features, so that feature information of different scales can be fused, so that the model can process targets of different sizes at the same time, which enhances the semantic information while improving the performance of the model, thereby enhancing the accuracy of empty parking space detection.
[0090] Step S40, performing target detection and semantic segmentation processing according to the feature pyramid to obtain a feature processing result;
[0091] Step S50: performing polygon fitting on the feature processing result to obtain an empty parking space detection result.
[0092] It should be noted that by performing target detection and semantic segmentation processing on the feature pyramid, it is possible to classify the image pixels in the feature pyramid and obtain the semantic segmentation result of the entire empty parking space.
[0093] In addition, it should be noted that the parking space frame can be obtained by performing polygon fitting on the feature processing result, and the empty parking space detection result can be determined through the parking space frame.
[0094] It can be understood that by performing polygon fitting on the feature processing results, the shape features of the parking space can be extracted more accurately, thereby generating a more accurate and stable parking space frame, thereby improving the recognition accuracy and robustness of the detection algorithm.
[0095] The embodiment of the present application obtains a vehicle surround view image containing surrounding environment information; performs data annotation on the vehicle surround view image to obtain a marked vehicle surround view image; performs feature extraction on the marked vehicle surround view image and constructs a feature pyramid based on the extracted image features; performs target detection and semantic segmentation processing based on the feature pyramid to obtain feature processing results; performs polygon fitting on the feature processing results to obtain empty parking space detection results. Since the vehicle surround view image is extracted and the feature pyramid is constructed, the semantic information of the features is enhanced and the detection performance of the model is improved; by performing polygon fitting on the feature processing results obtained by target detection and speech segmentation processing, a more accurate and stable parking space frame can be generated, which improves the accuracy and robustness of detection.
[0096] Based on the first embodiment of the present application, in the second embodiment of the present application, the same or similar contents as those in the above-mentioned embodiment 1 can be referred to the above introduction, and will not be repeated in the following. Figure 3 In the second embodiment, the step of performing target detection and semantic segmentation processing according to the feature pyramid to obtain feature processing results includes:
[0097] Step S41: determining a valid feature layer based on the feature pyramid, and determining a feature layer size of the valid feature layer;
[0098] Step S42: setting a feature detection priori frame according to the feature layer size;
[0099] Step S42: performing feature detection on the effective feature layer according to the feature detection prior frame to obtain a feature detection candidate frame including a candidate empty parking space;
[0100] Step S44: intercepting and adjusting the effective feature layer according to the feature detection candidate frame to obtain a feature processing result.
[0101] It should be noted that when determining the feature pyramid, the effective feature layer of each level in the pyramid and the size of each effective feature layer can be obtained. According to the size of the feature layer of the effective feature layer, the corresponding feature detection prior frame can be selected. The effective feature layer is passed into the region generation network to obtain the adjustment parameters of the feature detection prior frame and whether the feature inspection frame contains an empty parking space. Then, the feature inspection frame containing the empty parking space can be adjusted according to the corresponding adjustment parameters, so that the adjusted inspection frame is closer to the position of the empty parking space, and the feature detection candidate frame is obtained.
[0102] Specifically, the step of performing feature detection on the effective feature layer according to the feature detection prior frame to obtain a feature detection candidate frame containing a candidate empty parking space includes:
[0103] Inputting the effective feature layer into a region generation network, determining a target feature detection priori frame including a candidate empty parking space and adjustment parameters of the target feature detection priori frame in the feature detection priori frame;
[0104] The target feature detection prior frame is adjusted according to the adjustment parameters to obtain a feature detection candidate frame.
[0105] It should be explained that the region generation network is a network structure that extracts feature detection frames based on feature detection frames to obtain feature detection candidate frames. The region generation network selects candidate regions by predicting and correcting the input feature detection frames. Since it can predict the object boundaries and object scores at each position, it improves the accuracy of candidate frame generation.
[0106] It should be noted that in the embodiment of the present application, Mask R-CNN can be used to perform target detection and semantic segmentation on the feature pyramid. This algorithm is an extension of Faster R-CNN, which introduces the RoI Align layer to replace the RoIPooling layer in Faster R-CNN, and adds a semantic segmentation model to perform semantic segmentation. The ROI Align layer can use the obtained feature detection candidate frame to intercept the corresponding valid feature layer to obtain a local feature layer. By adjusting the obtained local feature layer to the same size, and passing the resized local feature layer into the classification and bounding box regression model, it is determined whether there is a real empty parking space in the feature detection candidate frame, and then the feature detection candidate frame is adjusted according to the existing real empty parking space to obtain a prediction frame, that is, a feature processing result.
[0107] Specifically, the step of intercepting and adjusting the effective feature layer according to the feature detection candidate frame to obtain a feature processing result includes:
[0108] The effective feature layer is intercepted by the feature detection candidate frame to obtain a local feature layer;
[0109] Inputting the local feature layer into a classification and bounding box regression model to determine a target feature detection candidate box where a real empty parking space exists;
[0110] The local feature layer is intercepted and adjusted through the target feature detection candidate frame to obtain a feature processing result.
[0111] It should be noted that the above-mentioned method for adjusting the local feature layer may include interpolation method, pooling method, sampling method, etc., and the embodiments of the present application are not limited to this.
[0112] In one implementation of the real-time example of the present application, interpolation can be used to calculate approximate pixel values at non-pixel coordinate points, so that local feature inputs of different sizes can obtain outputs of the same size, that is, local feature layers of consistent size are obtained.
[0113] Furthermore, the prediction box can be used to preliminarily obtain the approximate area of the empty parking space in the vehicle surround image. In order to obtain more accurate empty parking space information, the prediction box can be used to intercept and adjust the local feature layer, and the pixel points can be classified through the semantic segmentation model to obtain the semantic segmentation result of the entire empty parking space, thereby achieving an improvement in the feature processing results.
[0114] It should be noted that the embodiment of the present application achieves a step-by-step progressive interception of the effective feature layer by obtaining feature detection candidate boxes, target feature detection candidate boxes, and prediction boxes, so that the obtained semantic segmentation results can gradually approach the empty parking spaces, thereby improving the accuracy of target detection and semantic segmentation.
[0115] The embodiment of the present application determines the effective feature layer based on the feature pyramid and determines the feature layer size of the effective feature layer; sets a feature detection prior frame according to the feature layer size; performs feature detection on the effective feature layer according to the feature detection prior frame to obtain a feature detection candidate frame containing a candidate empty parking space; intercepts and adjusts the effective feature layer according to the feature detection candidate frame to obtain a feature processing result. Since the feature detection prior frame is set and the feature detection candidate frame is obtained in the effective feature layer according to the feature detection prior frame, and then the effective feature layer is intercepted and adjusted, the obtained detection frame is gradually approached to the real empty parking space, thereby improving the efficiency and accuracy of empty parking space detection.
[0116] Based on the above-mentioned first embodiment and / or second embodiment of the present application, in the third embodiment of the present application, the same or similar contents as those in the above-mentioned embodiments can be referred to the above introduction, and will not be described in detail later. Figure 4 In the third embodiment, the step of performing polygon fitting on the feature processing result to obtain the empty parking space detection result includes:
[0117] Step S51: determining a parking space semantic segmentation contour curve according to the feature processing result;
[0118] Step S52: determining the chord of the parking space semantic segmentation contour curve;
[0119] Step S53: determining, on the parking space semantic segmentation contour curve, a segmentation point with the largest distance from the chord, and a straight-line distance between the segmentation point and the chord;
[0120] Step S54: processing the parking space semantic segmentation contour curve according to the straight-line distance to obtain a parking space fitting result;
[0121] Step S55: determining an empty parking space detection result based on the parking space fitting result.
[0122] It should be noted that when the feature processing result is obtained, a polygon fitting may be performed on it. The fitting method may use Hough transform, RANSAC algorithm, etc., which is not limited in the embodiment of the present application.
[0123] In one implementation of an embodiment of the present application, the Douglas-Peucker algorithm is used to perform polygon fitting on the semantically segmented empty parking space contour, that is, the parking space contour is fitted to the shape of the empty parking space in the surround image by dynamically adjusting the threshold of the distance from the point to the corresponding straight line segment.
[0124] Specifically, when there are pixels that do not belong to empty parking spaces or when the feature processing results are not closed, they need to be filled and then the parking spaces are fitted according to the filled overall contour curve. That is, when there are pixels that do not belong to empty parking spaces or when the feature processing results are not closed, the semantic segmentation contour curve of the parking spaces is determined.
[0125] It should be noted that when determining the semantic segmentation contour curve of the parking space, a straight line can be connected between the two end points of the curve, and the straight line is also the chord of the curve. On the semantic segmentation curve of the parking space, the point with the largest distance from the straight line can be determined, that is, the segmentation point. The distance between the segmentation point and the chord is compared with the distance of the preset given threshold. If the distance is less than the preset threshold, the chord is used as an approximation of the semantic segmentation contour curve of the parking space, thereby completing the processing of this contour curve. If the distance is not less than the preset threshold, the semantic segmentation contour curve of the parking space is divided into two segments based on the segmentation point, and the chords of the two curves are taken separately for subsequent segmentation / processing. When all the semantic segmentation contour curves of the parking space are processed, the straight lines that have been processed are connected in sequence to obtain the fitting result of the parking space, that is, the fitted parking space frame.
[0126] Specifically, the step of processing the parking space semantic segmentation contour curve according to the straight-line distance to obtain a parking space fitting result includes:
[0127] Get the preset distance threshold;
[0128] If the straight-line distance is not less than the preset distance threshold, segmenting the parking space semantic segmentation contour curve based on the segmentation point, and returning to the step of determining the chord of the parking space semantic segmentation contour curve to process the two segmented curves;
[0129] If the straight-line distance is less than the preset distance threshold, the chord is used as an approximation of the parking space semantic segmentation contour curve to obtain a parking space fitting result.
[0130] It is understandable that the preset distance threshold is also the predetermined threshold, which can be a threshold preset by a user or a manufacturer. When the shape fidelity of the curve is required to be high, the threshold can usually be set to be smaller, otherwise it can be set to be larger.
[0131] In the embodiment of the present application, the detection device determines the parking space semantic segmentation contour curve according to the feature processing result; determines the chord of the parking space semantic segmentation contour curve; determines the segmentation point with the largest distance from the chord and the straight-line distance between the segmentation point and the chord on the parking space semantic segmentation contour curve; processes the parking space semantic segmentation contour curve according to the straight-line distance to obtain the parking space fitting result; and determines the empty parking space detection result based on the parking space fitting result. Since there are pixel points that do not belong to the empty parking space or are not closed inside the feature processing result, the parking space semantic segmentation contour curve is segmented according to the chord, so that the distance between the chord of the final curve and the segmentation point is not less than the preset distance threshold, thereby improving the detection accuracy of the empty parking space detection.
[0132] This application also provides an empty parking space detection device, please refer to Figure 5 , the empty parking space detection device comprises:
[0133] An image acquisition module 510 is used to acquire a vehicle surround view image including surrounding environment information;
[0134] A data standard module 520 is used to perform data annotation on the vehicle surround view image to obtain a marked vehicle surround view image;
[0135] A feature extraction module 530 is used to extract features from the marked vehicle surround image and construct a feature pyramid based on the extracted image features;
[0136] A detection and segmentation module 540 is used to perform target detection and semantic segmentation processing according to the feature pyramid to obtain a feature processing result;
[0137] The result fitting module 550 is used to perform polygon fitting on the feature processing result to obtain an empty parking space detection result.
[0138] The embodiment of the present application obtains a vehicle surround view image containing surrounding environment information; performs data annotation on the vehicle surround view image to obtain a marked vehicle surround view image; performs feature extraction on the marked vehicle surround view image and constructs a feature pyramid based on the extracted image features; performs target detection and semantic segmentation processing based on the feature pyramid to obtain feature processing results; performs polygon fitting on the feature processing results to obtain empty parking space detection results. Since the vehicle surround view image is extracted and the feature pyramid is constructed, the semantic information of the features is enhanced and the detection performance of the model is improved; by performing polygon fitting on the feature processing results obtained by target detection and speech segmentation processing, a more accurate and stable parking space frame can be generated, which improves the accuracy and robustness of detection.
[0139] In one embodiment, the detection and segmentation module 540 is also used to determine a valid feature layer based on the feature pyramid, and determine the feature layer size of the valid feature layer; set a feature detection prior frame according to the feature layer size; perform feature detection on the valid feature layer according to the feature detection prior frame to obtain a feature detection candidate frame including a candidate empty parking space; intercept and adjust the valid feature layer according to the feature detection candidate frame to obtain a feature processing result.
[0140] In one embodiment, the detection and segmentation module 540 is also used to input the effective feature layer into the region generation network, determine the target feature detection prior frame including the candidate empty parking space and the adjustment parameters of the target feature monitoring prior frame in the feature detection prior frame; adjust the target feature detection prior frame according to the adjustment parameters to obtain the feature detection candidate frame.
[0141] In one embodiment, the detection and segmentation module 540 is also used to intercept the effective feature layer through the feature detection candidate frame to obtain a local feature layer; input the local feature layer into a classification and bounding box regression model to determine a target feature detection candidate frame where a real empty parking space exists; intercept and adjust the local feature layer through the target feature detection candidate frame to obtain a feature processing result.
[0142] In one embodiment, the image acquisition module 510 is further used to acquire an environmental image containing surrounding environment information through a fisheye camera; perform fisheye distortion correction, bird's-eye view transformation and image stitching on the environmental image to obtain a vehicle surround view image.
[0143] In one embodiment, the result fitting module 550 is also used to determine a parking space semantic segmentation contour curve based on the feature processing result; determine the chord of the parking space semantic segmentation contour curve; determine the segmentation point with the largest distance from the chord and the straight-line distance between the segmentation point and the chord on the parking space semantic segmentation contour curve; process the parking space semantic segmentation contour curve according to the straight-line distance to obtain a parking space fitting result; and determine an empty parking space detection result based on the parking space fitting result.
[0144] In one embodiment, the result fitting module 550 is also used to obtain a preset distance threshold; if the straight-line distance is not less than the preset distance threshold, the parking space semantic segmentation contour curve is segmented based on the segmentation point, and the step of determining the chord of the parking space semantic segmentation contour curve is returned to process the two segmented curves; if the straight-line distance is less than the preset distance threshold, the chord is used as an approximation of the parking space semantic segmentation contour curve to obtain a parking space fitting result.
[0145] The empty parking space detection device provided by the present application adopts the empty parking space detection method in the above embodiment, which can solve the technical problem of low detection accuracy of the detection method in the prior art when the image clarity is low or there is occlusion. Compared with the prior art, the beneficial effects of the empty parking space detection device provided by the present application are the same as the beneficial effects of the empty parking space detection method provided by the above embodiment, and the other technical features of the empty parking space detection device are the same as the features disclosed in the above embodiment method, which will not be repeated here.
[0146] The present application provides an empty parking space detection device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the empty parking space detection method in the above-mentioned embodiment one.
[0147] Reference below Figure 6 , which shows a schematic diagram of the structure of an empty parking space detection device suitable for implementing the embodiment of the present application. The empty parking space detection device in the embodiment of the present application may include but is not limited to mobile terminals such as mobile phones, laptop computers, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Descriptions), PMPs (Portable Media Players), vehicle-mounted terminals (such as vehicle-mounted navigation terminals), etc., and fixed terminals such as digital TVs, desktop computers, etc. Figure 6The empty parking space detection device shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0148] like Figure 6 As shown, the empty parking space detection device may include a processing device 1001 (e.g., a central processing unit, a graphics processor, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory (ROM: Read Only Memory) 1002 or a program loaded from a storage device 1003 to a random access memory (RAM: Random Access Memory) 1004. In RAM1004, various programs and data required for the operation of the empty parking space detection device are also stored. The processing device 1001, ROM1002, and RAM1004 are connected to each other through a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Generally, the following systems can be connected to the I / O interface 1006: an input device 1007 including, for example, a touch screen, a touch pad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; an output device 1008 including, for example, a liquid crystal display (LCD: Liquid Crystal Display), a speaker, a vibrator, etc.; a storage device 1003 including, for example, a magnetic tape, a hard disk, etc.; and a communication device 1009. The communication device 1009 can allow the empty parking space detection device to communicate with other devices wirelessly or by wire to exchange data. Although the figure shows an empty parking space detection device with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems can be implemented or have alternatively.
[0149] In particular, according to the embodiments disclosed in the present application, the process described above with reference to the flowchart can be implemented as a computer software program. For example, the embodiments disclosed in the present application include a computer program product, which includes a computer program carried on a computer-readable medium, and the computer program includes a program code for executing the method shown in the flowchart. In such an embodiment, the computer program can be downloaded and installed from a network through a communication device, or installed from a storage device 1003, or installed from a ROM 1002. When the computer program is executed by the processing device 1001, the above-mentioned functions defined in the method of the embodiment disclosed in the present application are executed.
[0150] The empty parking space detection device provided by the present application adopts the empty parking space detection method in the above embodiment, which can solve the technical problem of low detection accuracy of the detection method in the prior art when the image clarity is low or there is occlusion. Compared with the prior art, the beneficial effects of the empty parking space detection device provided by the present application are the same as the beneficial effects of the empty parking space detection method provided by the above embodiment, and the other technical features of the empty parking space detection device are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0151] It should be understood that the various parts disclosed in this application can be implemented by hardware, software, firmware or a combination thereof. In the description of the above embodiments, specific features, structures, materials or characteristics can be combined in any one or more embodiments or examples in a suitable manner.
[0152] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0153] The present application provides a computer-readable storage medium having computer-readable program instructions (ie, computer programs) stored thereon, and the computer-readable program instructions are used to execute the empty parking space detection method in the above-mentioned embodiment.
[0154] The computer-readable storage medium provided in the present application may be, for example, a USB flash drive, but is not limited to electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems, systems or devices, or any combination of the above. More specific examples of computer-readable storage media may include, but are not limited to: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in combination with an instruction execution system, system or device. The program code contained on the computer-readable storage medium may be transmitted using any appropriate medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination of the above.
[0155] The computer-readable storage medium may be included in the empty parking space detection device; or may exist independently without being assembled into the empty parking space detection device.
[0156] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the empty parking space detection device, the empty parking space detection device:
[0157] Acquire a vehicle surround view image containing surrounding environment information;
[0158] Performing data annotation on the vehicle surround view image to obtain a marked vehicle surround view image;
[0159] Extracting features from the marked vehicle surround image, and constructing a feature pyramid based on the extracted image features;
[0160] Performing target detection and semantic segmentation processing according to the feature pyramid to obtain feature processing results;
[0161] Polygon fitting is performed on the feature processing result to obtain an empty parking space detection result.
[0162] Computer program code for performing the operations of the present application may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet service provider).
[0163] The flow chart and block diagram in the accompanying drawings illustrate the possible architecture, function and operation of the system, method and computer program product according to various embodiments of the present application. In this regard, each square box in the flow chart or block diagram can represent a module, a program segment or a part of a code, and the module, the program segment or a part of the code contains one or more executable instructions for realizing the specified logical function. It should also be noted that in some alternative implementations, the functions marked in the square box can also occur in a sequence different from that marked in the accompanying drawings. For example, two square boxes represented in succession can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each square box in the block diagram and / or flow chart, and the combination of the square boxes in the block diagram and / or flow chart can be implemented with a dedicated hardware-based system that performs a specified function or operation, or can be implemented with a combination of dedicated hardware and computer instructions.
[0164] The modules involved in the embodiments described in this application may be implemented by software or hardware, wherein the name of the module does not constitute a limitation on the unit itself in some cases.
[0165] The readable storage medium provided in the present application is a computer-readable storage medium, which stores computer-readable program instructions (i.e., computer programs) for executing the above-mentioned empty parking space detection method, and can solve the technical problem of low detection accuracy of the detection method in the prior art when the image clarity is low or there is occlusion. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in the present application are the same as the beneficial effects of the empty parking space detection method provided in the above-mentioned embodiment, and will not be repeated here.
[0166] The present application also provides a computer program product, including a computer program, which implements the steps of the above-mentioned empty parking space detection method when executed by a processor.
[0167] The computer program product provided by the present application can solve the technical problem of low detection accuracy of the detection method in the prior art when the image clarity is low or there is occlusion. Compared with the prior art, the beneficial effects of the computer program product provided by the present application are the same as the beneficial effects of the empty parking space detection method provided by the above embodiment, which will not be repeated here.
[0168] The above descriptions are only some embodiments of the present application, and are not intended to limit the patent scope of the present application. All equivalent structural changes made using the contents of the present application specification and drawings under the technical concept of the present application, or direct / indirect applications in other related technical fields are included in the patent protection scope of the present application.
Claims
1. A method for detecting an empty parking space, characterized in that: The method comprises: Acquire a vehicle surround view image containing surrounding environment information; Performing data annotation on the vehicle surround view image to obtain a marked vehicle surround view image; Extracting features from the marked vehicle surround image, and constructing a feature pyramid based on the extracted image features; Performing target detection and semantic segmentation processing according to the feature pyramid to obtain feature processing results; Polygon fitting is performed on the feature processing result to obtain an empty parking space detection result.
2. The empty parking space detection method according to claim 1, characterized in that: The step of performing target detection and semantic segmentation processing according to the feature pyramid to obtain feature processing results includes: Determine a valid feature layer based on the feature pyramid, and determine a feature layer size of the valid feature layer; Setting a feature detection priori frame according to the feature layer size; Performing feature detection on the effective feature layer according to the feature detection prior frame to obtain a feature detection candidate frame including a candidate empty parking space; The effective feature layer is intercepted and adjusted according to the feature detection candidate frame to obtain a feature processing result.
3. The empty parking space detection method according to claim 2, characterized in that: The step of performing feature detection on the effective feature layer according to the feature detection prior frame to obtain a feature detection candidate frame containing a candidate empty parking space comprises: Inputting the effective feature layer into a region generation network, determining a target feature detection priori frame including a candidate empty parking space and adjustment parameters of the target feature detection priori frame in the feature detection priori frame; The target feature detection prior frame is adjusted according to the adjustment parameters to obtain a feature detection candidate frame.
4. The empty parking space detection method according to claim 2, characterized in that: The step of intercepting and adjusting the effective feature layer according to the feature detection candidate frame to obtain a feature processing result includes: The effective feature layer is intercepted by the feature detection candidate frame to obtain a local feature layer; Inputting the local feature layer into a classification and bounding box regression model to determine a target feature detection candidate box where a real empty parking space exists; The local feature layer is intercepted and adjusted through the target feature detection candidate frame to obtain a feature processing result.
5. The empty parking space detection method according to claim 1, characterized in that: The step of obtaining the vehicle surround view image containing surrounding environment information comprises: Acquire an environmental image containing surrounding environment information through a fisheye camera; The environment image is subjected to fisheye distortion correction, bird's-eye view transformation and image stitching to obtain a vehicle surround view image.
6. The empty parking space detection method according to claim 1, characterized in that: The step of performing polygon fitting on the feature processing result to obtain an empty parking space detection result comprises: Determine a parking space semantic segmentation contour curve according to the feature processing result; Determining a chord of the parking space semantic segmentation contour curve; Determine, on the parking space semantic segmentation contour curve, a segmentation point having a maximum distance from the chord, and a straight-line distance between the segmentation point and the chord; Processing the parking space semantic segmentation contour curve according to the straight-line distance to obtain a parking space fitting result; An empty parking space detection result is determined based on the parking space fitting result.
7. The empty parking space detection method according to claim 6, characterized in that: The step of processing the parking space semantic segmentation contour curve according to the straight-line distance to obtain a parking space fitting result includes: Get the preset distance threshold; If the straight-line distance is not less than the preset distance threshold, segmenting the parking space semantic segmentation contour curve based on the segmentation point, and returning to the step of determining the chord of the parking space semantic segmentation contour curve to process the two segmented curves; If the straight-line distance is less than the preset distance threshold, the chord is used as an approximation of the parking space semantic segmentation contour curve to obtain a parking space fitting result.
8. An empty parking space detection device, characterized in that: The empty parking space detection device comprises: An image acquisition module, used to acquire a vehicle surround view image containing surrounding environment information; A data standard module, used for performing data annotation on the vehicle surround view image to obtain a marked vehicle surround view image; A feature extraction module is used to extract features from the marked vehicle surround image and construct a feature pyramid based on the extracted image features; A detection and segmentation module is used to perform target detection and semantic segmentation processing according to the feature pyramid to obtain feature processing results; The result fitting module is used to perform polygon fitting on the feature processing result to obtain an empty parking space detection result.
9. An empty parking space detection device, characterized in that: The device includes: a memory, a processor, and an empty parking space detection program stored in the memory and executable on the processor, wherein the empty parking space detection program is configured to implement the steps of the empty parking space detection method according to any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium stores an empty parking space detection program, which, when executed by a processor, implements the steps of the empty parking space detection method according to any one of claims 1 to 7.
Citation Information
Patent Citations
Parking space detection method, device and equipment and storage medium
CN117612138A
