A dynamic grouping residual pyramid convolutional neural network and an image segmentation method
Patent Information
- Application Number
- CN202611182601.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-05
- Publication Date
- 2026-10-09
AI Technical Summary
[0007]本发明旨在提供一种动态分组残差金字塔卷积神经网络及影像分割方法,以解决现有技术中高分辨率遥感影像分割所面临的以下技术问题:
本发明设计动态分组残差金字塔卷积块,构建多尺度卷积并行的多分支特征提取结构,搭配残差融合机制搭建新型编码器网络。该网络可同步提取图像细粒度边缘纹理特征与大邻域局部上下文特征,弥补了传统神经网络固定感受野特征提取单一、细节特征丢失、深层特征退化的架构缺陷,大幅提升网络模型的多尺度特征表征能力与特征传递稳定性,从网络结构层面提升模型的精细化特征建模能力。
Smart Images

Figure CN122886683A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the fields of artificial intelligence neural networks and computer vision technology. Specifically, it relates to a dynamic grouped residual pyramid convolutional neural network and an image segmentation method, which is particularly suitable for complex image segmentation scenarios such as water body extraction from remote sensing images. Background Technology
[0002] As various image segmentation scenarios place increasing demands on model accuracy, versatility, and lightweight performance, the traditional fixed-structure convolutional neural network architecture has gradually revealed many inherent defects, severely restricting the model's generalization ability and engineering applicability.
[0003] Existing encoder-decoder neural networks often employ single, fixed-receptive-field convolutional structures for feature extraction units. These structures are unable to adapt to image features of different scales and dimensions, resulting in weak multi-scale feature representation capabilities. In fine-grained feature extraction scenarios, fixed-scale convolutions struggle to accurately capture subtle textures and edge topology, easily leading to the loss of feature details. In large-scale regional feature modeling scenarios, single local convolutions cannot construct effective long-range contextual relationships, resulting in poor feature semantic consistency, fragmented prediction results, and an overall difficulty in balancing refinement and comprehensiveness in feature extraction accuracy.
[0004] To address the limitation of single convolution scale, existing technologies generally adopt a network design approach that integrates multi-scale convolutional branches, improving the model's multi-scale feature extraction capability by introducing large-size convolutional kernels. However, the introduction of large convolutional kernels significantly increases the number of network parameters and computational complexity. To balance model performance and computational overhead, existing solutions often use grouped convolutions with a fixed number of groups to lightweight the large convolutional kernel branches.
[0005] However, traditional fixed-group convolutions suffer from a fatal architectural adaptation flaw: the number of input and output channels at each layer of the encoder-decoder network dynamically changes with network depth, while a fixed preset number of groups cannot adapt to the dynamic changes in network channel dimensions. When the number of input or output channels at a network layer is not divisible by the preset number of groups, fixed-group convolutions will experience problems such as dimension matching failure, network structure mismatch, and abnormal feature propagation. This not only fails to achieve lightweight effects but also severely reduces network training stability and model generalization ability, greatly limiting the versatility and adaptability of multi-scale convolutional networks.
[0006] In view of the above, this application is hereby submitted. Summary of the Invention
[0007] This invention aims to provide a dynamic grouped residual pyramid convolutional neural network and an image segmentation method to solve the following technical problems faced by high-resolution remote sensing image segmentation in the prior art:
[0008] (1) Traditional neural network convolutional units have fixed receptive fields and insufficient multi-scale feature extraction capabilities, making it impossible to model both fine-grained detailed features and global long-range contextual features. (2) Fixed group convolutional architecture cannot adapt to the dynamic changes in the channel dimension of network layers, and is prone to structural mismatch, unstable training and poor versatility; (3) Traditional multi-scale convolutional networks have a large number of parameters and computational overhead, making it difficult to achieve a balance between high precision and lightweight design.
[0009] To solve at least one of the above-mentioned technical problems, the present invention is achieved through the following technical solution: A dynamic grouped residual pyramid convolutional neural network includes an encoding path and a decoding path; Dynamically grouped residual pyramid convolutional blocks are used at the downsampling level of the encoding path to extract local multi-scale features of the input image; The dynamically grouped residual pyramid convolutional block includes a main branch and a shortcut branch; The main branch contains at least two sets of convolutional branch structures with different receptive field sizes. The outputs of each convolutional branch are spliced together in the channel dimension and then fused with the residuals of the shortcut branch. One set of convolutional branches is configured with a dynamic grouping strategy, that is: dynamically select grouped convolution or standard convolution based on whether the number of input channels and the number of output channels of the current layer meet the preset grouping divisibility condition; A dilated spatial pyramid pooling module is configured at the bottleneck layer of the encoding path to perform dilated spatial pyramid pooling processing on deep features in order to obtain multi-scale global context information. The void space pyramid pooling module includes five parallel branches, and the outputs of the five parallel branches are spliced and fused in the channel dimension to obtain global semantic enhancement features; The decoding path receives the global semantic enhancement features and concatenates and fuses them with the corresponding hierarchical features of the encoding path to output pixel-level segmentation results.
[0010] This invention also provides an image segmentation method based on dynamic grouped residual pyramid convolution, comprising: S1. Acquire and preprocess the remote sensing image of the target to be segmented to obtain a standardized input image; S2, the standardized input image is input into the encoding path, and local multi-scale features are extracted at the downsampling level of the encoding path using dynamic grouped residual pyramid convolutional blocks. A dynamic grouping strategy is configured in one of the convolutional branches of the dynamic grouped residual pyramid convolutional blocks, that is: dynamically select grouped convolution or standard convolution based on whether the number of input channels and the number of output channels at the current level meet the preset grouping divisibility condition. S3, At the bottleneck layer of the encoding path, the deep features are subjected to dilated spatial pyramid pooling to obtain global semantic enhancement features; S4. Input the global semantic enhancement features into the decoding path and concatenate and fuse them with the corresponding layer features of the encoding path to output pixel-level segmentation results.
[0011] The present invention also provides an image segmentation device based on dynamic grouped residual pyramid convolution, comprising: The preprocessing unit is used to acquire and preprocess the remote sensing image of the target to be segmented to obtain a standardized input image; The encoding unit is used to input the standardized input image into the encoding path, extract local multi-scale features at the downsampling level of the encoding path using a dynamically grouped residual pyramid convolutional block, and configure a dynamic grouping strategy in one of the convolutional branches of the dynamically grouped residual pyramid convolutional block: dynamically select grouped convolution or standard convolution based on whether the number of input channels and the number of output channels at the current level meet the preset grouping number divisibility condition. The global semantic aggregation unit is used to perform dilated spatial pyramid pooling on deep features at the bottleneck layer of the encoding path to obtain global semantic enhancement features. The decoding output unit is used to input the global semantic enhancement features into the decoding path, and to concatenate and fuse them with the corresponding hierarchical features of the encoding path to output pixel-level segmentation results.
[0012] The present invention also provides an image segmentation device using a dynamic grouped residual pyramid convolutional neural network, including a processor and a memory. The memory stores a computer program that can be executed by the processor to implement the image segmentation method of the dynamic grouped residual pyramid convolutional neural network as described above.
[0013] The present invention also provides a computer-readable storage medium storing computer-readable instructions, which, when executed by a processor of the device on which the computer-readable storage medium is located, implement an image segmentation method of a dynamic grouped residual pyramid convolutional neural network as described above.
[0014] In summary, compared with the prior art, the present invention has the following beneficial effects: This invention designs dynamically grouped residual pyramid convolutional blocks to construct a multi-scale convolutional parallel multi-branch feature extraction structure, and builds a novel encoder network with a residual fusion mechanism. This network can simultaneously extract fine-grained edge texture features and large-neighborhood local context features from images, making up for the architectural defects of traditional neural networks, such as single feature extraction with fixed receptive field, loss of detailed features, and degradation of deep features. It significantly improves the multi-scale feature representation ability and feature transfer stability of the network model, and enhances the model's refined feature modeling ability from the network structure level.
[0015] This invention integrates a hollow spatial pyramid pooling module into the network bottleneck layer to construct a multi-scale global context modeling architecture. This breaks through the limitations of traditional convolutional networks in local neighborhood modeling, and can efficiently capture global long-range semantic information of images. It improves the network's global feature constraint capabilities, solves the problems of inconsistent semantic features and fragmented predictions in traditional neural networks, and significantly improves the integrity of the network's feature modeling of large-scale targets.
[0016] This invention employs a dynamic grouped convolution adaptive adaptation mechanism. For multi-scale large convolutional kernel branches, it dynamically and adaptively switches between grouped convolution and standard convolution operation modes based on the divisibility relationship between the number of input and output channels at each network layer and the preset number of groups. When the divisibility condition is met, grouped convolution significantly compresses the number of network parameters and computational cost, achieving model lightweighting. When the divisibility condition is not met, it automatically degenerates into standard convolution, completely avoiding the structural mismatch problem of fixed grouped convolution. This achieves dynamic self-adaptation of the network architecture, significantly improving the versatility, stability, and robustness of the neural network, and solving the core pain point of traditional multi-scale networks that cannot simultaneously achieve both accuracy and lightweighting.
[0017] This invention integrates the Convolutional Block Attention (CBAM) module, which optimizes the network feature response weights through a dual weighting mechanism of channel attention and spatial attention. This enhances effective feature extraction and suppresses invalid background interference features, further improving the feature selection and accurate modeling capabilities of the neural network and enhancing the model's anti-interference performance.
[0018] The reconstructed dynamic grouped residual pyramid convolutional neural network of this invention is a general-purpose AI model architecture, not limited to a single application scenario, and can be widely adapted to various image semantic segmentation tasks. In multiple comparative experiments in a typical application scenario (remote sensing image water segmentation), the network model of this invention achieves the best performance in core indicators such as Dice coefficient, IoU, Recall, and Accuracy compared to existing mainstream neural network models such as U-Net, U-Net++, and Cwnnet. At the same time, compared with traditional networks, this model significantly improves segmentation accuracy while maintaining controllable parameter quantity and excellent lightweight performance, balancing model performance and engineering implementation costs, and possesses strong versatility and industrial application value. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments will be briefly introduced below. It should be understood that the following drawings only show some embodiments of the present invention and should not be regarded as a limitation of the scope. For those skilled in the art, other related drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a schematic diagram of the overall structure of a dynamic grouped residual pyramid convolutional neural network provided in Example 1.
[0021] Figure 2 This is a schematic diagram of the internal structure of the dynamic grouped residual pyramid convolutional block provided in Example 1.
[0022] Figure 3 This is a schematic diagram of the selection mechanism for the dynamic grouping logic of convolutional branches provided in Example 1.
[0023] Figure 4 This is a schematic diagram of the internal structure of the Convolutional Block Attention (CBAM) module provided in Embodiment 1.
[0024] Figure 5 This is a schematic diagram of the structure of the hollow space pyramid pooling module ASPP provided in Example 1.
[0025] Figure 6 This is a schematic diagram of the overall process of an image segmentation method using a dynamic grouped residual pyramid convolutional neural network, as provided in Example 2.
[0026] Figure 7 The diagram shows the visualization results of the method of the present invention provided in Example 2 and six other comparison algorithms in natural water body scenes (A) and artificial water body scenes (B) of the GLH dataset.
[0027] Figure 8 The diagram shows the visualization results of the method of the present invention provided in Example 2 and six other comparison algorithms in the closed region and the narrow water system scene (A) and the complex urban background scene (B) of the WHDLD dataset.
[0028] Figure 9 The diagram shows the visualization segmentation results of the method of the present invention provided in Example 2 and six other comparison algorithms in a certain city dataset under microscale water scene (A) and macroscale water scene (B).
[0029] Figure 10 This is a schematic diagram of an image segmentation device using a dynamic grouped residual pyramid convolutional neural network, as provided in Embodiment 3.
[0030] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. Detailed Implementation
[0031] 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 only a part of the embodiments of the present invention, not all of them. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention. Therefore, the following detailed description of the embodiments of the present invention provided in the accompanying drawings is not intended to limit the scope of the claimed invention, but merely represents selected embodiments of the invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.
[0032] Example 1 like Figure 1 As shown, a dynamic grouped residual pyramid convolutional neural network includes an encoding path and a decoding path.
[0033] (a) Encoding path.
[0034] like Figure 1 As shown, the encoding path includes an initial feature extraction module and four downsampling levels, Down1 to Down4. The initial feature extraction module employs a dual convolutional structure, consisting of two 3×3 convolutional layers, group normalization, and a cascaded ReLU activation function, used to map the original three-channel or four-channel remote sensing image into a 64-channel initial feature map. This initial feature map is downsampled using a 2×2 max pooling operation (MaxPool) and then fed into the first downsampling level, Down1.
[0035] Dynamically grouped residual pyramid convolutional blocks are used at the downsampling level of the encoding path to extract local multi-scale features of the input image.
[0036] like Figure 1 As shown, each downsampling level (Down1 to Down4) uses a dynamically grouped residual pyramid convolutional block region context feature. Between each downsampling level, a 2×2 max pooling operation (MaxPool) is used to progressively halve the spatial size and double the number of channels. Specifically, the Down1 level has 64 input channels and 128 output channels; the Down2 level has 128 input channels and 256 output channels; the Down3 level has 256 input channels and 512 output channels; and the Down4 level has 512 input channels and 1024 output channels. The spatial resolution decreases progressively with each level, being 1 / 2, 1 / 4, 1 / 8, and 1 / 16 of the original input size, respectively.
[0037] (1) Dynamically grouped residual pyramid convolutional block. The dynamically grouped residual pyramid convolutional block includes a main branch and a shortcut branch. The main branch contains at least two sets of convolutional branch structures with different receptive field sizes. The outputs of each convolutional branch are concatenated along the channel dimension and then fused with the residuals of the shortcut branch. One set of convolutional branches is configured with a dynamic grouping strategy, that is: dynamically selecting grouped convolution or standard convolution based on whether the number of input channels and the number of output channels of the current level meet the preset divisibility condition of the number of groups.
[0038] like Figure 2 In a preferred embodiment, the main branch comprises two levels of cascaded pyramidal convolutional mappings, each level including at least one 3×3 convolutional branch and one 5×5 convolutional branch. The 3×3 convolutional branch, implemented using standard convolution, is used to extract fine-grained boundary and local texture information. Its smaller receptive field accurately captures the edge details of water bodies, such as river boundaries and land-water interfaces. The 5×5 convolutional branch, implemented using a dynamic grouping strategy, is used to extract local contextual information over a larger neighborhood. Its larger receptive field captures the spatial relationships between water features and surrounding landforms, such as the spatial layout of river channels and embankments, and transitional areas between water and vegetation.
[0039] The number of output channels of the two convolution branches is configured in an even distribution manner. If the target number of output channels of the module is... Therefore, the number of output channels for both the 3×3 convolution branch and the 5×5 convolution branch is configured to be half of the target number of output channels for the module. The outputs of the two branches are fused along the channel dimension through a concatenation operation to form the main branch output feature of this level of pyramid convolutional mapping. First-level output After being normalized by GroupNorm and activated by ReLU, the data is fed into the second-level mapping, and the second-level output is... After group normalization (GroupNorm), the residuals are added to the shortcut branches to mitigate the risks of gradient vanishing and feature degradation in deep feature propagation.
[0040] Let the input features be Then, a single-level pyramid convolution mapping is represented as: ; in, The output features of a single-level pyramid convolution mapping; and These represent the mapping results for the 3×3 convolution branch and the 5×5 convolution branch, respectively. This indicates a channel dimension splicing operation.
[0041] Let the first-stage output be The second-level output is Then we have: ; ; ; ; in, This is the first-level 3×3 convolution mapping; This is a first-level 5×5 convolution mapping; This is a second-level 3×3 convolution mapping; This is a second-level 5×5 convolution mapping; This indicates a group normalization operation; Indicates the activation function; , These are the final outputs of the first and second level convolution branches, respectively.
[0042] In the residual pyramid convolutional blocks at each level of the encoding path, the 5×5 convolutional branch plays a crucial role in extracting local context information from a larger neighborhood. The number of parameters in a 5×5 convolutional kernel is 25 times that of a 3×3 convolutional kernel; directly implementing it using standard convolution would result in a higher number of parameters and computational cost. To control the computational complexity of the large convolutional kernel branch without sacrificing multi-scale representation capabilities, this embodiment of the invention employs a dynamic grouped convolution strategy, automatically selecting either grouped convolution or standard convolution based on the number of channels at each network level.
[0043] The judgment process of the dynamic grouping adaptation strategy is as follows: Figure 3 As shown. Let the preset number of groups be... (For example The actual number of groups for the 5×5 convolutional branch (i.e., the convolutional branch with a larger receptive field) is 4. The number of input channels is denoted as The number of output channels is denoted as The judgment logic for dynamic mapping relationships is defined as follows: when... able to be Divisible (i.e.) )and able to be Divisible (i.e.) When ), the actual number of groups At this point, the 5×5 convolution branch uses a group number of... The grouped convolution implementation; in other cases, i.e. or If any one of them does not satisfy the condition... When the divisibility condition is met, the actual number of groups When the value equals 1, the 5×5 convolution branch automatically degenerates into a standard convolution implementation.
[0044] Grouped convolution parameter count satisfy: ,in Indicates the number of input channels. Indicates the number of output channels. Indicates the kernel size. Indicates the number of groups. When and At that time, the number of parameters for a 5×5 branch is ;when At that time, the 5×5 branch degenerates into a standard convolution, with the number of parameters being... Therefore, when the divisibility condition is met, the parameter compression ratio of the 5×5 branch using grouped convolution is [not specified]. satisfy: .
[0045] Let's take a specific numerical example to illustrate. At the Down1 level, , Both are divisible by 4, therefore the 5×5 convolution branch uses 4-group convolution, with a parameter count of (64×128×5×5) / 4 equal to 51200, which is compressed to one-quarter of the parameter count of the standard convolution (204800). In the Down2 layer, , Both are divisible by 4, and the 5×5 convolution branch also uses 4-group convolution, with a parameter count of (128×256×5×5) / 4 equal to 204800. In contrast, in the Down4 level... , Suppose that due to some special configuration... If the value is 1000 instead of 1024, then 1000 is not divisible by 4. In this case, the 5×5 convolutional branch automatically degenerates into a standard convolution to avoid structural mismatch caused by the mismatch in the number of groups. This dynamic adaptation mechanism ensures that the network can run stably under different channel number configurations, while maximizing the advantages of grouped convolution in reducing the number of parameters and computation.
[0046] The 3×3 convolutional branch is consistently implemented using standard convolution to maintain a more robust cross-channel information exchange capability. Since the 3×3 convolutional kernel itself has a relatively small number of parameters, consistently using standard convolution does not incur a significant computational burden, while its dense cross-channel connectivity plays a crucial role in extracting fine-grained texture information and maintaining the integrity of feature representation. The 5×5 convolutional branch preferentially employs grouped convolution to reduce the number of parameters and computational cost of the large convolutional kernel branch, only degenerating into standard convolution when the number of channels does not satisfy the divisibility condition, thus achieving structural self-adaptation of the large convolutional kernel branch.
[0047] Of course, other numbers of pyramid convolution mapping branches of different scales can be set according to the actual situation, and no limitation is made here.
[0048] Then, the outputs of each convolutional branch are concatenated along the channel dimension and fused with the residual of the shortcut branch. Assume the shortcut branch is mapped as follows: The residual fusion result satisfy: .
[0049] The shortcut branch in the residual pyramid convolution block uses an identity mapping when the number of input channels is the same as the number of output channels (i.e., This allows the features output by the main branch to be directly added to the input features, forming a lossless information transmission path. When the number of input channels is inconsistent with the number of output channels, the shortcut branch uses 1×1 convolution to match and map the number of channels, so that the channel dimension of the main branch output is aligned with the channel dimension of the input before element-wise addition.
[0050] The element-wise addition of main branch features and shortcut branch features constitutes a residual fusion mechanism, making it easier for the network to optimize the residual part during the learning process, thereby maintaining the transitivity of features in deep networks. Residual fusion features After ReLU activation, it enters the attention recalibration unit of the dynamically grouped residual pyramid convolutional block CBAM.
[0051] The dynamically grouped residual pyramid convolutional block also includes an attention recalibration unit. The attention recalibration unit is a convolutional block attention module (CBAM). The CBAM sequentially includes a channel attention submodule and a spatial attention submodule, with the structure as follows: Figure 4 As shown. The channel attention submodule performs global average pooling and global max pooling on the input features simultaneously, generating channel weights after shared mapping. The spatial attention submodule performs average pooling and max pooling on the channel-weighted features, generating spatial weights after convolutional mapping. The channel weights and spatial weights respectively weight the input features to enhance effective feature responses and suppress interference from irrelevant background features.
[0052] like Figure 4 The feature map of the input CBAM is shown below. The channel attention submodule applies input features. Simultaneously, global average pooling and global max pooling operations are performed to obtain the global average feature and global maximum feature at the channel dimension, respectively. These two pooling results are then mapped through a shared multilayer perceptron (MLP) network. This MLP network contains a hidden layer whose dimension is reduced to 1 / 16 of the input channel number, and then restored to the original channel dimension after ReLU activation. The two mapping results are then summed at the channel dimension and processed by a sigmoid activation function to generate channel attention weights. Channel attention weights Input features Perform element-wise multiplication to obtain the channel-weighted features. .
[0053] The specific calculation process of the channel attention submodule is expressed as follows: ; in, This represents the output features of the channel attention submodule, i.e., the channel-weighted features; This represents the Sigmoid activation function. This represents element-wise multiplication; Indicates global average pooling. Indicates global max pooling. This represents a multilayer perceptron mapping.
[0054] This channel attention mechanism enables the network to learn the importance of different channels for water segmentation tasks, automatically enhancing the channel responses carrying water information while suppressing channels associated with water-like background interference such as shadows, dark roofs, and roads.
[0055] The spatial attention submodule receives the weighted features of the channel. As input, Average pooling and max pooling are performed separately along the channel dimension to compress the channel dimension into a single channel. These channels are then concatenated. The concatenated features are then mapped using a 7×7 convolution and subsequently activated by a sigmoid function to generate spatial attention weights. Spatial attention weights. Features after channel weighting Perform element-wise multiplication to obtain the final CBAM-weighted features. .
[0056] The specific calculation process of the spatial attention submodule is expressed as follows: ; in, The output features of the spatial attention submodule are the final CBAM-weighted features. This indicates a splicing operation. This represents a 7×7 convolution mapping.
[0057] This spatial attention mechanism enables the network to learn which regions in the spatial location of the feature map are more likely to belong to water bodies. For example, in remote sensing images, large areas with low reflectivity and specific texture patterns are more likely to correspond to water bodies, while shadowed areas are further suppressed.
[0058] The feature maps processed by the CBAM module are output to the residual pyramid convolutional block of the next downsampling layer or fed into the hollow spatial pyramid pooling module of the network bottleneck layer. The introduction of the CBAM module effectively enhances the response intensity of water-related channels and spatial locations, while significantly reducing the interference of building shadows, road shadows and other low-reflectivity features on water body recognition under complex background conditions.
[0059] (2) Hollow space pyramid pooling module.
[0060] A hollow spatial pyramid pooling module is configured at the bottleneck layer of the encoding path to perform hollow spatial pyramid pooling processing on deep features (i.e., the Down4 output features of the last downsampling layer of the encoding path) to obtain multi-scale global context information.
[0061] This deep feature carries highly abstract semantic information, but spatial detail is largely lost during continuous downsampling. To re-establish multi-scale spatial contextual relationships while preserving the deep semantic abstraction capability, this embodiment of the invention introduces a hollow spatial pyramid pooling module (ASPP) at the bottleneck layer of the encoding path to perform global semantic aggregation processing on the deep feature. Its structure is as follows: Figure 5 As shown.
[0062] The void space pyramid pooling module ASPP includes five parallel branches: the first branch, the second branch, the third branch, the fourth branch, and the fifth branch. These branches cover different scales of information, from point-level features to global context. The outputs of the five parallel branches are spliced and fused in the channel dimension to obtain global semantic enhancement features.
[0063] The first branch uses 1×1 convolution; the second to fourth branches use 3×3 dilated convolution with different dilation rates (e.g., dilation rates r equal to 6, 12 and 18 respectively); the fifth branch uses global average pooling, 1×1 convolution and upsampling to restore spatial resolution.
[0064] The first branch is used to capture the finest point-level features, preserving the precise spatial location information already extracted by the shallow layers of the network. This branch has a 1×1 kernel size, 1024 input channels, and the number of output channels is unified to 256 channels after 1×1 convolution mapping. The second to fourth branches are used to significantly expand the equivalent receptive field of the convolution operation without introducing additional parameters.
[0065] The core principle of dilated convolution is to insert zero-value holes between the sampling points of the convolution kernel, thereby increasing the effective sampling interval of the convolution kernel while keeping the number of parameters constant.
[0066] For dilated convolution, let the input feature map be... The convolution kernel weights are The void ratio is The kernel size is The output position is The output of the two-dimensional dilated convolution is... Represented as: ; in, This represents the two-dimensional coordinate position.
[0067] Its equivalent receptive field size satisfy: .
[0068] Furthermore, the corresponding equivalent receptive field area satisfy: When using 3×3 convolution with dilatation rates of 6, 12 and 18, the equivalent receptive field sizes are 13×13, 25×25 and 37×37, respectively, and the corresponding equivalent receptive field areas are 169, 625 and 1369 square pixels, respectively, to achieve hierarchical receptive field coverage from mesoscale neighborhood to large-scale context.
[0069] This series of hierarchical receptive field coverages, ranging from mesoscale neighborhoods (such as riverbank transition zones) to large-scale global contexts (such as the spatial relationship between the two banks of a lake), can simultaneously capture the local orientation of river bends, the medium-range relationship between riverbanks and water bodies, and the regional consistency within large-scale areal water bodies such as lakes and reservoirs.
[0070] The fifth parallel branch employs a combination of global average pooling, 1×1 convolution, and bilinear interpolation upsampling to extract global semantic statistics and restore them to the same spatial resolution as other branches. This branch first performs global average pooling on the deep feature map in the spatial dimension, compressing the spatial size to 1×1 to obtain a global semantic vector. This vector encodes the statistically average features of all spatial locations within the entire image range. Subsequently, it adjusts the channel dimensions using 1×1 convolution and then restores them to the same spatial resolution as the outputs of other branches through bilinear interpolation upsampling, ensuring the feasibility of subsequent channel-dimensional stitching operations.
[0071] The outputs of the five parallel branches are concatenated along the channel dimension, fusing the features extracted from each branch at different scales to form a global semantic enhancement feature with a channel dimension of 256+256+256+256+256=1280. This global semantic enhancement feature simultaneously includes point-level precise location information, multi-scale local context information, and global statistical semantic information, effectively compensating for the spatial detail loss caused by continuous downsampling and laying the foundation for accurate segmentation of subsequent decoding paths.
[0072] (ii) Decoding path.
[0073] like Figure 1As shown, the decoding path includes four upsampling levels, Up1 to Up4, and its structure is mirror-symmetric to the encoding path.
[0074] The task of the decoding path is to upsample the global semantic enhancement features aggregated by the ASPP module to restore the spatial resolution, and at the same time fuse them with the features of the corresponding level in the encoding path through skip connections, and finally output the pixel-level water body segmentation result.
[0075] Specifically, the decoding path receives the global semantic enhancement features and concatenates and fuses them with the corresponding hierarchical features of the encoding path to output pixel-level segmentation results.
[0076] At each stage of the decoding path, the upsampling operation uses bilinear interpolation or transposed convolution to double the spatial resolution. For example, the Up1 level restores the spatial resolution of the bottleneck layer output from 1 / 16 to 1 / 8 of the original input, the Up2 level restores it to 1 / 4, the Up3 level restores it to 1 / 2, and the Up4 level restores it to the original input resolution. The upsampled features are then concatenated and fused with the skip connection features of the corresponding levels in the encoding path along the channel dimension. Before performing the concatenation operation, the upsampled features of the decoding path are spatially aligned. Cropping or padding is used to ensure that the spatial dimensions of the upsampled features and the skip connection features are completely consistent, thus guaranteeing consistency in cross-layer feature fusion.
[0077] Taking the Up1 layer as an example, the upsampled features (spatial size 1 / 8 of the original input) of this layer are concatenated with the skip connection features output from the Down3 layer of the encoding path (spatial size also 1 / 8 of the original input) in the channel dimension. The concatenated features are then sequentially processed by 1×1 convolution for channel dimension compression, 3×3 convolution for spatial feature fusion, group normalization, and ReLU activation to generate the decoded features for this layer. This decoded feature is then fed into the next upsampled layer for the same processing until the pixel-level feature map at the original input resolution is finally restored. The final pixel-level feature map is mapped to two channels by 1×1 convolution (corresponding to water and non-water categories respectively), and then the Sigmoid activation function is used to generate a probability value for each pixel belonging to the target water body. Pixels with a probability value greater than 0.5 are determined to be the target image (water body), thus outputting the water body segmentation result map.
[0078] Skip connections play a crucial role in the decoding path. Because the encoding path gradually loses fine spatial details during downsampling, bottom-up upsampling alone is insufficient to accurately reconstruct the water body's boundary contours. Skip connections fuse shallow features (high spatial resolution but low semantic abstraction) from the encoding path with deep features (low spatial resolution but high semantic abstraction) from the decoding path. This allows the decoding path to simultaneously acquire accurate boundary location information and abstract semantic category information while restoring spatial resolution, thereby achieving high-precision segmentation of narrow water system boundaries and consistent prediction within large-scale water areas.
[0079] In summary, compared with the prior art, the present invention has the following beneficial effects: This invention designs a residual pyramid convolution core module, constructing a multi-branch feature extraction structure that parallels small-scale and large-scale convolutions, and builds a novel encoder network unit with a residual fusion mechanism. This network module can simultaneously extract fine-grained edge texture features and large-neighborhood local context features from images, overcoming the architectural shortcomings of traditional neural networks, such as single feature extraction with a fixed receptive field, loss of detailed features, and degradation of deep features. It significantly improves the multi-scale feature representation capability and feature transfer stability of the network model, enhancing the model's refined feature modeling capability from the network structure level.
[0080] This invention integrates a hollow spatial pyramid pooling module into the network bottleneck layer to construct a multi-scale global context modeling architecture. This breaks through the limitations of traditional convolutional networks in local neighborhood modeling, and can efficiently capture global long-range semantic information of images. It improves the network's global feature constraint capabilities, solves the problems of inconsistent semantic features and fragmented predictions in traditional neural networks, and significantly improves the integrity of the network's feature modeling of large-scale targets.
[0081] This invention employs a dynamic grouped convolution adaptive adaptation mechanism. For multi-scale large convolutional kernel branches, it dynamically and adaptively switches between grouped convolution and standard convolution operation modes based on the divisibility relationship between the number of input and output channels at each network layer and the preset number of groups. When the divisibility condition is met, grouped convolution significantly compresses the number of network parameters and computational cost, achieving model lightweighting. When the divisibility condition is not met, it automatically degenerates into standard convolution, completely avoiding the structural mismatch problem of fixed grouped convolution. This achieves dynamic self-adaptation of the network architecture, significantly improving the versatility, stability, and robustness of the neural network, and solving the core pain point of traditional multi-scale networks that cannot simultaneously achieve both accuracy and lightweighting.
[0082] This invention integrates the Convolutional Block Attention (CBAM) module, which optimizes the network feature response weights through a dual weighting mechanism of channel attention and spatial attention. This enhances effective feature extraction and suppresses invalid background interference features, further improving the feature selection and accurate modeling capabilities of the neural network and enhancing the model's anti-interference performance.
[0083] The reconstructed dynamic grouped residual pyramid convolutional neural network of this invention is a general AI model architecture that is not limited to a single application scenario and can be widely adapted to various image semantic segmentation tasks.
[0084] Example 2 Taking water body segmentation in remote sensing images as an example, this invention also provides an image segmentation method using a dynamic grouped residual pyramid convolutional neural network, which can be implemented by an image segmentation device using a dynamic grouped residual pyramid convolutional neural network (hereinafter referred to as the segmentation device), specifically, executed by one or more processors within the segmentation device.
[0085] In this embodiment, the segmentation device may be an electronic device equipped with a processor, the processor having a computer program for the image segmentation method of the dynamic grouped residual pyramid convolutional neural network, and the computer program being executable, such as a computer, smartphone, smart tablet, workstation, etc., without limitation.
[0086] like Figure 6 As shown, an image segmentation method using a dynamic grouped residual pyramid convolutional neural network includes steps S1 to S4.
[0087] S1: Acquire and preprocess the remote sensing image of the target to be segmented to obtain a standardized input image.
[0088] In practical applications, this method can be deployed in remote sensing image processing systems for water resource surveys, flood disaster monitoring, ecological environment assessment, and urban water environment management. When users need to extract detailed water body boundary information from high-resolution remote sensing images, such as segmenting different types of water bodies like rivers, lakes, and reservoirs from 0.5-meter resolution urban waterfront images, the method provided in this embodiment can simultaneously ensure the structural integrity of narrow water systems and the regional consistency of large-scale areal water bodies.
[0089] In step S1, the system first acquires the remote sensing image to be segmented. The acquired remote sensing image can come from various high-resolution optical remote sensing satellites, such as data from domestic satellites like Gaofen-2 and Ziyuan-3, or from aerial drone imagery or high-resolution commercial remote sensing data. After acquiring the image, the system performs a series of preprocessing operations on the remote sensing image to obtain a standardized input image.
[0090] Specifically, the preprocessing includes at least one of radiometric correction, geometric correction, image cropping, label binarization remapping, pixel value normalization, and data augmentation.
[0091] Radiometric correction eliminates the effects of radiation errors caused by the sensor itself and atmospheric scattering and absorption, enabling image pixel values to more accurately reflect the true reflectivity of the Earth's surface. Geometric correction eliminates geometric distortions in the image by reprojecting it onto a unified geographic coordinate system, ensuring a one-to-one correspondence between pixels and their geographic locations. Image cropping cuts large remote sensing images into a series of smaller tiles according to a preset size; for example, a full-view image of 8192×8192 pixels can be cropped into sub-tiles of 512×512 pixels or 1024×1024 pixels, facilitating batch processing by the network model.
[0092] Label binarization remapping is used to map the original multi-class labels into two categories: water bodies and non-water bodies. During the training phase, the system performs binarization remapping on the original multi-class semantic segmentation labels according to the training task requirements. For example, categories belonging to water bodies in the original labels (including rivers, lakes, reservoirs, ponds, pits, etc.) are uniformly mapped to the foreground category and labeled as 1, while all other land feature categories (including buildings, roads, vegetation, bare soil, etc.) are uniformly mapped to the background category and labeled as 0, forming two categories of labels: water bodies and non-water bodies.
[0093] Pixel value normalization normalizes the pixel values of remote sensing images to the range of 0 to 1 or negative one to positive one to adapt to the input requirements of the network model. Data augmentation operations expand the number of training samples during the training phase through random rotation, random flipping, random scaling, random cropping, color jitter, etc., to improve the model's generalization ability to remote sensing images with different shooting angles, different lighting conditions, and different seasons.
[0094] In one specific embodiment, the input samples can come from publicly available remote sensing water datasets GLH and WHDLD, or from a self-built high-resolution urban water dataset. The self-built dataset covers various typical water body distribution patterns, including urban waterfront areas, urban river networks, lakes and reservoirs, port areas, and surrounding shorelines, to enhance the method's adaptability to different urban geographical environments. The preprocessed, standardized input images are fed into the subsequent encoder-decoder network structure in tensor form.
[0095] The preprocessed remote sensing images are input into a dynamic grouped residual pyramid convolutional neural network with an encoder-decoder structure.
[0096] S2, the standardized input image is input into the encoding path, and local multi-scale features are extracted at the downsampling level of the encoding path using dynamic grouped residual pyramid convolutional blocks. A dynamic grouping strategy is configured in one of the convolutional branches of the dynamic grouped residual pyramid convolutional blocks, that is, according to whether the number of input channels and the number of output channels at the current level meet the preset grouping divisibility condition, grouped convolution or standard convolution is dynamically selected.
[0097] The dynamic grouped residual pyramid convolutional block includes a main branch and a shortcut branch. The main branch contains a multi-scale convolutional branch structure. The outputs of each convolutional branch are concatenated in the channel dimension and then residually fused with the shortcut branch.
[0098] The residual pyramid convolutional block includes at least a 3×3 convolutional branch and a 5×5 convolutional branch, and the number of output channels of both convolutional branches is configured to be half of the target number of output channels of the module.
[0099] The shortcut branch uses identity mapping when the number of input channels is the same as the number of output channels, and uses 1×1 convolution for channel matching when the number of input channels is different from the number of output channels.
[0100] The residual fusion features are further input into an attention recalibration unit before entering the next layer. The attention recalibration unit is a convolutional block attention module (CBAM). The CBAM sequentially weights the features through channel attention and spatial attention to enhance the response of water-related channels and suppress interference from water-like backgrounds such as shadows and dark roofs.
[0101] In the 5×5 convolutional branch, the use of either grouped convolution or standard convolution is dynamically determined based on whether the number of input and output channels at the current level satisfies the divisibility condition of the preset number of groups, thus achieving structural self-adaptation of the large convolutional kernel branch. When the number of input channels of the large-scale convolutional branch is equal to zero modulo the preset number of groups and the number of output channels is equal to zero modulo the preset number of groups, the actual number of groups is equal to the preset number of groups, and a grouped convolution strategy with the preset number of groups is adopted; otherwise, the actual number of groups is set to 1, and a standard convolution strategy is adopted.
[0102] S3 performs hollow spatial pyramid pooling on deep features at the bottleneck layer of the encoding path to obtain global semantic enhancement features.
[0103] The void space pyramid pooling module includes five parallel branches: one 1×1 convolution branch, three 3×3 void convolution branches with different void ratios, and one global average pooling branch. The outputs of the five parallel branches are concatenated and fused along the channel dimension to obtain global semantic enhancement features.
[0104] S4. Input the global semantic enhancement features into the decoding path and concatenate and fuse them with the corresponding layer features of the encoding path to output pixel-level segmentation results.
[0105] At each level of the decoding path, the upsampled features are concatenated and fused with the features of the corresponding level of the encoding path in the channel dimension. Before concatenation, spatial size alignment is performed on the upsampled features to ensure the consistency of cross-layer feature fusion.
[0106] It also includes: optimizing the network parameters of the model corresponding to the water body segmentation method of remote sensing images using the cross-entropy loss function or a combination of the cross-entropy loss function and the Dice loss function; the Dice loss function is used to enhance the supervision ability of target image boundaries (such as water body boundaries) and small target regions in class imbalance scenarios.
[0107] The method in this embodiment of the invention employs a deep learning optimization algorithm to perform end-to-end optimization of network parameters during the training process. Specifically, it can use stochastic gradient descent (SGD) or the Adam optimizer in conjunction with a learning rate decay strategy, gradually decaying the learning rate from an initial learning rate (such as 0.001 or 0.0001) until convergence.
[0108] The loss function during training can be one of two options depending on the actual needs.
[0109] The first approach uses the cross-entropy loss function. The calculation formula is as follows: ; in, Represents pixels The true label (0 or 1). Represents the pixels predicted by the network. The probability value that it belongs to a body of water.
[0110] The second approach uses a combined loss function of cross-entropy loss and Dice loss. The expression is: ; ; in, The Dice loss function; This is a weighting coefficient (e.g., 0.5).
[0111] The design of the combined loss function effectively alleviates the class imbalance problem that is common in water segmentation tasks of high-resolution remote sensing images. Since water pixels usually account for a much smaller proportion of background pixels in the whole image, the simple cross-entropy loss tends to make the network predict all pixels as background, thereby minimizing the loss value. The Dice loss function directly optimizes the degree of overlap between the predicted result and the true label region, and can more effectively supervise the model's segmentation effect on water boundaries and small target regions.
[0112] In a preferred embodiment, to verify the effectiveness of the method of the present invention, comparative experiments were conducted using the publicly available datasets GLH and WHDLD, as well as a self-built high-resolution water body dataset of a certain city. The comparison models included six water body segmentation models: the original U-Net, U-Net++, Cwnnet, Arconv, TaTransunet (2024), and DconnNet (2023). A unified data preprocessing, training, and evaluation process was performed on each dataset. Evaluation metrics included Dice coefficient, IoU, Precision, Recall, and Accuracy.
[0113] like Figure 7 As shown, natural water scenes (Figure (A)) and artificial water scenes (Figure (B)) from the GLH dataset are selected for visualization comparison to observe the performance of the method of the present invention in terms of boundary preservation and local detail integrity compared with six other comparison algorithms.
[0114] As shown in Table 1, in the test results of the GLH dataset, the PCGF method of this invention achieved a Dice coefficient of 93.33%, an IoU of 87.50%, a Precision of 96.50%, a Recall of 90.37%, and an Accuracy of 94.58%. The Dice coefficient, IoU, Recall, and Accuracy are all superior to all six comparison models, with only the Precision metric slightly lower than U-Net++'s 97.59%.
[0115] Table 1. Comparison Experiment Results of GLH Dataset
[0116] The results indicate that the method of the present invention can detect water targets more fully while maintaining high prediction reliability, especially in areas that are prone to being missed, such as narrow channels, broken shorelines and weak tributaries.
[0117] like Figure 8 As shown, closed regions in the WHDLD dataset are selected for visualization comparison with slender water system scenes (Figure (A)) and complex urban background scenes (Figure (B)) to observe the suppression effect of the method of this invention on complex background interference compared with six other comparison algorithms.
[0118] As shown in Table 2, the test results on the WHDLD dataset demonstrate that the method of this invention achieves a Dice coefficient of 93.00%, an IoU of 86.91%, a Precision of 96.80%, a Recall of 89.49%, and an Accuracy of 96.78%. This dataset contains a large number of complex urban background samples, such as road shadows, building shadows, and dark rooftops, which resemble water bodies. The method of this invention outperforms the comparative models in all aspects, indicating that the synergistic effect of the CBAM and ASPP modules can effectively suppress complex background interference and maintain high regional overlap accuracy.
[0119] Table 2. Comparison Experiment Results of WHDLD Dataset
[0120] like Figure 9 As shown, five sets of images of microscale water bodies (Figure (A)) and five sets of images of macroscale water bodies (Figure (B)) from a certain city dataset were selected for visualization comparison to observe the consistency of the method of the present invention with the segmentation of small-scale water bodies and contiguous water areas compared with six other comparison algorithms.
[0121] As shown in Table 3, in the test results of a high-resolution water body dataset of a certain city, the method of this invention achieved a Dice coefficient of 93.01%, an IoU of 86.94%, a Precision of 95.86%, a Recall of 90.33%, and an Accuracy of 96.45%. This dataset covers a variety of typical scenarios, including complex water bodies in coastal cities, narrow urban river networks, and irregular shorelines. The method of this invention achieved optimal results in all indicators, fully verifying the effectiveness of residual pyramid convolutional blocks in extracting multi-scale water body features.
[0122] Table 3. Comparison Experiment Results of High-Resolution Water Body Datasets in a Certain City
[0123] Furthermore, as shown in Table 4, in the results of the mixed test set combining the three study areas, the method of this invention achieved a Dice coefficient of 93.07%, an IoU of 87.04%, a Precision of 96.59%, a Recall of 89.81%, and an Accuracy of 95.28%. It also achieved the best results in the four key indicators of Dice coefficient, IoU, Recall, and Accuracy, demonstrating the strong generalization ability and stability of the method of this invention in cross-study area scenarios.
[0124] Table 4. Results of the comparative experiment with mixed datasets
[0125] From the perspective of model efficiency, compared with the original U-Net, the method of this invention achieves a significant improvement in segmentation accuracy with a similar number of model parameters, increasing the Dice coefficient from 84.21% to 93.07%, an increase of 8.86 percentage points. Compared with U-Net++, the method of this invention maintains higher segmentation accuracy with a significantly reduced number of model parameters, increasing the Dice coefficient from 92.53% to 93.07%. These comparative results fully demonstrate that the method of this invention achieves a good balance between segmentation accuracy and model efficiency, possessing high engineering application value and market promotion prospects.
[0126] In this embodiment, U-Net (the classic baseline model) is a symmetric encoder-decoder U-shaped convolutional network proposed in 2015, which is a general baseline model for remote sensing water segmentation. The encoder downsamples to extract multi-scale local texture and water edge features, while the decoder upsamples to restore resolution. Direct skip connections stitch shallow detail features to the decoding layer, compensating for the loss of fine river and ditch contour information during downsampling. It has a simple structure, few parameters, and stable training results on small datasets. However, its drawbacks include limited information fusion in skip connections, weak global context modeling ability for long-distance, large-scale water bodies, and limited segmentation accuracy for complex mountain shadows and thin water bodies.
[0127] U-Net++ (a nested, densely packed improved version of U-Net) reconstructs skip connections based on U-Net, introducing a nested, densely packed skip structure. It adds multiple convolutional transitions between encoding and decoding layers, fusing features from shallow and deep layers layer by layer to eliminate the semantic gap between shallow and deep features. Combined with a deep supervision branch, it can optimize water body boundary localization, significantly improving the segmentation of small tributaries and fragmented water bodies compared to the original U-Net. Its drawbacks include increased network layers and higher computational cost; global long-range dependency modeling still relies solely on convolutions; and it has limitations in consistent segmentation of large, contiguous water bodies.
[0128] Cwnnet (a lightweight segmentation model for composite water networks) is a lightweight hybrid network designed specifically for multi-source, multi-temporal remote sensing composite water networks. Its core innovations lie in the fusion of Sentinel-1 radar and Sentinel-2 optical multi-source imagery to mitigate interference from vegetation and shadow spectral distortion; the embedding of a SwingTransformer and a temporal attention module to model the global dependencies of seasonally changing water networks; the use of dual-branch prediction heads adapted to both narrow ditches and large lakes; and its overall lightweight design (only 2.96 million parameters), balancing segmentation accuracy and inference speed, making it suitable for batch extraction of water bodies across large watersheds.
[0129] Arconv (Adaptive Dilated Convolutional Network) innovates with its core feature of adaptive dilated convolution, dynamically adjusting the dilation rate to construct multi-scale receptive fields. This allows for the capture of large-scale global water body information without repeated downsampling. It also uses deformable convolution to adapt to irregular, curved river contours, mitigating the problem of water body segmentation errors caused by mountain shadows and cloud cover in remote sensing images. However, it primarily relies on convolution and lacks Transformer global modeling capabilities, resulting in mediocre long-distance continuous segmentation of narrow river channels.
[0130] TaTransUNet (2024, a hybrid U-shaped network combining convolutional and Transformer architectures) is a novel hybrid architecture that integrates local convolutional feature extraction from U-Net with global self-attention from Transformer. The encoder uses convolution to extract water texture details, while the bottleneck / decoding layer introduces window self-attention to model pixel dependencies in distant water bodies, addressing the problem of global semantic fragmentation in large lakes and long rivers. Simultaneously, it embeds multi-scale attention modules to enhance small water bodies and boundary features. It is the leading state-of-the-art (SOTA) model for remote sensing water segmentation in 2024, balancing local details with global context.
[0131] DconnNet (2023, Dense Residual Connectivity Network), an improved U-shaped network proposed in 2023, is based on a dense residual connectivity module. Each layer's feature map reuses multiple channels of residuals to reduce feature loss. It incorporates a multi-scale pyramid convolution module to adapt to water bodies of different sizes, and uses lightweight channel attention to suppress interference from vegetation and bare land backgrounds. The model has a moderate number of parameters and is optimized for high-resolution remote sensing of small ditches and fragmented water bodies. It outperforms the traditional U-Net series on imbalanced water datasets.
[0132] Among the evaluation metrics, the Dice coefficient measures the overlap similarity between the predicted water body region and the actual water body label, with a value range of [0,1]. A higher value indicates better segmentation overlap. It is sensitive to changes in the boundaries of small targets and fragmented water bodies, and is a core indicator for class-imbalanced remote sensing water body segmentation.
[0133] IoU (Intersection over Union / Jaccard index) is used to predict the area of intersection / union between a water body and the actual water body, with a value range of [0,1]. It focuses on the overall overlap of regions and is a common core indicator for semantic segmentation; compared to Dice, it penalizes falsely detected background pixels more strongly and is suitable for evaluating the segmentation integrity of large lakes and contiguous water areas.
[0134] Precision represents the percentage of actual water bodies among all pixels predicted as water. It measures a model's ability to avoid false detections and assesses the degree to which interfering features such as mountain shadows, roads, and mudflats are misclassified as water bodies. Higher precision indicates fewer background missegments.
[0135] Recall is the proportion of real water body pixels that are successfully detected. It measures the model's ability to avoid missing detections. For weak water body targets such as small tributaries, puddles, and narrow ditches, a higher recall rate means fewer water bodies are missed.
[0136] Accuracy (pixel accuracy) represents the total percentage of correctly classified pixels in an entire image. It is only suitable for scenarios where the number of pixels in the water and background is relatively balanced. In remote sensing images, the background often accounts for a very high percentage, so this metric is prone to being inflated and cannot truly reflect the quality of water segmentation. It should only be used as an auxiliary reference metric.
[0137] Compared with the prior art, the present invention has the following beneficial effects: This invention, by introducing a dynamic grouped residual pyramid convolution structure, can enhance the feature representation capabilities of narrow channels, broken shorelines, and large-scale planar water bodies, and improve the problems of water body boundary fractures and semantic inconsistencies within regions.
[0138] This invention enhances the contextual constraint capability of deep features by introducing a global semantic aggregation mechanism at the network bottleneck layer, thereby reducing the interference of building shadows, road shadows, and other low-reflectivity features on water body identification under complex background conditions.
[0139] This invention, through the collaborative design of dynamic grouped convolution and global semantic aggregation, can improve segmentation accuracy while also taking into account model parameter efficiency.
[0140] In comparative experiments on three datasets, compared with six comparative models, the proposed method achieved the best results in terms of Dice coefficient, IoU, Recall, and Accuracy, indicating that the proposed method has good segmentation accuracy, stability, and applicability to multiple scenarios.
[0141] Furthermore, compared to the original U-Net, the method of this invention can achieve higher segmentation accuracy with a similar number of model parameters; compared to U-Net++, the method of this invention can further improve the segmentation effect with a reduced number of model parameters, thus having good engineering application value.
[0142] Example 3 like Figure 10 As shown, the third embodiment of the present invention also provides an image segmentation device based on dynamic grouped residual pyramid convolution, comprising: The preprocessing unit is used to acquire and preprocess remote sensing images of water targets to be segmented to obtain a standardized input image. The encoding unit is used to input the standardized input image into the encoding path, extract local multi-scale features at the downsampling level of the encoding path using a dynamically grouped residual pyramid convolutional block, and configure a dynamic grouping strategy in one of the convolutional branches of the dynamically grouped residual pyramid convolutional block: dynamically select grouped convolution or standard convolution based on whether the number of input channels and the number of output channels at the current level meet the preset grouping number divisibility condition. The global semantic aggregation unit is used to perform dilated spatial pyramid pooling on deep features at the bottleneck layer of the encoding path to obtain global semantic enhancement features. The decoding output unit is used to input the global semantic enhancement features into the decoding path, and to concatenate and fuse them with the corresponding hierarchical features of the encoding path to output pixel-level water body segmentation results.
[0143] Example 4 The fourth embodiment of the present invention also provides an image segmentation device for a dynamic grouped residual pyramid convolutional neural network, which includes a memory and a processor. The memory stores a computer program that can be executed by the processor to implement the image segmentation method of the dynamic grouped residual pyramid convolutional neural network as described above.
[0144] Example 5 The fifth embodiment of the present invention also provides a computer-readable storage medium storing computer-readable instructions. When the computer-readable instructions are executed by the processor of the device where the computer-readable storage medium is located, they implement the image segmentation method of the dynamic grouped residual pyramid convolutional neural network as described above.
[0145] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A dynamic grouped residual pyramid convolutional neural network, characterized in that, Including encoding path and decoding path; Dynamically grouped residual pyramid convolutional blocks are used at the downsampling level of the encoding path to extract local multi-scale features of the input image; The dynamically grouped residual pyramid convolutional block includes a main branch and a shortcut branch; The main branch contains at least two sets of convolutional branch structures with different receptive field sizes. The outputs of each convolutional branch are spliced together in the channel dimension and then fused with the residuals of the shortcut branch. One set of convolutional branches is configured with a dynamic grouping strategy, that is: dynamically select grouped convolution or standard convolution based on whether the number of input channels and the number of output channels of the current layer meet the preset grouping divisibility condition; A dilated spatial pyramid pooling module is configured at the bottleneck layer of the encoding path to perform dilated spatial pyramid pooling processing on deep features in order to obtain multi-scale global context information. The void space pyramid pooling module includes five parallel branches, and the outputs of the five parallel branches are spliced and fused in the channel dimension to obtain global semantic enhancement features; The decoding path receives the global semantic enhancement features and concatenates and fuses them with the corresponding hierarchical features of the encoding path to output pixel-level segmentation results.
2. The dynamic grouped residual pyramid convolutional neural network according to claim 1, characterized in that... The two sets of convolutional branch structures with different receptive field sizes are 3×3 convolutional branches and 5×5 convolutional branches, respectively. The number of output channels of both convolutional branches is configured to be half of the target number of output channels of the module.
3. The dynamic grouped residual pyramid convolutional neural network according to claim 1, characterized in that... The shortcut branch uses identity mapping when the number of input channels is the same as the number of output channels, and uses 1×1 convolution for channel matching when the number of input channels is different from the number of output channels.
4. The dynamic grouped residual pyramid convolutional neural network according to claim 2, characterized in that... The dynamic grouping strategy is as follows: when the number of input channels of the 5×5 convolution branch is equal to zero modulo the preset number of groups and the number of output channels is equal to zero modulo the preset number of groups, the actual number of groups is equal to the preset number of groups, and a grouping convolution strategy with the preset number of groups is adopted. Otherwise, set the actual number of groups to 1 and use the standard convolution strategy.
5. The dynamic grouped residual pyramid convolutional neural network according to claim 1, characterized in that... The dynamically grouped residual pyramid convolutional block also includes an attention recalibration unit; The attention recalibration unit is a convolutional block attention module (CBAM). CBAM consists of a channel attention submodule and a spatial attention submodule. The channel attention submodule is used to simultaneously perform global average pooling and global max pooling on the input features, and generate channel weights after shared mapping. The spatial attention submodule is used to perform average pooling and max pooling on the channel-weighted features, and generate spatial weights after convolution mapping; The channel weights and spatial weights respectively weight the input features to enhance the effective feature response and suppress interference from irrelevant background features.
6. The dynamic grouped residual pyramid convolutional neural network according to claim 1, characterized in that... The five parallel branches are as follows: the first branch uses 1×1 convolution; the second to fourth branches use 3×3 dilated convolution with different dilation rates; and the fifth branch uses global average pooling, 1×1 convolution, and upsampling to restore spatial resolution.
7. The dynamic grouped residual pyramid convolutional neural network according to claim 1, characterized in that... It also includes: performing spatial size alignment on the upsampled features of the decoding path before splicing and fusing the decoding paths, so as to ensure the consistency of cross-layer feature fusion.
8. An image segmentation method based on a dynamic grouped residual pyramid convolutional neural network as described in any one of claims 1-7, characterized in that, include: S1. Acquire and preprocess the remote sensing image of the target to be segmented to obtain a standardized input image; S2, the standardized input image is input into the encoding path, and local multi-scale features are extracted at the downsampling level of the encoding path using dynamic grouped residual pyramid convolutional blocks. A dynamic grouping strategy is configured in one of the convolutional branches of the dynamic grouped residual pyramid convolutional blocks, that is: dynamically select grouped convolution or standard convolution based on whether the number of input channels and the number of output channels at the current level meet the preset grouping divisibility condition. S3, At the bottleneck layer of the encoding path, the deep features are subjected to dilated spatial pyramid pooling to obtain global semantic enhancement features; S4. Input the global semantic enhancement features into the decoding path and concatenate and fuse them with the corresponding layer features of the encoding path to output pixel-level segmentation results.
9. The image segmentation method according to claim 8, characterized in that... The preprocessing includes at least one of the following: radiometric correction, geometric correction, image cropping, label binarization remapping, pixel value normalization, and data augmentation. The label binarization remapping is used to map the original multi-class labels into two-class labels.
10. The image segmentation method according to claim 8, characterized in that... It also includes: The network parameters of the corresponding model of the image segmentation method are optimized by using the cross-entropy loss function or a combination of the cross-entropy loss function and the Dice loss function; The Dice loss function is used to enhance the supervision of target image boundaries and small target regions in class imbalance scenarios.