Parking space detection method, device, electronic device and storage medium
By improving the YOLX object detection algorithm, utilizing the salient feature enhancement fusion module (SFEF) and panoramic surround view stitching, the accuracy and efficiency issues of existing parking space detection are solved, efficient parking space recognition and vehicle-side deployment are achieved, and the performance of the autonomous driving parking system is improved.
Patent Information
- Application Number
- CN202410213670.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-27
- Publication Date
- 2025-09-12
- Estimated Expiration
- 2044-02-27
AI Technical Summary
Existing parking space detection technologies have shortcomings in accuracy, efficiency, and end-to-end deployment. The YOLOv3 detection solution cannot accurately match parking spaces with complex shapes, the graph convolution recognition solution is prone to misidentifying parking space corners, and has high computing resources and deployment difficulties.
An improved YOLX object detection algorithm is used to enhance feature fusion through the salient feature enhancement fusion module (SFEF). Combined with the panoramic surround view mosaic image and post-processing strategy, the corner box, entrance wireframe and parking space frame of the parking space are identified to optimize parking space detection.
It improves the accuracy and efficiency of parking space detection, reduces the difficulty of vehicle-side deployment, and improves the parking efficiency and safety of autonomous vehicles.
Smart Images

Figure CN118038410B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of new energy vehicle technology, and in particular to a parking space detection method, device, electronic device, and storage medium. Background Art
[0002] Automated Valet Parking (AVP) systems, an innovative application in the field of autonomous vehicles, utilize parking space detection as one of their core technologies. This technology automatically identifies and locates parking spaces, providing accurate parking guidance for autonomous vehicles. Currently, parking space detection technology primarily relies on two approaches: one that utilizes the YOLOv3 object detection algorithm, and the other that employs a recognition method based on graph convolution.
[0003] However, these two existing technical solutions have obvious shortcomings. Although the YOLOv3 detection solution is widely used in various target detection scenarios, it faces multiple challenges in parking space detection. The rectangular detection frame it generates often cannot accurately match the complex geometric shape of the actual parking space, resulting in the inclusion of non-target scenes in the detection frame, affecting the recognition effect. In addition, YOLOv3 performs poorly in small target positioning, dense scene processing, and detection of occluded or deformed targets. Its model training requires a lot of time and computing resources, especially the processing effect of targets of different scales is unsatisfactory, which easily leads to a decrease in detection performance.
[0004] Graph convolution recognition also faces challenges in parking space detection. When detecting parking space corners, it can easily misidentify the back corners of parking spaces as entrance line corners. This error directly impacts the accuracy of downstream tasks. Furthermore, graph convolution algorithms require a large number of convolution parameters, which complicates their deployment on end-user ARM processors.
[0005] Therefore, the existing technology has deficiencies in the accuracy, efficiency, and terminal-side deployment of parking space detection, and an improved technical solution is urgently needed to solve the above problems. Summary of the Invention
[0006] In view of this, the embodiments of the present application provide a parking space detection method, device, electronic device and storage medium to solve the problems of low accuracy and efficiency of parking space detection in the existing technology and difficulty in deployment on the vehicle side.
[0007] According to a first aspect of an embodiment of the present application, a parking space detection method is provided, comprising: in response to a triggering of a vehicle parking operation, using a camera to capture images around the vehicle, and stitching the captured images into a panoramic surround stitching image, wherein the panoramic surround stitching image includes multiple parking spaces to be detected; inputting the panoramic surround stitching image into a predetermined target detection model for processing to identify corner point frames, entrance wireframes, and parking space frames corresponding to each parking space; wherein the predetermined target detection model includes a significant feature enhancement and fusion module, and the significant feature enhancement and fusion module uses a parallel dual-channel aggregation module to fuse feature maps of different scales respectively to enhance target detection features; based on a preset post-processing strategy, processing the entrance wireframe of the parking space, and matching the processed entrance wireframe with the parking space frame, determining the corner point positions and order corresponding to the parking space according to the matching results, and determining the specific position and orientation of the parking space ultimately used for parking based on the corner point positions and order.
[0008] According to a second aspect of an embodiment of the present application, a parking space detection device is provided, comprising: an acquisition module configured to, in response to a triggering of a parking operation of a vehicle, acquire images of the vehicle's surroundings using a camera, and stitch the acquired images into a panoramic surround view mosaic image, wherein the panoramic surround view mosaic image includes a plurality of parking spaces to be detected; a detection module configured to input the panoramic surround view mosaic image into a predetermined target detection model for processing to identify corner point frames, entrance wireframes, and parking space frames corresponding to each parking space; wherein the predetermined target detection model includes a salient feature enhancement and fusion module, which utilizes a parallel dual-channel aggregation module to fuse feature maps of different scales to enhance target detection features; and a determination module configured to process the entrance wireframe of the parking space based on a preset post-processing strategy, match the processed entrance wireframe with the parking space frame, determine the position and order of the corner points corresponding to the parking space based on the matching results, and determine the specific position and orientation of the parking space ultimately used for parking based on the position and order of the corner points.
[0009] According to a third aspect of an embodiment of the present application, an electronic device is provided, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the steps of the above method are implemented when the processor executes the computer program.
[0010] According to a fourth aspect of the embodiments of the present application, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the steps of the above method are implemented.
[0011] At least one of the above technical solutions adopted in the embodiments of the present application can achieve the following beneficial effects:
[0012] In response to the triggering of the vehicle parking operation, the camera is used to collect images around the vehicle, and the collected images are stitched into a panoramic surround stitching map, wherein the panoramic surround stitching map contains multiple parking spaces to be detected; the panoramic surround stitching map is input into a predetermined target detection model for processing to identify the corner point frame, entrance wireframe and parking space frame corresponding to each parking space; wherein the predetermined target detection model includes a significant feature enhancement fusion module, and the significant feature enhancement fusion module uses a parallel dual-channel aggregation module to fuse feature maps of different scales respectively to enhance the target detection features; based on a preset post-processing strategy, the entrance wireframe of the parking space is processed, and the processed entrance wireframe is matched with the parking space frame, and according to the matching results, the corner point position and order corresponding to the parking space are determined, and the specific position and orientation of the parking space finally used for parking are determined based on the corner point position and order. This application improves the accuracy and efficiency of parking space detection and reduces the difficulty of deploying the detection algorithm on the vehicle side. BRIEF DESCRIPTION OF THE DRAWINGS
[0013] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the following briefly introduces the drawings required for use in the embodiments or descriptions of the prior art. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.
[0014] Figure 1 1 is a flow chart of a parking space detection method provided in an embodiment of the present application;
[0015] Figure 2 It is a schematic diagram of the structure of the YOLX target detection model provided in the embodiment of the present application;
[0016] Figure 3 Schematic diagram of the structure of the salient feature enhancement fusion module SFEF provided in an embodiment of the present application;
[0017] Figure 4 is a structural diagram of a parking space detection device provided in an embodiment of the present application;
[0018] Figure 5 It is a structural diagram of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0019] In the following description, specific details such as specific system structures and techniques are provided for purposes of illustration rather than limitation to facilitate a thorough understanding of the embodiments of the present application. However, it will be apparent to those skilled in the art that the present application may be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid obscuring the description of the present application with unnecessary detail.
[0020] Automatic valet parking (AVP) is a key application for self-driving cars, in which parking space detection plays a crucial role. Current parking space detection methods primarily include detection using YOLOv3 and recognition using graph convolution. The following details the challenges with each approach, including the following:
[0021] The first solution detected by YOLOv3 has the following shortcomings:
[0022] 1. The box detected by YOLOv3 is rectangular. Parking spaces are usually not complete rectangles in the mosaic image, so other scenes may appear in the detection box, interfering with the recognition effect.
[0023] 2. Compared with some other object detection algorithms, YOLOv3 may have slightly lower localization accuracy for small objects, especially in densely populated target scenes;
[0024] 3. For targets with occlusion, rotation, deformation, etc., YOLOv3 is relatively difficult to accurately detect and locate;
[0025] 4. Compared with some lightweight models, YOLOv3 takes longer to train and requires more computing resources and time;
[0026] 5. YOLOv3 does not handle objects of different scales consistently, which may lead to a decrease in the detection performance of objects of certain scales.
[0027] The second solution of graph convolution recognition has the following shortcomings:
[0028] 1. When identifying entrance line corners for parking space detection, graph convolution often mistakenly detects the back corners of parking spaces as entrance line corners, causing errors in downstream tasks.
[0029] 2. Graph convolution has many convolution parameters and is not easy to deploy on the end-side ARM.
[0030] It should be noted that the target detection model used in the following embodiments of this application is an improvement on the existing YOL Ov3 detection model. This model is obtained by adding the saliency feature enhancement fusion module SFEF to the target detection algorithm. SFEF uses saliency maps of adjacent scales to enhance the features required for fusion, thereby generating more representative fusion features. In the following embodiments of this application, the improved target detection model is referred to as the YOLX algorithm.
[0031] The following is a detailed description of the specific working process and content of the existing YOLOv3 detection model, which may include the following:
[0032] YOLOv3 is an object detection algorithm in computer vision, widely used in the field of real-time object detection. The core idea of YOLOv3 is to use a single neural network model to simultaneously predict the bounding boxes and class probabilities of different objects in an image. The working process and principles of YOLOv3 can be summarized as follows:
[0033] 1. Single Neural Network: YOLOv3 uses a single convolutional neural network (CNN) to predict bounding boxes and class probabilities directly from the input image, which is different from region proposal networks (such as the R-CNN series), which first generate region proposals and then perform classification and bounding box regression.
[0034] 2. Feature Extraction: The network first extracts features from the input image using multiple convolutional and pooling layers. YOLOv3 introduces the Darknet-53 as a feature extractor. This network is deep and powerful, and contains multiple residual blocks to enhance feature learning.
[0035] 3. Bounding box prediction: Based on feature extraction, YOLOv3 uses anchor boxes to predict the size and position of the bounding box. The size of these anchor boxes is pre-set based on the statistical information in the training dataset.
[0036] 4. Category and Confidence: For each bounding box, YOLOv3 predicts the probability of multiple categories and an objectness score. Object confidence refers to whether the bounding box contains an object and the accuracy of the bounding box.
[0037] 5. Scale Prediction: YOLOv3 makes predictions at different layers of the network, allowing it to capture objects of different scales. This is achieved by making predictions on feature maps of three different sizes, allowing it to detect small, medium, and large objects.
[0038] 6. Non-Maximum Suppression (NMS): Finally, the algorithm uses non-maximum suppression to remove overlapping bounding boxes and only keep the bounding boxes that are most likely to contain objects.
[0039] In general, YOLOv3's advantage lies in its speed, enabling real-time detection while maintaining high accuracy. However, as mentioned above, YOLOv3 also has some limitations, such as low accuracy in detecting small and densely packed objects, and insufficient adaptability in certain complex scenarios. Therefore, the YOLX algorithm proposed in this application aims to address the issues encountered by YOLOv3 in parking space detection applications by introducing the SFEF module.
[0040] The contents of the technical solution of this application are described in detail below with reference to the accompanying drawings and specific embodiments.
[0041] Figure 1 It is a flowchart of the parking space detection method provided in an embodiment of the present application. Figure 1 The parking space detection method can be executed by the vehicle-side control system. Figure 1 As shown, the parking space detection method may specifically include:
[0042] S101, in response to triggering a parking operation of the vehicle, using a camera to capture images around the vehicle, and stitching the captured images into a panoramic surround stitching image, wherein the panoramic surround stitching image includes a plurality of parking spaces to be detected;
[0043] S102: Inputting the panoramic surround stitching image into a predetermined object detection model for processing to identify corner boxes, entrance wireframes, and parking space boxes corresponding to each parking space; the predetermined object detection model includes a salient feature enhancement and fusion module, which utilizes a parallel dual-channel aggregation module to fuse feature maps of different scales to enhance object detection features;
[0044] S103: Based on a preset post-processing strategy, the entrance wireframe of the parking space is processed and matched with the parking space frame. Based on the matching results, the positions and order of the corner points corresponding to the parking space are determined. Based on the positions and order of the corner points, the specific position and orientation of the parking space ultimately used for parking are determined.
[0045] The parking space detection method provided in this application is based on a panoramic surround view mosaic image and implements parking space detection by deploying the YOLX object detection algorithm on the vehicle-side ARM. The following first introduces the overall implementation process and content of the parking space detection method of this application in conjunction with the embodiments. The overall implementation process of the parking space detection method of this application may include the following steps:
[0046] First, the system collects image information around the vehicle through cameras and uses panoramic stitching technology to synthesize a full view. This image can show the complete view around the vehicle, including all potential parking spaces.
[0047] Secondly, the improved YOLX algorithm is deployed on the edge ARM. The edge ARM refers to edge computing devices, which means running the algorithm directly on local hardware (such as the vehicle system). This can reduce dependence on central servers, reduce latency, and improve response speed.
[0048] The YOLX algorithm is then used to process the panoramic mosaic image and identify the parking space corner boxes, entrance wireframes, and parking space frames. The corner boxes are used to identify the corner points of the parking space, the entrance wireframes are used to identify the location of the parking space entrance line, and the parking space frames are used to identify the location of the entire parking space.
[0049] Finally, after detecting the corner boxes, entrance wireframes, and parking space boxes, the system performs a series of post-processing strategies to accurately determine the four corner points and their order for each parking space. Post-processing includes filtering, matching, and determining the order of the corner points.
[0050] The present invention provides a fully automatic parking space detection method, which aims to improve the accuracy and efficiency of parking space identification and positioning in an automatic valet parking (AVP) system. The parking space detection method of the present invention comprises the following steps:
[0051] In response to a user's triggering of a parking maneuver, the system deploys multiple cameras, for example, located at the front, rear, left, and right sides of the vehicle. These cameras capture real-time image information surrounding the vehicle. Each camera captures images from a specific perspective, ensuring comprehensive coverage of the vehicle's surroundings.
[0052] The captured images are then processed by an image processing unit, which uses an efficient image stitching algorithm to seamlessly stitch the individual perspective images into a complete 360° panoramic surround image. This panoramic image can show the entire environment around the vehicle, including multiple potential parking spaces.
[0053] After obtaining the panoramic surround stitching image, the system analyzes the panorama using the advanced YOLX object detection algorithm. This algorithm optimizes the traditional YOLOv3 algorithm by integrating the salient feature enhancement fusion module (SFEF), improving parking space detection accuracy. The YOLX algorithm specifically designs the CCG and CCP modules to process and enhance feature information in the panorama.
[0054] After the YOLX algorithm detects the parking space corners, entrance wireframes, and parking space frames in the panoramic image, the system performs a series of post-processing steps. This includes filtering, matching, and corner filling of the entrance wireframes, as well as determining the orientation of the parking space frames, ultimately accurately determining the location and orientation of each parking space.
[0055] Finally, once the system identifies and confirms a suitable parking space, the AVP system will control the vehicle for precise parking based on the detection results.
[0056] The parking space detection method in the embodiments of this application can significantly enhance the user experience of the AVP system, significantly improving parking efficiency and safety through accurate parking space recognition and rapid image processing. Furthermore, the algorithm design of this application allows for rapid execution in environments with limited computing resources (such as end-side ARM processors), making it highly practical and easy to deploy.
[0057] In some embodiments, the salient feature enhancement fusion module includes a first aggregation module and a second aggregation module;
[0058] The salient feature enhancement fusion module uses a parallel dual-channel aggregation module to fuse feature maps of different scales, including:
[0059] Input the first-scale feature map into the first aggregation module, use the first aggregation module to extract features from the first-scale feature map, and perform global information enhancement through global average pooling operations and point-by-point convolution operations to aggregate contextual information on different channels;
[0060] Inputting the second-scale feature map into the second aggregation module, performing feature extraction on the second-scale feature map using the second aggregation module, enhancing spatial information in the feature map through a point-by-point convolution operation, and performing local refinement on the feature map;
[0061] The feature map output by the first aggregation module is fused with the feature map output by the second aggregation module to obtain a fused feature map.
[0062] Specifically, this embodiment of the present application develops a salient feature enhancement and fusion module (SFEF) based on YOLOv3. SFEF utilizes saliency maps at adjacent scales to enhance features required for fusion, thereby generating more representative fused features. Integrating the SFEF module into YOLOv3 yields the YOLX object detection model. The YOLX algorithm model and the structure of the SFEF module are described in detail below, in conjunction with the accompanying figures and specific examples. Figure 2 It is a structural diagram of the YOLX target detection model provided in the embodiment of the present application. Figure 3 Schematic diagram of the structure of the salient feature enhancement fusion module SFEF provided in the embodiment of the present application. Figure 2 and Figure 3 As shown, the structure of the YOLX target detection model framework and the salient feature enhancement fusion module SFEF of this application may include the following:
[0063] The salient feature enhancement and fusion module (SFEF) is developed based on YOLOv3 to enhance and fuse feature maps from different image scales to improve the performance of object detection.
[0064] The SFEF module in this embodiment includes two parallel aggregation modules: a first aggregation module and a second aggregation module. The first aggregation module is also called a CCG (Channel Context Gating) module, and the second aggregation module is also called a CCP (Channel and Concatenate Processing) module. The CCG module and the CCP module each receive feature maps of two different scales: a first-scale feature map F1 and a second-scale feature map F2. These feature maps originate from different layers of the network and contain visual information at different scales, making them crucial for detecting objects of different sizes.
[0065] In one example, feature maps F1 and F2 are processed through two parallel paths. Each path contains a convolutional block (CB), where CBR represents a convolution (Conv) operation followed by batch normalization (BN) and a ReLU nonlinear activation function. This sequence helps extract and enhance features in the feature maps.
[0066] The CCG module processes the first-scale feature map F1 to aggregate contextual information across different channels. The GAP (Global Average Pooling) operation in the CCG module is used to reduce the spatial dimension of features and enhance global information, while PWC (Point-Wise Convolution) is used to refine features. The CCP module processes the second-scale feature map F2. The CCP module processes spatial information and enhances local information through PWC, enabling the module to capture details at different locations.
[0067] Finally, the feature maps output by the CCG and CCP modules are fused through a Concat operation. This feature fusion operation aggregates information from different channels and spaces to generate a comprehensive feature map F. The fused feature map F is fed back into the main network for further object detection. Because these features are more representative, they can improve detection accuracy.
[0068] Based on the model framework provided by the above embodiment, after integrating the SFEF module into YOLOv3, the generated YOLX model can more effectively handle the challenges in parking space detection, such as complex lighting conditions, occlusion, and the diversity of parking spaces. The introduction of the SFEF module enables YOLX to perform higher accuracy and robustness when detecting parking space corners in the panoramic surround mosaic. This is because the SFEF module can enhance significant features and effectively integrate multi-scale information, thereby improving the ability to recognize parking space details.
[0069] In some embodiments, a first aggregation module is used to extract features from the first-scale feature map, and global information enhancement is performed through a global average pooling operation and a point-by-point convolution operation to aggregate contextual information on different channels, including:
[0070] The feature map is continuously processed using the first convolution combination layer, the first convolution block, the global average pooling layer, the first activation function layer and the first point-by-point convolution layer connected in sequence in the first aggregation module to obtain the feature map processed by the first aggregation module, wherein the first aggregation module is used to strengthen global information and aggregate contextual information on different channels.
[0071] Specifically, the first aggregation module (CCG module) includes a first convolution combination layer, a first convolution block, a global average pooling layer, a first activation function layer and a first point-by-point convolution layer connected in sequence; based on Figure 3 As shown in the SFEF structure diagram, the processing process of the CCG module on the first-scale feature map F1 includes: the first convolution combination layer performs preliminary extraction on the first-scale feature map, inputs the preliminary extracted feature map into the first convolution block for feature extraction, performs global average pooling operation on the feature map output by the first convolution block, uses the first activation function layer to process the feature map after global average pooling, and finally uses the first point-by-point convolution layer to perform point-by-point convolution processing on the feature map processed by the first activation function, and outputs the feature map processed by the CCG module.
[0072] In one example, the CCG module is a key component of the salient feature enhancement fusion module (SFEF). Its main function is to weight the channel importance of the feature map and enhance the global information to improve the performance of the target detection algorithm. The composition and function of the CCG module of the embodiment of the present application are as follows:
[0073] First, the CCG module consists of the following parts:
[0074] The first convolutional combination layer (CBR) represents the combination of convolution Conv + batch normalization BN + activation function ReLU, where the convolution operation Conv is used to extract features, batch normalization BN is used to stabilize the training process and accelerate convergence, and the activation function ReLU is used to introduce nonlinearity and increase the expressive power of the model.
[0075] First Convolutional Block (CB): CB is a common image and signal processing operation used to extract features from images.
[0076] Global Average Pooling (GAP): GAP is a pooling operation used in convolutional neural networks to reduce the spatial dimensions (width and height) of each feature map to a single average value, which helps reduce model parameters and prevent overfitting. This layer involves performing global average pooling on the feature maps output by the convolutional block, that is, taking the average of their spatial dimensions on each channel, which compresses the information of each channel into a single scalar. This operation helps the model capture global contextual information rather than focusing only on local features.
[0077] First activation function layer (ReLU): ReLU is a nonlinear function used in convolutional neural networks to increase the nonlinear ability of the model.
[0078] First pointwise convolutional layer (PWC): PWC is a convolution operation with a 1x1 kernel size. It is used to change the number of channels in the feature map and can perform feature fusion and information reorganization without changing the spatial size of the feature map. This operation adjusts the relationship between channels without changing the spatial dimensions of the feature map. As a feature fusion mechanism, it helps the model integrate global information and strengthen feature expression.
[0079] Figure 3 The “+” sign in represents the Concat operation (i.e., feature fusion operation).
[0080] The above components work together in the CCG module to extract and enhance the information in the feature map, thereby providing the necessary operations for the enhanced fusion of salient features.
[0081] Secondly, the functions of the CCG module are as follows:
[0082] The CCG module is primarily responsible for capturing the channel context of the feature map and assigning different importance to different channels. Through global average pooling, the CCG module understands the average response of the entire feature map at each channel, which helps to highlight the most informative features globally. Subsequently, point-by-point convolution adjusts the response of each channel based on this global information, thereby enhancing the model's understanding of the overall image content. As a result, the feature map processed by the CCG module contains important information about the global context of the image, which is crucial for subsequent object detection tasks.
[0083] In some embodiments, extracting features from the second-scale feature map using a second aggregation module, enhancing spatial information in the feature map through a point-by-point convolution operation, and locally refining the feature map include:
[0084] The feature map is continuously processed using the second convolution combination layer, the second convolution block, the second point-by-point convolution layer, the second activation function layer and the third point-by-point convolution layer connected sequentially in the second aggregation module to obtain the feature map processed by the second aggregation module, wherein the second aggregation module is used to process and enhance the spatial information in the feature map, and perform local refinement of the features to enhance local detail information.
[0085] Specifically, the second aggregation module (CCP module) includes a second convolution combination layer, a second convolution block, a second point-by-point convolution layer, a second activation function layer, and a third point-by-point convolution layer connected in sequence; based on Figure 3 As shown in the SFEF structure diagram, the processing process of the CCP module on the second-scale feature map F2 includes: the second convolution combination layer performs preliminary extraction on the feature map of the second scale, inputs the preliminary extracted feature map into the second convolution block for feature extraction, uses the second point-by-point convolution layer to perform point-by-point convolution processing on the feature map output by the second convolution block, inputs the feature map after point-by-point convolution processing into the second activation function layer for processing, and finally uses the third point-by-point convolution layer to perform point-by-point convolution processing on the feature map after the second activation function processing, and outputs the feature map processed by the CCP module.
[0086] In one example, the CCP module is another key component of the salient feature enhancement fusion module (SFEF), which is mainly responsible for processing and enhancing the spatial information in the feature map and performing local refinement of the features. The following is a detailed explanation of the composition and functions of the CCP module in the embodiment of the present application:
[0087] First, the CCP module consists of the following parts:
[0088] The second convolution combination layer (CBR), the second convolution block (CB), the second point-by-point convolution layer (PWC), the second activation function layer (ReLU) and the third point-by-point convolution layer (PWC). It should be noted that the main difference between the components of the above-mentioned CCP module and the components of the CCG module in the aforementioned embodiment is that the CCP module does not contain a global average pooling layer (GAP), but uses a second point-by-point convolution layer (PWC) to replace the global average pooling layer (GAP). Therefore, for the functions of the various components in the CCP module, please refer to the functional introduction of the components of the CCG module in the aforementioned embodiment, and will not be repeated here. It should be emphasized that the point-by-point convolution PWC in the CCP module is mainly used to adjust the channel dimension of the feature map and enhance local features without changing the spatial resolution. Through point-by-point convolution, the CCP module can reweight and adjust the features of each position while maintaining the spatial structure.
[0089] Secondly, the functions of the CCP module are as follows:
[0090] The main function of the CCP module is to refine features at the positional level and fuse information from different feature maps. After the feature map is extracted through the convolution block for local features, these features are further processed by point-by-point convolution, allowing the module to process local areas of the image in more detail. In this way, the CCP module effectively strengthens the feature expression capabilities of each local area in the image, enabling the algorithm to more accurately locate and identify target objects, especially in complex scenes, such as the identification of individual corner points in parking space detection. Ultimately, the feature map output by the CCP module is fused with the output of the CCG module to form a feature representation that integrates channel importance and spatial detailed information, thereby greatly enhancing the performance of the object detection network.
[0091] Furthermore, the feature maps processed by the CCG and CCP modules are fused to produce a comprehensive feature representation F, which improves the accuracy and robustness of parking space detection. Feature fusion is achieved through a concatenation operation to integrate the features processed by each module, strengthening the model's ability to represent parking spaces.
[0092] In some embodiments, processing the parking space entrance wireframe includes:
[0093] Traverse the detected entry wireframes, filter them according to their size and the preset size threshold, and remove those that are smaller than the size threshold;
[0094] For the entry wireframes obtained after screening, the number of corner points in each entry wireframe is determined, and when the number of corner points meets a first preset condition, the entry wireframes meeting the first preset condition are eliminated;
[0095] When the number of corner points meets the second preset condition, the position of the second corner point is determined according to the diagonal relationship of the current corner point, and the second corner point is completed;
[0096] When the number of corner points meets the third preset condition, the current entrance wireframe is determined to be a complete entrance wireframe, and the complete entrance wireframe is matched with the parking space frame;
[0097] When the number of corner points meets the fourth preset condition, two corner points on the diagonal line are selected as entry line points to obtain a processed entry wireframe.
[0098] Specifically, the post-processing strategy in the embodiments of this application is a key step in parking space detection, used to process the raw detection results obtained by the YOLX object detection algorithm. In actual applications, the parking space detection post-processing strategy mainly includes the following four steps: traversing the entrance wireframe, matching the parking space frame with the entrance wireframe, completing the parking space frame and determining the orientation, and determining the order based on the four corner points.
[0099] Furthermore, during the process of traversing the entry wireframes, the system will check the size of each entry wireframe. If the size (including width and height) of the entry wireframe is less than a preset size threshold, it will be filtered out. In addition, the system will also analyze the number of corner points contained in the entry wireframe and perform different operations based on different situations. The operation process and principle of traversing the entry wireframe will be described in detail below with reference to specific embodiments, which may include the following:
[0100] 1) Preliminary screening of entry wireframes:
[0101] The system iterates through all detected entry wireframes and performs a preliminary screening on each one. The screening criteria is to check whether the width and height of each entry wireframe are less than a preset threshold th1. If an entry wireframe's size is smaller than this threshold, it is considered noise or an irrelevant object and is filtered out.
[0102] 2) Determination of the number of corner points:
[0103] For the entry wireframes that pass the initial screening, the system will calculate the number of corner points n1 contained in each entry wireframe. Based on the number of corner points n1, the processing of the entry wireframe will be divided into the following situations:
[0104] The first case: when the number of corner points n1 meets the first preset condition, for example, when there is no corner point in the entrance wireframe (n1=0) or the number of corner points is greater than the threshold (n1≥4), this indicates that the entrance wireframe may not be a valid parking space entrance wireframe, so this entrance wireframe is ignored and the current processing flow is exited.
[0105] The second situation: When the number of corner points n1 meets the second preset condition, for example, when there is only one corner point in the entry wireframe (n1=1), the system will use the preset algorithm or rules to use the diagonal relationship corresponding to the corner point to infer the position of the second corner point, complete it, and then continue to the next step of processing.
[0106] The third situation: when the number of corner points n1 meets the third preset condition, for example, when there are two corner points in the entry wireframe (n1=2), this means that the currently traversed entry wireframe is complete and can directly proceed to the next step of processing.
[0107] The fourth situation: When the number of corner points n1 meets the fourth preset condition, for example, when there are three corner points in the entry wireframe (n1=3), it is necessary to select two corner points as the two endpoints of the entry line. For example, two points on the diagonal line can be selected as entry line points to ensure the correctness of the entry line and proceed to the next step of processing.
[0108] Through the processing steps of the above embodiment, the system can effectively identify and process the parking space entrance wireframe, laying the foundation for the next step of parking space frame matching and parking space orientation determination. This process is crucial for ultimately determining the accurate location and orientation of each parking space.
[0109] In some embodiments, matching the processed entrance wireframe with the parking space frame includes:
[0110] Determine the number of processed entrance wireframes contained in each parking space frame, and when the number of entrance wireframes meets the first matching condition, remove the parking space frames that meet the first matching condition, and end the matching;
[0111] When the number of entry wireframes meets the second matching condition, it is determined that the current entry wireframe has been correctly matched to the parking space frame, and the correctly matched parking space frame is output for subsequent processing;
[0112] When the number of entrance wireframes meets the third matching condition, the sum of the distances between the two corner points of each entrance wireframe and the nearest edge of the parking space frame is calculated, and the entrance wireframe with the smallest sum of distances is taken as the entrance wireframe that matches the parking space frame.
[0113] Specifically, during the process of matching the parking space frame with the entrance wireframe, the entrance wireframe processed in the previous step needs to be matched with the actual parking space frame. The parking space frame here refers to the rectangular frame representing the actual parking space detected by the YOLX object detection algorithm. The following will be combined with specific embodiments to explain the operation process and principle of matching the parking space frame with the entrance wireframe in detail, which may include the following:
[0114] First, the number of processed entrance wireframes in each parking space frame is determined: the system counts the number n2 of processed entrance wireframes contained in each parking space frame.
[0115] Then, matching is performed according to the following logic: Based on the number of entrance wireframes, the matching of parking space frames will be divided into the following cases for processing:
[0116] In the first scenario, when the number of entry wireframes meets the first matching condition, for example, when there is no entry wireframe within the parking space frame (n2=0), the parking space frame is considered to not match any entry wireframes and may be a false detection or an irrelevant object. Therefore, the parking space frame is ignored and the processing flow ends.
[0117] The second situation: when the number of entrance wireframes meets the second matching condition, for example, when there is only one entrance wireframe in the parking space frame (n2=1), it indicates that the current entrance wireframe has been correctly matched to a parking space frame. In this case, the next step can be directly processed.
[0118] In the third scenario, when the number of entry wireframes meets the third matching condition, for example, when the parking space frame contains two or more entry wireframes (n2 ≥ 2), it is necessary to determine which entry wireframe actually belongs to the parking space. To do this, the system calculates the sum of the distances (B) between the two corner points of each entry wireframe and the nearest edge of the parking space frame. The entry wireframe with the smallest sum of distances B is selected as the correct entry wireframe to match the parking space frame.
[0119] Through the matching process in the above embodiment, the system can find the correct entrance wireframe for each parking space frame, thus ensuring accurate parking space identification. This step ensures that subsequent steps can be carried out based on the correct parking space frame, such as filling in missing corner points, determining the orientation of the parking space, and ultimately determining the order of the four corner points of the parking space.
[0120] In some embodiments, determining the positions and order of corner points corresponding to parking spaces based on the matching results includes:
[0121] Determine whether the entrance wireframe is perpendicular to or parallel to the parking space based on the width and height of the entrance wireframe; deduce the position of the missing corner points of the parking space frame corresponding to the entrance wireframe based on the corner points of the entrance line corresponding to each entrance wireframe, and fill in the corner points of the parking space frame corresponding to the entrance wireframe based on the positions of the missing corner points;
[0122] When the order of the entry line points is uncertain, determine the center point of the first parking space and the center point of the second parking space;
[0123] Determine whether the rear corner point is within the parking space frame and use the rear corner point within the parking space frame as the valid rear corner point. If there are multiple valid rear corner points, select the rear corner point closest to the actual boundary of the parking space frame as the matched rear corner point.
[0124] When all rear corner points are within the parking space frame, the distances between the center point of the first parking space and the center point of the second parking space and the center point of the parking space frame are calculated respectively, and the rear corner point with the closest distance to the center point of the parking space frame is selected as the matched rear corner point;
[0125] When the distances between the center points of the first and second parking spaces and the center point of the parking space frame are the same, respectively calculate the distances between the center points of the first and second parking spaces and the center point of the image, and select the rear corner point with the farthest distance from the center point of the image as the matched rear corner point;
[0126] According to the entrance line corner points corresponding to the entrance wireframe and the matched rear corner points, the positions and order of the four corner points of the parking space corresponding to the entrance wireframe are determined.
[0127] Specifically, during the operation of completing the parking space frame and determining its orientation, the goal of this step is to complete the four corner points of the parking space frame and determine its orientation, thereby determining the specific position and orientation of the parking space. The following will be combined with specific embodiments to explain in detail the operation process and principle of completing the parking space frame and determining its orientation, which may include the following:
[0128] First, the width and height of the entrance wireframe are used to determine whether it is perpendicular or parallel to the parking space. This is done by analyzing the directionality of the entrance wireframe relative to the panorama.
[0129] Next, assume that points A and B are the corner points of the entry line, S1 is the center point of the parking space frame, and J1 is the center point of the image. For each entry line frame, fill in the missing corner points. Since the two corner points of the entry line (A and B) are known, the other two corner points can be inferred to form a complete parking space frame.
[0130] If the order of the entry line points is uncertain, then there are two possible situations when filling in the corner points: (A1, B1) - the corresponding parking space center point is C1, (A2, B2) - the corresponding parking space center point is C2, that is, there are two possible corner point orders, and the two different corner point orders correspond to two parking space center points. To address this situation, the embodiment of the application will determine which set of rear corner points is the correct one through the following steps. The specific judgment logic is as follows:
[0131] Step 1: Check whether each set of back corner points is within the parking space frame. If the back corner point is within the parking space frame, it is considered a valid back corner point. If there are multiple valid back corner points, the back corner point closest to the actual boundary of the parking space frame is selected as the actual matched back corner point.
[0132] Step 2: When each set of rear corner points is within the parking space frame, compare the distances between the first parking space center point C1 and the second parking space center point C2 and the parking space frame center point S1. Select the rear corner point closest to the parking space frame center point S1 as the actual matched rear corner point, as this rear corner point is more likely to be the actual parking space boundary.
[0133] Step 3: If the distances between the first and second parking space centers C1 and C2 and the parking space frame center S1 are the same, then the distances between the first and second parking space centers C1 and C2 and the image center J1 are compared. The rear corner point that is farther from the image center J1 is selected as the actual matched rear corner point. In this case, the matched rear corner point is usually the outer boundary of the parking space.
[0134] Through the above steps, the four corner points of each parking space are determined, and their order reflects the actual layout and orientation of the space. The entire process requires comprehensive consideration of geometric relationships and spatial location to ensure that the order of the corner points of the parking spaces is consistent with the actual layout of the parking spaces. This allows the accurate shape and position of each parking space to be accurately depicted, providing accurate data support for the final parking space detection.
[0135] According to the technical solutions provided in the embodiments of the present application, the technical solutions of the present application have at least the following technical effects:
[0136] 1. Improved detection accuracy: By introducing the SFEF module, the YOLX model can effectively enhance and fuse feature maps from different scales, significantly improving the accuracy of parking space detection. In particular, when dealing with parking space detection in complex scenarios, such as occlusion and irregularly shaped parking spaces, the YOLX model demonstrates superior performance compared to traditional YOLOv3 and graph convolutional recognition solutions.
[0137] 2. Optimizing Computing Resource Utilization: The SFEF module is designed with computational efficiency in mind, resulting in improved accuracy for the YOLX model while also ensuring low computational resource consumption. This is particularly important for automated valet parking (AVP) systems, which require real-time image processing on device-side devices, ensuring system responsiveness and real-time performance.
[0138] 3. Improved Post-Processing Strategies: This technical solution also develops a set of parking space detection post-processing strategies that exceed industry standards, further improving the efficiency and accuracy of parking space detection. By refining the entrance wireframe and parking space frame, the system can more accurately identify and locate parking spaces, reducing false detections and missed detections.
[0139] 4. Enhanced system robustness: Leveraging the SFEF module and the YOLX model, this technical solution demonstrates high adaptability and robustness in handling diverse parking environments, such as varying lighting conditions and parking space layouts. Even in extreme or complex parking scenarios, the system consistently delivers high-quality detection results.
[0140] The following are device embodiments of the present application, which can be used to implement the method embodiments of the present application. For details not disclosed in the device embodiments of the present application, please refer to the method embodiments of the present application.
[0141] Figure 4 Schematic diagram of the structure of the parking space detection device provided in the embodiment of the present application. Figure 4 As shown, the parking space detection device includes:
[0142] The acquisition module 401 is configured to, in response to a triggering of a parking operation of the vehicle, use a camera to acquire images of the vehicle's surroundings, and stitch the acquired images into a panoramic surround view mosaic image, wherein the panoramic surround view mosaic image includes a plurality of parking spaces to be detected;
[0143] The detection module 402 is configured to input the panoramic surround stitching image into a predetermined object detection model for processing to identify corner boxes, entrance wireframes, and parking space boxes corresponding to each parking space. The predetermined object detection model includes a salient feature enhancement and fusion module, which utilizes a parallel dual-channel aggregation module to fuse feature maps of different scales to enhance object detection features.
[0144] Determination module 403 is configured to process the parking space entrance wireframe based on a preset post-processing strategy, match the processed entrance wireframe with the parking space frame, determine the position and order of the corner points corresponding to the parking space based on the matching results, and determine the specific position and orientation of the parking space ultimately used for parking based on the position and order of the corner points.
[0145] In some embodiments, the salient feature enhancement fusion module includes a first aggregation module and a second aggregation module; Figure 4 The detection module 402 inputs the first-scale feature map into the first aggregation module, uses the first aggregation module to extract features from the first-scale feature map, and performs global information enhancement through global average pooling operation and point-by-point convolution operation to aggregate context information on different channels; inputs the second-scale feature map into the second aggregation module, uses the second aggregation module to extract features from the second-scale feature map, and enhances the spatial information in the feature map through point-by-point convolution operation, and locally refines the feature map; the feature map output by the first aggregation module is fused with the feature map output by the second aggregation module to obtain a fused feature map.
[0146] In some embodiments, Figure 4 The detection module 402 uses the first convolution combination layer, the first convolution block, the global average pooling layer, the first activation function layer and the first point-by-point convolution layer connected in sequence in the first aggregation module to continuously process the feature map to obtain the feature map processed by the first aggregation module, wherein the first aggregation module is used to strengthen global information and aggregate contextual information on different channels.
[0147] In some embodiments, Figure 4 The detection module 402 uses the second convolution combination layer, the second convolution block, the second point-by-point convolution layer, the second activation function layer and the third point-by-point convolution layer connected in sequence in the second aggregation module to continuously process the feature map to obtain the feature map processed by the second aggregation module, wherein the second aggregation module is used to process and enhance the spatial information in the feature map and perform local refinement of the features to enhance local detail information.
[0148] In some embodiments, Figure 4 The determination module 403 traverses the detected entrance wireframes, screens the entrance wireframes according to the size of each entrance wireframe and a preset size threshold, and eliminates the entrance wireframes that are smaller than the size threshold; for the entrance wireframes obtained after screening, determines the number of corner points in each entrance wireframe, and when the number of corner points meets the first preset condition, eliminates the entrance wireframes that meet the first preset condition; when the number of corner points meets the second preset condition, determines the position of the second corner point according to the diagonal relationship of the current corner point, and completes the second corner point; when the number of corner points meets the third preset condition, determines that the current entrance wireframe is a complete entrance wireframe, and matches the complete entrance wireframe with the parking space frame; when the number of corner points meets the fourth preset condition, selects two corner points on the diagonal as entrance line points to obtain a processed entrance wireframe.
[0149] In some embodiments, Figure 4 The determination module 403 determines the number of processed entry wireframes contained in each parking space frame. When the number of entry wireframes meets the first matching condition, the parking space frames meeting the first matching condition are eliminated and the matching ends. When the number of entry wireframes meets the second matching condition, it is determined that the current entry wireframe has been correctly matched to the parking space frame, and the correctly matched parking space frame is output for subsequent processing. When the number of entry wireframes meets the third matching condition, the sum of the distances from the two corner points of each entry wireframe to the nearest edge of the parking space frame is calculated, and the entry wireframe with the smallest sum of distances is selected as the entry wireframe that matches the parking space frame.
[0150] In some embodiments, Figure 4The determination module 403 determines whether the entrance wireframe is perpendicular to the parking space or parallel to the parking space according to the width and height of the entrance wireframe; calculates the position of the missing corner points of the parking space frame corresponding to the entrance wireframe according to the entrance line corner points corresponding to each entrance wireframe, and fills in the corner points of the parking space frame corresponding to the entrance wireframe according to the position of the missing corner points; when the order of the entrance line points is uncertain, determines the first parking space center point and the second parking space center point; determines whether the rear corner point is within the parking space frame, and takes the rear corner point within the parking space frame as the valid rear corner point; when there are multiple valid rear corner points, selects the rear corner point closest to the actual boundary of the parking space frame as the matched rear corner point; when the rear corner point is within the parking space frame, the rear corner point is selected as the matched rear corner point. When all corner points are within the parking space frame, the distances between the center points of the first and second parking spaces and the center point of the parking space frame are calculated respectively, and the rear corner point closest to the center point of the parking space frame is selected as the matched rear corner point; when the distances between the center points of the first and second parking spaces and the center point of the parking space frame are the same, the distances between the center points of the first and second parking spaces and the center point of the image are calculated respectively, and the rear corner point farthest from the center point of the image is selected as the matched rear corner point; based on the entrance line corner points corresponding to the entrance line frame and the matched rear corner points, the positions and order of the four corner points of the parking space corresponding to the entrance line frame are determined.
[0151] It should be understood that the size of the serial numbers of the steps in the above embodiments does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiments of this application.
[0152] Figure 5 Schematic diagram of the structure of the electronic device 5 provided in the embodiment of the present application. Figure 5 As shown, the electronic device 5 of this embodiment includes: a processor 501, a memory 502, and a computer program 503 stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program 503, the steps of the above-mentioned method embodiments are implemented. Alternatively, when the processor 501 executes the computer program 503, the functions of the modules / units in the above-mentioned device embodiments are implemented.
[0153] For example, the computer program 503 may be divided into one or more modules / units, which are stored in the memory 502 and executed by the processor 501 to implement the present application. The one or more modules / units may be a series of computer program instruction segments capable of implementing specific functions, and the instruction segments are used to describe the execution process of the computer program 503 in the electronic device 5.
[0154] The electronic device 5 may be a desktop computer, a notebook, a PDA, a cloud server, or other electronic device. The electronic device 5 may include but is not limited to a processor 501 and a memory 502. Those skilled in the art will appreciate that Figure 5It is only an example of the electronic device 5 and does not constitute a limitation of the electronic device 5. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the electronic device may also include input and output devices, network access devices, buses, etc.
[0155] The processor 501 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0156] The memory 502 can be an internal storage unit of the electronic device 5, such as a hard drive or memory of the electronic device 5. The memory 502 can also be an external storage device of the electronic device 5, such as a plug-in hard drive, a Smart Media Card (SMC), a Secure Digital (SD) card, a flash memory card, etc. equipped on the electronic device 5. Furthermore, the memory 502 can include both an internal storage unit of the electronic device 5 and an external storage device. The memory 502 is used to store computer programs and other programs and data required by the electronic device. The memory 502 can also be used to temporarily store data that has been output or is about to be output.
[0157] Those skilled in the art can clearly understand that, for the convenience and brevity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In actual applications, the above-mentioned functions can be distributed and completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated into one processing unit, or each unit can exist physically alone, or two or more units can be integrated into one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, and will not be repeated here.
[0158] In the above embodiments, the description of each embodiment has its own focus. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant description of other embodiments.
[0159] Those skilled in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0160] In the embodiments provided in this application, it should be understood that the disclosed apparatus / computer equipment and methods can be implemented in other ways. For example, the apparatus / computer equipment embodiments described above are merely schematic. For example, the division of modules or units is merely a logical function division. In actual implementation, there may be other division methods. Multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed may be through some interfaces, indirect coupling or communication connection of the apparatus or unit, which may be electrical, mechanical or other forms.
[0161] Units described as separate components may or may not be physically separate, and components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected to achieve the purpose of this embodiment according to actual needs.
[0162] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0163] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. The computer program may include computer program code, which may be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying computer program code, recording medium, U disk, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium, etc.
[0164] The above embodiments are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, those skilled in the art should understand that they can still modify the technical solutions described in the aforementioned embodiments, or make equivalent replacements for some of the technical features therein. These modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the various embodiments of the present application, and should all be included in the scope of protection of the present application.
Claims
1. A parking space detection method, characterized in that: include: In response to triggering a parking operation of the vehicle, using a camera to collect images around the vehicle, and stitching the collected images into a panoramic surround stitching image, wherein the panoramic surround stitching image includes a plurality of parking spaces to be detected; The panoramic surround stitching image is input into a predetermined target detection model for processing to identify the corner box, entrance wireframe and parking space box corresponding to each parking space; wherein the predetermined target detection model includes a significant feature enhancement fusion module, and the significant feature enhancement fusion module uses a parallel dual-channel aggregation module including a first aggregation module and a second aggregation module to process feature maps of different scales respectively, and then fuses the feature maps output by the parallel dual-channel aggregation module to enhance target detection features; wherein the first aggregation module is used to extract features from the first-scale feature map, and perform global information enhancement through a global average pooling operation and a point-by-point convolution operation to aggregate contextual information on different channels; the second aggregation module is used to extract features from the second-scale feature map, and enhance spatial information in the feature map through a point-by-point convolution operation and perform local refinement on the feature map; Based on a preset post-processing strategy, the entrance wireframe of the parking space is processed and matched with the parking space frame. Based on the matching result, the position and order of the corner points corresponding to the parking space are determined. Based on the position and order of the corner points, the specific position and orientation of the parking space ultimately used for parking are determined. The preset post-processing strategy includes traversing the entrance wireframe, matching the parking space frame with the entrance wireframe, completing the parking space frame and determining the orientation, and determining the order based on the four corner points.
2. The method according to claim 1, characterized in that The first aggregation module is used to extract features from the first scale feature map, and global information enhancement is performed through a global average pooling operation and a point-by-point convolution operation to aggregate context information on different channels, including: The feature map is continuously processed using the first convolution combination layer, the first convolution block, the global average pooling layer, the first activation function layer and the first point-by-point convolution layer connected in sequence in the first aggregation module to obtain a feature map processed by the first aggregation module, wherein the first aggregation module is used to strengthen global information and aggregate contextual information on different channels.
3. The method according to claim 1, characterized in that The step of extracting features from the second-scale feature map using the second aggregation module, enhancing spatial information in the feature map through a point-by-point convolution operation, and locally refining the feature map includes: The feature map is continuously processed using the second convolution combination layer, the second convolution block, the second point-by-point convolution layer, the second activation function layer and the third point-by-point convolution layer connected sequentially in the second aggregation module to obtain a feature map processed by the second aggregation module, wherein the second aggregation module is used to process and enhance the spatial information in the feature map and perform local refinement of the features to enhance local detail information.
4. The method according to claim 1, wherein The processing of the entrance wireframe of the parking space includes: Traversing the detected entry wireframes, screening the entry wireframes according to the size of each entry wireframe and a preset size threshold, and removing the entry wireframes that are smaller than the size threshold; For the entry wireframes obtained after screening, determining the number of corner points in each entry wireframe, and when the number of corner points meets a first preset condition, eliminating the entry wireframes meeting the first preset condition; When the number of corner points meets the second preset condition, the position of the second corner point is determined according to the diagonal relationship of the current corner point, and the second corner point is completed; When the number of corner points meets the third preset condition, the current entrance wireframe is determined to be a complete entrance wireframe, and the complete entrance wireframe is matched with the parking space frame; When the number of corner points meets the fourth preset condition, two corner points on the diagonal line are selected as entry line points to obtain a processed entry wireframe.
5. The method according to claim 1, wherein The matching of the processed entrance wireframe with the parking space frame includes: determining the number of the processed entry wireframes contained in each parking space frame, and when the number of the entry wireframes meets a first matching condition, eliminating the parking space frames that meet the first matching condition, and ending the matching; When the number of the entry wireframes meets the second matching condition, it is determined that the current entry wireframe has correctly matched the parking space frame, and the correctly matched parking space frame is output for subsequent processing; When the number of the entry wireframes meets the third matching condition, the sum of the distances between the two corner points of each entry wireframe and the nearest edge of the parking space frame is calculated, and the entry wireframe with the smallest sum of distances is taken as the entry wireframe that matches the parking space frame.
6. The method according to claim 1, characterized in that Determining the positions and order of the corner points corresponding to the parking spaces according to the matching results includes: Determining whether the entrance wireframe is perpendicular to or parallel to the parking space based on the width and height of the entrance wireframe; calculating the position of missing corner points of the parking space frame corresponding to the entrance wireframe based on the entrance line corner points corresponding to each of the entrance wireframes, and filling in the corner points of the parking space frame corresponding to the entrance wireframe based on the positions of the missing corner points; When the order of the entry line points is uncertain, determine the center point of the first parking space and the center point of the second parking space; Determine whether the rear corner point is within the parking space frame and use the rear corner point within the parking space frame as the valid rear corner point. If there are multiple valid rear corner points, select the rear corner point closest to the actual boundary of the parking space frame as the matched rear corner point. When all the rear corner points are within the parking space frame, respectively calculating the distances between the first parking space center point and the second parking space center point and the parking space frame center point, and selecting the rear corner point closest to the parking space frame center point as the matched rear corner point; When the distances between the first parking space center point and the second parking space center point and the center point of the parking space frame are the same, respectively calculating the distances between the first parking space center point and the second parking space center point and the center point of the image, and selecting the rear corner point farthest from the center point of the image as the matched rear corner point; The positions and order of the four corner points of the parking space corresponding to the entrance wireframe are determined according to the entrance line corner points corresponding to the entrance wireframe and the matched rear corner points.
7. A parking space detection device, characterized in that: include: a collection module configured to, in response to a triggering of a parking operation of the vehicle, use a camera to collect images around the vehicle and stitch the collected images into a panoramic surround view stitching image, wherein the panoramic surround view stitching image includes a plurality of parking spaces to be detected; A detection module is configured to input the panoramic surround stitching image into a predetermined target detection model for processing to identify the corner box, entrance wireframe, and parking space box corresponding to each parking space; wherein the predetermined target detection model includes a significant feature enhancement and fusion module, which uses a parallel dual-channel aggregation module including a first aggregation module and a second aggregation module to process feature maps of different scales respectively and then fuse the feature maps output by the parallel dual-channel aggregation module to enhance target detection features; wherein the first aggregation module is used to extract features from the first-scale feature map and perform global information enhancement through a global average pooling operation and a point-by-point convolution operation to aggregate contextual information on different channels; the second aggregation module is used to extract features from the second-scale feature map and enhance spatial information in the feature map through a point-by-point convolution operation and perform local refinement on the feature map; The determination module is configured to process the entrance wireframe of the parking space based on a preset post-processing strategy, match the processed entrance wireframe with the parking space frame, determine the position and order of the corner points corresponding to the parking space based on the matching results, and determine the specific position and orientation of the parking space ultimately used for parking based on the position and order of the corner points, wherein the preset post-processing strategy includes traversing the entrance wireframe, matching the parking space frame with the entrance wireframe, completing the parking space frame and determining the orientation, and determining the order based on the four corner points.
8. An electronic device comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the method according to any one of claims 1 to 6 when executing the computer program.
9. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the method according to any one of claims 1 to 6 is implemented.
Citation Information
Patent Citations
Obstacle detection method for railway vehicle, computer equipment and storage medium
CN113936268A
KR20210094476A