A target segmentation method optimized by boundary learning
By constructing a target segmentation model and combining pixel-level and Fourier descriptor loss functions with a deformable convolutional coding module, the problems of blurred segmentation boundaries and loss of details for aircraft and ship targets in existing technologies are solved, achieving higher segmentation accuracy and robustness.
Patent Information
- Application Number
- CN202511170957.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-21
- Publication Date
- 2025-10-31
- Estimated Expiration
- 2045-08-21
AI Technical Summary
Existing deep learning models suffer from blurred boundaries and loss of detailed information when processing complex targets such as airplanes and ships, limiting the improvement of algorithm performance.
A target segmentation model is constructed, employing loss functions based on pixel-level loss functions, Fourier descriptor loss functions, and adaptive weighted coefficients. This model combines multi-scale feature extraction, deformable convolutional coding, and mask generation modules. The Fourier descriptor loss function captures the topological structure of the shape, while the deformable convolutional coding module adapts to changes in the target shape, thereby enhancing feature representation.
It improves the accuracy of the target segmentation model, retains more local details, and enhances the model's robustness and generalization ability, especially in the task of segmenting small targets in complex backgrounds, generating high-quality segmentation masks.
Smart Images

Figure CN120672783B_ABST
Abstract
Description
Technical Field
[0001] This application relates to the field of image segmentation, and in particular to a target segmentation method optimized by boundary learning. Background Technology
[0002] In the fields of computer vision and remote sensing image analysis, accurate segmentation of air and sea targets such as aircraft and ships is a key task, which is of great significance to many application scenarios such as air traffic management, civil aviation safety, and maritime traffic management.
[0003] In some situations, rule-based object segmentation methods often exhibit poor generalization ability and insufficient adaptability when facing complex and ever-changing environments. In recent years, deep learning methods, especially convolutional neural networks, have achieved remarkable success in image segmentation tasks due to their superior feature extraction capabilities and end-to-end learning frameworks.
[0004] However, most existing deep learning models rely on pixel-level loss functions, such as cross-entropy loss and Dice loss. When dealing with objects with complex shapes, these algorithms still have some shortcomings: pixel-level loss functions can easily lead to blurred boundaries in the segmentation results or loss of detailed information, thus limiting further performance improvements. This problem of detail loss and blurred boundaries is particularly prominent when segmenting targets with fine edges and complex shapes, such as airplanes and ships. Summary of the Invention
[0005] The purpose of this application is to provide a boundary learning-optimized target segmentation method that can improve the accuracy of target segmentation models, retain more local detail information, and thus improve the pixel quality of aircraft segmented in airport airspace.
[0006] To achieve the above objectives, this application provides the following solution.
[0007] Firstly, this application provides a boundary learning-optimized target segmentation method, including the following:
[0008] A target segmentation model is constructed and trained; the loss function used for training the target segmentation model is constructed based on the pixel-level loss function, the Fourier descriptor loss function, and the adaptive weighting coefficient; the target segmentation model includes: a multi-scale feature extraction module, a deformable convolutional coding module, a multi-scale feature fusion module, and a mask generation module connected in sequence.
[0009] The airport airspace image is input into the trained target segmentation model to obtain a prediction mask, thereby completing the segmentation of targets in the airport airspace; the prediction mask is the pixel position of the aircraft in the airport airspace image.
[0010] The process involves inputting an airport airspace image into a trained target segmentation model to obtain a predicted mask, which includes the following steps.
[0011] The airport airspace image is input into the multi-scale feature extraction module to obtain features at different scales.
[0012] Features of different scales are input into the deformable convolutional coding module to obtain multiple enhanced features.
[0013] Multiple enhanced multi-scale features are input into the multi-scale feature fusion module to obtain fused features.
[0014] The fused features are input into the mask generation module to obtain the predicted mask.
[0015] According to the specific embodiments provided in this application, this application has the following technical effects.
[0016] (1) A loss function for training the target segmentation model was constructed by using a pixel-level loss function, a Fourier descriptor loss function and an adaptive weighting coefficient. Adding a Fourier descriptor loss function on the basis of the pixel-level loss function can effectively capture the topological structure of the shape, so that the model output is not only close to the true value at the pixel level, but also more similar to the shape features, retaining more details, making the boundary clearer, and improving the prediction effect of the final prediction mask.
[0017] (2) The deformable convolutional coding module can, on the one hand, enable the convolutional kernel to dynamically adjust the sampling position according to the input features, so as to better adapt to the shape changes of the target in different rotation angles and shooting perspectives, and more accurately capture the edges and details of these small targets, avoiding omissions or missegmentation; on the other hand, the deformable convolutional coding module can capture global context information through the self-attention mechanism, so that the model can not only pay attention to local features, but also understand the overall structure and contextual relationship of the target, further enhancing the feature representation capability; furthermore, by designing sparse attention selection, the number of sampling points of deformable convolution can be reduced; at the same time, the combination of sparse deformable convolution with learnable gating units can strengthen the features of key channels and spatial positions, reduce the computation of invalid features, and improve the accuracy of target segmentation model segmentation. Attached Figure Description
[0018] To more clearly illustrate the technical solutions in the embodiments of this application or related technologies, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0019] Figure 1 This is a flowchart illustrating a boundary learning optimization target segmentation method provided in an embodiment of this application.
[0020] Figure 2 for Figure 1 A detailed flowchart illustrating a boundary learning-optimized target segmentation method. Detailed Implementation
[0021] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.
[0022] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.
[0023] In one exemplary embodiment, such as Figure 1 and Figure 2 As shown, a boundary learning-optimized target segmentation method is provided. This method is executed by a computer device, specifically by a terminal or server alone, or by both a terminal and a server. In this embodiment, the method is described using a server as an example, and includes the following steps S1 to S2.
[0024] Step S1: Construct and train the target segmentation model; the loss function used for training the target segmentation model is constructed based on the pixel-level loss function, the Fourier descriptor loss function, and the adaptive weighting coefficients; the target segmentation model includes: a multi-scale feature extraction module, a deformable convolutional coding module, a multi-scale feature fusion module, and a mask generation module connected in sequence.
[0025] Furthermore, the deformable convolutional coding module includes: a channel-space separable offset prediction unit, a sparse attention selection unit, a deformable convolutional unit, a learnable gating unit, and a bidirectional heterogeneous feature interaction unit.
[0026] Furthermore, the learnable gating units include: channel attention branch and spatial attention branch.
[0027] Specifically, the mask generation module consists of three deconvolutional layers and a sigmoid layer connected in sequence.
[0028] Furthermore, the training process of the target segmentation model specifically includes: constructing sample data pairs; the sample data pairs include: sample airport airspace images and sample ground truth masks; inputting the sample airport airspace images into the target segmentation model to obtain sample prediction masks; based on the sample prediction masks and the corresponding sample ground truth masks, using a loss function to iteratively optimize the parameters of the target segmentation model until the loss function reaches its minimum value or the number of iterations reaches its maximum value, at which point the iterative optimization stops, and the trained target segmentation model is obtained.
[0029] Furthermore, the expression for the loss function is as follows.
[0030] .
[0031] .
[0032] .
[0033] .
[0034] in, The loss function; These are adaptive weighting coefficients; It is a pixel-level loss function; The Fourier descriptor loss function; For the sample prediction mask, the first Each pixel value; For the sample true mask, the first Each pixel value; The total number of pixels; The total number of Fourier descriptors; The first of the sample's true mask A Fourier descriptor; The 0th Fourier descriptor of the sample's true mask; The first sample prediction mask A Fourier descriptor; The 0th Fourier descriptor of the sample prediction mask; For taking the mold; This represents the current training iteration number; This represents the total number of training iterations.
[0035] Specifically, before training begins, images of the airport airspace (or images of other scenes containing targets) are captured using cameras in front of the air traffic control tower. These images are then uniformly cropped and resized to 512×512×3 pixels. Aircraft target locations are then labeled using masks to construct sample data pairs: <sample airport airspace image, sample ground truth mask>. Pixels belonging to aircraft targets in the airport airspace image are labeled as 1 in the ground truth mask, while pixels not belonging to aircraft targets are labeled as 0. All data pairs are then divided into training and test sets in a 7:3 ratio.
[0036] During training, repeat the following steps 500 times: Take from the training set Each data pair is used to input its image into the target segmentation model to obtain... Each prediction result is a sample prediction mask. Then, the total loss function corresponding to each data pair is obtained. Based on Total loss function The average value is backpropagated to optimize the network parameters in the target segmentation model. In this embodiment, .
[0037] (1) The pixel-level loss function is calculated as follows.
[0038] .
[0039] (2) The Fourier descriptor loss function is calculated as follows.
[0040] First, construct the edge point coordinate sequence of the sample true mask and the sample predicted mask.
[0041] An edge point is defined as follows: if a pixel in the mask has a value of 1 and the values of its eight adjacent pixels are not all 1, then that pixel is an edge point.
[0042] For any mask, starting from the edge point with the smallest X-coordinate value, edge points are taken in a clockwise direction to obtain the edge point sequence corresponding to that mask. The edge point sequence of the sample's true mask is represented as follows: ,in It is the first of the sample's true mask. The X and Y coordinates of each edge point; the edge point sequence of the sample prediction mask is represented as follows: ,in It is the first sample prediction mask. The X and Y coordinates of the edge points.
[0043] Then, the Fourier descriptors of the real mask and the predicted mask are obtained as follows.
[0044] .
[0045] .
[0046] in, , These are the 1st, 2nd, and 3rd digits of the true mask of the sample. The _th Fourier descriptor and the sample prediction mask A Fourier description, ; It is the total number of Fourier descriptors. It is the number of edge points in the edge point sequence of the sample's true mask. It is the number of edge points in the edge point sequence of the sample prediction mask.
[0047] The low-frequency part of the Fourier descriptor primarily describes the overall structure of the shape, while the high-frequency part describes the details. To reduce computation and focus on the main features of the shape, let... .
[0048] Finally, the Fourier descriptor loss function is calculated. .
[0049] .
[0050] The above formula normalizes the Fourier descriptor by dividing it by the first Fourier descriptor used to represent the centroid location and total length of the contour, making the Fourier descriptor insensitive to scale changes.
[0051] By designing a Fourier descriptor-based loss function and combining it with the MSE loss function, shape information can be effectively captured. Fourier descriptors are a set of coefficients obtained by performing a Fourier transform on the complex representation of a contour. They describe the main features of the shape and are invariant to translation, rotation, and scaling. By incorporating Fourier descriptor loss into the loss function, the predicted mask generated by the model can not only closely approximate the true value at the pixel level but also be more similar in shape features.
[0052] (3) The weighting coefficients are determined as follows.
[0053] Adaptive weighting coefficients This is used to balance the importance of the two losses. Adaptive weighting coefficients are set to better regulate the training process. The value is set as follows.
[0054] .
[0055] After training, the model is tested using a test set to evaluate its segmentation performance.
[0056] Step S2: Transfer the airport airspace image (i.e., Figure 2 The image to be segmented is input into the trained target segmentation model to obtain the predicted mask (i.e., the image to be segmented). Figure 2 The prediction mask is the pixel location of the aircraft in the airport airspace image.
[0057] The process of inputting the airport airspace image into the trained target segmentation model to obtain the prediction mask includes steps S21 to S24.
[0058] Step S21: Input the airport airspace image into the multi-scale feature extraction module to obtain features at different scales.
[0059] Specifically, in this embodiment, the multi-scale feature extraction module extracted a total of , , The three features have shapes of 128×128×64, 64×64×128, and 32×32×256, respectively.
[0060] Step S22: Input features of different scales into the deformable convolutional coding module to obtain multiple enhanced features.
[0061] Specifically, a common deformable convolutional coding module is the Deformable DETR (DEtection Transformer, an end-to-end object detection network based on Transformer). By introducing a deformable attention module and a multi-scale feature fusion mechanism, it can effectively improve feature learning efficiency and accuracy. However, this module usually requires a large number of sampling points, resulting in significant computational redundancy. Therefore, we design a Deformable DETR that combines a dynamic sparse network to achieve higher computational efficiency and better learning results with a smaller number of sampling points.
[0062] The input to the deformable convolutional coding module is one of the features output by the multi-scale feature extraction module. , The output is the corresponding augmented feature, where each feature is assigned a unique identifier. .feature Channel number and enhancement features The number of channels are respectively and .
[0063] The deformable convolutional coding module includes a channel-spatial separable offset prediction unit, a sparse attention selection unit, a deformable convolutional unit, a learnable gating unit, and a bidirectional heterogeneous feature interaction unit. The channel-spatial separable offset prediction unit is used for feature-based input... Perform channel-space separation migration prediction to obtain spatial migration. and channel modulation weights Sparse attention selection unit for channel modulation weights By selecting the weight elements in the data, we obtain the sparsified attention weights. Deformable convolutional units are based on spatial offsets. Attention weights after sparsification For the features of the input Perform deformable convolution to obtain feature maps. The learnable gating unit includes channel attention branches and spatial attention branches, both based on feature maps. The feature maps after channel attention weighting were obtained respectively. Feature maps with spatial attention weighting The bidirectional heterogeneous feature interaction unit interacts with the channel attention-weighted feature map. Feature maps with spatial attention weighting Fusion, resulting in enhanced features .
[0064] Furthermore, step S22 specifically includes steps S221 to S225.
[0065] Step S221: Input features of different scales into the channel-spatial separation migration prediction unit to obtain the spatial offset and channel modulation weights corresponding to features of different scales.
[0066] Specifically, based on input features Perform channel-space separation migration prediction to obtain spatial migration. and channel modulation weights : ,in This represents a channel-space separation migration prediction method. Spatial offset. Preset parameters In this embodiment, the number of sampling points is related to the deformable convolution. , , corresponding The numbers are 64, 128, and 256 respectively. , Based on features Number of channels and enhanced features Number of channels The set number of weights must match the feature channel transformation requirements. In this embodiment, to ensure that the channel modulation weights can be accurately applied to each original feature channel, the following settings are used: .
[0067] Step S222: Input the channel modulation weights into the sparse attention selection unit for weight selection to obtain the sparsified attention weights.
[0068] Furthermore, step S222 specifically includes steps S2221 to S2225.
[0069] Step S2221: Calculate the channel modulation weight score based on the channel modulation weight.
[0070] Furthermore, the formula for calculating the channel modulation weight score is as follows.
[0071] .
[0072] in, The channel modulation weight score; Channel modulation weights; For noise; This refers to the temperature parameter.
[0073] Step S2222: Select the channel modulation weight score and determine the index.
[0074] Furthermore, the expression for the index is as follows.
[0075] .
[0076] in, For indexing; For selection operation; The channel modulation weight score; The number of important weights to select.
[0077] Step S2223: Construct a sparse selection matrix based on the index.
[0078] Step S2224: Based on the sparse selection matrix and channel modulation weights, obtain the sparsified attention weights.
[0079] Furthermore, the expression for the attention weights after sparsification is as follows.
[0080] .
[0081] in, These are the attention weights after sparsification; Choose a sparse matrix; Dot product; This is the channel modulation weight.
[0082] Specifically, first generate Gumbel noise. Then calculate the channel modulation weight score. Then, based on the channel modulation weight score Obtain the index through Top-k operations. Then construct a sparse selection matrix. sparse choice matrix Corresponding index The element with a value of 1 is the first element, and the rest are 0. Finally, the sparsified attention weights are obtained. .
[0083] Step S223: Input the scale features, spatial offset, and sparsified attention weights into the deformable convolutional unit for convolution to obtain the feature map.
[0084] Furthermore, the expression for the feature map is as follows.
[0085] .
[0086] in, For feature maps; This refers to the convolution operation of deformable convolution units. It is a deformable convolution kernel. The side length of the sampling window (e.g.) Convolution kernel window corresponding ), This represents the total number of sampling points; For the first Individual scale features; It is a deformable convolution kernel; These are the attention weights after sparsification; This is the spatial offset; for The real number field, The height of the feature map; The width of the feature map; This represents the number of output channels.
[0087] Specifically, the attention weights after sparsification Used to assign dynamic weighting coefficients to each sampling point, enhancing the feature contribution of key sampling locations; spatial offset It is used to determine the displacement value of each sampling point coordinate during convolution, and learns to make the sampling points deviate from the regular grid to adapt to the target shape.
[0088] Step S224: Input the feature map into the learnable gating unit to obtain the feature map after channel attention weighting and the feature map after spatial attention weighting.
[0089] Specifically, the processing procedure for the channel attention branch is as follows: First, the feature map... Global average pooling is used to obtain the channel description vector. Then, the channel attention weights are obtained by sequentially passing through the first fully connected layer and the second fully connected layer. The weights of the first fully connected layer are... , To reduce dimensionality, the first fully connected layer applies the ReLU activation function. The weights of the second fully connected layer are... The second fully connected layer applies the Sigmoid activation function. Channel attention weights Finally, the channel attention weights are... With feature map Channel-by-channel multiplication yields the channel attention-weighted feature map. .
[0090] The spatial attention branch processing procedure is as follows: First, the feature map is processed... Perform max pooling and average pooling respectively to obtain and Then, the two are concatenated along the channel dimension to obtain . After passing through the convolution kernel, Convolutional layers and Sigmoid activation function To obtain spatial attention weights Finally, spatial attention weights are... With feature map The spatial attention-weighted feature map is obtained by multiplying each spatial location. .
[0091] Step S225: Input the feature map after channel attention weighting and the feature map after spatial attention weighting into the bidirectional heterogeneous feature interaction unit to obtain the enhanced features corresponding to features at different scales.
[0092] Specifically, in the bidirectional heterogeneous feature interaction unit, the feature map after channel attention weighting... Feature maps with spatial attention weighting The fusion method is as follows: First, the feature maps after channel attention weighting are... Feature maps with spatial attention weighting The feature maps are concatenated along the channel dimension, and then a convolutional layer is applied to the concatenated result to learn the interaction pattern between the two feature maps, thus obtaining enhanced features. . and These are two-dimensional convolution operations. The size of the convolution kernel and the number of output channels.
[0093] Step S23: Input multiple enhanced multi-scale features into the multi-scale feature fusion module to obtain fused features.
[0094] Specifically, the multi-scale feature fusion module is used to integrate multiple enhanced features obtained from the deformable convolutional coding module. By performing a top-down, step-by-step fusion process, fusion characteristics can be obtained. .
[0095] The specific fusion method is as follows: first, fusion is performed from top to bottom, with each enhanced feature... Each corresponds to an intermediate fusion feature For the lowest resolution enhancement features ( ),have For other resolutions ( ), intermediate fusion features ,in This indicates the fusion features at a lower resolution. Upsampling and then augmentation features The splicing result, This indicates that a convolution operation is performed along the channel direction on the spliced result, and the number of output channels is... .
[0096] In this embodiment, , , .
[0097] Finally, the intermediate fused features are aggregated in ascending order of resolution through top-down upsampling, concatenation, and convolution to obtain the final fused features. In this embodiment as follows.
[0098] .
[0099] Step S24: Input the fused features into the mask generation module to obtain the predicted mask.
[0100] The beneficial effects of the boundary learning-optimized target segmentation method proposed in this application are mainly reflected in:
[0101] 1. This application designs a loss function based on Fourier descriptors during training. Fourier descriptors obtain a set of coefficients by performing a Fourier transform on the complex representation of the contour. These coefficients describe the main features of the shape and are invariant to translation, rotation, and scaling. Therefore, even if the target moves, changes angle, or scales in size within the image, the Fourier descriptors remain consistent, making the model more robust when handling targets with different poses. Secondly, Fourier descriptors effectively capture the topological structure of the shape, not just pixel-level differences. By incorporating the Fourier descriptor loss into the loss function, the model outputs a predictive mask that is not only closer to the true value at the pixel level but also more similar in shape features, thereby improving prediction performance on small targets.
[0102] 2. This application further improves the adaptability to scale changes by normalizing the loss function based on Fourier descriptors.
[0103] 3. The low-frequency part of the Fourier descriptor mainly describes the overall structure of the shape, while the high-frequency part describes the details. This application encourages the model to focus on the main features of the shape by retaining the first K Fourier descriptors, while ignoring some unnecessary detail noise.
[0104] 4. To better regulate the training process, this application sets adaptive weight parameters to balance the Fourier descriptor loss and the traditional MSE loss. By dynamically adjusting the weight values, the model can flexibly weigh the importance of the two losses during training. Ultimately, the designed loss function can effectively improve the model's performance on shape features, especially when handling small object segmentation tasks, better capturing the shape and topological structure of the target. This not only enhances the model's robustness and generalization ability but also improves training efficiency and the quality of segmentation results.
[0105] 5. The target segmentation model in this application obtains feature maps at multiple different scales through multi-scale feature extraction, which can simultaneously capture low-level local details and high-level global semantic information. Ultimately, it fully learns target information at different scales, thereby better handling target segmentation tasks in complex backgrounds.
[0106] 6. This application designs a deformable convolutional coding module that combines a dynamic sparse network: On the one hand, it enables the convolutional kernel to dynamically adjust the sampling position according to the input features, thereby better adapting to the shape changes of the target in different rotation angles and shooting perspectives, more accurately capturing the edges and details of these small targets, and avoiding omissions or missegmentation; on the other hand, the deformable convolutional coding module can capture global contextual information through a self-attention mechanism, thereby enabling the model to not only focus on local features, but also understand the overall structure and contextual relationships of the target, further enhancing the feature representation capability; furthermore, by designing sparse attention selection, the number of sampling points of the deformable convolution can be reduced; at the same time, the combination of sparse deformable convolution with learnable gating units can strengthen the features of key channels and spatial locations, improve the accuracy of model segmentation, and reduce the computation of invalid features.
[0107] 7. This application achieves multi-scale feature fusion through FPN (Feature Pyramid Network), which transmits high-level semantic information to low-level feature maps while retaining more local detail information.
[0108] 8. The end-to-end trainable architecture used in this application can effectively capture small targets of different scales, while enhancing robustness and generalization ability, ultimately adapting to small target segmentation tasks in complex backgrounds and generating high-quality segmentation masks.
[0109] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, data stored, data displayed, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of the relevant data must comply with relevant regulations.
[0110] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium. When executed, the computer program can include the processes of the embodiments described above. Any references to memory, databases, or other media used in the embodiments provided in this application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).
[0111] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.
[0112] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0113] This document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.
Claims
1. A target segmentation method optimized by boundary learning, characterized in that, The boundary learning-optimized target segmentation method includes: A target segmentation model is constructed and trained; the loss function used for training the target segmentation model is constructed based on a pixel-level loss function, a Fourier descriptor loss function, and adaptive weighting coefficients; the target segmentation model includes: a multi-scale feature extraction module, a deformable convolutional coding module, a multi-scale feature fusion module, and a mask generation module connected in sequence; The airport airspace image is input into a trained target segmentation model to obtain a prediction mask, thereby completing the segmentation of targets in the airport airspace; the prediction mask is the pixel position of the aircraft in the airport airspace image. Specifically, the airport airspace image is input into a trained target segmentation model to obtain a predicted mask, which includes: The airport airspace image is input into the multi-scale feature extraction module to obtain features at different scales; Features of different scales are input into the deformable convolutional coding module to obtain multiple enhanced features; Multiple enhanced multi-scale features are input into the multi-scale feature fusion module to obtain fused features; The fused features are input into the mask generation module to obtain the predicted mask; The deformable convolutional coding module includes: a channel-space separable offset prediction unit, a sparse attention selection unit, a deformable convolutional unit, a learnable gating unit, and a bidirectional heterogeneous feature interaction unit; Features at different scales are input into the deformable convolutional coding module to obtain multiple enhanced features, specifically including: Features of different scales are input into the channel-space separation offset prediction unit to obtain the spatial offset and channel modulation weights corresponding to the features of different scales. The channel modulation weights are input to the sparse attention selection unit for weight selection to obtain the sparsified attention weights. The scale features, the spatial offset, and the sparsified attention weights are input into the deformable convolutional unit for convolution to obtain a feature map. The feature map is input into the learnable gating unit to obtain a channel attention-weighted feature map and a spatial attention-weighted feature map. The feature maps after channel attention weighting and spatial attention weighting are input into the bidirectional heterogeneous feature interaction unit to obtain enhanced features corresponding to features at different scales.
2. The target segmentation method optimized by boundary learning according to claim 1, characterized in that, Based on the channel modulation weights, the channel modulation weights are input to the sparse attention selection unit for weight selection to obtain the sparsified attention weights, specifically including: Based on the channel modulation weights, calculate the channel modulation weight score; The channel modulation weight scores are selected to determine the index; Construct a sparse selection matrix based on the index; Based on the sparse selection matrix and the channel modulation weights, the sparsified attention weights are obtained.
3. The target segmentation method optimized by boundary learning according to claim 2, characterized in that, The formula for calculating the channel modulation weight score is as follows: ; in, The channel modulation weight score; Channel modulation weights; For noise; This refers to the temperature parameter.
4. The target segmentation method optimized by boundary learning according to claim 2, characterized in that, The expression for the index is: ; in, For indexing; For selection operation; The channel modulation weight score; The number of important weights to select.
5. The target segmentation method optimized by boundary learning according to claim 2, characterized in that, The expression for the sparsified attention weights is: ; in, These are the attention weights after sparsification; Choose a sparse matrix; Dot product; This is the channel modulation weight.
6. The target segmentation method optimized by boundary learning according to claim 1, characterized in that, The expression for the feature map is: ; in, For feature maps; For convolution operations of deformable convolution units; For the first Individual scale features; It is a deformable convolution kernel; These are the attention weights after sparsification; This is the spatial offset; for The real number field, The height of the feature map; The width of the feature map; This represents the number of output channels.
7. The target segmentation method optimized by boundary learning according to claim 1, characterized in that, The learnable gating unit includes: channel attention branch and spatial attention branch.
8. The target segmentation method optimized by boundary learning according to claim 1, characterized in that, The training process of the target segmentation model specifically includes: Construct sample data pairs; the sample data pairs include: sample airport airspace images and sample ground masks; The sample airport airspace image is input into the target segmentation model to obtain the sample prediction mask; Based on the sample prediction mask and the corresponding sample real mask, the parameters of the target segmentation model are iteratively optimized using the loss function until the loss function reaches its minimum value or the number of iterations reaches its maximum value, at which point the iterative optimization stops, and the trained target segmentation model is obtained.
9. The target segmentation method optimized by boundary learning according to claim 8, characterized in that, The expression for the loss function is: ; ; ; ; in, The loss function; These are adaptive weighting coefficients; It is a pixel-level loss function; The Fourier descriptor loss function; For the sample prediction mask, the first Each pixel value; For the sample true mask, the first Each pixel value; The total number of pixels; The total number of Fourier descriptors; The first of the sample's true mask A Fourier descriptor; The 0th Fourier descriptor of the sample's true mask; The first sample prediction mask A Fourier descriptor; The 0th Fourier descriptor of the sample prediction mask; For taking the mold; This represents the current training iteration number; This represents the total number of training iterations.
Citation Information
Patent Citations
Image segmentation method based on boundary enhancement
CN116205927A
Multi-scale perceptual decoupling ultrasonic image segmentation method
CN119206221A