Parking space line segmentation method and device for shielded parking space, equipment and storage medium
By introducing a context perception module and a dynamic completion module into the parking space line detection model, the problem of inaccurate segmentation when the parking space line is blocked is solved, and efficient parking space line segmentation is achieved under resource constraints.
Patent Information
- Application Number
- CN202411583522.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-14
AI Technical Summary
In autonomous driving and intelligent parking systems, traditional image segmentation algorithms are difficult to accurately identify and divide parking space lines when the parking space lines are blocked, resulting in a decrease in the accuracy of segmentation and the system cannot correctly identify parking spaces or signs.
A method of segmenting parking spaces for obscured parking spaces is proposed. Through the parking space line detection model composed of feature encoder, context perception module, feature compression module, dynamic completion module and feature decoder, the image of the parking space line to be detected is obtained and semantic segmentation is performed to achieve accurate segmentation of the obscured parking space lines.
Under the conditions of resource limitation, the parking space lines can be accurately divided, the accuracy of parking space lines detection can be improved, and it is suitable for practical application scenarios, especially in scenarios with severe occlusion, which can maintain a high segmentation accuracy.
Smart Images

Figure CN119625296A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image recognition technology, and in particular to a method, device, equipment and storage medium for segmenting parking space lines of an obstructed parking space. Background Art
[0002] In autonomous driving and smart parking systems, accurate identification and segmentation of parking lines and related signs are crucial for safe parking and automatic navigation of vehicles. For example, in the related technologies of automatic parking assistance, the industry's leading on-site memory parking assistance (LAPA) requires correct detection of parking spaces. However, in real-world environments, parking lines and signs are often partially or completely blocked by other objects, such as other vehicles, pedestrians, trees, snow, etc., which poses a huge challenge to traditional image segmentation algorithms. The occlusion problem not only affects the accuracy of segmentation, but may also cause the system to fail to correctly identify parking spaces or signs, thereby affecting the accuracy of autonomous driving decisions.
[0003] Existing solutions improve the performance of parking line detection models in occlusion scenarios through multi-scale feature fusion or attention mechanisms. Among them, multi-scale feature fusion extracts features of different scales through parallel branches or convolutional pyramid structures. Although it has a certain effect on occlusion processing, it is usually accompanied by high computational overhead, which increases the complexity of the model and is not suitable for real-time application scenarios. The attention mechanism has been widely used in semantic segmentation tasks, which improves segmentation accuracy by emphasizing important image areas and suppressing irrelevant background information. Although it is effective in occlusion processing in theory, its complex calculation process makes it difficult for the model to meet real-time requirements in actual deployment. In addition, such methods usually require a large amount of training data to cover a variety of occlusion situations, otherwise the performance in new scenarios will be less than ideal.
[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 segmenting parking space lines of obstructed parking spaces, aiming to solve the technical problem of how to accurately segment parking space lines under resource-constrained conditions.
[0006] To achieve the above objectives, the present application proposes a method for segmenting parking space lines of obscured parking spaces, the method comprising:
[0007] Acquire a parking space line image to be detected, wherein the parking space in the parking space line image to be detected is a blocked parking space;
[0008] Inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, wherein the parking space line detection model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence;
[0009] The parking space line segmentation result of the blocked parking space is determined according to the semantic segmentation map.
[0010] In one embodiment, the step of inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map includes:
[0011] Inputting the parking space line image to be detected into a parking space line detection model, and extracting feature channels of the parking space line image to be detected by the feature encoder to obtain a feature coding map;
[0012] The multi-scale features of the feature coding map are fused by the context perception module to obtain a multi-scale feature enhancement map;
[0013] Performing feature compression on the multi-scale feature enhancement map by the feature compression module to obtain a feature compression map;
[0014] Acquire the context features and the local completion features of the feature compression map through the dynamic completion module, and splice the context features and the local completion features to obtain a feature completion map;
[0015] The feature completion map is feature decoded by the feature decoder to obtain a semantic segmentation map.
[0016] In one embodiment, the step of extracting feature channels from the parking space line image to be detected by the feature encoder to obtain a feature coding map includes:
[0017] Extracting features from the parking space line image to be detected by the feature encoder to obtain an initial feature map;
[0018] Performing global average pooling on the initial feature map to obtain a channel vector;
[0019] Channel weighting is performed on the initial feature map according to the channel vector to obtain a feature coding map.
[0020] In one embodiment, the context-aware module includes a depth-wise separable convolutional layer, a parallel convolutional layer, and a channel weighted layer connected in sequence;
[0021] The step of fusing the multi-scale features of the feature coding map through the context perception module to obtain a multi-scale feature enhancement map includes:
[0022] Performing local feature extraction on the feature coding map through the depthwise separable convolutional layer to obtain a local feature map;
[0023] Performing multi-scale feature extraction on the local feature map through the parallel convolution layer to obtain a multi-scale feature map;
[0024] The multi-scale feature map is channel-weighted by the channel weighting layer to obtain a multi-scale feature enhancement map.
[0025] In one embodiment, the feature compression module includes a first parking space line detection model;
[0026] Before the step of performing feature compression on the multi-scale feature enhancement map by the feature compression module to obtain a feature compression map, the method further includes:
[0027] The preset high-precision semantic segmentation model is trained based on the obscured parking space dataset to obtain a second parking space line detection model;
[0028] A lightweight convolutional neural network model is trained based on the second parking space line detection model to obtain the first parking space line detection model.
[0029] In one embodiment, before the step of inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, the step includes:
[0030] Collect video data of drawn parking spaces;
[0031] Performing image preprocessing on the video data of the drawn parking spaces to obtain a data set of obscured parking spaces;
[0032] A preset deep learning model is trained based on the obscured parking space data set to obtain a parking space line detection model, wherein the preset deep learning model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence.
[0033] In one embodiment, the step of performing image preprocessing on the video data of the drawn parking space to obtain a data set of obscured parking spaces includes:
[0034] Perform frame extraction processing based on the line-drawn parking space video data to obtain a line-drawn parking space image;
[0035] Marking parking space lines based on the line-drawn parking space image to obtain a marked parking space image;
[0036] The annotated parking space image is subjected to occlusion processing to obtain an occluded parking space data set.
[0037] In addition, to achieve the above-mentioned purpose, the present application also proposes a parking space line dividing device for an obstructed parking space, the parking space line dividing device for an obstructed parking space comprising:
[0038] A data acquisition module, used for acquiring a parking space line image to be detected, wherein the parking space in the parking space line image to be detected is a blocked parking space;
[0039] A semantic segmentation module, used for inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, wherein the parking space line detection model comprises a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence;
[0040] A result determination module is used to determine the parking space line segmentation result of the blocked parking space according to the semantic segmentation map.
[0041] In addition, to achieve the above-mentioned purpose, the present application also proposes a parking space line segmentation device for an obstructed parking space, the device comprising: a memory, a processor, and a computer program stored on the memory and executable on the processor, the computer program being configured to implement the steps of the parking space line segmentation method for an obstructed parking space as described above.
[0042] 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 parking space line segmentation method for the obstructed parking space as described above are implemented.
[0043] 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, it implements the steps of the parking space line segmentation method for an obstructed parking space as described above.
[0044] One or more technical solutions proposed in this application have at least the following technical effects:
[0045] A parking line image to be detected is obtained, wherein the parking space in the parking line image to be detected is an obstructed parking space; the parking line image to be detected is input into a parking line detection model to obtain a semantic segmentation map, wherein the parking line detection model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence; the parking line segmentation result of the obstructed parking space is determined according to the semantic segmentation map, and feature information of the parking line is extracted from different angles and levels by the feature encoder, the context perception module, the feature compression module, the dynamic completion module and the feature decoder connected in sequence, so that the features of the parking line can be fully understood and the accuracy of the parking line detection can be improved. In particular, the global context information in the image can be captured by the context perception module, and the understanding of the position and shape of the parking line can be enhanced. The feature map can be compressed by the feature compression module, so that the parameter amount and calculation complexity of the model can be reduced. The obstructed parking space can be processed by the dynamic completion module, so that the features of the obstructed parking line can be predicted and completed, so that the parking line can be accurately segmented under resource-constrained conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0046] 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.
[0047] In order to more clearly illustrate the embodiments of the present application or the technical solutions in 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.
[0048] Figure 1 A flowchart diagram of the first embodiment of the parking space line segmentation method for an obstructed parking space of the present application;
[0049] Figure 2 An architecture diagram of a preset deep learning model provided in Embodiment 1 of the parking space line segmentation method for an obstructed parking space of the present application;
[0050] Figure 3 A flow chart of the second embodiment of the parking space line segmentation method for an obstructed parking space provided in the present application;
[0051] Figure 4 A flowchart for creating an obstructed data set provided in Embodiment 2 of the parking space line segmentation method for obstructed parking spaces of the present application;
[0052] Figure 5 A schematic diagram of a simplified process of a method for segmenting parking space lines of an obstructed parking space provided in the second embodiment of the present application;
[0053] Figure 6This is a schematic diagram of the module structure of the parking space line dividing device for the blocked parking space according to an embodiment of the present application;
[0054] Figure 7 Schematic diagram of the device structure of the hardware operating environment involved in the parking space line segmentation method for an obstructed parking space in an embodiment of the present application.
[0055] 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
[0056] 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.
[0057] 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.
[0058] The main solution of the embodiment of the present application is: obtaining a parking space line image to be detected, wherein the parking space in the parking space line image to be detected is an obscured parking space; inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, wherein the parking space line detection model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence; and determining the parking space line segmentation result of the obscured parking space according to the semantic segmentation map.
[0059] In this embodiment, for the convenience of description, the following description is made by taking the parking space line segmentation identification device as the execution subject.
[0060] In autonomous driving and smart parking systems, accurate identification and segmentation of parking lines and related signs are crucial for safe parking and automatic navigation of vehicles. For example, in the related technologies of automatic parking assistance, the industry's leading on-site memory parking assistance (LAPA) requires correct detection of parking spaces. However, in real-world environments, parking lines and signs are often partially or completely blocked by other objects, such as other vehicles, pedestrians, trees, snow, etc., which poses a huge challenge to traditional image segmentation algorithms. The occlusion problem not only affects the accuracy of segmentation, but may also cause the system to fail to correctly identify parking spaces or signs, thereby affecting the accuracy of autonomous driving decisions.
[0061] Traditional image processing methods rely on clear edges and features for segmentation, and these methods often have difficulty handling when the target area is occluded. To address these challenges, semantic segmentation techniques based on deep learning have been widely used in recent years, especially the emergence of convolutional neural networks (CNNs), which has greatly improved segmentation accuracy. However, standard CNNs still have limitations when dealing with occluded targets. To this end, researchers have proposed a variety of enhancement methods, such as multi-scale feature fusion, context awareness, generative adversarial networks, and attention mechanisms, to improve the performance of the model in occluded scenes.
[0062] Among them, multi-scale feature fusion extracts features of different scales through parallel branches or convolutional pyramid structures. Although it has a certain effect on occlusion processing, it is usually accompanied by high computational overhead, which increases the complexity of the model and is not suitable for real-time application scenarios. The attention mechanism has been widely used in semantic segmentation tasks, which improves segmentation accuracy by emphasizing important image areas and suppressing irrelevant background information. Although it is effective in occlusion processing in theory, its complex calculation process makes it difficult for the model to meet real-time requirements in actual deployment. In addition, such methods usually require a large amount of training data to cover a variety of occlusion situations, otherwise the performance in new scenarios will be less than ideal.
[0063] This application improves the computational complexity, real-time, generation instability and consistency problems in the prior art, and proposes a lightweight and efficient solution that can achieve accurate parking line segmentation in scenarios where the parking line is obscured. It is suitable for practical applications, especially in resource-constrained environments.
[0064] It should be noted that the execution subject of this embodiment can be a computing service device with data processing, network communication and program running functions, such as a tablet computer, a personal computer, a mobile phone, etc., or an electronic device capable of realizing the above functions, a parking space line segmentation device, etc. The following takes the parking space line segmentation device as an example to illustrate this embodiment and the following embodiments.
[0065] Based on this, the embodiment of the present application provides a parking space line segmentation method for an obstructed parking space, referring to Figure 1 , Figure 1 It is a flowchart diagram of the first embodiment of the parking space line segmentation method for an obstructed parking space of the present application.
[0066] In this embodiment, the parking space line segmentation method for the blocked parking space includes steps S10 to S30:
[0067] Step S10, obtaining a parking space line image to be detected, wherein the parking space in the parking space line image to be detected is a blocked parking space.
[0068] It should be understood that the parking space line image to be detected may be an image collected by a camera or sensor in a parking lot environment or beside a roadside parking space, and the parking space line image to be detected may contain image information of vehicles and road markings in addition to image information of the obscured parking space. The parking space line of the obscured parking space may be partially obscured by other objects, such as leaves, pedestrians, vehicles, etc.
[0069] Specifically, the parking space line image to be detected can be an RGB image of size (H, W, 3), where H represents the height of the parking space line image to be detected, which is the number of pixels in the vertical direction of the image; W represents the width of the parking space line image to be detected, which is the number of pixels in the horizontal direction of the image; 3 represents the number of channels of the parking space line image to be detected. RGB images use three color channels to represent color information, namely red (Red), green (Green) and blue (Blue), and each channel of the parking space line image to be detected contains the intensity information of the corresponding color.
[0070] Step S20, inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, wherein the parking space line detection model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence.
[0071] It should be understood that the parking line detection model can be obtained by training the preset deep learning model through the obscured parking space data set, and the obscured parking space data set is annotated with parking line segmentation information. The preset deep learning model is a lightweight deep learning model LCASNet (Lightweight Context-Aware Segmentation Network) designed in this application, which needs to include a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder. The preset deep learning model is used to detect and segment parking lines in images containing obscured parking spaces to improve the reliability of the automatic parking system.
[0072] Please note that, please refer to Figure 2 , Figure 2The architecture diagram of the parking line detection model provided for the first embodiment of the parking line segmentation method for obscured parking spaces of the present application. After the parking line image to be detected is input into the parking line detection model, the model input module receives the parking line image to be detected, and performs normalization operation on the parking line image to be detected to obtain a standardized image; the encoder module (i.e., the feature encoder) encodes the standardized image output by the model input module, extracts key features, and obtains a feature encoding map; the lightweight context perception module (i.e., the context perception module) analyzes the contextual relationship of the feature map output by the encoder module, enhances the semantic understanding of the features, and obtains a multi-scale feature enhancement map; the feature compression module compresses the features of the multi-scale feature enhancement map output by the context perception module to optimize storage and computing efficiency, and obtains a feature compression map; the simplified dynamic completion mechanism module (i.e., the dynamic completion module) processes the missing or abnormal parts in the feature compression map data output by the feature compression module to ensure the stability of the model and obtain a feature completion map; the model output module performs feature decoding on the parking lines of the feature completion map output by the dynamic completion module, and generates a semantic segmentation map containing parking line segmentation information.
[0073] In addition, it should be noted that the size of the semantic segmentation map can be (H, W, N), where the N values of each pixel represent the probability of its corresponding category, and the height H and width W of the semantic segmentation map should be consistent with the parking line image to be detected. The value of the number of channels N of the semantic segmentation map depends on the category information annotated in the occluded parking space dataset used to train the preset deep learning model. Specifically, if the images in the occluded parking space dataset only contain the annotation results of the image information of the parking line category and the road sign category, then N is 2.
[0074] In a feasible implementation, step S20 may include steps S21 to S25:
[0075] Step S21, inputting the parking space line image to be detected into a parking space line detection model, performing feature channel extraction on the parking space line image to be detected by the feature encoder, and obtaining a feature coding map;
[0076] It should be noted that the feature encoder is a lightweight encoder (Lightweight Encoder), which can be specifically a lightweight encoder based on MobileNetV3. The feature encoder is used to extract features from the parking line image to be detected, compress image information to retain important visual features, and the height and width of the image processed by the feature encoder will be reduced, and the number of channels will increase. Specifically, for the parking line image to be detected with an input size of (H, W, 3), the size of the feature coding map output after processing by the feature encoder is ((H / 4, W / 4, C2), where C2 represents the number of feature channels extracted by the feature encoder.
[0077] In a feasible implementation, step S21 may include steps A11 to A13:
[0078] Step A11, extracting features from the parking space line image to be detected by the feature encoder to obtain an initial feature map.
[0079] It should be noted that after the parking space line image to be detected is input into the feature encoder, the standard convolution layer of the feature encoder will first extract features of the parking space line image to be detected through a 3x3 convolution kernel, and then perform depth convolution and point-by-point convolution on the feature map output by the standard convolution layer through the depth-wise separable convolution layer to obtain the initial feature map.
[0080] Specifically, for a parking space line image to be detected of size (H, W, 3), after being processed by the standard convolution layer of the feature encoder, a feature map of size (H / 4, W / 4, C1) will be obtained, where C1 is the number of channels after the parking space line image to be detected is expanded. The feature map output by depth convolution of the feature map of size (H / 4, W / 4, C1) has the same shape as the input feature map, and the initial feature map obtained after point-by-point convolution is of size (H / 4, W / 4, C2), and the number of channels C2 is less than C1.
[0081] Step A12, performing global average pooling on the initial feature map to obtain a channel vector;
[0082] It should be noted that there is a Squeeze-and-Excitation (SE) module connected after the depthwise separable convolutional layer. The SE module contains a squeeze layer and an excitation layer connected in sequence. The squeeze layer is used to perform global average pooling on the input initial feature map, compressing the spatial information of each channel into a vector to obtain a channel vector. Specifically, for the initial feature map with an input size of (H / 4, W / 4, C2), the size of each channel vector obtained after the squeeze layer processing is (1, 1, C2).
[0083] Step A13, performing channel weighting on the initial feature map according to the channel vector to obtain a feature coding map.
[0084] It should be noted that after obtaining the channel vector generated based on the spatial information of each channel of the initial feature map, the Excitation layer will adjust the channel weights of the initial feature map through two fully connected layers, and perform nonlinear processing on the feature map output after adjusting the weights through a nonlinear activation function such as ReLU6 to obtain a feature encoding map. Specifically, for multiple input channel vectors of size (1, 1, C2), the dimension of the channel vector will be reduced from C2 to C2 / r through the first fully connected layer, and then remapped from C2 / r back to C2 through the second fully connected layer after being processed by the ReLU activation function. The channel weights are obtained after being processed by the Sigmoid activation function, and the obtained channel weights are applied to the input initial feature map. The C2 channels are recalibrated by channel-by-channel multiplication to obtain a channel-weighted feature map, and the feature encoding map (H / 4, W / 4, C2) is obtained after being processed by the nonlinear activation function ReLU6. While keeping the size of the input feature map unchanged, the SE module focuses on the important feature channels of the initial feature map, thereby enhancing the representation ability of the model.
[0085] Step S22, fusing the multi-scale features of the feature coding map through the context perception module to obtain a multi-scale feature enhancement map;
[0086] It should be noted that the Lightweight Contextual Awareness Module (LCAM) fuses features through multi-scale convolution and channel attention mechanism, which can enhance the perception of occluded areas. The number of channels of the image processed by the context-aware module will continue to increase. Specifically, for the input feature encoding map of size (H / 4, W / 4, C2), the multi-scale feature enhancement map obtained after the context-aware module fuses the multi-scale features of the feature encoding map is of size (H / 4, W / 4, C3), where C3 is larger than C2.
[0087] In a feasible implementation, the context-aware module includes a depth-separable convolutional layer, a parallel convolutional layer, and a channel weighted layer connected in sequence; step S22 may include steps A21 to A23:
[0088] Step A21, extracting local features from the feature coding map through the depthwise separable convolutional layer to obtain a local feature map;
[0089] It should be noted that after the feature coding map is input to the context-aware module, the context-aware module will first perform channel-by-channel convolution on the feature coding map through a depth-wise separable convolutional layer, and then perform point-by-point convolution to extract local features and obtain a local feature map with unchanged size information.
[0090] Step A22, performing multi-scale feature extraction on the local feature map through the parallel convolution layer to obtain a multi-scale feature map;
[0091] It should be noted that after obtaining the local feature map output by the depthwise separable convolution layer, multiple parallel convolution branches (i.e., parallel convolution layers) are used to extract features of different scales from the local feature map to obtain a multi-scale feature map containing contextual information. Specifically, the multiple parallel convolution branches can be convolution kernels of different sizes such as 3x3, 5x5, and 6x6. For a local feature map with an input size of (H / 4, W / 4, C2), multiple branch features with a size of (H / 4, W / 4, C2) will be obtained after multi-scale feature extraction. After fusing the multiple branch features, a multi-scale feature map with a size of (H / 4, W / 4, C3) will be obtained, where C3 is the number of channels added after fusing the branch features, and C3 should be greater than C2.
[0092] Step A23, performing channel weighting on the multi-scale feature map through the channel weighting layer to obtain a multi-scale feature enhancement map.
[0093] It should be noted that after obtaining the multi-scale feature map output by the parallel convolutional layer, different channels will be weighted through the channel attention mechanism to highlight important features and obtain a multi-scale feature enhancement map that enhances the understanding of the occluded area. The channel attention can be calculated by combining global average pooling and global maximum pooling.
[0094] It should be understood that in occluded scenes, features of a single scale may not be sufficient to capture enough information. By introducing a lightweight context-aware module in the parking line detection model, multi-scale features are integrated based on deep separable convolution and channel attention mechanisms. The weights of features of different scales can be dynamically adjusted through channel attention without increasing a lot of computation, so that the network can better perceive important contextual information.
[0095] Step S23, performing feature compression on the multi-scale feature enhancement map by the feature compression module to obtain a feature compression map;
[0096] It should be noted that the feature compression module is a feature compression (KD-GFC) module guided by knowledge distillation. KD-GFC contains a lightweight parking line detection model. The lightweight parking line detection model learns the feature representation of the high-precision semantic segmentation model, which can further compress the multi-scale feature enhancement map output by the context-aware module into a more compact representation, ensuring that the model reduces computational overhead while maintaining high precision, and obtains a feature compression map. Specifically, for the multi-scale feature enhancement map with an input size of (H / 4, W / 4, C3), the size of the feature compression map obtained after processing by the feature compression module is (H / 4, W / 4, C4).
[0097] In a feasible implementation, the feature compression module includes a first parking line detection model; before step S23, it may include: training a preset high-precision semantic segmentation model based on the obscured parking space data set to obtain a second parking line detection model; training a lightweight convolutional neural network model based on the second parking line detection model to obtain the first parking line detection model.
[0098] It should be noted that the second parking line detection model can be obtained by training a high-precision semantic segmentation model based on the obscured parking space dataset. The second parking line detection model can effectively handle pixel-level classification in complex scenes. The first parking line detection model is used as the student model in knowledge distillation, and the second parking line detection model is used as the teacher model in knowledge distillation. Through knowledge distillation, the high-precision teacher model knowledge is transferred to the lightweight student model, which can reduce the number of parameters and maintain lightweight while retaining the model performance to the maximum extent, ensuring the accuracy of the parking line detection model in parking line segmentation under resource-constrained conditions.
[0099] Specifically, the steps of guiding the lightweight convolutional neural network model to learn the teacher model (i.e., the second parking space line detection model) through knowledge distillation to obtain the student model (i.e., the first parking space line detection model) can be as follows: based on the occluded parking space data set, a preset high-precision semantic segmentation model such as MCANet is trained to obtain the teacher model, and the lightweight convolutional neural network model is used as the student model; the teacher model is used to forward propagate the input occluded parking space data to obtain the soft target (probability distribution), and at the same time obtain the predicted parking space line segmentation result of the student model; the distillation loss between the student model output and the teacher model soft target, as well as the cross entropy loss between the student model output and the true label are calculated; the distillation loss and the cross entropy loss are combined to obtain the total loss function, and the student model is optimized and trained based on the total loss function so that it learns the knowledge of the teacher model and improves its own performance, thereby obtaining the first parking space line detection model.
[0100] It should be understood that lightweight models usually lose some accuracy while reducing the number of parameters. In order to maximize the performance of the model while maintaining lightweight, the knowledge distillation technology is used to pass the rich features extracted from a high-precision teacher model to the lightweight student model. Through distillation guidance, the student model can learn a more compact but effective feature representation to make up for the performance loss caused by the lightweight parking line detection model. During the training process, by minimizing the difference between the student model output and the teacher model output, the feature representation of the student model can be gradually optimized, so that it can still achieve high segmentation accuracy with low computational overhead.
[0101] Step S24, obtaining the context features and the local completion features of the feature compression map through the dynamic completion module, and splicing the context features and the local completion features to obtain a feature completion map;
[0102] It should be noted that the dynamic completion module is a simplified dynamic completion mechanism (SDCM) module. The dynamic completion module uses lightweight convolution operations to complete the occluded areas of the feature compression map output by the feature compression module to ensure the accuracy of the segmentation result under occlusion and obtain a feature completion map. Specifically, for a feature compression map of size (H / 4, W / 4, C4), the size of the feature completion map obtained by splicing the context features and local completion features obtained by the dynamic completion module is (H / 4, W / 4, C5), where C5 is the number of channels after compression and completion.
[0103] In addition, it should be noted that after the feature compression map is input into the dynamic completion module, it will be convolved through the first convolutional layer (Conv2D), which contains C' filters and 3x3 convolution kernels. The 'same' padding method is used to keep the size of the feature map unchanged. After the conversion from input features to C' feature channels is realized, the activation function ReLU is applied to the feature map output by the convolutional layer to introduce nonlinearity and enhance the expression ability of the model to obtain context features. After being processed by this convolutional layer, the feature map output by the first convolutional layer will be further refined through the second convolutional layer Conv2D in the local feature completion stage to reduce the C' feature channels to C" channels, while keeping the spatial dimension of the feature map unchanged, and applying the ReLU activation function to strengthen the nonlinear expression of the features to obtain local completion features. Finally, in the fusion and decoding stage, the context features and local completion features are spliced along the channel dimension through the Concatenate operation of the fusion layer, and the feature information of the two stages is combined to obtain a feature map with the number of channels increased to C5, which provides a rich information basis for subsequent model decoding and high-level feature extraction.
[0104] It should be understood that in scenes with severe occlusion, traditional segmentation models have difficulty processing completely occluded areas. A simplified dynamic completion mechanism is introduced into the parking line detection model to handle the semantic completion of occluded areas. Through the fusion of lightweight convolution filters and contextual information, reasonable feature completion can be performed on completely occluded areas, thereby maintaining consistency in the segmentation results. This mechanism combines the output of the context-aware module and the local information of the occluded area, and generates possible completion features through lightweight convolution operations, which can ensure that the segmentation results still maintain high accuracy in occluded scenes.
[0105] Step S25, performing feature decoding on the feature completion map by the feature decoder to obtain a semantic segmentation map.
[0106] It should be noted that the feature decoder is a lightweight decoder (Lightweight Decoder). The feature decoder decodes the feature completion map, obtains all enhanced and completed features, and generates a complete semantic segmentation map. For the parking line detection model trained with the occluded parking data set containing the annotation information of the parking line category and the road sign category, the parking lines and road signs can be correctly identified and segmented even when they are occluded. Specifically, for the feature completion map of size (H / 4, W / 4, C5) output by the dynamic completion module, the size of the semantic segmentation map obtained after processing by the feature decoder is (H, W, N).
[0107] In addition, it should be noted that after the feature completion map is input into the feature decoder, the feature decoder will gradually enlarge the feature completion map through a series of deconvolution (or upsampling) layers, and restore its spatial resolution to the same level of width and height as the input to the parking space line image to be detected, and obtain a semantic segmentation map. Specifically, for the feature completion map with an input size of (H / 4, W / 4, C5), after deconvolution, the shape of the output feature map will be gradually restored to (H / 2, W / 2, C1), and then further restored to the size of the original input image (H, W, C), where C is the number of channels after decoding. After the feature map of size (H, W, C) is processed by a 1x1 convolution layer, the number of channels is transformed from C to N, and a semantic segmentation map of size (H, W, N) is generated, where the N values of each pixel represent the probability of its corresponding category (such as parking space line, road sign, etc.).
[0108] Step S30: determining a parking space line segmentation result of the blocked parking space according to the semantic segmentation map.
[0109] It should be noted that the spatial resolution of the semantic segmentation map generated by the feature encoder is consistent with the resolution of the parking line image to be detected input into the parking line detection model. Each pixel in the semantic segmentation map is marked as a different category, and pixels of different categories are represented by different colors. By analyzing the category information in the semantic segmentation map, it is possible to identify which pixels belong to the parking line category, and then determine the location information and shape information of the parking space, and obtain the parking line segmentation result. The parking line segmentation result can provide accurate parking space location information for autonomous driving vehicles to realize automatic parking function.
[0110] The present embodiment provides a parking line segmentation method for an obstructed parking space, which includes obtaining an image of a parking line to be detected, wherein the parking space in the image of the parking line to be detected is an obstructed parking space; inputting the image of the parking line to be detected into a parking line detection model to obtain a semantic segmentation map, wherein the parking line detection model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module, and a feature decoder connected in sequence; determining a parking line segmentation result of the obstructed parking space according to the semantic segmentation map, extracting feature information of the parking line from different angles and levels through the feature encoder, the context perception module, the feature compression module, the dynamic completion module, and the feature decoder connected in sequence, so as to fully understand the features of the parking line and improve the accuracy of the parking line detection. In particular, the context perception module can capture the global context information in the image and enhance the understanding of the position and shape of the parking line; the feature compression module can compress the feature map to reduce the number of parameters and the computational complexity of the model; the dynamic completion module can process the obstructed parking space to predict and complete the features of the obstructed parking line, so as to achieve accurate parking line segmentation under resource-constrained conditions.
[0111] 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 Before step S20, the parking space line segmentation method for the blocked parking space further includes steps S11 to S13:
[0112] Step S11, collecting video data of the drawn parking space;
[0113] It should be noted that the video data of the parking spaces with painted lines is the video of the parking spaces with occlusions, which can be directly obtained through cameras or other video capture devices installed in the parking lot or next to the parking spaces. In order to ensure the robustness of the parking space line detection model trained, the video data of the parking spaces with painted lines needs to include video data of parking spaces under different conditions, such as different lighting conditions and parking spaces under different weather changes.
[0114] Step S12, performing image preprocessing on the video data of the drawn parking spaces to obtain a data set of blocked parking spaces;
[0115] It should be understood that in order to ensure the accuracy of parking line segmentation of the parking line detection model trained according to the model obtained after training the obscured parking space dataset, it is necessary to perform image preprocessing on the drawn parking space video data to obtain an obscured parking space dataset that contains obscured parking spaces and is marked with parking line segmentation results.
[0116] In a feasible implementation, step S12 may include: performing frame extraction processing based on the drawn parking space video data to obtain a drawn parking space image; marking parking space lines based on the drawn parking space image to obtain a marked parking space image; and performing occlusion processing on the marked parking space image to obtain an occluded parking space data set.
[0117] It should be noted that the collected original line-drawing parking space video data needs to be processed by frame extraction, parking space line marking and occlusion. Figure 4 , Figure 4 The flowchart of creating the obscured data set provided in the second embodiment of the parking space line segmentation method for obscured parking spaces of this application is as follows. Figure 4 As shown, after obtaining the video data of the lined parking space, in order to ensure the clarity and consistency of the image data used for training and testing, so as to mark the parking space information later, it is necessary to extract frames from the continuous video stream, select representative images for processing, and perform denoising, brightness and contrast adjustment, etc., to obtain a lined parking space image with clearly visible parking lines. After obtaining the lined parking space image, use the image annotation tool to annotate the position of the parking lines in the lined parking space image to determine the specific position of the parking lines, especially the occluded part of the parking lines. After obtaining the annotated parking space image, considering that there are some non-occluded lane line scenes in the data set, synthetic occluders can be added through data enhancement. Specifically, an occlusion mask can be added near the parking line position in the image to simulate different occlusion scenes, providing training data closer to the actual situation for model training. The image data obtained after frame extraction, parking line annotation and occlusion processing can be saved using the COCO (Common Objects in Context) data format. The COCO format can store image and annotation information, and supports complex annotations such as polygons and segmentation masks. It is suitable for the task of parking line segmentation of obscured parking spaces.
[0118] Step S13, training a preset deep learning model based on the obscured parking space data set to obtain a parking space line detection model, wherein the preset deep learning model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence.
[0119] It should be understood that after obtaining the obstructed parking space dataset, the obstructed parking space dataset containing the obstructed parking spaces and annotated with the parking space line segmentation results will be divided into a training set and a test set. The training set is used to train the preset deep learning model to obtain the parking space line detection model, and the test set is used to evaluate the generalization ability of the parking space line detection model, so as to optimize the parameters of the parking space line detection model according to the performance of the test set on the parking space line detection model, and finally obtain the parking space line detection model used for parking space line segmentation of the parking space line image to be detected. Among them, both the training set and the test set need to contain enough obstructed parking space samples.
[0120] The present embodiment provides a parking line segmentation method for obscured parking spaces, which collects video data of drawn parking spaces; performs image preprocessing on the video data of drawn parking spaces to obtain an obscured parking space data set; and trains a preset deep learning model based on the obscured parking space data set to obtain a parking line detection model, wherein the preset deep learning model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module, and a feature decoder connected in sequence, which can effectively improve the accuracy and robustness of the parking line detection model in complex environments when the parking lines are obscured. The parking line detection model obtained by training with a preset deep learning model proposed in the present application can significantly reduce the number of parameters while retaining a strong processing capability for parking line and sign obscured areas in complex scenes. The streamlined model structure and optimized module design of the model can achieve higher segmentation accuracy at a lower computing cost in practical applications, and is suitable for resource-constrained embedded devices or mobile application scenarios.
[0121] For example, in order to help understand the implementation process of the parking space line segmentation method for the blocked parking space obtained by combining this embodiment with the above-mentioned embodiment 1, please refer to Figure 5 , Figure 5 A brief flow chart of a method for segmenting parking spaces of obstructed parking spaces is provided, specifically:
[0122] Collect video data of drawn parking spaces, process and annotate the collected video data of drawn parking spaces, obtain a data set of occluded parking spaces for model training, build a preset deep learning model including a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence, and tune and train it to obtain a parking line detection model. The best trained deep learning model (i.e., the parking line detection model) performs line segmentation on the parking spaces to achieve parking space segmentation.
[0123] It should be noted that the above examples are only used to understand the present application and do not constitute a limitation on the parking space line segmentation method for obstructed parking spaces of the present application. More simple transformations based on this technical concept are all within the protection scope of the present application.
[0124] This application also provides a parking space line segmentation device for an obstructed parking space, please refer to Figure 6 , the parking space line dividing device for the blocked parking space comprises:
[0125] The data acquisition module 10 is used to acquire a parking space line image to be detected, wherein the parking space in the parking space line image to be detected is a blocked parking space;
[0126] A semantic segmentation module 20, for inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, wherein the parking space line detection model comprises a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence;
[0127] The result determination module 30 is used to determine the parking space line segmentation result of the blocked parking space according to the semantic segmentation map.
[0128] In one embodiment, the semantic segmentation module 20 is also used to input the parking space line image to be detected into a parking space line detection model, perform feature channel extraction on the parking space line image to be detected by the feature encoder, and obtain a feature coding map; fuse the multi-scale features of the feature coding map by the context perception module to obtain a multi-scale feature enhancement map; perform feature compression on the multi-scale feature enhancement map by the feature compression module to obtain a feature compression map; obtain context features and local completion features of the feature compression map by the dynamic completion module, and splice the context features and the local completion features to obtain a feature completion map; perform feature decoding on the feature completion map by the feature decoder to obtain a semantic segmentation map.
[0129] In one embodiment, the semantic segmentation module 20 is further used to perform feature extraction on the parking space line image to be detected through the feature encoder to obtain an initial feature map; perform global average pooling on the initial feature map to obtain a channel vector; and perform channel weighting on the initial feature map according to the channel vector to obtain a feature coding map.
[0130] In one embodiment, the context perception module includes a depth-separable convolution layer, a parallel convolution layer and a channel weighted layer connected in sequence; the semantic segmentation module 20 is also used to perform local feature extraction on the feature coding map through the depth-separable convolution layer to obtain a local feature map; perform multi-scale feature extraction on the local feature map through the parallel convolution layer to obtain a multi-scale feature map; perform channel weighting on the multi-scale feature map through the channel weighted layer to obtain a multi-scale feature enhancement map.
[0131] In one embodiment, the feature compression module includes a first parking line detection model; the semantic segmentation module 20 is also used to train a preset high-precision semantic segmentation model based on the occluded parking space data set to obtain a second parking line detection model; based on the second parking line detection model, a lightweight convolutional neural network model is trained to obtain the first parking line detection model.
[0132] In one embodiment, the data acquisition module 10 is also used to collect video data of drawn parking spaces; perform image preprocessing on the video data of drawn parking spaces to obtain an obscured parking space data set; and train a preset deep learning model based on the obscured parking space data set to obtain a parking space line detection model, wherein the preset deep learning model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module, and a feature decoder connected in sequence.
[0133] In one embodiment, the data acquisition module 10 is further used to perform frame extraction processing based on the drawn parking space video data to obtain a drawn parking space image; mark the parking space lines based on the drawn parking space image to obtain a marked parking space image; and perform occlusion processing on the marked parking space image to obtain an occluded parking space data set.
[0134] The parking space line segmentation device for an obstructed parking space provided by the present application adopts the parking space line segmentation method for an obstructed parking space in the above-mentioned embodiment, and can solve the technical problem of how to accurately segment the parking space line under resource-constrained conditions. Compared with the prior art, the beneficial effects of the parking space line segmentation device for an obstructed parking space provided by the present application are the same as the beneficial effects of the parking space line segmentation method for an obstructed parking space provided by the above-mentioned embodiment, and other technical features of the parking space line segmentation device for an obstructed parking space are the same as the features disclosed in the above-mentioned embodiment method, and are not described in detail here.
[0135] The present application provides a parking line segmentation device for an obstructed parking space, and the parking line segmentation device for an obstructed parking space 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 parking line segmentation method for the obstructed parking space in the above-mentioned embodiment one.
[0136] Reference below Figure 7, which shows a schematic diagram of the structure of a parking space line segmentation device for an obstructed parking space suitable for implementing the embodiment of the present application. The parking space line segmentation device for an obstructed parking space 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 7 The parking space line dividing device for the obstructed parking space 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.
[0137] like Figure 7 As shown, the parking space line segmentation device for the obstructed parking space may include a processing device 1001 (such as a central processing unit, a graphics processing unit, 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. Various programs and data required for the operation of the parking space line segmentation device for the obstructed parking space are also stored in the RAM 1004. The processing device 1001, the ROM 1002, and the RAM 1004 are connected to each other via a bus 1005. An input / output (I / O) interface 1006 is also connected to the bus. Typically, the following systems can be connected to the I / O interface 1006: input devices 1007 including, for example, a touch screen, a touchpad, a keyboard, a mouse, an image sensor, a microphone, an accelerometer, a gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), a speaker, a vibrator, etc.; storage devices 1003 including, for example, a magnetic tape, a hard disk, etc.; and communication devices 1009. The communication device 1009 can allow the parking space line segmentation device for obstructed parking spaces to communicate wirelessly or wired with other devices to exchange data. Although the figure shows the parking space line segmentation device for obstructed parking spaces with various systems, it should be understood that it is not required to implement or have all the systems shown. More or fewer systems may be implemented or have instead.
[0138] 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.
[0139] The parking space line segmentation device for obstructed parking spaces provided by the present application adopts the parking space line segmentation method for obstructed parking spaces in the above-mentioned embodiment, which can solve the technical problem of how to accurately segment parking space lines under resource-constrained conditions. Compared with the prior art, the beneficial effects of the parking space line segmentation device for obstructed parking spaces provided by the present application are the same as the beneficial effects of the parking space line segmentation method for obstructed parking spaces provided by the above-mentioned embodiment, and other technical features of the parking space line segmentation device for obstructed parking spaces are the same as the features disclosed in the method of the previous embodiment, which will not be repeated here.
[0140] 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.
[0141] 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.
[0142] 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 parking space line segmentation method for the obstructed parking space in the above-mentioned embodiment.
[0143] 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.
[0144] The computer-readable storage medium may be included in the parking space line segmentation device for the obstructed parking space; or may exist independently without being assembled into the parking space line segmentation device for the obstructed parking space.
[0145] The computer-readable storage medium carries one or more programs. When the one or more programs are executed by the parking line segmentation device for the obstructed parking space, the parking line segmentation device for the obstructed parking space: obtains a parking line image to be detected, wherein the parking space in the parking line image to be detected is the obstructed parking space; inputs the parking line image to be detected into a parking line detection model to obtain a semantic segmentation map, wherein the parking line detection model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence; and determines the parking line segmentation result of the obstructed parking space according to the semantic segmentation map.
[0146] 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).
[0147] 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.
[0148] 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.
[0149] 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 method for segmenting parking lines of obstructed parking spaces, and can solve the technical problem of how to accurately segment parking lines under resource-constrained conditions. 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 method for segmenting parking lines of obstructed parking spaces provided in the above-mentioned embodiments, and will not be described in detail here.
[0150] The present application also provides a computer program product, including a computer program, which, when executed by a processor, implements the steps of the parking space line segmentation method for an obstructed parking space as described above.
[0151] The computer program product provided by the present application can solve the technical problem of how to accurately segment parking space lines under resource-constrained conditions. 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 parking space line segmentation method for obstructed parking spaces provided by the above embodiment, which will not be described in detail here.
[0152] 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 parking space line segmentation method for an obstructed parking space, characterized in that: The parking space line segmentation method for the blocked parking space comprises: Acquire a parking space line image to be detected, wherein the parking space in the parking space line image to be detected is a blocked parking space; Inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, wherein the parking space line detection model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence; The parking space line segmentation result of the blocked parking space is determined according to the semantic segmentation map.
2. The method according to claim 1, characterized in that The step of inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map comprises: Inputting the parking space line image to be detected into a parking space line detection model, and extracting feature channels of the parking space line image to be detected by the feature encoder to obtain a feature coding map; The multi-scale features of the feature coding map are fused by the context perception module to obtain a multi-scale feature enhancement map; Performing feature compression on the multi-scale feature enhancement map by the feature compression module to obtain a feature compression map; Acquire the context features and the local completion features of the feature compression map through the dynamic completion module, and splice the context features and the local completion features to obtain a feature completion map; The feature completion map is feature decoded by the feature decoder to obtain a semantic segmentation map.
3. The method according to claim 2, characterized in that The step of extracting feature channels from the parking space line image to be detected by the feature encoder to obtain a feature coding map comprises: Extracting features from the parking space line image to be detected by the feature encoder to obtain an initial feature map; Performing global average pooling on the initial feature map to obtain a channel vector; Channel weighting is performed on the initial feature map according to the channel vector to obtain a feature coding map.
4. The method according to claim 2, characterized in that The context-aware module includes a depth-separable convolutional layer, a parallel convolutional layer, and a channel weighted layer connected in sequence; The step of fusing the multi-scale features of the feature coding map through the context perception module to obtain a multi-scale feature enhancement map includes: Performing local feature extraction on the feature coding map through the depthwise separable convolutional layer to obtain a local feature map; Performing multi-scale feature extraction on the local feature map through the parallel convolution layer to obtain a multi-scale feature map; The multi-scale feature map is channel-weighted by the channel weighting layer to obtain a multi-scale feature enhancement map.
5. The method according to claim 2, characterized in that The feature compression module includes a first parking space line detection model; Before the step of performing feature compression on the multi-scale feature enhancement map by the feature compression module to obtain a feature compression map, the method further includes: The preset high-precision semantic segmentation model is trained based on the obscured parking space dataset to obtain a second parking space line detection model; A lightweight convolutional neural network model is trained based on the second parking space line detection model to obtain the first parking space line detection model.
6. The method according to claim 1, characterized in that Before the step of inputting the parking space line image to be detected into the parking space line detection model to obtain the semantic segmentation map, the method includes: Collect video data of drawn parking spaces; Performing image preprocessing on the video data of the drawn parking spaces to obtain a data set of obscured parking spaces; A preset deep learning model is trained based on the obscured parking space data set to obtain a parking space line detection model, wherein the preset deep learning model includes a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence.
7. The method according to claim 6, characterized in that The step of performing image preprocessing on the video data of the drawn parking space to obtain a data set of blocked parking spaces includes: Perform frame extraction processing based on the line-drawn parking space video data to obtain a line-drawn parking space image; Marking parking space lines based on the line-drawn parking space image to obtain a marked parking space image; The annotated parking space image is subjected to occlusion processing to obtain an occluded parking space data set.
8. A parking space line segmentation device for an obstructed parking space, characterized in that: The device comprises: A data acquisition module, used for acquiring a parking space line image to be detected, wherein the parking space in the parking space line image to be detected is a blocked parking space; A semantic segmentation module, used for inputting the parking space line image to be detected into a parking space line detection model to obtain a semantic segmentation map, wherein the parking space line detection model comprises a feature encoder, a context perception module, a feature compression module, a dynamic completion module and a feature decoder connected in sequence; A result determination module is used to determine the parking space line segmentation result of the blocked parking space according to the semantic segmentation map.
9. A parking space line segmentation device for an obstructed parking space, characterized in that: The device comprises: a memory, a processor and a computer program stored in the memory and executable on the processor, wherein the computer program is configured to implement the steps of the method for segmenting parking space lines of an obstructed parking space as described in any one of claims 1 to 7.
10. A storage medium, characterized in that: The storage medium 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 parking space line segmentation method for an obstructed parking space as described in any one of claims 1 to 7 are implemented.