Remote sensing image segmentation method based on residual feature extraction and contrast driven aggregation

By using residual feature extraction and contrast-driven aggregation, the problems of blurred target boundaries and missed detection of small targets in remote sensing image segmentation are solved, achieving high-precision and robust image segmentation results.

CN120953613APending Publication Date: 2025-11-14耕宇牧星(北京)空间科技有限公司
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202511082261.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-08-04
Publication Date
2025-11-14

AI Technical Summary

Technical Problem

Existing remote sensing image segmentation methods struggle to simultaneously consider both shallow spatial details and deep semantic information. They lack the ability to model global contextual information, leading to blurred target boundaries and missed detection of small targets. Furthermore, they lack explicit modeling of the contrast features between the target and the background, affecting segmentation accuracy and generalization performance.

Method used

A remote sensing image segmentation model is constructed by employing residual feature extraction, local contrast-driven aggregation, and complementary loss constraints. Through multi-scale feature fusion and contrast feature enhancement, the accuracy and boundary clarity of remote sensing image segmentation are improved.

Benefits of technology

It effectively integrates multi-scale semantic information, enhances the contrast feature representation of targets and backgrounds, and improves the accuracy and robustness of remote sensing image segmentation, especially in image segmentation in complex scenes.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120953613A_ABST
    Figure CN120953613A_ABST
Patent Text Reader

Abstract

The invention discloses a remote sensing image segmentation method based on residual feature extraction and contrast driven aggregation, and belongs to the technical field of remote sensing image processing. The method comprises the following steps: constructing a remote sensing image segmentation model comprising a residual block, an expansion convolution layer, a contrast driven feature aggregation module, a decoupling unit and a segmentation decoder module; performing remote sensing image segmentation training on the built remote sensing image segmentation model; and inputting the acquired remote sensing image into the trained remote sensing image segmentation model for image processing to obtain a remote sensing image segmentation result. According to the method, through the three-in-one design of residual feature extraction, local contrast driven aggregation and complementarity loss constraint, the actual problems of large scale change, complex ground feature boundary, high target and background similarity and the like in the remote sensing image are fully considered, and the defects of a traditional method in the aspects of feature fusion, context modeling and boundary definition can be effectively overcome; and a new technical means is provided for high-precision automatic segmentation of the remote sensing image.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of remote sensing image processing technology, and in particular to a remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation. Background Technology

[0002] Remote sensing image segmentation is a key task in intelligent interpretation of remote sensing images, widely used in land use classification, urban planning, resource monitoring, disaster assessment, and other fields. In recent years, with the development of remote sensing imaging technology, high-resolution remote sensing images have become increasingly rich in information across spatial, spectral, and temporal dimensions, providing greater potential for ground feature identification and refined analysis. However, due to the complexity of remote sensing image scenes, the diversity of ground feature categories, significant differences in spatial scale, and blurred target boundaries, traditional image segmentation methods face numerous challenges.

[0003] Currently, mainstream remote sensing image segmentation methods are mainly based on convolutional neural network (CNN) frameworks. Typical networks such as U-Net and DeepLab, while achieving pixel-level semantic segmentation to some extent, still have the following limitations: First, they struggle to simultaneously capture shallow spatial details and deep semantic information, leading to blurred target boundaries and missed detections of small targets; second, convolutional operations are inherently localized and lack the ability to model global contextual information, resulting in poor performance when handling large-scale targets or complex scenes. To alleviate these problems, some studies have attempted to introduce Transformer structures to enhance the model's ability to model long-distance dependencies; however, their high computational complexity makes efficient application in large remote sensing images difficult. Furthermore, existing methods often lack explicit modeling of the contrast features between targets and background, resulting in insufficient ability to distinguish similar regions between categories, affecting segmentation accuracy and generalization performance.

[0004] To address the aforementioned problems, there is an urgent need for a remote sensing image segmentation method that can effectively integrate multi-scale semantic information, enhance the contrast feature representation of targets and backgrounds, and possess strong boundary preservation capabilities. Therefore, this invention proposes a remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation, aiming to improve the segmentation accuracy and boundary clarity in complex scenes of remote sensing images through refined feature extraction and aggregation strategies. Summary of the Invention

[0005] In view of this, the present invention provides a remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation. The present invention fully considers the practical problems of large scale variation, complex ground object boundaries, and high similarity between targets and background in remote sensing images. It adopts a three-in-one design of residual feature extraction, local contrast-driven aggregation and complementary loss constraint to construct a remote sensing image segmentation model, which can effectively overcome the shortcomings of traditional methods in feature fusion, context modeling and boundary clarity, and provides a new technical means for high-precision automatic segmentation of remote sensing images.

[0006] To achieve the above objectives, the technical solution adopted by the present invention is as follows:

[0007] This invention provides a remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation, the method comprising the following steps:

[0008] S1. Construct a remote sensing image segmentation model that includes an image preprocessing module, residual blocks, dilated convolutional layers, a contrast-driven feature aggregation module, a decoupling unit, and a segmentation decoder module.

[0009] S2. Perform remote sensing image segmentation training on the constructed remote sensing image segmentation model;

[0010] S3. Input the acquired remote sensing images into the trained remote sensing image segmentation model for image processing to obtain the remote sensing image segmentation results.

[0011] In a preferred embodiment, the remote sensing image segmentation model has multiple residual blocks. The acquired remote sensing images are sequentially input into each residual block, and multi-scale feature information is extracted layer by layer to generate multi-layer features.

[0012] In a preferred embodiment, there are four residual blocks, and the structure and function of each residual block are as follows:

[0013] Residual Block 1: Consists of 3 residual units, used to extract shallow features. This layer maintains high spatial resolution and preserves low-level detail information;

[0014] Residual Block 2: Consists of 4 residual units, used for output features. This layer of features possesses preliminary semantic understanding capabilities while retaining moderate details;

[0015] Residual block 3: consists of 6 residual units used for output features. This layer of features possesses semantic discrimination capabilities for complex regions;

[0016] Residual Block 4: Consists of 3 residual units, used to extract deep semantic features. This layer of features possesses high-order semantic information;

[0017] Each residual unit consists of two convolutional layers and one skip connection.

[0018] In a preferred embodiment, the extracted multi-layer features to The inputs are respectively fed into a dilated convolutional layer with different dilation rates to expand the receptive field without reducing the resolution, thereby enhancing the context awareness of the target region in the remote sensing image. Subsequently, the features processed by the dilated convolutional layer are compared and driven by the feature aggregation module to perform target-background contrast enhancement and spatial semantic consistency reconstruction.

[0019] In a preferred embodiment, deep semantic features are also included. The input is fed into the decoupling unit for feature processing. The feature processing process includes:

[0020] Deep semantic features A convolutional layer is input to extract local contextual features with high semantic information; then, these features are enhanced sequentially through a normalization layer and a non-linear activation function; finally, these features are passed through a convolutional layer to compress the number of channels and construct attention candidate regions, ultimately yielding the feature matrix. This matrix serves as one of the inputs to the contrast-driven feature aggregation module, guiding feature matching and weighting within a local window.

[0021] In a preferred embodiment, after feature processing by the comparison-driven feature aggregation module, features corresponding to the original features are obtained respectively. to Aggregation enhancement features in, As the deepest feature, it is input into a convolutional layer, then processed by normalization and non-linear activation functions to extract more refined semantic features. These semantic features are then passed through another convolutional layer to compress the channel dimension, and after normalization and activation processing, the final global weight matrix is ​​obtained. Used to guide the final feature fusion process.

[0022] In a preferred embodiment, the four aggregated enhanced features to Alignment is performed in the spatial dimension, and element-wise addition and fusion are performed to obtain a unified fusion feature. This fused feature is used as input to the remote sensing image segmentation decoder module to perform fine segmentation.

[0023] In a preferred embodiment, the contrast-driven feature aggregation module guides the feature aggregation process by constructing a contrast weighting matrix based on a local window. The specific process includes:

[0024] (1) Generate the comparison weighted matrix:

[0025] Let the input features be w and f, representing the target region features and background region features initially extracted from the remote sensing image, respectively; where feature w is fed into a linear mapping layer to initially reconstruct its channel dimensions, and the output feature shape is K.2 ×K 2 , where K is the set local window size hyperparameter;

[0026] Subsequently, local spatial feature information is extracted from the output features, and the output tensor is reconstructed into a four-dimensional local window feature map with dimensions K×K×K×K.

[0027] Next, the local feature map is reconstructed into K using a tensor reshaping operation. 2 ×K 2 The matrix form is then normalized using the Softmax activation function to obtain the contrast-weighted matrix. It serves as the basis for attention weights in feature aggregation;

[0028] (2) Extracting background feature maps:

[0029] Feature f is passed sequentially through a convolutional layer, a normalization layer, and a ReLU activation function layer to generate background feature f';

[0030] (3) Value vector construction and window expansion:

[0031] The feature f' is input into the linear layer to obtain the value vector V; then, a local window expansion operation is performed on the value vector V to extract a subset of the value vector within the K×K receptive field centered at each pixel position (i,j) in the image, denoted as:

[0032] V △i,j =Unfold(V,i,j,K)

[0033] Among them, V Δi,j It is a vector of values ​​within a K×K window centered at position (i,j);

[0034] (4) Weighted feature aggregation:

[0035] Using contrast weighted matrix For value vector V Δi,j We perform weighted fusion to calculate the fused feature representation:

[0036]

[0037] in, f represents matrix multiplication. Δ To compare the final output features of the driving feature aggregation module.

[0038] In a preferred embodiment, when training the constructed remote sensing image segmentation model, a total loss function is used for training optimization. The total loss function includes a main loss function and a complementary contrast loss function, and its expression is as follows:

[0039]

[0040]

[0041]

[0042] In the formula, Indicates the total loss; This represents the main loss; λ is the weighting adjustment coefficient. This represents the complementary contrast loss; H and W represent the image height and width, respectively, and C is the number of classes. To predict the probability, Y i,j,c This is the one-hot encoding of the true label at the corresponding position; σ represents the Sigmoid function normalization operation, ⊙ represents element-wise multiplication, and ||·||1 is the L1 norm; Represents the characteristic matrix; This represents the global weight matrix.

[0043] Compared with existing technologies, the remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation provided by this invention has at least the following beneficial effects:

[0044] 1) This invention builds a remote sensing image segmentation model based on residual blocks, dilated convolutional layers, contrast-driven feature aggregation modules, decoupling units, and segmentation decoder modules. It can integrate multi-scale spatial semantic features and regional contrast information, effectively enhancing the expressive ability of target boundaries and small target regions in remote sensing images, thereby achieving high-precision and robust image segmentation tasks in complex remote sensing scenarios.

[0045] 2) This invention constructs a deep residual feature extraction network and combines it with dilated convolution to expand the receptive field, thereby obtaining multi-scale features from shallow details to deep semantics. Then, through the contrast-driven feature aggregation module, the features are fused layer by layer, which can improve the ability to distinguish between fine-grained targets and complex backgrounds. Compared with traditional CNN or Transformer structures, it is more adaptable to the diverse distribution of ground features in remote sensing images.

[0046] 3) This invention designs a contrast-driven feature aggregation module, which guides the feature aggregation process by constructing a contrast weighting matrix based on a local window, thereby enhancing the discriminativeness of the target region in the feature representation space, realizing the enhancement of the difference between the target and the background region and feature reconstruction, and effectively improving the boundary clarity and segmentation accuracy.

[0047] 4) This invention introduces a complementary contrastive loss function to constrain the distribution consistency and differences of the semantic attention matrix, thereby further improving the model's generalization ability and robustness in complex remote sensing scenarios.

[0048] Other features and advantages of the invention will be set forth in the following description, and will be apparent in part from the description, or may be learned by practicing the invention. The objects and other advantages of the invention may be realized and obtained by means of the structures particularly pointed out in the written description and the accompanying drawings.

[0049] The preferred technical solution of the present invention will be described in detail below with reference to the accompanying drawings and embodiments. Attached Figure Description

[0050] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0051] The accompanying drawings are provided to further illustrate the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof.

[0052] Figure 1 This is a schematic diagram of the remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation provided in an embodiment of the present invention.

[0053] Figure 2 This is a schematic diagram of the overall structure of the remote sensing image segmentation model provided in an embodiment of the present invention.

[0054] Figure 3 This is a schematic diagram of the structure of the comparison-driven feature aggregation module provided in an embodiment of the present invention.

[0055] Figure 4 A schematic diagram of an electronic device provided in an embodiment of the present invention. Detailed Implementation

[0056] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are some embodiments of the present invention, but not all embodiments.

[0057] In the description of this invention, it should be noted that some processes described in this application specification and drawings include multiple operations that appear in a specific order. However, it should be clearly understood that these operations may be performed in any order or in parallel. Furthermore, various numbers are used for descriptive purposes only and should not be construed as indicating or implying relative importance.

[0058] Therefore, the following detailed description of the embodiments of the invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely to illustrate selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the invention without inventive effort are within the scope of protection of the invention.

[0059] See Figure 1 As shown, this invention provides a remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation, aiming to fuse multi-scale spatial semantic features with regional contrast information to achieve high-precision and robust image segmentation in complex remote sensing scenarios. The method mainly includes the following steps:

[0060] S1. Construct a remote sensing image segmentation model that includes residual blocks, dilated convolutional layers, contrast-driven feature aggregation modules, decoupling units, and segmentation decoders;

[0061] S2. Train the constructed remote sensing image segmentation model for remote sensing image segmentation;

[0062] S3. Input the acquired remote sensing images into the trained remote sensing image segmentation model for image processing to obtain the remote sensing image segmentation results.

[0063] The following is combined Figures 2-3 As shown, the specific implementation methods and working principles of the present invention will be described in detail below:

[0064] I. Constructing a remote sensing image segmentation model:

[0065] like Figure 2 As shown, to achieve high-precision remote sensing image segmentation, this invention first designs and constructs a multi-level, multi-scale feature extraction network to extract rich semantic and spatial information from the original remote sensing images, providing basic feature support for subsequent feature aggregation and fine segmentation. Specific implementation methods include:

[0066] 1.1: Input Image Preprocessing and Multi-Layer Feature Extraction:

[0067] In this embodiment, the original acquired remote sensing image data is first subjected to standardization preprocessing, including image size normalization, illumination compensation, and denoising operations, to obtain the network input image I. Image I is then sequentially input into a feature extraction backbone network composed of multiple deep residual blocks, where multi-scale feature information is extracted layer by layer to generate feature layers. The extraction process for each layer is as follows:

[0068] Residual Block 1: Composed of 3 residual units, used to extract shallow features. This layer maintains high spatial resolution and preserves a large amount of low-level detail information such as edges and textures, which helps to enhance the representation of target boundaries;

[0069] Residual Block 2: Consists of 4 residual units, outputting features This layer of features possesses preliminary semantic understanding capabilities while retaining moderate details;

[0070] Residual Block 3: Composed of 6 residual units, output features This layer has strong semantic discrimination capabilities for complex areas (such as urban buildings, farmland boundaries, etc.);

[0071] Residual Block 4: Composed of 3 residual units, used to extract deep semantic features. It primarily captures high-level semantic information, which helps in identifying large-scale target areas (such as water bodies, woodlands, etc.), but retains less detail.

[0072] Each residual unit consists of two 3×3 convolutional layers and one skip connection, which ensures the trainability of deep networks and enhances the consistency of feature representation between layers.

[0073] 1.2: Feature layer dilation, receptive field expansion, and contrast aggregation preparation:

[0074] Extracted multi-layer features to Each dilated convolutional layer with a different dilation rate is input to expand the receptive field without reducing resolution, thereby enhancing the context awareness of the target region in the remote sensing image. These features are then fed as input into the subsequent "contrast-driven feature aggregation module" (see Part II below) for processing to achieve target-background contrast enhancement and spatial semantic consistency reconstruction.

[0075] 1.3: Generation of Auxiliary Weight Matrix

[0076] To further enhance the model's ability to identify complex region boundaries and inter-class details in remote sensing images, this invention utilizes the deepest features... A 3×3 convolutional layer is input to extract local contextual features with high semantic information. Then, these features are enhanced sequentially through normalization layers and non-linear activation functions (such as ReLU). Finally, these features are passed through a 1×1 convolutional layer to compress the number of channels and construct attention candidate regions, ultimately yielding the feature matrix. This matrix serves as one of the inputs to the contrast-driven feature aggregation module, guiding feature matching and weighting within a local window.

[0077] 1.4: Feature Refinement and Weight Matrix Output:

[0078] After comparing the driving feature aggregation module, the corresponding original features are obtained respectively. to Aggregation enhancement features in, As the deepest feature layer, it is further input into a convolutional layer, then processed by normalization and non-linear activation functions to extract more refined semantic features. This refined feature is then passed through a 1×1 convolutional layer to compress the channel dimension, and after normalization and activation processing, the final global weight matrix is ​​obtained. Used to guide the final feature fusion process.

[0079] 1.5: Multi-scale feature fusion:

[0080] Finally, the four enhanced features to Alignment is performed in the spatial dimension (through upsampling if necessary), and element-wise addition and fusion are performed to obtain a unified fused feature map. This fusion feature contains multi-scale semantic and spatial information from shallow to deep layers, and can be used as input to a remote sensing image segmentation decoder to perform fine segmentation.

[0081] 2. Comparison-driven feature aggregation module:

[0082] See Figure 3 As shown, this section mainly introduces the structure and workflow of the contrast-driven feature aggregation module. The aim is to effectively enhance the discriminative feature representation between target and background regions in remote sensing images by constructing this module, thereby improving the accuracy and robustness of image segmentation. Specific implementation methods include:

[0083] 2.1: Generating the contrast weight matrix:

[0084] First, let the input features be w and f, representing the target region features and background region features initially extracted from the remote sensing image, respectively. Feature w is fed into a linear mapping layer to initially reconstruct its channel dimensions, and the output feature shape is K. 2 ×K 2 , where K is the set local window size hyperparameter.

[0085] Subsequently, local spatial feature information is extracted from the output features. Specifically, the output tensor is reconstructed into a four-dimensional local window feature map of dimension K×K×K×K to capture the response relationship of the target region at different spatial locations.

[0086] Next, the local feature map is reconstructed into K using the tensor reshape operation. 2 ×K2 The matrix form is then normalized using the Softmax activation function to obtain the contrast-weighted matrix. It serves as the basis for attention weights in feature aggregation.

[0087] 2.2: Extracting background feature maps:

[0088] For feature f, a 3×3 convolutional layer, a normalization layer (such as BatchNorm or LayerNorm), and a ReLU activation function layer are sequentially applied. The 3×3 convolution operation enhances the local context awareness, the normalization layer normalizes the feature scale, and the ReLU activation introduces non-linearity to enhance expressive power, thereby generating a more discriminative background feature representation f'.

[0089] 2.3: Value Vector Construction and Window Expansion:

[0090] The enhanced feature f' is input into the linear layer to obtain the value vector V.

[0091] Then, a local window unfolding operation is performed on the value vector V, extracting a subset of the value vectors within the K×K receptive field centered at each pixel position (i,j) in the image, denoted as:

[0092] V Δi,j =Unfold(V,i,j,K)

[0093] Among them, V Δi,j It is a value vector within a K×K window centered at position (i,j).

[0094] 2.4: Weighted Feature Aggregation

[0095] Finally, the attention weight matrix generated in section 2.1 is used. For the value vector V within each local window Δi,j We perform weighted fusion to calculate the fused feature representation:

[0096]

[0097] in, f represents matrix multiplication. Δ To compare the final output features of the driving feature aggregation module (i.e., the aggregated enhanced features) The fused features effectively combine local differences and spatial context information, improving the segmentation contrast between targets and background in remote sensing images.

[0098] III. Segmentation Decoding and Loss Function Constraint Mechanism:

[0099] This section aims to utilize the feature maps of fused remote sensing images. A semantic decoding module is further constructed to output a high-precision segmentation map, and the model training process is constrained through multiple loss functions to ensure the stability of prediction accuracy and semantic representation. Specific implementation methods include:

[0100] 3.1: Constructing a remote sensing image segmentation decoder:

[0101] The multi-scale fusion features obtained in Part 1.5 The input is fed into the segmentation decoder module. This module consists of multiple convolutional layers with progressively decreasing channel counts, and its specific structure includes:

[0102] ① A 3×3 convolutional layer is used to integrate local semantic information;

[0103] ②Then it passes through a normalization layer (such as BatchNorm) and a nonlinear activation function (such as ReLU) to enhance the nonlinear expressive power;

[0104] ③ Finally, a 1×1 convolutional layer is used to project the feature map onto a channel number that matches the number of classes, generating a prediction map. That is, the segmentation result of the remote sensing image.

[0105] Prediction chart The channel vector at each pixel position represents the confidence distribution of that position belonging to each category. Finally, it is normalized through the Softmax operation to output a pixel-level classification probability map.

[0106] 3.2: Constructing the Main Loss Function

[0107] To optimize the performance of the segmentation network, the standard cross-entropy loss function is used as the main supervisory signal to measure the pixel-level difference between the predicted image y and the ground truth labeled image y. Its definition is as follows:

[0108]

[0109] Where H and W represent the image height and width, respectively, and C is the number of categories. To predict the probability, Y i,j,c This is a one-hot encoding of the ground truth label at the corresponding location. This loss function encourages the model to correctly classify each pixel, improving overall segmentation accuracy.

[0110] 3.3: Constructing Complementary Contrast Loss

[0111] To further strengthen the matrix and To address the complementarity and consistency between them, this invention introduces a complementary contrastive loss function. The aim is to apply regularization constraints to the difference between two weight matrices in the feature representation space. The specific form is as follows:

[0112]

[0113] Where σ(·) represents the Sigmoid function normalization operation, ⊙ represents element-wise multiplication (Hadamard product), and ||·||1 is the L1 norm. This loss term promotes... and It exhibits differentiation when expressing different semantic regions and maintains complementarity when expressing key semantic regions, effectively improving the clarity of segmentation boundaries and the consistency within regions.

[0114] 3.4: Construction and Optimization Objective of Total Loss Function

[0115] Ultimately, the overall optimization objective loss function is... Defined as a weighted combination of the main loss and the complementary loss, specifically expressed as follows:

[0116]

[0117] Here, λ is the weight adjustment coefficient, used to control the intensity of the influence of complementary losses on the overall optimization. Through the multi-loss collaborative optimization mechanism, the network not only learns global semantics but also accurately focuses on local differential regions, thereby significantly improving the segmentation performance of remote sensing images.

[0118] As described in the above embodiments, those skilled in the art will understand that this invention proposes a remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation. First, this invention constructs a multi-level, multi-scale deep residual feature extraction network, using residual connections and dilated convolution operations to achieve semantic modeling and detail extraction of features at different scales in remote sensing images. Based on this, a contrast-driven feature aggregation module is introduced. By establishing a contrast weighting mechanism within a local window for shallow and deep features respectively, the discriminative power between the target and background is effectively enhanced, solving the problem of blurred category boundaries. This module utilizes mechanisms such as linear mapping, Softmax normalization, and local window expansion to explicitly construct the contrast relationship between the target region and the background region in the feature space, improving the model's ability to perceive fine-grained differences.

[0119] Furthermore, this invention designs a collaborative training mechanism based on multiple loss functions. In addition to using the mainstream cross-entropy loss for pixel-level supervision, it also proposes a complementary contrastive loss function to constrain the semantic differences and spatial consistency between multi-scale attention matrices, thereby improving the complementarity and discriminative ability of feature representations and significantly optimizing the robustness of the model in complex remote sensing images and the clarity of segmentation boundaries.

[0120] In summary, this invention, through a three-pronged design of residual feature extraction, local contrast-driven aggregation, and complementary loss constraint, fully considers the practical problems of large scale variations, complex ground object boundaries, and high similarity between targets and backgrounds in remote sensing images. It effectively overcomes the shortcomings of traditional methods in feature fusion, context modeling, and boundary clarity, providing a new technical means for high-precision automatic segmentation of remote sensing images.

[0121] Additionally, refer to Figure 4 As shown, this embodiment of the invention also provides an electronic device, which may include a processor 10, a memory 11, a communication bus 12 and a communication interface 13, and may also include a computer program stored in the memory 11 and executable on the processor 10, wherein the processor executes the computer program to perform the above-described method.

[0122] In some embodiments, the processor 10 may be composed of integrated circuits, such as a single packaged integrated circuit or multiple integrated circuits packaged with the same or different functions, including combinations of one or more central processing units, microprocessors, digital processing chips, graphics processors, and various control chips. The processor 10 is the control core of the electronic device, connecting various components of the entire electronic device through various interfaces and lines. It executes programs or modules stored in the memory 11 and calls data stored in the memory 11 to perform various functions and process data within the electronic device.

[0123] Those skilled in the art will understand that embodiments of the present invention can be provided as methods, systems, electronic devices, or computer program products, etc. Therefore, the present invention can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, the present invention can take the form of a computer program product implemented on one or more storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0124] It should be noted that the word "comprising" does not exclude the presence of components or steps not listed in the claims. The words "a" or "an" preceding a component do not exclude the presence of a plurality of such components. This invention can be implemented by means of hardware comprising several different components and by means of a suitably programmed computer.

[0125] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on the differences from other embodiments. The same or similar parts between the various embodiments can be referred to each other.

[0126] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation, characterized in that, The method includes the following steps: S1. Construct a remote sensing image segmentation model that includes residual blocks, dilated convolutional layers, contrast-driven feature aggregation modules, decoupling units, and segmentation decoder modules; S2. Perform remote sensing image segmentation training on the constructed remote sensing image segmentation model; S3. Input the acquired remote sensing images into the trained remote sensing image segmentation model for image processing to obtain the remote sensing image segmentation results.

2. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 1, characterized in that, The remote sensing image segmentation model has multiple residual blocks. The acquired remote sensing images are sequentially input into each residual block, and multi-scale feature information is extracted layer by layer to generate multi-layer features.

3. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 2, characterized in that, There are 4 residual blocks, and the structure and function of each residual block are as follows: Residual Block 1: Consists of 3 residual units, used to extract shallow features. This layer maintains high spatial resolution and preserves low-level detail information; Residual Block 2: Consists of 4 residual units, used for output features. This layer of features possesses preliminary semantic understanding capabilities while retaining moderate details; Residual block 3: consists of 6 residual units used for output features. This layer of features possesses semantic discrimination capabilities for complex regions; Residual Block 4: Consists of 3 residual units, used to extract deep semantic features. This layer of features possesses high-order semantic information; Each residual unit consists of two convolutional layers and one skip connection.

4. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 3, characterized in that, Extracted multi-layer features to Each feature is input into a dilated convolutional layer with a different dilation rate to expand the receptive field without reducing resolution, thereby enhancing the context awareness of the target region in the remote sensing image. Subsequently, the features processed by the dilated convolutional layer are input into the contrast-driven feature aggregation module for target-background contrast enhancement and spatial semantic consistency reconstruction.

5. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 4, characterized in that, Deep semantic features will also be used The input is fed into the decoupling unit for feature processing. The feature processing process includes: Deep semantic features A convolutional layer is input to extract local contextual features with high semantic information; then, these features are enhanced sequentially through a normalization layer and a non-linear activation function; finally, these features are passed through a convolutional layer to compress the number of channels and construct attention candidate regions, ultimately yielding the feature matrix. This matrix serves as one of the inputs to the contrast-driven feature aggregation module, guiding feature matching and weighting within a local window.

6. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 5, characterized in that, After processing by the comparison-driven feature aggregation module, the corresponding original features are obtained respectively. to Aggregation enhancement features in, As the deepest feature, it is processed through convolutional layers, normalization, and non-linear activation functions to extract more refined semantic features. These semantic features are then passed through another convolutional layer to compress the channel dimension, and after normalization and activation processing, the final global weight matrix is ​​obtained. Used to guide the final feature fusion process.

7. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 6, characterized in that, Four aggregated enhanced features to Alignment is performed in the spatial dimension, and element-wise addition and fusion are performed to obtain a unified fusion feature. This fusion feature It serves as input to the remote sensing image segmentation decoder module to perform fine segmentation.

8. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 4, characterized in that, In the contrast-driven feature aggregation module, the feature aggregation process is guided by constructing a contrast weighting matrix based on a local window. The specific process includes: (1) Generate the comparison weighted matrix: Let the input features be w and f, representing the target region features and background region features initially extracted from the remote sensing image, respectively; where feature w is fed into a linear mapping layer to initially reconstruct its channel dimensions, and the output feature shape is K. 2 ×K 2 , where K is the set local window size hyperparameter; Subsequently, local spatial feature information is extracted from the output features, and the output tensor is reconstructed into a four-dimensional local window feature map with dimensions K×K×K×K. Next, the local feature map is reconstructed into K using a tensor reshaping operation. 2 ×K 2 The matrix form is then normalized using the Softmax activation function to obtain the contrast-weighted matrix. It serves as the basis for attention weights in feature aggregation; (2) Extract background feature maps: Feature f is passed sequentially through a convolutional layer, a normalization layer, and a ReLU activation function layer to generate background feature f'; (3) Value vector construction and window expansion: The feature f' is input into the linear layer to obtain the value vector V; then, a local window expansion operation is performed on the value vector V to extract a subset of the value vector within the K×K receptive field centered at each pixel position (i,j) in the image, denoted as: V Δi,j =Unfold(V,i,j,K) Among them, V Δi,j It is a vector of values ​​within a K×K window centered at position (i,j); (4) Weighted feature aggregation: Using contrast weighted matrix For value vector V Δi,j We perform weighted fusion to calculate the fused feature representation: in, f represents matrix multiplication. Δ To compare the final output features of the driving feature aggregation module.

9. The remote sensing image segmentation method based on residual feature extraction and contrast-driven aggregation according to claim 6, characterized in that, When training the constructed remote sensing image segmentation model, a total loss function is used for training and optimization. The total loss function includes the main loss function and the complementarity contrast loss function, and its expression is as follows: In the formula, Indicates the total loss; Indicates the main loss; λ represents the complementary contrast loss; λ is the weight adjustment coefficient; H and W represent the image height and width, respectively; and C is the number of classes. To predict the probability, Y i,j,c This represents the one-hot encoding of the true label at the corresponding position; σ represents the Sigmoid function normalization operation; ⊙ represents element-wise multiplication; ||·||1 is the L1 norm; Represents the characteristic matrix; This represents the global weight matrix.

Citation Information

Patent Citations

  • Method and system for segmenting kidney region in dynamic kidney development image based on mixed attention branches

    CN118918126A

  • Method and device with image enhancement based on blur segmentation

    EP4546252A1

  • Image processing method and apparatus, device, and storage medium

    WO2023179028A1