Tamarix chinensis identification method based on attention mechanism and feature alignment

By introducing attention mechanism and feature alignment technology into the tamari recognition method, the problem of low thorn recognition accuracy in complex wetland environments is solved, and high-precision tamari recognition and cross-scene migration are achieved, which is suitable for vegetation type classification in complex wetland environments.

CN119723339AActive Publication Date: 2025-03-28FIRST INSTITUTE OF OCEANOGRAPHY MNR

Patent Information

Application Number
CN202411799449.9
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-09
Publication Date
2025-03-28
Estimated Expiration
2044-12-09

AI Technical Summary

Technical Problem

The existing tamagoya recognition method is difficult to achieve high-precision recognition in complex wetland environments, especially in mixed regions and cross-scene classifications. Traditional methods have problems such as insufficient adaptability to spectral feature changes and poor model migration ability.

Method used

The thorn recognition method based on attention mechanism and feature alignment is adopted. Through the deep feature extraction module and the dual feature alignment module of the attention mechanism, the deep features of the remote sensing image are extracted and aligned, and the classification accuracy of the thorn in complex wetland environments is improved.

Benefits of technology

It improves the classification accuracy of tamago, enhances cross-scene migration capabilities, is suitable for vegetation type classification in complex wetland environments, reduces the cost of data collection and labeling, and improves the robustness of the model in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723339A_ABST
    Figure CN119723339A_ABST
Patent Text Reader

Abstract

The invention discloses a tamarix chinensis identification method based on an attention mechanism and feature alignment. The tamarix chinensis identification method comprises the following steps: acquiring a plurality of remote sensing images of a multi-temporal research area under different conditions; constructing a source domain image set and a target domain image set; inputting the source domain image set and the target domain image set into an attention mechanism deep feature extraction module, and extracting deep features; inputting the extracted deep features into a dual feature alignment module to perform GOT image feature alignment and MMD spatial feature alignment, and performing weighted addition on the features to obtain new features of the source domain image and the target domain image; inputting the new features of the source domain image into a neural network model, and training the model; inputting the new features of the target domain image into the trained model, and carrying out model testing; and acquiring a remote sensing image of a to-be-identified area, processing the remote sensing image by adopting the method, inputting the remote sensing image into a qualified model, and outputting an identification result of tamarix chinensis. According to the method disclosed by the invention, the classification accuracy of the tamarix chinensis in the complex wetland environment can be improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of vegetation classification, and in particular to a Tamarix chinensis identification method based on attention mechanism and feature alignment. Background Art

[0002] Tamarix can effectively prevent wind and sand erosion, stabilize the surface of coastal wetlands, and improve saline-alkali land. It plays an important role in the restoration of coastal wetland ecosystems. It usually grows in coastal wetland environments and often grows alternately with other plants such as reeds to form complex mixed vegetation areas. Due to the similarity in spectral characteristics between Tamarix and other plants, traditional remote sensing classification methods are difficult to achieve high-precision Tamarix identification, especially in mixed areas. These problems not only affect the accuracy of ecological monitoring, but also hinder the effective management and protection of wetland resources.

[0003] Traditional remote sensing image field survey methods mainly rely on manual interpretation technology, which consumes a lot of manpower, material resources and financial resources, and is difficult to apply to large-scale, multi-scene remote sensing image classification. With the development of science and technology, machine learning methods in the computer field have gradually been applied to remote sensing image wetland classification. However, due to the complexity and changeability of wetland types, traditional machine learning classification methods cannot capture the subtle spectral changes of remote sensing images, resulting in large errors in classification using machine learning methods. Later, manual correction is required, making the classification steps cumbersome and the accuracy is not ideal. Remote sensing image classification technology based on deep learning has made significant progress in vegetation classification in recent years, especially the successful application of Transformer models in image classification tasks. Some scholars have proposed the classification of Tamarix by using an improved Transformer method. Although a high classification accuracy rate has been achieved in some areas, the classification accuracy rate is still low in mixed vegetation areas (such as areas where Tamarix and reeds grow together). This shows that the existing classification methods based on deep learning have certain shortcomings in dealing with complex vegetation combinations and hyperspectral mixed areas, especially when distinguishing similar vegetation types, the performance of the model cannot achieve the expected effect. In addition, the multi-source feature embedding network proposed by some scholars has improved the overall classification accuracy, but the classification accuracy of Tamarix chinensis alone is far below the ideal level. This shows that the current technology is still insufficient in dealing with the variability between different vegetation types. In particular, in the fusion and optimization between high-resolution remote sensing image data and deep features, the existing technology fails to fully consider the spatial heterogeneity and spectral differences in complex environments, thus affecting the classification accuracy of Tamarix chinensis.

[0004] In addition to the classification problem of mixed areas, the accuracy of cross-scene classification is also a major bottleneck of current technology. Traditional domain adaptation methods, such as DAN (Domain-Adversarial Networks) and DSAN (Deep SubdomainAlignment Networks), are affected by differences in sample time and imaging environment in the cross-scene classification of the Yellow River Delta and other wetlands, resulting in a decrease in the performance of the model when dealing with spectral drift and inconsistent distribution. Therefore, it is difficult for traditional cross-scene adaptation methods to achieve accurate model transfer and adaptation in complex wetland environments. Although there are some improved methods, such as SSWADA (Spectral-Spatial Weighted Domain Adaptation), which can improve the cross-scene classification performance to a certain extent, the classification effect for mixed vegetation is still limited. This is mainly due to the lack of adaptability of these methods to changes in spectral features, and they cannot effectively deal with the complex spectral feature differences in wetland environments. Summary of the invention

[0005] In order to solve the above technical problems, the present invention provides a Tamarix identification method based on attention mechanism and feature alignment, so as to improve the classification accuracy of Tamarix in complex wetland environments.

[0006] To achieve the above object, the technical solution of the present invention is as follows:

[0007] A method for identifying Tamarix chinensis based on attention mechanism and feature alignment includes the following steps:

[0008] Step 1, obtaining several remote sensing images of the multi-temporal study area under different conditions, and preprocessing the remote sensing images;

[0009] Step 2, extracting typical vegetation indexes NDVI, RVI, MSAVI and DVI from each pre-processed remote sensing image, and superimposing them with the original remote sensing image to form a multi-channel image; performing the above processing on all remote sensing images to obtain several multi-channel images, annotating the multi-channel images with Tamarix chinensis, making a true value map, and dividing the several multi-channel images and their corresponding true value maps into source domain and target domain image sets;

[0010] Step 3: Input the source domain and target domain image sets into the attention mechanism deep feature extraction module respectively to extract the deep features in the source domain and target domain images; input the extracted deep features into the dual feature alignment module to perform GOT graph feature alignment and MMD space feature alignment, and obtain the new features of the source domain and target domain images by weighted addition of the features after GOT graph feature alignment and MMD space feature alignment;

[0011] Step 4: input the new features of the source domain image and the source domain truth map into the neural network model to train the model; input the new features of the target domain image and the target domain truth map into the trained model to test the model;

[0012] Step 5, obtain the remote sensing image of the area to be identified, and perform preprocessing, extract typical vegetation indices NDVI, RVI, MSAVI and DVI from the preprocessed remote sensing image, and perform image superposition with the original remote sensing image to form a multi-channel image to be identified, input the source domain image set obtained in step 2 and the multi-channel image to be identified into the deep feature extraction module of the attention mechanism, and extract the deep features in the source domain and the multi-channel image to be identified; input the extracted deep features into the dual feature alignment module for GOT map feature alignment and MMD space feature alignment, and obtain new features of the source domain and the multi-channel image to be identified after weighted addition of the features after GOT map feature alignment and MMD space feature alignment; input the new features of the multi-channel image to be identified into the qualified test model, and the model outputs the recognition result of Tamarix chinensis.

[0013] In the above scheme, the attention mechanism deep feature extraction module is composed of an ECA channel attention mechanism and a ResNet50 feature extraction module. The ResNet50 feature extraction module includes an input convolution layer, a batch normalization layer, a ReLU activation layer and a residual block. Each residual block contains a 1x1 convolution layer for compressing the number of channels, a 3x3 convolution layer and a 1x1 convolution layer for restoring the number of channels; the ECA channel attention mechanism is integrated into the ResNet50 feature extraction module to optimize the channel, and the weight of the channel is optimized by calculating the weight coefficient of each channel.

[0014] In the above scheme, the dual feature alignment module includes a GOT graph feature alignment module and an MMD space feature alignment module, which are used to align the deep features of the source domain and the target domain.

[0015] In the above scheme, in the GOT graph feature alignment module, the graph features of the source domain and the target domain extracted by the attention mechanism deep feature extraction module are used as the input of the GOT graph feature alignment module, and the graph optimization transmission is performed using the following formula to calculate the result after the alignment of the source domain and the target domain graph features:

[0016]

[0017] Among them, G s and G t Represents the graph features of the source domain and the target domain, s represents the source domain, t represents the target domain, and Represents the two pairs of nodes currently being processed, and Represent the characteristics of source domain node i and target domain node j respectively, and Respectively represent and The mapping of T ij and There are two pairs of nodes and The transformation matrix, Representative from arrive The transmission cost, Represented by The cost matrix formed, GOT(G s ,G t ) represents the result after the source domain and target domain graph features are aligned.

[0018] In a further technical solution, in the MMD spatial feature alignment module, the spatial features of the source domain and the target domain extracted by the attention mechanism deep feature extraction module are used as the input of the MMD spatial feature alignment module, and the spatial feature distribution is adjusted to be aligned to the maximum extent between the two domains by minimizing the MMD value to reduce the spatial distribution difference between the source domain and the target domain. The MMD value calculation formula is as follows:

[0019]

[0020] in, are the spatial features of the source domain and the target domain respectively, X s , X t are the spatial feature sets of the source domain and the target domain respectively, n s 、n t Respectively represent the number of samples in the source domain and the number of samples in the target domain; s represents the source domain, t represents the target domain, represents the spatial feature map of the source domain, Represents the spatial feature map of the target domain, and H represents that this operation is performed in a high-dimensional space.

[0021] In a further technical solution, in the neural network model, the feature vector from the dual feature alignment module is input into the fully connected layer, calculated using matrix multiplication, and biased, and then the output neuron feature value is obtained; the Softmax activation function is then used to obtain the tamarisk recognition probability feature vector of the neuron corresponding to each position in the image, each value in the feature vector represents the recognition probability of tamarisk, and the sum of all values ​​in the feature vector is 1; the Softmax function expression formula is as follows:

[0022]

[0023] Among them, ω and b are weight coefficient and bias coefficient respectively, and b j represents the weight value and bias coefficient of the input neuron n classified as Tamarix type j, Y represents the value corresponding to the output recognition result of Tamarix type, P represents the probability, represents the feature of the nth neuron in the l-1th layer of the fully connected layer output, where n represents the element index, l represents the number of convolutional layers in the fully connected layer, K represents the attribute value corresponding to the Tamarix category label, i represents the type of Tamarix, represent The transpose of .

[0024] In the above scheme, the typical vegetation indices NDVI, RVI, MSAVI and DVI are respectively the normalized difference vegetation index, the ratio vegetation index, the modified soil adjusted vegetation index and the difference vegetation index, and their calculation formulas are as follows:

[0025] NDVI = (NIR-R) / (NIR+R)

[0026] RVI=NIR / R

[0027]

[0028] DVI=NIR-R

[0029] Among them, NIR represents the reflectivity of the near-infrared band in the remote sensing image, and R represents the reflectivity of the red light band.

[0030] In the above scheme, in step 4, when testing the model, the recall rate TPR is used to evaluate the accuracy of each category. The calculation formula is as follows:

[0031]

[0032] Among them, TP represents the number of samples that correctly predict a certain category as a certain category, and FP represents the number of samples that incorrectly predict other categories as a certain category;

[0033] The overall accuracy OA is used to evaluate the overall classification accuracy of all categories, and the formula is:

[0034]

[0035] Among them, FN represents the number of samples that incorrectly predict a certain category as other categories, and FP represents the number of samples that correctly predict other categories as other categories;

[0036] The Kappa coefficient is used to quantitatively evaluate the overall performance of the classification method, and its formula is:

[0037]

[0038] Among them, Po is the overall accuracy, P e is an accidental consistency error.

[0039] Through the above technical solution, the present invention provides a method for identifying Tamarix chinensis based on attention mechanism and feature alignment, which has the following beneficial effects:

[0040] 1. Improved classification accuracy: The present invention combines ResNet50 with ECA for deep feature extraction. By introducing a self-attention mechanism, it can more effectively identify and distinguish the subtle spectral differences between different types of Tamarix in complex environments, thereby improving the accuracy of classification.

[0041] 2. Enhanced cross-scenario migration capability: Through the dual feature alignment strategy, the present invention uses MMD and GOT to achieve the joint alignment of spatial features and graph features. This multi-level feature alignment helps to improve the generalization ability of the model between different scenarios, so that the classification model still maintains high accuracy in new scenarios.

[0042] 3. Wide range of applications: The technical solution of the present invention is applicable to wetland environments with complex and varied vegetation types and mixed growth of tamarisk vegetation, reflecting its wide applicability and strong expansion capabilities.

[0043] 4. Reduce costs: Through efficient feature extraction and transfer learning mechanisms, the present invention reduces the need for a large amount of labeled data, thereby significantly reducing the cost of data collection and labeling while ensuring high accuracy.

[0044] 5. Robustness in complex environments: The method of the present invention enhances its ability to identify and handle uncertainty, noise and scene changes in complex environments through the attention mechanism deep feature extraction module and multi-scale feature alignment strategy, thereby improving the robustness of the model. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art are briefly introduced below.

[0046] Figure 1 The present invention is a flowchart of a method for identifying Tamarix chinensis based on an attention mechanism and feature alignment disclosed in an embodiment of the present invention.

[0047] Figure 2 are source domain and target domain images; (a) is the source domain image; (b) is the target domain image; (c) is the true value image of the source domain image; (d) is the true value image of the target domain image.

[0048] Figure 3 Schematic diagram of the deep feature extraction module of the attention mechanism.

[0049] Figure 4 Schematic diagram of the dual feature alignment module.

[0050] Figure 5 are actual classification results; (a) is the true value graph, and (b) is the classification result graph obtained using the method of the present invention. DETAILED DESCRIPTION

[0051] The technical solutions in the embodiments of the present invention will be described clearly and completely below in conjunction with the accompanying drawings in the embodiments of the present invention.

[0052] The present invention provides a method for identifying Tamarix chinensis based on attention mechanism and feature alignment, such as Figure 1 As shown, the following steps are included:

[0053] Step 1: Acquire several remote sensing images of the multi-temporal study area under different conditions and preprocess the remote sensing images.

[0054] The embodiment of the present invention obtains remote sensing image data of the Yellow River Estuary Wetland, collects drone aerial photography data on site, and performs image preprocessing such as radiation calibration, atmospheric correction, orthorectification, and image cropping on the collected remote sensing images to eliminate the influence of conditions such as lighting and clouds, and enhance image stability and usability. The experimental sample set is produced in combination with drone aerial photography data. In addition, data enhancement techniques such as rotation, scaling, and cropping are used to expand the data set samples and improve the generalization ability of the model.

[0055] Step 2: extract typical vegetation indices NDVI, RVI, MSAVI and DVI from each preprocessed remote sensing image, and overlay them with the original remote sensing image to form a multi-channel image.

[0056] The vegetation distribution in the study area is complex, and different types of mixed Tamarix are easily confused and classified. In addition, due to the unevenness of vegetation coverage, the image characteristics of some sparse vegetation are not obvious, and the classification accuracy is often low when the original remote sensing images are directly used for classification. Therefore, the present invention introduces a typical vegetation index to enhance the representation of mixed Tamarix forest characteristics, as shown in Table 1.

[0057] In view of the problem that the image features of Tamarix forest are not obvious in mixed growth, the present invention selects the Normalized Difference Vegetation Index (NDVI) and the Ratio Vegetation Index (RVI) which are highly sensitive to vegetation. The Normalized Difference Vegetation Index (NDVI) can not only eliminate the influence of the solar altitude angle, but also eliminate the interference of factors such as the remote sensor observation angle and terrain. It can highlight the difference between Tamarix and bare beach, enhance the contrast between vegetation, and thus provide more obvious image features for the accurate classification of Tamarix mixed growth areas. The Ratio Vegetation Index (RVI) is sensitive to the state of green vegetation. This characteristic enables RVI to effectively distinguish between the vigorous growth of Tamarix and other surface cover types in coastal wetlands, such as sparse saltwort or bare land.

[0058] Aiming at the problem that the soil background will affect the information extraction results due to the different coverage density of mixed Tamarix forest, the present invention selects the modified soil adjusted vegetation index (MSAVI) and the difference vegetation index (DVI) that can weaken the change of soil reflectivity. In the mixed Tamarix area of ​​coastal wetlands, the color and texture of the soil may change greatly due to tidal action, sediment deposition and human activities. These factors may make the traditional vegetation index effect worse, but MSAVI has strong adaptability and robustness to these changes, and can provide more stable and reliable vegetation information, thereby improving the accuracy of classification of different mixed Tamarix areas; in complex ecosystems such as coastal wetlands, DVI helps to identify the distribution of plants such as Tamarix, especially in areas with dense vegetation coverage. The above vegetation index definitions are shown in the table, where NIR represents the reflectivity of the near-infrared band in the remote sensing image, and R represents the reflectivity of the red light band.

[0059] Table 1 Calculation formula of vegetation index

[0060]

[0061] All remote sensing images are processed as above to obtain several multi-channel images, which are annotated to produce true value maps, and the several multi-channel images and their corresponding true value maps are divided into source domain and target domain image sets. Figure 2 As shown in the figure, the source domain images have known the distribution information of Tamarix after field investigation and exploration, while the distribution information of Tamarix is ​​unknown in most of the target domain images, and only the distribution information of a small part of Tamarix is ​​known, which is used to test the model.

[0062] Step 3: Input the source domain and target domain image sets into the deep feature extraction module of the attention mechanism respectively to extract the deep features in the source domain and target domain images; input the extracted deep features into the dual feature alignment module for GOT graph feature alignment and MMD space feature alignment, and obtain the new features of the source domain and target domain images by weighted addition of the features after GOT graph feature alignment and MMD space feature alignment.

[0063] 1. Attention mechanism deep feature extraction module

[0064] like Figure 3 As shown in the figure, the attention mechanism deep feature extraction module consists of the ECA channel attention mechanism and the ResNet50 feature extraction module. The ResNet50 feature extraction module includes an input convolution layer, a batch normalization layer, a ReLU activation layer, and a residual block. Each residual block contains a 1x1 convolution layer for compressing the number of channels, a 3x3 convolution layer, and a 1x1 convolution layer for restoring the number of channels. The ECA channel attention mechanism is integrated into the ResNet50 feature extraction module to optimize the channels. The weight coefficient of each channel is calculated to optimize the channel weight. The ECA channel attention mechanism uses an adaptive convolution kernel size for each channel to capture cross-channel dependencies.

[0065] 2. Dual feature alignment module

[0066] like Figure 4 As shown, the dual feature alignment module includes a GOT graph feature alignment module and an MMD space feature alignment module, which are used to align the deep features of the source domain and the target domain.

[0067] In the GOT graph feature alignment module, the graph features of the source domain and the target domain extracted by the attention mechanism deep feature extraction module are used as the input of the GOT graph feature alignment module. The following formula is used to perform graph optimization transmission and calculate the result after the alignment of the source domain and the target domain graph features:

[0068]

[0069] Among them, G s and G t Represents the graph features of the source domain and the target domain, s represents the source domain, t represents the target domain, and Represents the two pairs of nodes currently being processed, and Represent the characteristics of source domain node i and target domain node j respectively, and Respectively represent and The mapping of T ij and There are two pairs of nodes and The transformation matrix, Representative from arrive The transmission cost, Represented by The cost matrix formed, GOT(G s ,G t) represents the result after the source domain and target domain graph features are aligned.

[0070] In the MMD spatial feature alignment module, the spatial features of the source domain and the target domain extracted by the attention mechanism deep feature extraction module are used as the input of the MMD spatial feature alignment module. The spatial feature distribution is adjusted to be aligned to the maximum extent between the two domains by minimizing the MMD (maximum mean difference) value to reduce the spatial distribution difference between the source domain and the target domain. The MMD value calculation formula is as follows:

[0071]

[0072] in, are the spatial features of the source domain and the target domain respectively, X s , X t are the spatial feature sets of the source domain and the target domain respectively, n s 、n t Respectively represent the number of samples in the source domain and the number of samples in the target domain; s represents the source domain, t represents the target domain, represents the spatial feature map of the source domain, Represents the spatial feature map of the target domain, and H represents that this operation is performed in a high-dimensional space.

[0073] Step 4: input the new features of the source domain image and the source domain truth map into the neural network model to train the model; input the new features of the target domain image and the target domain truth map into the trained model to test the model;

[0074] In the embodiment of the present invention, the neural network model used is ResNet50; in the neural network model, the feature vector from the dual feature alignment module is input into the fully connected layer, and the matrix multiplication is used for calculation, and the bias is added to obtain the output neuron feature value; and then the tamarisk recognition probability feature vector of the neuron corresponding to each position in the image is obtained by the Softmax activation function, and each value in the feature vector represents the recognition probability of tamarisk, and the sum of all values ​​in the feature vector is 1; the Softmax function expression formula is as follows:

[0075]

[0076] Among them, ω and b are weight coefficient and bias coefficient respectively, and b j represents the weight value and bias coefficient of the input neuron n classified as Tamarix type j, Y represents the value corresponding to the output recognition result of Tamarix type, P represents the probability, represents the feature of the nth neuron in the l-1th layer of the fully connected layer output, where n represents the element index, l represents the number of convolutional layers in the fully connected layer, K represents the attribute value corresponding to the Tamarix category label, i represents the type of Tamarix, represent The transpose of .

[0077] When testing the model, the recall rate TPR is used to evaluate the accuracy of each category. The calculation formula is as follows:

[0078]

[0079] Among them, TP (true positive) indicates the number of samples that correctly predict a certain category as a certain category, and FP (false positive) indicates the number of samples that incorrectly predict other categories as a certain category; taking the TRP value of Tamarix-Phragmites australis (there are currently three categories in this classification system: Tamarix-Phragmites australis, Tamarix-Suaeda, and Tamarix-Phragmites australis-Suaeda), TP indicates the number of samples that correctly classify Tamarix-Phragmites australis into Phragmites australis, and FP (false positive) indicates the number of samples that incorrectly classify Tamarix-Suaeda or Tamarix-Phragmites australis-Suaeda as Tamarix-Phragmites australis.

[0080] The overall accuracy OA is used to evaluate the overall classification accuracy of all categories. The overall accuracy (OA) represents the proportion of all correctly classified samples in the total labeled samples, which can intuitively reflect the overall performance of different models in all categories. The formula is:

[0081]

[0082] Among them, FN (false negative) indicates the number of samples that mistakenly predict a certain category as other categories, and FP (true negative) indicates the number of samples that correctly predict other categories as other categories. Specifically, FN indicates the number of samples that mistakenly predict Tamarix-Phragmites as Tamarix-Suaeda or Tamarix-Phragmites-Suaeda, and FP indicates the number of samples that correctly predict Tamarix-Suaeda as Tamarix-Suaeda, and Tamarix-Phragmites-Suaeda as Tamarix-Phragmites-Suaeda.

[0083] Finally, in order to more comprehensively compare the effects of cross-scenario classification, the Kappa coefficient is used to quantitatively evaluate the overall performance of the classification method in the experiment. The Kappa coefficient takes into account the imbalance of category distribution during evaluation, providing a more fair and accurate performance evaluation method that can provide more accurate and comprehensive information than OA. The formula is:

[0084]

[0085] Among them, P o is the overall accuracy, P e is an accidental consistency error.

[0086] The classification accuracy is shown in Table 2 below:

[0087] Table 2 Classification accuracy results

[0088]

[0089] The final classification result is Figure 5 As shown in the figure, it can be seen that the classification result obtained by the method of the present invention is very close to the true value graph and has a high accuracy rate.

[0090] Step 5, obtain the remote sensing image of the area to be identified, and perform preprocessing, extract typical vegetation indices NDVI, RVI, MSAVI and DVI from the preprocessed remote sensing image, and perform image superposition with the original remote sensing image to form a multi-channel image to be identified, input the source domain image set obtained in step 2 and the multi-channel image to be identified into the deep feature extraction module of the attention mechanism, and extract the deep features in the source domain and the multi-channel image to be identified; input the extracted deep features into the dual feature alignment module for GOT map feature alignment and MMD space feature alignment, and obtain new features of the source domain and the multi-channel image to be identified after weighted addition of the features after GOT map feature alignment and MMD space feature alignment; input the new features of the multi-channel image to be identified into the qualified test model, and the model outputs the recognition result of Tamarix chinensis.

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

Claims

1. A method for identifying Tamarix chinensis based on attention mechanism and feature alignment, characterized in that: The steps include: Step 1, obtaining several remote sensing images of the multi-temporal study area under different conditions, and preprocessing the remote sensing images; Step 2, extracting typical vegetation indexes NDVI, RVI, MSAVI and DVI from each pre-processed remote sensing image, and superimposing them with the original remote sensing image to form a multi-channel image; performing the above processing on all remote sensing images to obtain several multi-channel images, annotating the multi-channel images with Tamarix chinensis, making a true value map, and dividing the several multi-channel images and their corresponding true value maps into source domain and target domain image sets; Step 3: Input the source domain and target domain image sets into the attention mechanism deep feature extraction module respectively to extract the deep features in the source domain and target domain images; input the extracted deep features into the dual feature alignment module to perform GOT graph feature alignment and MMD space feature alignment, and obtain the new features of the source domain and target domain images by weighted addition of the features after GOT graph feature alignment and MMD space feature alignment; Step 4: input the new features of the source domain image and the source domain truth map into the neural network model to train the model; input the new features of the target domain image and the target domain truth map into the trained model to test the model; Step 5, obtain the remote sensing image of the area to be identified, and perform preprocessing, extract typical vegetation indices NDVI, RVI, MSAVI and DVI from the preprocessed remote sensing image, and perform image superposition with the original remote sensing image to form a multi-channel image to be identified, input the source domain image set obtained in step 2 and the multi-channel image to be identified into the deep feature extraction module of the attention mechanism, extract the deep features in the source domain and the multi-channel image to be identified; input the extracted deep features into the dual feature alignment module to perform GOT graph feature alignment and MMD space feature alignment, and obtain new features of the source domain and the multi-channel image to be identified after weighted addition of the features after GOT graph feature alignment and MMD space feature alignment; The new features of the multi-channel image to be identified are input into the qualified model, and the model outputs the identification result of Tamarix chinensis.

2. The method for identifying Tamarix chinensis based on attention mechanism and feature alignment according to claim 1, characterized in that: The attention mechanism deep feature extraction module is composed of an ECA channel attention mechanism and a ResNet50 feature extraction module. The ResNet50 feature extraction module includes an input convolution layer, a batch normalization layer, a ReLU activation layer and a residual block. Each residual block contains a 1x1 convolution layer for compressing the number of channels, a 3x3 convolution layer and a 1x1 convolution layer for restoring the number of channels. The ECA channel attention mechanism is integrated into the ResNet50 feature extraction module to optimize the channels. The weight of the channel is optimized by calculating the weight coefficient of each channel.

3. The method for identifying Tamarix chinensis based on attention mechanism and feature alignment according to claim 1, characterized in that: The dual feature alignment module includes a GOT graph feature alignment module and an MMD space feature alignment module, which are used to align the deep features of the source domain and the target domain.

4. The method for identifying Tamarix chinensis based on attention mechanism and feature alignment according to claim 3, characterized in that: In the GOT graph feature alignment module, the graph features of the source domain and the target domain extracted by the attention mechanism deep feature extraction module are used as the input of the GOT graph feature alignment module, and the graph optimization transmission is performed using the following formula to calculate the result after the source domain and the target domain graph features are aligned: Among them, G s and G t Represents the graph features of the source domain and the target domain, s represents the source domain, t represents the target domain, and Represents the two pairs of nodes currently being processed, and Represent the characteristics of source domain node i and target domain node j respectively, and Respectively represent and The mapping of T ij and There are two pairs of nodes and The transformation matrix, Representative from arrive The transmission cost, Represented by The cost matrix formed, GOT(G s ,G t ) represents the result after the source domain and target domain graph features are aligned.

5. The method for identifying Tamarix chinensis based on attention mechanism and feature alignment according to claim 3, characterized in that: In the MMD spatial feature alignment module, the spatial features of the source domain and the target domain extracted by the attention mechanism deep feature extraction module are used as the input of the MMD spatial feature alignment module. The spatial feature distribution is adjusted to be aligned to the maximum extent between the two domains by minimizing the MMD value to reduce the spatial distribution difference between the source domain and the target domain. The MMD value calculation formula is as follows: in, are the spatial features of the source domain and the target domain respectively, X s , X t are the spatial feature sets of the source domain and the target domain respectively, n s 、n t Respectively represent the number of samples in the source domain and the number of samples in the target domain; s represents the source domain, t represents the target domain, represents the spatial feature map of the source domain, Represents the spatial feature map of the target domain, and H represents that this operation is performed in a high-dimensional space.

6. The method for identifying Tamarix chinensis based on attention mechanism and feature alignment according to claim 1, characterized in that: In the neural network model, the feature vector from the dual feature alignment module is input into the fully connected layer, and the matrix multiplication is used for calculation, and the bias is added to obtain the output neuron feature value; the Softmax activation function is then used to obtain the Tamarix identification probability feature vector of the neuron corresponding to each position in the image, and each value in the feature vector represents the identification probability of Tamarix, and the sum of all values ​​in the feature vector is 1; the Softmax function expression formula is as follows: Among them, ω and b are weight coefficient and bias coefficient respectively, and b j represents the weight value and bias coefficient of the input neuron n classified as Tamarix type j, Y represents the value corresponding to the output recognition result of Tamarix type, P represents the probability, represents the feature of the nth neuron in the l-1th layer of the fully connected layer output, where n represents the element index, l represents the number of convolutional layers in the fully connected layer, K represents the attribute value corresponding to the Tamarix category label, i represents the type of Tamarix, represent The transpose of .

7. The method for identifying Tamarix chinensis based on attention mechanism and feature alignment according to claim 1, characterized in that: The typical vegetation indices NDVI, RVI, MSAVI and DVI are respectively the normalized difference vegetation index, the ratio vegetation index, the modified soil adjusted vegetation index and the difference vegetation index, and their calculation formulas are as follows: NDVI = (NIR-R) / (NIR+R) RVI=NIR / R DVI=NIR-R Among them, NIR represents the reflectivity of the near-infrared band in the remote sensing image, and R represents the reflectivity of the red light band.

8. The method for identifying Tamarix chinensis based on attention mechanism and feature alignment according to claim 1, characterized in that: In step 4, when testing the model, the recall rate TPR is used to evaluate the accuracy of each category. The calculation formula is as follows: Among them, TP represents the number of samples that correctly predict a certain category as a certain category, and FP represents the number of samples that incorrectly predict other categories as a certain category; The overall accuracy OA is used to evaluate the overall classification accuracy of all categories, and the formula is: Among them, FN represents the number of samples that incorrectly predict a certain category as other categories, and FP represents the number of samples that correctly predict other categories as other categories; The Kappa coefficient is used to quantitatively evaluate the overall performance of the classification method, and its formula is: Among them, P o is the overall accuracy, P e is an accidental consistency error.

Citation Information

Patent Citations

  • Large-range cross-phenological-area crop drawing method based on time sequence remote sensing image

    CN115439754A

  • Remote sensing image change detection method, device and equipment and readable storage medium

    CN116168253A

  • Sugarcane identification and yield prediction method based on multi-source satellite remote sensing image

    CN118053075A

  • Cross-scene hyperspectral image classification method based on domain generalization

    CN118608944A

Cited By

  • Soil total nitrogen content detection method and device, electronic equipment and storage medium

    CN121027036A