Hyperspectral image lithology identification method and device based on spatial and spectral characteristics
By constructing a high-level convolutional neural network model based on spatial and spectral features, the problems of complexity and environmental impact of hyperspectral data processing are solved, and efficient and accurate lithologic recognition is achieved, which is suitable for multi-field applications.
Patent Information
- Application Number
- CN202411469343.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-21
- Publication Date
- 2025-02-18
AI Technical Summary
Hyperspectral data processing and analysis have problems such as high-dimensional data processing complexity, hardware and software support limitations, and natural environment complexity affecting the quality of spectral signal, making it difficult to meet the needs of efficient and accurate lithologic identification.
Using advanced convolutional neural network model based on spatial and spectral features, the GGPLM-Net model including encoder and decoder is constructed to capture rock mass information at different scales by pre-processing, data augmenting and feature extraction of hyperspectral data. Retain spatial information to improve the accuracy and efficiency of lithologic identification.
Effectively identifying different types of rocks improves the accuracy and efficiency of lithologic recognition of hyperspectral images, and is suitable for geological exploration, mineral resource survey and environmental monitoring.
Smart Images

Figure CN119478669A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image information processing, and more specifically to a method and device for identifying lithology using hyperspectral images based on spatial and spectral features. Background Art
[0002] Hyperspectral remote sensing technology, as an advanced remote sensing detection technology, has demonstrated its unique advantages and wide application potential in many fields such as geological exploration, environmental monitoring, agricultural assessment, water quality analysis, etc. Compared with traditional remote sensing technology, hyperspectral remote sensing technology can provide continuous spectral information of target substances, which means that it can capture the spectral characteristics of objects such as reflectivity and absorption rate at different wavelengths, thereby realizing accurate identification and classification of surface materials.
[0003] In the field of geological exploration, lithology identification is a basic and critical task, which involves identifying and classifying rock types on the surface and underground. Traditional lithology identification methods mainly rely on ground sampling and laboratory analysis. Although these methods can provide accurate rock type information, they are usually time-consuming, costly, and difficult to implement in areas with complex terrain or inaccessible areas. In addition, although lithology identification relies on remote sensing data with low spectral resolution, its identification accuracy and reliability are often limited, making it difficult to meet the needs of precise exploration.
[0004] With the development of hyperspectral remote sensing technology, it has greatly enriched the understanding of the surface material characteristics of this embodiment by providing continuous and subdivided spectral band information. Due to its unique chemical composition and structure, each rock and mineral will show unique spectral characteristics within a specific wavelength range, such as reflection peaks and absorption valleys. Hyperspectral remote sensing technology can capture these subtle spectral differences and provide an efficient and accurate means for lithology identification. By analyzing and processing hyperspectral data, the rock type within the coverage area can be quickly identified, significantly improving the efficiency and accuracy of geological exploration.
[0005] However, the processing and analysis of hyperspectral data is not without challenges. First, hyperspectral images are usually high-dimensional, and each pixel contains spectral information of hundreds of bands, which not only increases the complexity of data processing, but also puts higher requirements on data processing and analysis algorithms. Secondly, the acquisition and processing of hyperspectral data requires specialized hardware and software support, which to a certain extent limits its popularity in some resource-limited application scenarios. In addition, the complexity of the natural environment also brings challenges to the interpretation of hyperspectral data. Factors such as atmospheric conditions and changes in surface cover may affect the quality of spectral signals and the accuracy of interpretation. Summary of the invention
[0006] The purpose of the present invention is to provide a method and device for lithology recognition based on hyperspectral images with spatial and spectral characteristics, which can improve the accuracy and efficiency of lithology recognition based on hyperspectral images.
[0007] The present invention provides a hyperspectral image lithology identification method based on spatial and spectral characteristics, comprising the following steps: S1: preprocessing the hyperspectral data of a study area to obtain a hyperspectral sample data set, dividing the hyperspectral sample data set according to a preset ratio, and performing data enhancement processing to obtain a training set, a validation set and a test set; S2: using an advanced convolutional neural network model to construct a lithology identification model; S3: using the training set and the validation set to train and verify the lithology identification model to obtain a trained lithology identification model; S4: according to the test set, using the trained lithology identification model to obtain a lithology identification result.
[0008] Furthermore, the above preset ratio is 7:1:2.
[0009] Furthermore, the above preprocessing includes data merging, wavelength information writing, bad band removal, stripe noise removal, radiation correction, geometric correction and spectrum normalization.
[0010] Furthermore, the above-mentioned rock type identification model includes an encoder and a decoder; the encoder is used to capture rock information of different scales using spatial and spectral information and extract rich contextual information in the hyperspectrum; the decoder is used to combine high-resolution feature maps with low-resolution feature maps to retain more spatial information and improve the fineness of the extraction results.
[0011] Furthermore, the encoder comprises a first Convolutional layer, ResNet50 module, dilated pyramid pooling module, spatial and spectral feature mining module, first Convolutional layer and a first upsampling module; the first The convolution layer is used to convert the original hyperspectral data into 3D features; the ResNet50 module is used to extract the deep features of the input hyperspectral data; the hole pyramid pooling module is used to extract the multi-level features and context information in the hyperspectral data; the hole pyramid pooling module includes a second The convolutional layer and the parallel second Convolutional layer, third Convolutional layer, fourth Convolutional layer and global average pooling unit, as shown in the formula: , in, is the output of the hole pyramid pooling module, represents the concatenation function, express convolution, is the input of the hole pyramid pooling module, represents bilinear interpolation, The expansion rate is The dilated convolution, Represents global average pooling.
[0012] Furthermore, the above-mentioned spatial and spectral feature mining module is used to integrate effective features in channel and spatial dimensions, such as formula: , , , , , , , in, It is the input of spatial and spectral feature mining module. Represents the first Group, Represents the first The channel attention branch of the group, Represents the first The spatial attention branch of the group, Indicates the number of channels, The number of groups into which the input feature map is divided, represents the height of the input feature map, represents the width of the input feature map, represents the channel statistics, Indicates Group channel attention map, represents sigmoid activation, and is the learnable parameter of the channel attention mechanism, Indicates Group spatial attention map, Represents normalization, which is used to calculate statistical information on the spatial dimension; and are learnable parameters of the spatial attention mechanism.
[0013] Furthermore, the decoder comprises a third Convolutional layer, concatenation operation, fifth Convolutional layer and second upsampling module.
[0014] Furthermore, the above-mentioned hyperspectral image lithology identification method based on spatial and spectral features also includes: according to the lithology identification result, performing a performance test on the lithology identification model to obtain a model accuracy evaluation result.
[0015] The present invention also provides a computer-readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the above-mentioned high-spectral image lithology identification method based on spatial and spectral features are implemented.
[0016] The present invention also provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned high-spectral image lithology identification method based on spatial and spectral features are implemented.
[0017] The implementation of the hyperspectral image lithology identification method and device based on spatial and spectral features provided by the present invention has the following beneficial effects: The invention preprocesses the hyperspectral data, including band selection, spectral normalization and noise removal, and performs data enhancement processing to obtain training sets, validation sets and test sets, and constructs a convolutional neural network GGPLM-Net including an encoder and a decoder. The encoder includes an ASPP module, which uses three parallel 3 × 3 convolutions (with invalid rates of 6, 12 and 18) and global average pooling to capture high-level semantic information; the spatial and spectral feature mining module models and analyzes the spatial features and channel features in the hyperspectral data, automatically focusing on useful band information and suppressing useless information; in the decoder component, the low-level features extracted from the input layer of the backbone network are used 1 1 convolution is used for reduction and fusion with the high-level features obtained from the encoder; the data in the training set and the validation set are input into the network, multi-level features are extracted in the encoder, and high-level feature information is aggregated in the decoder to better restore the feature map, and the training results are verified by the validation set. After training, the data in the test set is input into the trained network model to generate a lithology classification result map; the present invention combines the characteristics of hyperspectral data and the advantages of deep learning models, utilizes the spatial and spectral information of hyperspectral data, and can effectively identify different types of rocks through effective feature extraction and classification, and makes a detailed description of lithology distribution, thereby improving the accuracy and efficiency of lithology recognition of hyperspectral images, and is suitable for geological exploration, mineral resource investigation, environmental monitoring and other fields. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which: Figure 1 It is a flow chart of the hyperspectral image lithology identification method based on spatial and spectral features provided by the present invention; Figure 2 It is a technical flow chart of the hyperspectral image lithology identification method based on spatial and spectral features provided by the present invention; Figure 3 It is a network structure diagram of the hyperspectral image lithology identification method based on spatial and spectral features provided by the present invention; Figure 4 It is an ASPP module of the hyperspectral image lithology identification method based on spatial and spectral features provided by the present invention; Figure 5 It is a spatial and spectral feature mining module diagram of the hyperspectral image lithology recognition method based on spatial and spectral features provided by the present invention; Figure 6 It is a structural block diagram of the computer device provided by the present invention. DETAILED DESCRIPTION
[0019] In order to have a clearer understanding of the technical features, purposes and effects of the present invention, specific embodiments of the present invention are now described in detail with reference to the accompanying drawings.
[0020] Figure 1 A schematic diagram of a hyperspectral image lithology recognition method based on spatial and spectral features of this embodiment is shown. In this embodiment, the hyperspectral image lithology recognition method based on spatial and spectral features includes the following steps: S1: preprocessing the hyperspectral data of the study area to obtain a hyperspectral sample data set, dividing the hyperspectral sample data set according to a preset ratio, and performing data enhancement processing to obtain a training set, a validation set, and a test set; Specifically, the preset ratio is 7:1:2; Specifically, the preprocessing includes data merging, wavelength information writing, bad band removal, stripe noise removal, radiation correction, geometric correction and spectrum normalization; Specifically, step S1 includes: cropping the original hyperspectral data set to a pixel size of C×H×W; dividing the cropped data set into a training set, a validation set, and a test set; enhancing the data in the training set and the validation set by translation, rotation, and vertical mirroring; re-encoding the label data to convert it into a lithology label data set; Specifically, in step S1, the hyperspectral data of the study area is obtained, and preliminary preprocessing is performed, such as merging two parts of hyperspectral data, writing wavelength information, removing bad bands, removing stripe noise, etc.; performing radiation correction operations such as radiation calibration, atmospheric correction and spectral filtering, and geometric correction operations such as geometric precision correction and orthorectification correction; performing spectral normalization and other operations, producing application products such as vegetation index and parameter inversion, and performing mosaic product operations such as reflectivity mosaic and application product mosaic; and producing lithology type label data for the corresponding area; dividing the hyperspectral sample data set after data preprocessing into a training set, a validation set and a test set, and performing data enhancement processing; Specifically, the preliminary preprocessing includes: for hyperspectral metadata, the bands with strong water vapor absorption are removed by default, the bands with overlapping parts of visible light and short-wave infrared are discarded, and the initial preprocessing of hyperspectral data is performed; it mainly solves the problems of no wavelength information written in hyperspectral data, and the merging and storage of visible light-near infrared and short-wave infrared wavelength data; Specifically, bad band removal includes: removing invalid bad bands in the image. For hyperspectral images, it is mainly necessary to remove the strong water vapor absorption bands and overlapping bands in the image; Specifically, stripe removal includes: stripe noise exists in the first ten bands of the visible-near infrared data part of the hyperspectral image, and the stripe type is vertical stripes, and the vertical stripes need to be removed to improve the imaging quality of the image; Specifically, radiation correction includes: radiation calibration and atmospheric correction of images. Radiation calibration is to convert the DN value data processed in the previous stage into radiance or apparent reflectance data. Atmospheric correction is to eliminate the atmospheric transmission effect of the radiation calibration result, so as to obtain the real surface reflectance product. Specifically, geometric correction includes: geometric correction of the radiation-corrected product, the main processing methods are geometric precision correction and orthorectification processing, so that the hyperspectral data has accurate spatial position information, and the image is output with a spatial resolution of 30m corresponding to the hyperspectral data; It should be noted that, in this embodiment, the geological map of the corresponding area is used to prepare the lithology type label data of the study area; the original geological map contains 96 different lithologies such as moraine conglomerate, gravel, marl, and granite; due to the different data sources, compilation time, and compilation personnel of the collected data, the results formed have different degrees of differences in rock and soil body types, distribution ranges, structural development characteristics, etc., which are sorted out and summarized on the original geological map; the engineering geological characteristics of the rock and soil bodies in the study area are modified and the geological engineering attribute information is extracted, and the 96 lithology categories are modified into three categories such as sedimentary rock, igneous rock, and metamorphic rock, and the fourth category of sample data composed of ice and snow and water bodies is included; It should be noted that, in this embodiment, the pre-processed hyperspectral data and lithology type label data are aligned to construct a hyperspectral lithology identification dataset GDS-LM; wherein the GDS-LM dataset contains four 3200 Hyperspectral images with a size of 2400 pixels and corresponding lithology labels, with a spatial resolution of 30m, contain 153 bands. The hyperspectral band range is usually between 400 nm and 2500 nm, covering the visible light, near infrared and short-wave infrared regions; the GDS-LM dataset is randomly cropped and divided into training set, validation set and test set in a ratio of 7:1:2, and data enhancement is performed. The enhanced image data is obtained by translation, rotation, scaling, vertical mirroring, illumination adjustment, and adding salt and pepper noise points; the label data in the training set and validation set are re-encoded and converted into 0, 1, ..., 3-encoded label data; thus, the final training set, validation set and test set are obtained; S2: Using advanced convolutional neural network model to build lithology recognition model; Specifically, the advanced convolutional neural network model is a Deeplabv3Plus model; Specifically, the lithology recognition model includes an encoder and a decoder; the encoder is used to capture rock mass information of different scales using spatial and spectral information and extract rich contextual information in the hyperspectral image; the decoder is used to combine the high-resolution feature map with the low-resolution feature map to retain more spatial information and improve the precision of the extraction result; Specifically, the encoder includes a first Convolutional layer, ResNet50 module, dilated pyramid pooling module, spatial and spectral feature mining module, first Convolutional layer and the first upsampling module; the first The convolution layer is used to convert the original hyperspectral data into 3D features; the ResNet50 module is used to extract the deep features of the input hyperspectral data; the hole pyramid pooling module is used to extract the multi-level features and context information in the hyperspectral data; the hole pyramid pooling module includes a second The convolutional layer and the parallel second Convolutional layer, third Convolutional layer, fourth Convolutional layer and global average pooling unit, as shown in the formula: , in, is the output of the hole pyramid pooling module, represents the concatenation function, express convolution, is the input of the hole pyramid pooling module, represents bilinear interpolation, The expansion rate is The dilated convolution, represents global average pooling; Specifically, in step S2, the convolutional neural network GGPLM-Net, i.e., the lithology recognition model, uses the Deeplabv3Plus model as the backbone network; Deeplabv3Plus has a simplified and efficient decoding module that can refine feature information and enhance semantic segmentation performance; in the encoder, ResNet50 is used to extract deep features; the GGPLM-Net network structure is as follows: Figure 3 As shown, the GGPLM-Net network mainly includes an encoder and a decoder; Specifically, in the encoder, first a The convolutional layer converts the original hyperspectral data into 3D features, and then ResNet50 is used to extract the deep features of the input hyperspectral data; the extracted deep features are used as input data and input into the Atrous spatial pyramid pooling (ASPP) module in the encoder of GGPLM-Net to extract multi-level features and contextual information in the hyperspectral data; the ASPP module uses three parallel 3×3 dilated convolutions (with dilation rates of 6, 12 and 18) and global average pooling (GAP) to capture high-level semantic information; the Spatial and Spectral Feature Mining Module (SSFMM) models and analyzes the spatial and spectral features in the hyperspectral data, automatically focuses on useful band information and suppresses useless information, effectively integrates features in the channel and spatial dimensions to improve the performance and efficiency of the model, and rearranges the features of different groups in the channel dimension through the shuffle operation to promote information exchange between groups, which can significantly improve the feature representation ability of the deep learning model without significantly increasing the amount of calculation and the number of parameters; Specifically, the ASPP module consists of a The convolutional layer, three parallel 3×3 convolutions (with dilation rates of 6, 12, and 18, respectively) and global average pooling (GAP) are used to capture high-level semantic information, which can effectively capture multi-scale features and spectral features in hyperspectral datasets, such as Figure 4 As shown in Figure 2, compared with conventional convolution operations, the dilated convolution can change its field of view by setting different expansion rates r. For the input feature map X, the output of each position i It can be calculated as follows: , It should be noted that GAP calculates the global pixel average of each feature channel as the image-level feature; for the input feature , GAP can generate output features ; yes A channel, then the corresponding output It can be calculated as follows: , It should be noted that the ASPP module also uses the conventional convolution , three different dilated convolutions ( is the dilation rate) and the GAP unit to calculate the output; next, through bilinear interpolation The output features are resized to the width and height of X and then passed through the concatenation function connect in the channel dimension; therefore, the computation process of the ASPP module can be summarized as follows: , It should be noted that, in this embodiment, a dilated convolution is used to extract multi-scale features through different dilation rates; this enables the model to capture a wider range of contextual information while maintaining high resolution; It should be noted that, in this embodiment, the different branch feature maps generated by the ASPP module are combined by concatenation to form a feature map containing multi-scale information; then, a The convolutional layer integrates the merged feature maps, which aims to reduce redundant information and enhance the expressiveness of features. Finally, the integrated feature maps are processed by batch normalization and activation functions (such as ReLU). This process not only helps to accelerate the training of the model, but also improves the stability and performance of the model, ensuring that the features can be effectively used by subsequent layers. Specifically, the spatial and spectral feature mining module is used to integrate effective features in channel and spatial dimensions, such as the formula: , , , , , , , in, It is the input of spatial and spectral feature mining module. Represents the first Group, Represents the first The channel attention branch of the group, Represents the first The spatial attention branch of the group, Indicates the number of channels, The number of groups into which the input feature map is divided, represents the height of the input feature map, represents the width of the input feature map, Represents channel statistics as a summary of important information in the feature map; Indicates Group channel attention map, represents sigmoid activation, and is a learnable parameter of the channel attention mechanism, Indicates Group spatial attention map, It is a normalization method used to calculate statistical information in the spatial dimension, which helps to obtain the feature statistics of each spatial position, thereby enhancing the representation ability of spatial features; are learnable parameters of the spatial attention mechanism, similar to the parameters in channel attention; Specifically, in the encoder, for the spatial and spectral feature mining modules, the feature maps extracted by ASPP are concatenated, and the effective information in the hyperspectral data is effectively aggregated, but the feature dimension is also increased; Figure 5In order to fully identify and select the most representative features, the spatial and spectral feature mining module SSFMM models and analyzes the spatial and spectral features in the aggregated feature map / hyperspectral data generated by the ASPP module, automatically focusing on useful band information and suppressing useless information; by effectively integrating features in the channel and spatial dimensions to improve the performance and efficiency of the model, and by shuffle operations, the features of different groups are rearranged in the channel dimension to promote information exchange between groups; specifically, "spectral segmentation" is used to process the sub-features of each group in parallel; for the spectral attention branch, GAP is used to generate spectral statistics, and then a pair of parameters are used to scale and move the spectral vector; for the spatial attention branch, the group norm is used to generate spatial statistics, and then compact features similar to the spectral branch are created; then the two branches are connected; after that, all sub-features are aggregated, and finally the "channel shuffle" operator is used to achieve information communication between different sub-features; the specific steps are as follows: First, the input feature map is divided into multiple groups (Group, G). This step helps to reduce the amount of computation and increase the capacity of the model. That is, the size of the ASPP module after aggregation is Feature Map Along the latitude of the channel Group, namely: , This step helps to reduce the amount of computation and increase the capacity of the model; and before the two attention branches are calculated, Along the latitude of the channel there are two branches: , One branch is used to generate channel attention maps by exploiting the mutual relationship between channels, while the other branch is used to generate spatial attention maps by exploiting the spatial relationship between features; Channel attention is calculated for the features within each group; this is achieved through global average pooling (GAP) and a fully connected layer (FC) to generate a channel attention map to highlight important channels: , The precise and adaptive selection is achieved through a simple gating mechanism with sigmoid activation; then, the final output of the channel attention can be obtained as follows: , , , Perform spatial attention on the features within each group; this step usually involves computing the spatial relationships of the feature maps to generate a spatial attention map that highlights important spatial regions: , The feature map processed by channel attention and spatial attention is fused with the original input feature map, usually by element-by-element addition. Through grouping operations and lightweight attention mechanisms, the SSFMM module effectively integrates features in the channel and spatial dimensions to improve the performance and efficiency of the model, and rearranges the features of different groups in the channel dimension through shuffle operations to promote information exchange between groups. It can significantly improve the feature representation ability of the deep learning model without significantly increasing the amount of calculation and parameters. Specifically, the decoder includes a third Convolutional layer, concatenation operation, fifth Convolutional layer and second upsampling module; Specifically, in the decoder part, the output feature map of the encoder is restored to the original size of the input image, and in the process, detailed spatial information is restored; in GGPLM-Net, the decoder first fuses the output of the encoder with low-level features (concatenation), then further processes the fused features through the convolution layer, and finally restores it to the original size through upsampling (upsample); the decoder combines the deep features from the ASPP module and the low-level features from the shallow layer of the network, effectively restoring the spatial information and improving the accuracy of lithology recognition; S3: using the training set and the verification set to train and verify the lithology identification model to obtain a trained lithology identification model; Specifically, in step S3, the data in the training set and the validation set are input into GGPLM-Net, and multi-level features are extracted in the encoder respectively. The spatial features and spectral features in the hyperspectral data set are modeled and analyzed through the spatial and spectral feature mining module SSFMM. The high-level feature information is aggregated in the decoder to better restore the feature map, and the training results are verified by the validation set. After the training is completed, a trained lithology recognition model is obtained; It should be noted that the training data set is a hyperspectral data with rich band information. The hyperspectral data of different sizes are input into the GGPLM-Net network for training; in the encoder part, the rock information of different scales can be captured, the rich contextual information in the hyperspectral can be extracted, and the spatial and spectral information can be fully utilized; in the decoder part, the high-resolution feature map in the encoder is combined with the low-resolution feature map, which helps to retain more spatial information and thus improve the refinement of the extraction results; the network training is optimized through the loss function, and the training results are verified through the validation set. After the training is completed, the trained network model is obtained.
[0021] S4: According to the test set, using the trained lithology identification model, a lithology identification result is obtained.
[0022] Optionally, the above-mentioned hyperspectral image lithology identification method based on spatial and spectral features further includes: S5: According to the lithology identification result, the lithology identification model is subjected to a performance test to obtain a model accuracy evaluation result.
[0023] In some embodiments, the above-mentioned hyperspectral image lithology identification method based on spatial and spectral features can also be implemented in the following manner.
[0024] Please refer to Figure 2 This embodiment provides a hyperspectral image deep learning lithology recognition method, more specifically, a hyperspectral image lithology recognition method based on spatial and spectral features, and its main steps are as follows: Step 1: Obtain the hyperspectral data of the study area, perform preprocessing, divide the hyperspectral sample data set after data preprocessing into training set, validation set and test set, and perform data enhancement processing; Specifically, obtain the hyperspectral data of the study area, preprocess the original hyperspectral data (merge the two parts of hyperspectral data, write wavelength information, remove bad bands, remove stripe noise, etc.), perform radiation correction (radiation calibration, atmospheric correction and spectral filtering, etc.), geometric correction (geometric precision correction, orthorectification, etc.), produce application products (vegetation index, parameter inversion, etc.), mosaic products (reflectance mosaic, application product mosaic, etc.); Step 2: Input the training data and verification data into the GGPLM-Net network. In the encoder part, it can capture rock mass information of different scales, extract rich contextual information in the hyperspectral, and make full use of spatial and spectral information. In the decoder part, the high-resolution feature map in the encoder is combined with the low-resolution feature map, which helps to retain more spatial information, thereby improving the precision of the extraction results. Through the loss function, the network training is optimized, and the training results are verified through the verification set. After the training is completed, the trained network model is obtained. The GGPLM-Net network structure is as follows: Figure 3 As shown in the figure, the training dataset is a hyperspectral data with rich band information. The hyperspectral data of size is input into the GGPLM-Net network for training; the convolutional network mainly includes an encoder part and a decoder part; in the encoder, firstly, a The convolutional layer converts the original hyperspectral data into 3D features, and then ResNet50 is used to extract the deep features of the input hyperspectral data; the ASPP module in the encoder of the GGPLM-Net has a The convolutional layer, three parallel Convolution (with dilation rates of 6, 12, and 18) and global average pooling are used to capture high-level semantic information, such as Figure 4 As shown; for the input feature map X, the output of each position i It can be calculated as follows:
[0025] GAP calculates the global pixel average of each feature channel as the image-level feature; for the input feature , GAP can generate output features yes A channel, then the corresponding output It can be calculated as follows:
[0026] The ASPP module also uses a regular 1×1 convolution , three different dilated convolutions ( is the dilation rate) and the GAP unit to calculate the output; next, through bilinear interpolation The output features are resized to the width and height of X and then passed through the concatenation function connect in the channel dimension; therefore, the computation process of the ASPP module can be summarized as follows:
[0027] The different branch feature maps generated by the ASPP module are merged by concatenation to form a feature map containing multi-scale information; then, a The convolutional layer integrates the merged feature maps, which aims to reduce redundant information and enhance the expressiveness of features. Finally, the integrated feature maps are processed by batch normalization and activation functions (such as ReLU). This process not only helps to accelerate the training of the model, but also improves the stability and performance of the model, ensuring that the features can be effectively used by subsequent layers. After the feature maps extracted by ASPP are spliced, the effective information in the hyperspectral data is effectively aggregated, but the feature dimension is also increased; Figure 5 ,In order to fully identify and select the most representative features, the spatial and spectral feature mining module (SSFMM) models and analyzes the spatial and spectral features in the aggregate feature map generated by the ASPP module, automatically focusing on useful band information and suppressing useless information; ,by effectively integrating features in the channel and spatial dimensions to improve the performance and efficiency of the model, and shuffle operations to rearrange the features of different groups in the channel dimension to promote information exchange between groups; First, the size of the ASPP module after aggregation is Feature Map Along the latitude of the channel Group, that is , this step helps to reduce the amount of calculation and increase the capacity of the model; and before the two attention branches are calculated, The channel is divided into two branches along the latitude ; One branch is used to generate a channel attention map by exploiting the mutual relationship between channels, while the other branch is used to generate a spatial attention map by exploiting the spatial relationship between features; Channel attention is calculated for the features within each group; this is achieved through global average pooling (GAP) and a fully connected layer (FC) to generate a channel attention map that highlights important channels:
[0028] The precise and adaptive selection is achieved through a simple gating mechanism with sigmoid activation; then, the final output of the channel attention can be obtained as follows:
[0029] in, , ; Perform spatial attention on the features within each group; this step usually involves computing the spatial relationships of the feature maps to generate a spatial attention map that highlights important spatial regions:
[0030] The feature map processed by channel attention and spatial attention is fused with the original input feature map, usually by element-by-element addition. Through grouping operations and lightweight attention mechanisms, the SSFMM module can significantly improve the feature representation capability of the deep learning model without significantly increasing the amount of computation and parameters. S3: Input the data in the training set and the validation set into GGPLM-Net, extract multi-level features in the encoder, aggregate high-level feature information in the decoder to better restore the feature map, and verify the training results through the validation set. After the training is completed, the trained network model is obtained; Specifically, in step S3, in the decoder part, the output feature map of the encoder is restored to the original size of the input image, and in the process, detailed spatial information is restored; in GGPLM-Net, the decoder first concatenates the output of the encoder with low-level features, then further processes the fused features through a convolutional layer, and finally restores them to the original size through upsampling; the decoder combines the deep features from the ASPP module and the low-level features from the shallow layer of the network, effectively restoring spatial information and improving the accuracy of lithology recognition; S4: Input the data in the test set into the trained network model to predict the lithology identification results, test the model performance, and obtain the model accuracy evaluation results.
[0031] In this embodiment, in order to test the performance of the proposed model, the following two evaluation indicators are used: overall classification accuracy (Overall accuracy, OA) and average classification accuracy (Average accuracy, AA); Specifically, the above evaluation indicators can be expressed by the following formula: The total classification accuracy refers to the ratio of the number of correctly classified samples to the total number of samples, and its calculation formula is: , Among them, TP (True Positive) is the true positive example, the number of samples correctly classified as the positive class; TN (True Negative) is the true negative example, the number of samples correctly classified as the negative class; FP (False Positive) is the false positive example, the number of samples incorrectly classified as the positive class; FN (False Negative) is the false negative example, the number of samples incorrectly classified as the negative class; The average classification accuracy is the average of the classification accuracy of each category, and its calculation formula is: , Where N is the total number of categories; is the number of true positive examples of the i-th class; is the number of false positive examples in the i-th category; The hyperspectral lithology classification results are shown in Table 1: Table 1: Comparison of hyperspectral lithology classification results
[0032] As can be seen from the table, the classification performance of the GGPLM-Net model is improved compared to the Deeplabv3Plus model. The total classification accuracy is improved by 1% and the average classification accuracy is improved by 9.8%.
[0033] This embodiment provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the steps of the hyperspectral image lithology identification method based on spatial and spectral features are implemented. The storage medium may be a magnetic disk, an optical disk, a read-only memory (ROM), a random access memory (RAM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD), etc.; the storage medium may also include a combination of the above-mentioned types of memory.
[0034] This embodiment provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor. When the processor executes the program, the steps of the above-mentioned hyperspectral image lithology identification method based on spatial and spectral features are implemented.
[0035] like Figure 6As shown, the computer device may include: at least one processor 121, such as a CPU (Central Processing Unit), at least one communication interface 123, a memory 124, and at least one communication bus 122. Among them, the communication bus 122 is used to realize the connection and communication between these components. Among them, the communication interface 123 may include a display screen (Display), a keyboard (Keyboard), and the optional communication interface 123 may also include a standard wired interface and a wireless interface. The memory 124 may be a high-speed RAM memory (Random Access Memory, volatile random access memory), or a non-volatile memory (non-volatile memory), such as at least one disk memory. The memory 124 may also be at least one storage device located away from the aforementioned processor 121. Among them, the memory 124 stores an application program, and the processor 121 calls the program code stored in the memory 124 to perform any of the above method steps. Among them, the communication bus 122 may be a peripheral component interconnect (PCI) bus or an extended industry standard architecture (EISA) bus, etc. The communication bus 122 can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 6Only one line is used to represent it, but it does not mean that there is only one bus or one type of bus. Among them, the memory 124 may include a volatile memory (English: volatile memory), such as a random access memory (English: random-access memory, abbreviated: RAM); the memory may also include a non-volatile memory (English: non-volatile memory), such as a flash memory (English: flash memory), a hard disk drive (English: hard disk drive, abbreviated: HDD) or a solid-state drive (English: solid-state drive, abbreviated: SSD); the memory 124 may also include a combination of the above-mentioned types of memory. Among them, the processor 121 may be a central processing unit (English: central processing unit, abbreviated: CPU), a network processor (English: network processor, abbreviated: NP) or a combination of CPU and NP. Among them, the processor 121 may further include a hardware chip. The above-mentioned hardware chip may be an application-specific integrated circuit (English: application-specific integrated circuit, abbreviated: ASIC), a programmable logic device (English: programmable logic device, abbreviated: PLD) or a combination thereof. The PLD can be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL), or any combination thereof. Optionally, the memory 124 is also used to store program instructions. The processor 121 can call the program instructions to implement the hyperspectral image lithology recognition method based on spatial and spectral features as in this embodiment.
[0036] The embodiments of the present invention are described above in conjunction with the accompanying drawings, but the present invention is not limited to the above-mentioned specific implementation modes, which are merely illustrative rather than restrictive. Under the guidance of the present invention, ordinary technicians in this field can also make many forms without departing from the scope of protection of the present invention and the claims, all of which are within the protection of the present invention.
Claims
1. A hyperspectral image lithology recognition method based on spatial and spectral features, characterized in that: The following steps are involved: S1: preprocessing the hyperspectral data of the study area to obtain a hyperspectral sample data set, dividing the hyperspectral sample data set according to a preset ratio, and performing data enhancement processing to obtain a training set, a validation set, and a test set; S2: Using advanced convolutional neural network model to build lithology recognition model; S3: using the training set and the verification set to train and verify the lithology identification model to obtain a trained lithology identification model; S4: According to the test set, using the trained lithology identification model, a lithology identification result is obtained.
2. The method for lithology identification based on hyperspectral images of spatial and spectral features according to claim 1 is characterized in that: The preset ratio is 7:1:
2.
3. The method for lithology identification based on hyperspectral images of space and spectral features according to claim 1 is characterized in that: The preprocessing includes data merging, wavelength information writing, bad band removal, stripe noise removal, radiation correction, geometric correction and spectrum normalization.
4. The method for lithology identification based on hyperspectral images of space and spectral features according to claim 1 is characterized in that: The lithology recognition model includes an encoder and a decoder; the encoder is used to capture rock mass information of different scales using spatial and spectral information and extract rich contextual information in the hyperspectrum; the decoder is used to combine high-resolution feature maps with low-resolution feature maps to retain more spatial information and improve the precision of the extraction results.
5. The method for lithology identification based on hyperspectral images of space and spectral features according to claim 4 is characterized in that: The encoder comprises a first Convolutional layer, ResNet50 module, dilated pyramid pooling module, spatial and spectral feature mining module, first Convolutional layer and a first upsampling module; the first The convolution layer is used to convert the original hyperspectral data into 3D features; the ResNet50 module is used to extract the deep features of the input hyperspectral data; the hole pyramid pooling module is used to extract the multi-level features and context information in the hyperspectral data; the hole pyramid pooling module includes a second The convolutional layer and the parallel second Convolutional layer, third Convolutional layer, fourth Convolutional layer and global average pooling unit, as shown in the formula: , in, is the output of the hole pyramid pooling module, represents the concatenation function, express convolution, is the input of the hole pyramid pooling module, represents bilinear interpolation, The expansion rate is The dilated convolution, Represents global average pooling.
6. The method for lithology identification based on hyperspectral images of space and spectral features according to claim 5 is characterized in that: The spatial and spectral feature mining module is used to integrate effective features in channel and spatial dimensions, such as the formula: , , , , , , , in, It is the input of spatial and spectral feature mining module. Represents the first Group, Represents the first The channel attention branch of the group, Represents the first The spatial attention branch of the group, Indicates the number of channels, The number of groups into which the input feature map is divided, represents the height of the input feature map, represents the width of the input feature map, represents the channel statistics, Indicates Group channel attention map, represents sigmoid activation, and is the learnable parameter of the channel attention mechanism, Indicates Group spatial attention map, Represents normalization, which is used to calculate statistical information on the spatial dimension; and are learnable parameters of the spatial attention mechanism.
7. The method for lithology identification based on hyperspectral images of space and spectral features according to claim 4 is characterized in that: The decoder comprises a third Convolutional layer, concatenation operation, fifth Convolutional layer and second upsampling module.
8. The method for lithology identification based on hyperspectral images of space and spectral features according to claim 1 is characterized in that: The hyperspectral image lithology identification method based on spatial and spectral features also includes: performing a performance test on the lithology identification model according to the lithology identification result to obtain a model accuracy evaluation result.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method for lithology identification based on hyperspectral images and spatial and spectral features as described in any one of claims 1 to 8 are implemented.
10. A computer device comprising a memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the steps of the hyperspectral image lithology identification method based on spatial and spectral features as described in any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Hyperspectral rock classification method based on deep ensemble learning algorithm
CN120451612A
Lithology identification method and device based on fusion of rock debris fluorescence image and Raman spectrum, and electronic equipment
CN120908158A
Lithology identification method and device based on fusion of rock debris fluorescence image and raman spectrum and electronic equipment
CN120908158B
Lithology automatic classification method and system based on cooperation of hyperspectral image and machine learning
CN120913055A