Land classification method based on deep and shallow features and multi-attention mechanism fusion, electronic device and storage medium

By constructing a multi-scale attention mechanism layer and a feature fusion network, the accuracy problem of segmentation between multiple and similar categories in land use classification is solved, achieving high-precision land use classification and supporting applications in urban management and ecological environmental protection.

CN117173462BActive Publication Date: 2026-03-03HARBIN AEROSPACE STAR DATA SYST TECH CO LTD
View PDF 1 Cites 0 Cited by

Patent Information

Application Number
CN202311105267.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-08-30
Publication Date
2026-03-03
Estimated Expiration
2043-08-30

AI Technical Summary

Technical Problem

Existing land use classification methods lack accuracy in segmenting multiple and similar categories, making it difficult to promote and apply them in high-precision industry sectors.

Method used

A land classification method based on the fusion of shallow and deep features and multi-attention mechanism is adopted. By constructing a multi-scale normalized spatial attention mechanism layer, a multi-scale normalized directional position attention mechanism layer, and a multi-scale normalized channel attention mechanism layer, and combining a normalized multi-attention feature extraction network and a multi-shallow feature fusion dilated convolutional network, feature extraction and fusion are performed.

Benefits of technology

It improves the accuracy of land use classification, especially in complex multi-category remote sensing images, enabling efficient identification of different land use types and providing technical support for urban management, ecological and environmental protection, and agricultural supervision.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117173462B_ABST
    Figure CN117173462B_ABST
Patent Text Reader

Abstract

The land classification method based on deep and shallow feature and multi-attention mechanism fusion, electronic equipment and storage medium belong to the technical field of remote sensing image processing and deep learning semantic segmentation. In order to solve the problem of accurate classification of similar categories and category boundaries in land use classification method, the present application comprises the following steps: constructing a multi-scale normalized spatial attention mechanism layer; constructing a multi-scale normalized direction position attention mechanism layer; constructing a multi-scale normalized channel attention mechanism layer; constructing a land use classification network model, including a normalized multi-attention feature extraction network and a multi-deep and shallow feature fusion dilated convolution network; collecting data in the city-rural area adaptive land surface cover dataset; performing data preprocessing to obtain land data set; inputting the land data set into the constructed land use classification network model; performing land classification training based on deep and shallow feature and multi-attention mechanism fusion; and obtaining the land classification model based on deep and shallow feature and multi-attention mechanism fusion. The present application is accurate in classification.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention belongs to the technical field of remote sensing image processing and deep learning semantic segmentation, specifically involving a land classification method, electronic device and storage medium based on the fusion of deep and shallow features and multi-attention mechanism. Background Technology

[0002] Land use can be understood as a series of products created by the combination of human activities and land, or as the exchange and transformation of matter, energy, value, and information generated by the interaction between the Earth's surface and the development of social civilization. Currently, it is widely used in urban management, ecological protection, and agricultural supervision, such as urban regional planning, monitoring of illegal construction, ecological pattern assessment, assessment of environmentally vulnerable areas, and supervision of non-agricultural and non-grain crops. Even today, how to obtain land use classification results using remote sensing image data efficiently, accurately, frequently, and at low cost remains a hotly debated research issue.

[0003] Satellite remote sensing imagery data, characterized by its large coverage area, short replay cycle, and historical traceability, provides effective data support for land use monitoring and change monitoring. Machine learning methods based on supervised classification, object-oriented programming, artificial neural networks, and support vector machines have been widely applied in land use analysis for a long time. The main techniques used are thresholding, edge segmentation, region segmentation, and image semantic segmentation based on specific theories. The main problem with these methods is that they mostly utilize relatively shallow semantic information for image segmentation, failing to extract deeper contextual information about similar categories. Furthermore, they struggle to cover all land types in multi-category classification. In recent years, with the rise and rapid development of deep learning semantic segmentation algorithms (CNNs), they are able to mine deeper contextual information and perform more refined land use classification. The main algorithms include pixel-level semantic segmentation algorithms such as ResNet, MobileNet, and DenseNet, which effectively achieve single-class image segmentation; pixel block semantic segmentation algorithms such as U_net, SegNet, and pspNet, which effectively achieve multi-class image segmentation; DeeplabV3+ utilizes dilated spatial convolutional pooling pyramid (ASPP) and shallow fusion to better segment class edges; in addition to the widespread application of CNN algorithms, natural language processing transformers are also beginning to be applied to land use. This type of network mainly utilizes multi-head attention mechanisms, enabling the model to focus on information from different locations and obtain richer feature information.

[0004] Existing technologies have good accuracy in the overall classification of major land use categories, but they still have significant problems in the segmentation of multiple categories, similar categories, and category edges, making it difficult to promote and apply them in high-precision industry fields. Summary of the Invention

[0005] The problem this invention aims to solve is the accurate classification of similar categories and category boundaries in land use classification methods. It proposes a land classification method, electronic device, and storage medium based on the fusion of deep and shallow features and multi-attention mechanism.

[0006] To achieve the above objectives, the present invention provides the following technical solution:

[0007] A land classification method based on the fusion of light and dark features and a multi-attention mechanism includes the following steps:

[0008] S1. Construct a multi-scale normalized spatial attention mechanism layer MANSAM;

[0009] S2. Construct the multi-scale normalized orientation position attention mechanism layer MANDPAM;

[0010] S3. Construct the multi-scale normalized channel attention mechanism layer MANCAM;

[0011] S4. Construct a land use classification network model, including a normalized multi-attention feature extraction network NSCPANet and a multi-shallow feature fusion dilated convolutional network MNSDDNet. The normalized multi-attention feature extraction network NSCPANet includes a shallow feature extraction network and a deep feature extraction network. The multi-shallow feature fusion dilated convolutional network MNSDDNet uses the shallow feature fusion method SDFF to fuse the features of the shallow feature extraction network and the deep feature extraction network.

[0012] S5. Collect data from the urban-rural adaptive land cover dataset, perform data preprocessing, and obtain the land dataset.

[0013] S6. Input the land dataset obtained in step S5 into the land use classification network model constructed in step S4, and perform land classification training based on the fusion of deep and shallow features and multi-attention mechanism to obtain a land classification model based on the fusion of deep and shallow features and multi-attention mechanism.

[0014] Furthermore, the specific implementation method of step S1 includes the following steps:

[0015] S1.1 Perform average pooling and max pooling on the input feature data along the channel direction. The expression for calculating the average pooling feature A(C) is as follows:

[0016]

[0017] Where C represents the total number of input channels, i represents any one of C, and x(C, i) represents the input feature data of the i-th channel;

[0018] The expression for calculating the max-pooling feature M(C) is:

[0019] M(C) = Max(x(C, i))

[0020] Where Max represents the max pooling operation;

[0021] S1.2 Connect A(C) and M(C) along the channel direction to obtain the connection feature Y(C), and the calculation expression is:

[0022] Y(C) = Cat(A(C), M(C))

[0023] Where Cat represents the join operation;

[0024] S1.3. Perform a 7×7 convolution operation on Y(C) to obtain the convolution feature Y(F), calculated as follows:

[0025] Y(F)=∫ 7×7 (Y(C))

[0026] Among them, ∫ 7×7 This represents a convolution operation with a 7×7 convolution kernel;

[0027] S1.4. Perform scaling factor weight calculation on Y(F) in batch normalized BN to obtain the scaling factor weight feature Y(BN) in normalized BN. The calculation expression is as follows:

[0028] Y(BN)=ω λ (BN(Y(F)))

[0029]

[0030]

[0031] Where λ represents the scaling factor for each channel, ω λ This indicates the weight, μ. B and σ B Let represent the mean and standard deviation of the mini-batch, r and β represent the finite transform size and bias of the trainable model, BN(s) represent the scaling factor, ∈ represent the penalty factor, and Bin out This represents the output features of the previous layer;

[0032] S1.5. Apply the sigmoid activation function to Y(BN) to obtain the attention vector, and then assign the attention vector to the input feature data to complete the multi-scale normalized spatial attention mechanism layer MANSAM assignment, thereby obtaining the output Y of the multi-scale normalized spatial attention mechanism layer. The calculation expression is as follows:

[0033] Y = sigmoid(Y(BN)) × input x

[0034] Where sigmoid represents the activation function operation, input x This represents the input feature data.

[0035] Furthermore, the specific implementation method of step S2 includes the following steps:

[0036] S2.1 Perform average pooling along the feature length H on the input feature data. The calculation expression is:

[0037]

[0038] Where W represents the feature width, H represents the feature length, i represents the number of width features, and x represents the number of width features. C (H, i) represents the i-th width feature data;

[0039] Max pooling is performed on the input feature data along the feature length H. The calculation expression is:

[0040]

[0041] The input feature data is subjected to average pooling along the feature width W. The calculation expression is:

[0042]

[0043] Where j represents any one of W;

[0044] Max pooling is performed on the input feature data along the feature width W. The calculation expression is:

[0045]

[0046] S2.2, to The scaling factor weight calculation in batch normalized BN is performed using the following expression:

[0047]

[0048]

[0049]

[0050]

[0051] in, The scaling factor weight features in the normalized BN with average pooling along the feature length H are the features. The scaling factor weight features in the normalized BN with max pooling along the feature length H are the features. The scaling factor weights in the normalized BN with average pooling along the feature width W are the features. The scaling factor weight features in the normalized BN with max pooling in the feature width W direction;

[0052] S2.3, to Performing a matrix dot product yields the matrix dot product feature Y(H) along the feature length H, calculated as follows:

[0053]

[0054] right Performing a matrix dot product yields the matrix dot product feature Y(W) along the feature width W, calculated as follows:

[0055]

[0056] S2.4. Transpose Y(W) and connect it to Y(H) along the H direction to obtain the connected feature Y(H, W) along the feature length H and feature width W directions. The calculation expression is as follows:

[0057] Y(H,W)=Cat(Y(H),Y(W).transpsition)

[0058] Where transpose denotes matrix transpose;

[0059] S2.5. Perform Conv2d, 1×1 convolution, batch normalization (BN), and activation function h_swish operations on Y(H, W) to obtain the multi-step operational features F(H, W) in the feature length H direction and feature width W direction. The calculation expression is as follows:

[0060] F(H, W) = h_swish(BN(∫ 1×1 (Y(H,W))))

[0061] Where h_swish represents the activation function operation, ∫ 1×1 This represents a convolution operation with a 1×1 convolution kernel.

[0062] S2.6. Divide F(H, W) into segments and calculate the expression:

[0063] F(H) (C,H,1) , F(W) (C,1,W) =split(F(H, W))

[0064] Where split represents the feature segmentation operation, (C, H, 1) and (C, 1, W) represent the feature size, and F(H) represents the feature size. (C,H,1) F(W) represents the segmentation feature along the feature length H. (C,1,W) This represents the segmentation feature along the width W direction;

[0065] S2.7, respectively for F(H) (C,H,1) F(W) (C,1,W) Perform Conv2d and 1×1 convolution operations and activation function h_swish operations to obtain the attention vector Y(Ht) of the segmentation features in the feature length H direction and the attention vector Y(Wt) of the segmentation features in the feature width W direction (these two letters have been used before, so they need to be modified here). The calculation expression is:

[0066] Y(Ht)=sigmoid(∫ 1×1 (F(H) (C,H,1) ))

[0067] Y(Wt)=sigmoid(∫ 1×1 (F(W) (C,1,W) ));

[0068] S2.8. Assign the attention vector Y(Ht) of the segmentation features along the feature length H and the attention vector Y(Wt) of the segmentation features along the feature width W to the input feature data, completing the MANDPAM assignment of the multi-scale normalized directional position attention mechanism layer, and obtaining the feature output M(y) of the multi-scale normalized directional position attention mechanism layer. The calculation expression is as follows:

[0069] M(y) = Y(Ht) × Y(Wt) × input x .

[0070] Furthermore, the specific implementation method of step S3 includes the following steps:

[0071] S3.1 Perform global average pooling on the input feature data to obtain the global average pooled feature A. C (H, W), the calculation expression is:

[0072]

[0073] Perform global max pooling on the input feature data to obtain the global max pooled feature M. C (H, W), the calculation expression is:

[0074] M C (H, W) = Max(x) C (H, W, i, j));

[0075] S3.2, respectively for A C (H, W), M C (H, W) performs scaling factor weight analysis and ReLU6 activation function operation in batch normalized BN, and finally performs scaling factor weight analysis in batch normalized BN again to obtain the scaling factor weight feature BN(A) of the global average pooling feature and the scaling factor weight feature BN(M) of the global max pooling feature in normalized BN. The calculation expression is:

[0076] BN(A)=ω λ (BN(Relu6(ω λ (BN(A C (H, W))))))

[0077] BN(M)=ω λ (BN(Relu6(ω λ (BN(M C (H, W))))));

[0078] S3.3. Perform a summation operation on BN(A) and BN(M) to obtain the summation characteristic M(x), and the calculation expression is:

[0079] M(x) = BN(A) + BN(M);

[0080] S3.4. Apply the activation function h_swish to M(x) to obtain the attention vector of the summation features.

[0081] The summation operation feature attention vector is assigned to the input feature data to complete the MANCAM assignment of the multi-scale normalized channel attention mechanism layer, resulting in the multi-scale normalized channel attention mechanism layer feature C(y), calculated as follows:

[0082] C(y) = sigmoid(M(x)) × input x .

[0083] Furthermore, the specific implementation method of step S4 includes the following steps:

[0084] S4.1 Construct a normalized multi-attention feature extraction network NSCPANet, which includes a shallow feature extraction network and a deep feature extraction network;

[0085] S4.1.1 Constructing the Shallow_bneck shallow feature extraction network: This is built on the MobileNetV3 model bneck. First, the input features are subjected to a 1×1 convolution operation to increase the dimensionality of the feature channels. Then, a 3×3 depthwise separable convolution is used to extract residual edges and feature information. Next, the multi-scale normalized spatial attention mechanism layer MANSAM constructed in step S1 is used to extract the feature spatial weights. Then, the multi-scale normalized orientation position attention mechanism layer MANDPAM constructed in step S2 is used to extract the feature orientation position weights. Finally, a 1×1 convolution operation is used to reduce the dimensionality of the feature map and restore the channel size of the input features, resulting in the Shallow_bneck shallow feature extraction network.

[0086] S4.1.2 Constructing the Deep_bneck deep feature extraction network is based on the MobileNetV3 model bneck. First, the input features are subjected to a 1×1 convolution operation to increase the dimensionality of the feature channels. Then, a 3×3 depthwise separable convolution is used to extract residual edges and feature information. Next, the MANCAM layer, a multi-scale normalized channel attention mechanism layer constructed in step S3, is used to extract the feature channel weights. Finally, a 1×1 convolution operation is used to reduce the dimensionality of the feature map to restore the channel size of the input features, thus obtaining the Deep_bneck deep feature extraction network.

[0087] S4.1.3. Constructing the Normalized Multi-Attention Feature Extraction Network (NSCPANet): This NSCPANet model is built based on the MobileNetV3 model. First, the input image data undergoes a 3×3 convolution operation (Covn2d) with a stride of 2 and a feature map size of 16. Then, batch normalization (BatchNorm2d) and the activation function (h_swish) are performed to downsample the features by 1 / 2, resulting in the first output feature (out1). The first output feature (out1) is then input into Shallow_bneck for further downsampling by 1 / 4 and 1 / 8. The second output feature out2 and the third output feature out3 are obtained by sampling. The third output feature out3 is then input into Deep_bneck for 1 / 16 feature downsampling to obtain the fourth output feature out4. The fourth output feature out4 is then input into Deep_bneck for 1 / 32 feature downsampling. Then, convolution operation with a 3×3 convolution kernel size, a stride of 2, and a feature map size of 960 is used for feature augmentation. Finally, batch normalization BatchNorm2d and activation function h_swish are performed to obtain the fifth output feature out5.

[0088] S4.2 Constructing a multi-depth and shallow feature fusion dilated convolutional network MNSDDNet;

[0089] S4.2.1 Constructing the shallow and deep feature fusion method SDFF: The shallow and deep feature fusion method SDFF utilizes the normalized multi-attention feature extraction network NSCPANet constructed in step S4.1 to downsample the input data by 1 / 2, 1 / 4, 1 / 8, 1 / 16, and 1 / 32 respectively. Then, the downsampled 1 / 2, 1 / 8, 1 / 16, and 1 / 32 features are respectively processed using the convolution algorithm Covn2d, 1×1, and upsampling algorithm to restore the number of channels and size to the same as the 1 / 4 downsampled features and concatenate them to complete the shallow and deep feature fusion. The calculation expression is:

[0090] FT = Cat(interpolate(∫ 1×1 (FT 1 / 2 FT 1 / 8 FT 1 / 16 FT 1 / 32 )), FT 1 / 4 )

[0091] Among them, FT 1 / 2 Represents the features downsampled by 1 / 2, FT 1 / 4 This represents the feature downsampled by 1 / 4, FT 1 / 8 This represents the feature downsampled by 1 / 8, FT 1 / 16 This represents the feature downsampled by 1 / 16, FT 1 / 32 Represents the feature sampled by 1 / 32, ∫ 1×1 This represents a convolution operation with a 1×1 kernel, and interpolate represents an upsampling operation that enhances the feature edges;

[0092] S4.2.2 Constructing the Multi-Deep and Shallow Feature Fusion Dilated Convolutional Network (MNSDDNet): This is a model based on the DeeplabV3+ model. First, the fifth output feature out5 obtained in step S4.1 is subjected to dilated spatial convolution, pooling, pyramid operations, and feature concatenation operations to obtain feature x. Then, the deep and shallow feature fusion method SDFF constructed in S4.2.1 is used to fuse x, out1, out2, out3, and out4 to obtain x1. x1 is then subjected to convolution with a kernel size of 1×1, a stride of 1, and a feature map equal to the number of classes num_classes. Finally, the interpolate upsampling method is used to restore the original feature size for land use classification prediction.

[0093] Furthermore, the specific implementation method of step S5 includes the following steps:

[0094] S5.1 Collect data from the urban-rural adaptive land cover dataset and modify the original 1024×1024 dataset to a 512×512 dataset.

[0095] S5.2 Label the data in the modified dataset, where 0 represents no data area, 1 represents background, 2 represents urban and rural residential land, 3 represents road, 4 represents water area, 5 represents unused land, 6 represents forest land, and 7 represents cultivated land.

[0096] S5.3. Perform rotation, mirroring, blurring, and noise preprocessing on the labeled dataset to obtain the land dataset.

[0097] Furthermore, in step S6, the land dataset obtained in step S5 is input into the land use classification network model constructed in step S4 to perform land classification training based on the fusion of shallow and deep features and multi-attention mechanism. The training is completed using the dice_loss loss function, sgd optimization algorithm, and cos loss decay strategy to obtain a land classification model based on the fusion of shallow and deep features and multi-attention mechanism.

[0098] An electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of the land classification method based on the fusion of deep and shallow features and a multi-attention mechanism.

[0099] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the land classification method based on the fusion of deep and shallow features and a multi-attention mechanism.

[0100] The beneficial effects of this invention are:

[0101] This invention presents a land classification method based on the fusion of shallow and deep features and multiple attention mechanisms. It designs the MANAM and MANDPAM attention mechanisms and applies them to the spatial and directional attention vector extraction of shallow features, effectively extracting contextual information about category boundaries and the category as a whole. It also designs the MANCAM attention mechanism and applies it to the channel direction attention vector extraction of deep features, effectively extracting contextual information about similar categories and the category as a whole. Finally, it designs the SDFF feature fusion algorithm to achieve cross-domain fusion of shallow and deep features, enabling effective segmentation of shallow boundaries. This invention can not only more accurately extract scenes with fewer categories, such as water bodies, lake ice, and individual buildings and roads, but also achieve high-precision land use classification images in complex multi-category remote sensing images. The method of this invention can efficiently and accurately identify different land use types from high-resolution, multi-temporal satellite remote sensing images, providing technical support for many fields such as urban management, ecological protection, and agricultural supervision. Attached Figure Description

[0102] Figure 1 This is a flowchart of the land classification method based on the fusion of shallow and deep features and multi-attention mechanism described in this invention;

[0103] Figure 2 This is the architecture diagram of the NSCPANet_NSCPANet land classification method based on the fusion of shallow and deep features and multi-attention mechanism described in this invention;

[0104] Figure 3 This is a diagram of the Shallow_bneck architecture of the land classification method based on the fusion of shallow and deep features and multi-attention mechanism described in this invention.

[0105] Figure 4 This is a diagram of the Deep_bneck architecture of the land classification method based on the fusion of shallow and deep features and multi-attention mechanism described in this invention.

[0106] Figure 5 This is a diagram of the MANSAM architecture of the land classification method based on the fusion of shallow and deep features and multi-attention mechanism described in this invention.

[0107] Figure 6 This is a diagram of the MANDPAM architecture of the land classification method based on the fusion of shallow and deep features and multi-attention mechanism described in this invention.

[0108] Figure 7 This is a diagram of the MANCAM architecture of the land classification method based on the fusion of shallow and deep features and multi-attention mechanism described in this invention. Detailed Implementation

[0109] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the specific embodiments described herein are only for explaining the invention and are not intended to limit the invention; that is, the described specific embodiments are merely a part of the embodiments of the invention, and not all of them. The components of the specific embodiments of the invention described and shown in the accompanying drawings can generally be arranged and designed in various different configurations, and the invention may also have other embodiments.

[0110] Therefore, the following detailed description of specific 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 specific embodiments of the invention. All other specific embodiments obtained by those skilled in the art based on these specific embodiments without inventive effort are within the scope of protection of this invention.

[0111] To further understand the invention's content, features, and effects, the following specific embodiments are provided, along with accompanying drawings. Figure 1 -Appendix Figure 7 Detailed explanation is as follows: Specific implementation method one:

[0113] A land classification method based on the fusion of light and dark features and a multi-attention mechanism includes the following steps:

[0114] S1. Construct a multi-scale normalized spatial attention mechanism layer MANSAM;

[0115] Furthermore, the specific implementation method of step S1 includes the following steps:

[0116] S1.1 Perform average pooling and max pooling on the input feature data along the channel direction. The expression for calculating the average pooling feature A(C) is as follows:

[0117]

[0118] Where C represents the total number of input channels, i represents any one of C, and x(C, i) represents the input feature data of the i-th channel;

[0119] The expression for calculating the max-pooling feature M(C) is:

[0120] M(C) = Max(x(C, i))

[0121] Where Max represents the max pooling operation;

[0122] S1.2 Connect A(C) and M(C) along the channel direction to obtain the connection feature Y(C), and the calculation expression is:

[0123] Y(C) = Cat(A(C), M(C))

[0124] Where Cat represents the join operation;

[0125] S1.3. Perform a 7×7 convolution operation on Y(C) to obtain the convolution feature Y(F), calculated as follows:

[0126] Y(F)=∫ 7×7 (Y(C))

[0127] Among them, ∫ 7×7 This represents a convolution operation with a 7×7 convolution kernel;

[0128] S1.4. Perform scaling factor weight calculation on Y(F) in batch normalized BN to obtain the scaling factor weight feature Y(BN) in normalized BN. The calculation expression is as follows:

[0129] Y(BN)=ω λ (BN(Y(F)))

[0130]

[0131]

[0132] Where λ represents the scaling factor for each channel, ω λ This indicates the weight, μ. B and σ B Let represent the mean and standard deviation of the mini-batch, r and β represent the finite transform size and bias of the trainable model, BN(s) represent the scaling factor, ∈ represent the penalty factor, and Bin out This represents the output features of the previous layer;

[0133] S1.5. Apply the sigmoid activation function to Y(BN) to obtain the attention vector, and then assign the attention vector to the input feature data to complete the multi-scale normalized spatial attention mechanism layer MANSAM assignment, thereby obtaining the output Y of the multi-scale normalized spatial attention mechanism layer. The calculation expression is as follows:

[0134] Y = sigmoid(Y(BN)) × input x

[0135] Where sigmoid represents the activation function operation, input x This represents the input feature data;

[0136] S2. Construct the multi-scale normalized orientation position attention mechanism layer MANDPAM;

[0137] Furthermore, the specific implementation method of step S2 includes the following steps:

[0138] S2.1 Perform average pooling along the feature length H on the input feature data. The calculation expression is:

[0139]

[0140] Where W represents the feature width, H represents the feature length, i represents the number of width features, and x represents the number of width features. C (H, i) represents the i-th width feature data;

[0141] Max pooling is performed on the input feature data along the feature length H. The calculation expression is:

[0142]

[0143] The input feature data is subjected to average pooling along the feature width W. The calculation expression is:

[0144]

[0145] Where j represents any one of W;

[0146] Max pooling is performed on the input feature data along the feature width W. The calculation expression is:

[0147]

[0148] S2.2, to The scaling factor weight calculation in batch normalized BN is performed using the following expression:

[0149]

[0150]

[0151]

[0152]

[0153] in, The scaling factor weight features in the normalized BN with average pooling along the feature length H are the features. The scaling factor weight features in the normalized BN with max pooling along the feature length H are the features. The scaling factor weights in the normalized BN with average pooling along the feature width W are the features. The scaling factor weight features in the normalized BN with max pooling in the feature width W direction;

[0154] S2.3, to Performing a matrix dot product yields the matrix dot product feature Y(H) along the feature length H, calculated as follows:

[0155]

[0156] right Performing a matrix dot product yields the matrix dot product feature Y(W) along the feature width W, calculated as follows:

[0157]

[0158] S2.4. Transpose Y(W) and connect it to Y(H) along the H direction to obtain the connected feature Y(H, W) along the feature length H and feature width W directions. The calculation expression is as follows:

[0159] Y(H,W)=Cat(Y(H),Y(W).transpsition)

[0160] Where transpose denotes matrix transpose;

[0161] S2.5. Perform Conv2d, 1×1 convolution, batch normalization (BN), and activation function h_swish operations on Y(H, W) to obtain the multi-step operational features F(H, W) in the feature length H direction and feature width W direction. The calculation expression is as follows:

[0162] F(H, W) = h_swish(BN(∫ 1×1 (Y(H,W))))

[0163] Where h_swish represents the activation function operation, ∫ 1×1 This represents a convolution operation with a 1×1 convolution kernel.

[0164] S2.6. Divide F(H, W) into segments and calculate the expression:

[0165] F(H) (C,H,1) , F(W) (C,1,W) =split(F(H, W))

[0166] Where split represents the feature segmentation operation, (C, H, 1) and (C, 1, W) represent the feature size, and F(H) represents the feature size. (C,H,1) F(W) represents the segmentation feature along the feature length H. (C,1,W) This represents the segmentation feature along the width W direction;

[0167] S2.7, respectively for F(H) (C,H,1) F(W) (C,1,W) Perform Conv2d and 1×1 convolution operations and activation function h_swish operations to obtain the attention vector Y(Ht) of the segmentation features in the feature length H direction and the attention vector Y(Wt) of the segmentation features in the feature width W direction. The calculation expression is as follows:

[0168] Y(Ht)=sigmoid(∫ 1×1 (F(H) (C,H,1) ))

[0169] Y(Wt)=sigmoid(∫ 1×1 (F(W) (C,1,W) ));

[0170] S2.8. Assign the attention vector Y(Ht) of the segmentation features along the feature length H and the attention vector Y(Wt) of the segmentation features along the feature width W to the input feature data, completing the MANDPAM assignment of the multi-scale normalized directional position attention mechanism layer, and obtaining the feature output M(y) of the multi-scale normalized directional position attention mechanism layer. The calculation expression is as follows:

[0171] M(y) = Y(Ht) × Y(Wt) × input x ;

[0172] S3. Construct the multi-scale normalized channel attention mechanism layer MANCAM;

[0173] Furthermore, the specific implementation method of step S3 includes the following steps:

[0174] S3.1 Perform global average pooling on the input feature data to obtain the global average pooled feature A. C (H, W), the calculation expression is:

[0175]

[0176] Perform global max pooling on the input feature data to obtain the global max pooled feature M. C (H, W), the calculation expression is:

[0177] M C (H, W) = Max(x) C (H, W, i, j));

[0178] S3.2, respectively for A C (H, W), M C (H, W) performs scaling factor weight analysis and ReLU6 activation function operation in batch normalized BN, and finally performs scaling factor weight analysis in batch normalized BN again to obtain the scaling factor weight feature BN(A) of the global average pooling feature and the scaling factor weight feature BN(M) of the global max pooling feature in normalized BN. The calculation expression is:

[0179] BN(A)=ω λ (BN(Relu6(ω λ (BN(A C (H, W))))))

[0180] BN(M)=ω λ (BN(Relu6(ω λ (BN(M C (H, W))))));

[0181] S3.3. Perform a summation operation on BN(A) and BN(M) to obtain the summation characteristic M(x), and the calculation expression is:

[0182] M(x) = BN(A) + BN(M);

[0183] S3.4. Apply the activation function h_swish to M(x) to obtain the attention vector of the summation features.

[0184] The summation operation feature attention vector is assigned to the input feature data to complete the MANCAM assignment of the multi-scale normalized channel attention mechanism layer, resulting in the multi-scale normalized channel attention mechanism layer feature C(y), calculated as follows:

[0185] C(y) = sigmoid(M(x)) × input x ;

[0186] S4. Construct a land use classification network model, including a normalized multi-attention feature extraction network NSCPANet and a multi-shallow feature fusion dilated convolutional network MNSDDNet. The normalized multi-attention feature extraction network NSCPANet includes a shallow feature extraction network and a deep feature extraction network. The multi-shallow feature fusion dilated convolutional network MNSDDNet uses the shallow feature fusion method SDFF to fuse the features of the shallow feature extraction network and the deep feature extraction network.

[0187] Furthermore, the specific implementation method of step S4 includes the following steps:

[0188] S4.1 Construct a normalized multi-attention feature extraction network NSCPANet, which includes a shallow feature extraction network and a deep feature extraction network;

[0189] S4.1.1 Constructing the Shallow_bneck shallow feature extraction network: This is built on the MobileNetV3 model bneck. First, the input features are subjected to a 1×1 convolution operation to increase the dimensionality of the feature channels. Then, a 3×3 depthwise separable convolution is used to extract residual edges and feature information. Next, the multi-scale normalized spatial attention mechanism layer MANSAM constructed in step S1 is used to extract the feature spatial weights. Then, the multi-scale normalized orientation position attention mechanism layer MANDPAM constructed in step S2 is used to extract the feature orientation position weights. Finally, a 1×1 convolution operation is used to reduce the dimensionality of the feature map and restore the channel size of the input features, resulting in the Shallow_bneck shallow feature extraction network.

[0190] S4.1.2 Constructing the Deep_bneck deep feature extraction network is based on the MobileNetV3 model bneck. First, the input features are subjected to a 1×1 convolution operation to increase the dimensionality of the feature channels. Then, a 3×3 depthwise separable convolution is used to extract residual edges and feature information. Next, the MANCAM layer, a multi-scale normalized channel attention mechanism layer constructed in step S3, is used to extract the feature channel weights. Finally, a 1×1 convolution operation is used to reduce the dimensionality of the feature map to restore the channel size of the input features, thus obtaining the Deep_bneck deep feature extraction network.

[0191] S4.1.3. Constructing the Normalized Multi-Attention Feature Extraction Network (NSCPANet): This NSCPANet model is built based on the MobileNetV3 model. First, the input image data undergoes a 3×3 convolution operation (Covn2d) with a kernel size of 3×3, a stride of 2, and a feature map size of 16. Then, batch normalization (BatchNorm2d) and activation function (h_swish) are performed to downsample the features by 1 / 2, resulting in the first output feature out1. The first output feature out1 is then input into Shallow_bneck for 1 / 4 and 1 / 8 feature extraction. Downsampling yields the second output feature out2 and the third output feature out3. The third output feature out3 is then input into Deep_bneck for 1 / 16 feature downsampling to obtain the fourth output feature out4. The fourth output feature out4 is then input into Deep_bneck for 1 / 32 feature downsampling. Feature augmentation is then performed using a 3×3 convolution kernel with a stride of 2 and a feature map size of 960. Finally, batch normalization (BatchNorm2d) and activation function (h_swish) are applied to obtain the fifth output feature out5.

[0192] S4.2 Constructing a multi-depth and shallow feature fusion dilated convolutional network MNSDDNet;

[0193] S4.2.1 Constructing the shallow and deep feature fusion method SDFF: The shallow and deep feature fusion method SDFF utilizes the normalized multi-attention feature extraction network NSCPANet constructed in step S4.1 to downsample the input data by 1 / 2, 1 / 4, 1 / 8, 1 / 16, and 1 / 32 respectively. Then, the downsampled 1 / 2, 1 / 8, 1 / 16, and 1 / 32 features are respectively processed using the convolution algorithm Covn2d, 1×1, and upsampling algorithm to restore the number of channels and size to the same as the 1 / 4 downsampled features and concatenate them to complete the shallow and deep feature fusion. The calculation expression is:

[0194] FT = Cat(interpolate(∫ 1×1 (FT1 / 2 FT 1 / 8 FT 1 / 16 FT 1 / 32 )), FT 1 / 4 )

[0195] Among them, FT 1 / 2 Represents the features downsampled by 1 / 2, FT 1 / 4 This represents the feature downsampled by 1 / 4, FT 1 / 8 This represents the feature downsampled by 1 / 8, FT 1 / 16 This represents the feature downsampled by 1 / 16, FT 1 / 32 Represents the feature sampled by 1 / 32, ∫ 1×1 This represents a convolution operation with a 1×1 kernel, and interpolate represents an upsampling operation that enhances the feature edges;

[0196] S4.2.2 Constructing the Multi-Deep and Shallow Feature Fusion Dilated Convolutional Network MNSDDNet: This is a model constructed based on the DeeplabV3+ model. First, the fifth output feature out5 obtained in step S4.1 is subjected to dilated spatial convolution, pooling, pyramid operations, and feature concatenation operations to obtain feature x. Then, the deep and shallow feature fusion method SDFF constructed in S4.2.1 is used to fuse x, out1, out2, out3, and out4 to obtain x1. x1 is then subjected to convolution with a kernel size of 1×1, a stride of 1, and a feature map equal to the number of classes num_classes. Finally, the interpolate upsampling method is used to restore the original feature size for land use classification prediction.

[0197] Table 1: NSCPANet Model Network Structure Table

[0198]

[0199]

[0200] S5. Collect data from the urban-rural adaptive land cover dataset, perform data preprocessing, and obtain the land dataset.

[0201] Furthermore, the specific implementation method of step S5 includes the following steps:

[0202] S5.1 Collect data from the urban-rural adaptive land cover dataset and modify the original 1024×1024 dataset to a 512×512 dataset.

[0203] S5.2 Label the data in the modified dataset, where 0 represents no data area, 1 represents background, 2 represents urban and rural residential land, 3 represents road, 4 represents water area, 5 represents unused land, 6 represents forest land, and 7 represents cultivated land.

[0204] S5.3. Perform rotation, mirroring, blurring, and noise preprocessing on the labeled dataset to obtain the land dataset;

[0205] S6. Input the land dataset obtained in step S5 into the land use classification network model constructed in step S4, and perform land classification training based on the fusion of deep and shallow features and multi-attention mechanism to obtain a land classification model based on the fusion of deep and shallow features and multi-attention mechanism.

[0206] Furthermore, in step S6, the land dataset obtained in step S5 is input into the land use classification network model constructed in step S4 to perform land classification training based on the fusion of shallow and deep features and multi-attention mechanism. The training is completed using the dice_loss loss function, sgd optimization algorithm, and cos loss decay strategy to obtain a land classification model based on the fusion of shallow and deep features and multi-attention mechanism.

[0207] Furthermore, the training parameter settings include: batch_size=8, optimizer=sgd(lr=0.001), lr_decay_type=cos, loss=dice_loss. Specific Implementation Method Two:

[0209] An electronic device includes a memory and a processor. The memory stores a computer program, and the processor executes the computer program to implement the steps of a land classification method based on the fusion of shallow and deep features and a multi-attention mechanism as described in Specific Embodiment 1.

[0210] The computer device of the present invention may include a processor and a memory, such as a microcontroller containing a central processing unit. Furthermore, when the processor executes the computer program stored in the memory, it implements the steps of the land classification method based on the fusion of deep and shallow features and a multi-attention mechanism described above.

[0211] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor can be a microprocessor or any conventional processor.

[0212] The memory may primarily include a program storage area and a data storage area. The program storage area may store the operating system and at least one application program required for a given function (such as sound playback or image playback). The data storage area may store data created based on the use of the mobile phone (such as audio data and phonebook entries). Furthermore, the memory may include high-speed random access memory and non-volatile memory, such as hard disks, RAM, plug-in hard disks, smart media cards (SMC), secure digital cards (SD), flash cards, at least one disk storage device, flash memory device, or other volatile solid-state storage devices. Specific implementation method three:

[0214] A computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the land classification method based on the fusion of deep and shallow features and a multi-attention mechanism.

[0215] The computer-readable storage medium of the present invention can be any form of storage medium that can be read by the processor of a computer device, including but not limited to non-volatile memory, volatile memory, ferroelectric memory, etc. The computer-readable storage medium stores a computer program. When the processor of the computer device reads and executes the computer program stored in the memory, the steps of the land classification method based on the fusion of deep and shallow features and multi-attention mechanism described above can be implemented.

[0216] The computer program includes computer program code, which may be in the form of source code, object code, executable file, or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording media, USB flash drive, portable hard drive, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium may be appropriately added to or subtracted according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media may not include electrical carrier signals and telecommunication signals.

[0217] It should be noted that relational terms such as "first" and "second" are used merely to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0218] Although this application has been described above with reference to specific embodiments, various modifications can be made and components can be replaced with equivalents without departing from the scope of this application. In particular, as long as there is no structural conflict, the features in the specific embodiments disclosed in this application can be combined with each other in any way. The lack of an exhaustive description of these combinations in this specification is merely for the sake of brevity and resource conservation. Therefore, this application is not limited to the specific embodiments disclosed herein, but includes all technical solutions falling within the scope of the claims.

Claims

1. A land classification method based on deep and shallow feature and multi-attention mechanism fusion, characterized in that, Comprising the following steps: S1, constructing a multi-scale normalized spatial attention mechanism layer MANSAM; S2, constructing a multi-scale normalized direction position attention mechanism layer MANDPAM; S3, constructing a multi-scale normalized channel attention mechanism layer MANCAM; S4, constructing a land use classification network model, comprising a normalized multi-attention feature extraction network NSCPANet and a multi-deep-shallow feature fusion dilated convolution network MNSDDNet, the normalized multi-attention feature extraction network NSCPANet comprising a shallow feature extraction network and a deep feature extraction network, the multi-deep-shallow feature fusion dilated convolution network MNSDDNet using a deep-shallow feature fusion method SDFF to perform feature fusion of the shallow feature extraction network and the deep feature extraction network; S4.1.1, constructing a shallow feature extraction network Shallow_bneck, which is constructed on the basis of a MobileNetV3 model bneck, first performing feature channel dimension processing by 1×1 convolution kernel size convolution operation, then extracting residual edges and feature information by 3×3 depth separable convolution, then extracting feature spatial weight by the multi-scale normalized spatial attention mechanism layer MANSAM constructed in step S1, then extracting feature direction position weight by the multi-scale normalized direction position attention mechanism layer MANDPAM constructed in step S2, then performing feature map dimension reduction processing by 1×1 convolution kernel size convolution operation, restoring the channel size of the input feature, and obtaining the shallow feature extraction network Shallow_bneck; S4.1.2, constructing a deep feature extraction network Deep_bneck, which is constructed on the basis of a MobileNetV3 model bneck, first performing feature channel dimension processing by 1×1 convolution kernel size convolution operation, then extracting residual edges and feature information by 3×3 depth separable convolution, then extracting feature channel weight by the multi-scale normalized channel attention mechanism layer MANCAM constructed in step S3, then performing feature map dimension reduction processing by 1×1 convolution kernel size convolution operation, restoring the channel size of the input feature, and obtaining the deep feature extraction network Deep_bneck; S4.1.3, constructing a normalized multi-attention feature extraction network NSCPANet, is based on the NSCPANet model of MobileNetV3 model construction, first, the input image data is subjected to 3x3 convolution kernel size, step 2, feature map is 16 convolution operation Covn2d, then batch normalization BatchNorm2d and activation function h_swish operation is subjected to 1 / 2 feature down sampling to obtain the first output feature out1; the first output feature out1 is input into Shallow_bneck to perform 1 / 4, 1 / 8 feature down sampling to obtain the second output feature out2, the third output feature out3, and then the third output feature out3 is input into Deep_bneck to perform 1 / 16 feature down sampling to obtain the fourth output feature out4, and then the fourth output feature out4 is input into Deep_bneck to perform 1 / 32 feature down sampling, and then 3x3 convolution kernel size, step 2, feature map is 960 convolution operation is used for feature expansion, and then batch normalization BatchNorm2d and activation function h_swish operation is used to obtain the fifth output feature out5; S5, collect the data in the urban-rural domain adaptive land cover data set, perform data preprocessing, and obtain a land data set; S6, input the land data set obtained in step S5 into the land use classification network model constructed in step S4, perform land classification training based on deep and shallow feature and multi-attention mechanism fusion, and obtain a land classification model based on deep and shallow feature and multi-attention mechanism fusion. 2.The land classification method based on deep and shallow features and multi-attention mechanism fusion according to claim 1, characterized in that, The specific implementation method of step S1 includes the following steps: S1.1, performing channel direction average pooling and maximum pooling on the input feature data, average pooling features The calculation expression is: ; wherein, represents the total number of input channels, represents any one of, represents the input feature data of the channel. max-pooled features The computational expression is: ; wherein denotes a max-pooling operation; S1.2, the , channel direction connection is performed to obtain a connection feature The calculation expression is: ; wherein represents a connection operation; S1.3, to convolution operation of 7x7 convolution kernel is performed to obtain convolution features The calculation expression is: ; wherein, denotes a convolution operation of a 7x7 convolution kernel; S1.4, to The scaling factor weight operation in batch normalization BN is performed to obtain the scaling factor weight feature in normalization BN The expression is calculated as: ; ; ; wherein, denotes a scale factor for each channel, denotes obtaining weights, and denote the mean and standard deviation of a mini-batch, respectively, and denote a trainable limited transform scale and offset, denotes a scale factor, denotes a penalty factor, previous layer output features; S1.5, to The sigmoid activation function is performed to obtain an attention vector, and the attention vector is assigned to the input feature data to complete the multi-scale normalized spatial attention mechanism layer MANSAM assignment to obtain a multi-scale normalized spatial attention mechanism layer output The calculation expression is: ; wherein, represents an activation function operation, represents input feature data. 3.The land classification method based on deep and shallow features and multi-attention mechanism fusion according to claim 2, characterized in that, The specific implementation method of step S2 includes the following steps: S2.1, feature length of input feature data average pooling in direction, feature length average-pooled feature in direction The calculation expression is: ; wherein, represents a feature width, represents a feature length, i represents a number of width features, represents the i-th width feature data; max-pooling of the input feature data max-pooling of the input feature data max-pooling of the input feature data the calculation expression is ; feature width directional average pooling, feature width directional average pooled features The computational expression is: ; wherein represents any one of W; max-pooling of the input feature data max-pooling of the input feature data max-pooling of the input feature data the calculation expression is ; S2.2, to , , , The scaling factor weight operation in batch normalization BN is performed, and the expression is calculated as: ; ; ; ; wherein, is a feature length scaling factor weight feature in normalization BN of average pooling in direction, is a feature length scaling factor weight feature in normalization BN of max pooling in direction, is a feature width scaling factor weight feature in normalization BN of average pooling in direction, is a feature width scaling factor weight feature in normalization BN of max pooling in direction; S2.3, to , performing matrix multiplication to obtain the characteristic length direction matrix multiplication characteristic , the expression is calculated as: ; , ,​​​ ; S2.4, to Matrix transposition is performed, and Connection is performed in the H direction to obtain a characteristic length direction and characteristic width Connection features in the H direction The calculation expression is: ; wherein denotes matrix transposition; S2.5, to Conv2d, 1x1 convolution operation, batch normalization BN operation, activation function h_swish operation operation, get the feature length direction and feature width Multi-step operation features of direction , the calculation expression is: ; wherein, denotes an activation function operation, denotes a convolution operation with a 1x1 kernel; S2.6, to Splitting is performed, and the expression is calculated as: ; wherein, represents a feature segmentation operation, and ( represents a feature size, represents a feature length a segmented feature in a direction, represents a feature width a segmented feature in a direction; S2.7, respectively, to , perform Conv2d, 1x1 convolution operation and activation function h_swish operation, to obtain the feature length directional segmentation feature attention vector , feature width directional segmentation feature attention vector , the calculation expression is: ; ; S2.8, the feature length attention vector of the split feature in the direction , the feature width attention vector of the split feature in the direction assigned to the input feature data, complete the multi-scale normalized direction position attention mechanism layer MANDPAM assignment, obtain the multi-scale normalized direction position attention mechanism layer feature output , the calculation expression is: 。 4. The land classification method based on deep and shallow feature and multi-attention mechanism fusion according to claim 3, characterized in that, The specific implementation method of step S3 includes the following steps: S3.1, globally average-pooling the input feature data to obtain globally average-pooled features The calculation expression is: ; The global maximum pooling is performed on the input feature data to obtain global maximum pooling features The calculation expression is: ; S3.2, respectively, to , scaling factor weight analysis in batch normalization BN and activation function Relu6 operation, and finally scaling factor weight analysis in batch normalization BN, to get the normalized BN scaling factor weight feature of the global average pooling feature , the normalized BN scaling factor weight feature of the global maximum pooling feature , the calculation expression is: ; ; S3.3, to , performing an addition operation to obtain an addition operation feature The calculation expression is: ; S3.4, to performing an activation function h_swish operation to obtain an attention vector of the sum operation feature, The additive operation feature attention vector is assigned to the input feature data, a multi-scale normalized channel attention mechanism layer MANCAM assignment is completed, and a multi-scale normalized channel attention mechanism layer feature is obtained The calculation expression is: 。 5. The land classification method based on deep and shallow feature and multi-attention mechanism fusion according to claim 4, characterized in that, The specific implementation method of step S4 includes the following steps: S4.1, constructing a normalized multi-attention feature extraction network NSCPANet, the normalized multi-attention feature extraction network NSCPANet includes a shallow feature extraction network and a deep feature extraction network; S4.2, constructing a multi-deep and shallow feature fusion dilated convolution network MNSDDNet; S4.2.1, constructing a deep and shallow feature fusion method SDFF, the deep and shallow feature fusion method SDFF is to use the normalized multi-attention feature extraction network NSCPANet constructed in step S4.1 to perform 1 / 2, 1 / 4, 1 / 8, 1 / 16, 1 / 32 down sampling on the input data, respectively, and then connect the 1 / 2, 1 / 8, 1 / 16, 1 / 32 features down sampled by the convolution algorithm Covn2d, 1x1 and the up sampling algorithm to restore the channel number and size to the same as the 1 / 4 down sampling and complete the deep and shallow feature fusion, the calculation expression is: ; wherein, denotes a feature down-sampled by 1 / 2, denotes a feature down-sampled by 1 / 4, denotes a feature down-sampled by 1 / 8, denotes a feature down-sampled by 1 / 16, denotes a feature down-sampled by 1 / 32, denotes a convolution operation with a 1x1 kernel, denotes an enhanced feature up-sampling operation; S4.2.2, constructing a multi-depth feature fusion hollow convolutional network MNSDDNet, is based on the MNSDDNet model construction of DeeplabV3+ model. First, the fifth output feature out5 obtained in step S4.1 is subjected to a hollow spatial convolutional pyramid operation and a feature connection operation to obtain a feature x. Then, the deep and shallow feature fusion method SDFF constructed in S4.2.1 is used to perform feature fusion on x, out1, out2, out3, and out4 to obtain x1. The x1 is subjected to a convolution with a convolution kernel size of 1x1, a step of 1, and a feature map of a classification number num_classes. Then, the original feature size is restored by using the interpolate up-sampling method, and land use classification prediction is performed.

6. The land classification method based on deep and shallow feature and multi-attention mechanism fusion according to claim 5, characterized in that, The specific implementation method of step S5 includes the following steps: S5.1, collect the data in the urban-rural domain adaptive land cover dataset, and modify the original size of 1024x1024 dataset to a size of 512x512 dataset; S5.2, label the data in the modified dataset, wherein 0 in the label represents a no-data area, 1 represents a background, 2 represents urban and rural residential land, 3 represents a road, 4 represents a water area, 5 represents unused land, 6 represents forest land, and 7 represents cultivated land; S5.3, rotate, mirror, blur, and noise preprocess the labeled dataset to obtain a land dataset.

7. The land classification method based on deep and shallow feature and multi-attention mechanism fusion according to claim 6, characterized in that, Step S6 inputs the land dataset obtained in step S5 into the land use classification network model constructed in step S4, and performs land classification training based on deep and shallow feature and multi-attention mechanism fusion. The training is completed by using the dice_loss loss function, the sgd optimization algorithm, and the cos loss decay strategy to obtain a land classification model based on deep and shallow feature and multi-attention mechanism fusion.

8. An electronic device, characterized by The computer program is executed by the processor to realize the steps of the land classification method based on deep and shallow feature and multi-attention mechanism fusion according to any one of claims 1-7.

9. A computer readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to realize the steps of the land classification method based on deep and shallow feature and multi-attention mechanism fusion according to any one of claims 1-7.

Citation Information

Patent Citations

  • Comprehensive evaluation method for land classification, electronic equipment and storage medium

    CN117113189A