A hyperspectral image band selection method and device based on contrast learning
By constructing an attention encoder and predictor based on a contrastive learning approach, and training a band selection network, the problems of high computational cost and pattern ignoring in existing technologies are solved, achieving efficient band selection and improved classification accuracy.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-06-07
- Publication Date
- 2026-04-07
AI Technical Summary
Existing methods for selecting bands in hyperspectral images based on deep representation learning are computationally expensive and ignore the more general data distribution patterns in hyperspectral images, making it impossible to efficiently select the most valuable subset of bands.
A contrastive learning-based approach is adopted. By constructing an attention encoder and predictor, and utilizing the spatial information of hyperspectral images, combined with symmetric loss and sparse weight vector constraints, a band selection network is trained to extract the importance of bands and select the most valuable subset of bands.
It effectively explores the nonlinear relationships between bands, avoids computationally expensive generation steps, improves the generalization performance of band selection, can focus on the abstract semantic information of hyperspectral images, and improves classification accuracy.
Smart Images

Figure CN116704343B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image processing, and in particular to a hyperspectral image band selection method and device based on contrast learning. BACKGROUND
[0002] Hyperspectral images contain hundreds of continuous spectral bands, which can reflect the subtle features of the measured object in detail. However, the high redundancy of the spectral dimension of hyperspectral images also brings many challenges, such as the "Hughes phenomenon" and heavy storage burden. Therefore, it is necessary to perform dimensionality reduction processing on the hyperspectral image. Generally speaking, there are two methods for data dimensionality reduction of hyperspectral images, namely feature extraction and band selection. Although the former can effectively map high-dimensional features to low-dimensional space, it will destroy the original physical meaning of the hyperspectral image, mainly because some characteristics are combined into new characteristics. Band selection can achieve the purpose of dimensionality reduction of hyperspectral images while preserving the physical characteristics of the original hyperspectral image. Therefore, in the field of hyperspectral, band selection methods have been widely concerned and studied.
[0003] Recently, band selection methods based on deep representation learning have made significant progress. Deep representation learning methods are generally divided into two categories: generative algorithms and discriminative algorithms. Generative algorithms are represented by autoencoders. Among discriminative algorithms, contrast learning can achieve excellent performance. Existing band selection methods based on deep representation learning usually need to rely on generative algorithms. However, there are mainly two problems in band selection methods based on generative algorithms:
[0004] (1) The generation of images with pixel-level details required by band selection methods based on generative algorithms is computationally expensive, which may not be necessary for band selection methods based on deep representation learning.
[0005] (2) Band selection methods based on generative algorithms focus too much on the details on the instance, leading to the neglect of more general data distribution patterns in hyperspectral images. SUMMARY
[0006] In view of the deficiencies in the prior art, the purpose of the present application is to provide a hyperspectral image band selection method and device based on contrast learning, which first introduces contrast learning into the field of hyperspectral image band selection, fully excavates abstract semantic information and more general data distribution patterns in hyperspectral images, improves the generalization performance of band selection models based on deep representation learning, avoids the computationally expensive generation step in generative methods, and solves the problem that existing band selection methods based on deep representation learning cannot efficiently select the most valuable band subset.
[0007] To achieve the above purpose, the present application provides the following technical solutions:
[0008] This invention provides a hyperspectral image band selection method based on contrastive learning, comprising the following steps:
[0009] Step 1) Divide the hyperspectral image into blocks, and perform two random data augmentation operations on each hyperspectral image block to obtain two random augmented views;
[0010] Step 2) Construct a contrastive learning network based on band attention, which includes:
[0011] 2.1) Construct an attention encoder and input two enhanced views of a hyperspectral image patch into two identical attention encoders for processing. The two attention encoders share weights, and the calculation formula is expressed as follows:
[0012] Z j =f(X) Pj ;θ)
[0013] Among them, Z j These represent two feature vectors obtained from the two augmented views after passing through the attention encoder, j = 1, 2, X Pj θ represents the augmented view, f(·) represents the attention encoder function, and θ represents the trainable parameters in the attention encoder.
[0014] The attention encoder mainly includes a band attention module; the band attention module takes the enhanced view as input to obtain the band weight vector, and the calculation formula is expressed as:
[0015] ω j =F(X) Pj ;θ A )
[0016] in, This represents the band attention weight vector obtained from the j-th augmented view, where j = 1, 2, L represents the number of bands, F(·) represents the band attention module function, and θ A These represent the trainable parameters in the band attention module;
[0017] 2.2) Constructing a predictor; the predictor is constructed using a multilayer sensing mechanism;
[0018] The feature vector obtained by passing one view through the attention encoder is input into the predictor, and the resulting predicted value is matched with the feature vector obtained by passing another view through the attention encoder.
[0019] The matching mentioned refers to calculating the symmetric loss between the predicted value obtained from one augmented view and the feature vector obtained from another augmented view;
[0020] Step 3) Define a loss function applicable to the band selection network based on contrastive learning. The loss function of the band selection network based on contrastive learning includes a symmetric loss term and a weight vector sparsity constraint term. The optimization objectives are to minimize the symmetric loss and the band weight vector sparsity. By minimizing the loss function, the contrastive learning network based on band attention is trained.
[0021] Step 4) Measure the importance of each band using the average band weights learned after network training. The calculation formula is as follows:
[0022]
[0023] in, This represents the average weight of the t-th band; The attention weights for the t-th band are obtained for the two enhanced views of the i-th hyperspectral image patch, respectively.
[0024] Step 5) Sort all bands from highest to lowest importance, and select the required number of bands at the top as the most valuable subset of bands.
[0025] As a preferred embodiment of the present invention, the calculation formula of the loss function of the band selection network based on contrastive learning is expressed as follows:
[0026]
[0027] Where n is the number of samples in the original hyperspectral image patch. The negative cosine similarity between h(Z1) and Z2 is represented by h(·), where h(·) represents the predictor function, stopgrad(·) represents the stopping gradient operation, and η represents the balance coefficient. The band attention weight vectors are obtained for the two enhanced views of the i-th hyperspectral image patch.
[0028] The present invention also provides a hyperspectral image band selection device based on contrastive learning, the device comprising:
[0029] The hyperspectral data augmentation module divides the hyperspectral image into blocks, with each block serving as a sample; it then performs two random data augmentations on each block to obtain two randomly augmented views.
[0030] A band-attention-based contrastive learning network construction module is used to construct a band-attention-based contrastive learning network. The band-attention-based contrastive learning network includes an attention encoder and a predictor. The attention encoder is used to apply more attention to valuable bands while utilizing the spatial information of the hyperspectral image. The predictor is used to predict the feature vector obtained by the attention encoder module for one view and match the result with the feature vector obtained by the attention encoder module for another view.
[0031] The loss function definition module for band selection networks based on contrastive learning is used to define the loss function applicable to band selection networks based on contrastive learning and to train the network.
[0032] The band importance measurement module uses the average band weights learned after network training to measure the importance of each band.
[0033] The module for selecting the most valuable band subset sorts all bands from highest to lowest importance and selects the required number of bands at the top of the list as the most valuable band subset.
[0034] The band selection result output module is used to output the selected band subset results.
[0035] The beneficial effects of this invention are as follows:
[0036] 1) To address the problem that existing band selection methods based on deep representation learning rely on computationally expensive generation steps, this invention proposes a band selection method based on contrastive learning, which can explore the nonlinear relationships between bands, utilize the spatial information of hyperspectral images, and avoid computationally expensive generation steps.
[0037] 2) This invention proposes to introduce an attention mechanism into the contrastive learning framework to extract the importance of each band, thereby designing a band importance metric that can focus on the abstract semantic information of hyperspectral images for unsupervised band selection tasks.
[0038] 3) This invention proposes the first loss function for band selection networks based on contrastive learning, which can ensure attention to the most valuable bands while constraining symmetric loss. Attached Figure Description
[0039] Figure 1 This is a flowchart illustrating the basic steps of an embodiment of the hyperspectral image band selection method based on contrastive learning according to the present invention.
[0040] Figure 2 This is a schematic diagram of the hyperspectral image band selection device of the present invention.
[0041] Figure 3Hyperspectral images from the Indian Pines dataset.
[0042] Figure 4 Hyperspectral images from the Pavia University dataset.
[0043] Figure 5 This shows the classification accuracy curves for different band selection methods when using an SVM classifier on the Indian Pines dataset.
[0044] Figure 6 The image shows the classification accuracy curves for different band selection methods when using an SVM classifier on the Pavia University dataset. Detailed Implementation
[0045] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative effort are within the scope of protection of the present invention.
[0046] like Figure 1 The diagram shown is a flowchart illustrating the basic steps of an embodiment of the hyperspectral image band selection method of the invention, specifically including the following steps.
[0047] Input: Original hyperspectral image X∈R L×W×H Where L represents the number of bands and W×H represents the number of pixels.
[0048] Step 1: Amplify hyperspectral data.
[0049] (1) Divide the original hyperspectral image into blocks, and represent each hyperspectral image block as X. P ∈R L×m×m m×m is the pixel size after block division, and each hyperspectral image block is a sample, resulting in a total of n samples.
[0050] (2) Perform two random data augmentation operations on a hyperspectral image patch to obtain two randomly augmented views. The calculation formula is as follows:
[0051] X P1 =aug(X) P )
[0052] X P2 =aug(X) P )
[0053] Among them, X P1 and X P2 Represents an augmented view, aug(·) represents a random data augmentation operation, X PRepresents a hyperspectral image block.
[0054] In one specific implementation of this embodiment, the random data augmentation operations include random cropping, Gaussian blurring, random horizontal image flipping, and normalization.
[0055] Step 2: Construct a contrastive learning network based on band attention.
[0056] (1) Construct an attention encoder and input the two enhanced views of a hyperspectral image patch into two identical attention encoders for processing. The two attention encoders share weights, and the calculation formula is expressed as follows:
[0057] Z j =f(X) Pj ;θ)
[0058] Among them, Z j These represent two feature vectors obtained from the two augmented views after passing through the attention encoder, j = 1, 2, X Pj θ represents the augmented view, f(·) represents the attention encoder function, and θ represents the trainable parameters in the attention encoder.
[0059] In one specific implementation of this embodiment, the attention encoder consists of a band attention module, a 2D convolution module, and a mapping module.
[0060] Furthermore, in one specific implementation of this embodiment, the band attention module consists of a global max pooling layer, a one-dimensional convolutional layer, and a sigmoid activation layer. It takes the enhanced view as input to obtain the band weight vector, and the calculation formula is expressed as:
[0061] ω j =F(X) Pj ;θ A )
[0062] in, This represents the band attention weight vector obtained from the j-th augmented view, where j = 1, 2, L represents the number of bands, F(·) represents the band attention module function, and θ A These represent the trainable parameters in the band attention module.
[0063] The 2D convolutional module consists of 2D convolutional layers, batch normalization layers, and ReLU activation function layers. It utilizes the spatial information of the hyperspectral image, taking a reweighted enhanced view as input, and outputs a 3D cube. The reweighted enhanced view is calculated by reweighting each band of the enhanced view using the band weight vector obtained from the band attention module. The calculation formula is as follows:
[0064]
[0065] Among them, Y j Represents the reweighted augmented view, j = 1, 2, This represents the symbol for multiplication by band.
[0066] The mapping module consists of a global average pooling layer and a multilayer perceptron. The global average pooling layer takes a 3D cube output from a 2D convolutional module as input and a one-dimensional vector as output, and is used to aggregate the spatial information of the 3D cube. The multilayer perceptron takes a one-dimensional aggregated representation output from the global average pooling layer as input and a one-dimensional vector of the latent space as output, and is used to project the aggregated representation onto the latent space.
[0067] (2) Construct a predictor, transform the output of one view through the attention encoder through the predictor, and match the result with the output of another view through the attention encoder. The matching refers to calculating the symmetric loss between the predicted value obtained by one enhanced view and the feature vector obtained by another enhanced view.
[0068] In one specific implementation of this embodiment, the predictor is constructed using a multilayer perceptron, which consists of a fully connected layer, a batch normalization layer, a ReLU activation function layer, and a fully connected layer.
[0069] Step 3: Define the loss function for the band selection network based on contrastive learning. The calculation formula is as follows:
[0070]
[0071] Where n is the number of samples in the original hyperspectral image patch. Let h(Z1) represent the negative cosine similarity between h(Z1) and Z2, h(·) represent the predictor, stopgrad(·) represent the stopping gradient operation, η represent the balance coefficient, and the superscript (i) indicates the i-th hyperspectral image patch. The band attention weight vectors are obtained for the two enhanced views of the i-th hyperspectral image patch.
[0072] Subsequently, by minimizing the loss function and optimizing the network parameters, a contrastive learning network based on band attention is trained.
[0073] Step 4: Measure the importance of the band.
[0074] The importance of each band is measured by the average weight of the bands learned after network training. The calculation formula is as follows:
[0075]
[0076] in, This represents the average weight of the t-th band. The attention weights for the t-th band are obtained for the two enhanced views of the i-th hyperspectral image patch.
[0077] Step 5: Select the most valuable subset of bands.
[0078] All bands are sorted from highest to lowest importance, and the top k bands are selected as the most valuable subset. The value of k varies for different hyperspectral datasets, but it is usually close to the number of real land cover categories in the dataset.
[0079] Corresponding to the aforementioned embodiments of the hyperspectral image band selection method based on contrastive learning, this application also provides an embodiment of a hyperspectral image band selection device based on contrastive learning, comprising:
[0080] The hyperspectral data augmentation module divides the hyperspectral image into blocks, with each hyperspectral image block serving as a sample; it then performs two random data augmentations on each hyperspectral image block to obtain two randomly augmented views.
[0081] A band-attention-based contrastive learning network construction module is used to construct a band-attention-based contrastive learning network. The band-attention-based contrastive learning network includes an attention encoder and a predictor. The attention encoder is used to apply more attention to valuable bands while utilizing the spatial information of the hyperspectral image. The predictor is used to predict the feature vector obtained by the attention encoder module for one view and match the result with the feature vector obtained by the attention encoder module for another view.
[0082] The loss function definition module for band selection networks based on contrastive learning is used to define the loss function applicable to band selection networks based on contrastive learning and to train the network.
[0083] The band importance measurement module uses the average band weights learned after network training to measure the importance of each band.
[0084] The module for selecting the most valuable band subset sorts all bands from highest to lowest importance and selects the required number of bands at the top of the list as the most valuable band subset.
[0085] The band selection result output module is used to output the selected band subset results.
[0086] In one specific embodiment of the present invention, the band selection device further includes an application module, which uses the selected band subset to perform hyperspectral image classification or target detection.
[0087] In one specific embodiment of the present invention, the hyperspectral data amplification module includes:
[0088] The image segmentation module is used to segment hyperspectral images into blocks, with each hyperspectral image block serving as a sample.
[0089] The random data augmentation module is used to perform random data augmentation twice on the hyperspectral image patch to obtain two randomly augmented views.
[0090] In one specific embodiment of the present invention, the attention encoder includes a band attention module, a 2D convolution module, and a mapping module; the band attention module takes an enhanced view as input to obtain a band weight vector.
[0091] The 2D convolution module is used to utilize the spatial information of the hyperspectral image. It takes a reweighted enhanced view as input and outputs a 3D cube. The reweighted enhanced view is obtained by reweighting each band of the enhanced view using the band weight vector obtained by the band attention module.
[0092] The mapping module consists of a global average pooling layer and a multilayer perceptron. The global average pooling layer takes a 3D cube output by a 2D convolutional module as input and a one-dimensional vector as output, and is used to aggregate the spatial information of the 3D cube. The multilayer perceptron takes a one-dimensional aggregated representation output by the global average pooling layer as input and a one-dimensional vector of the latent space as output, and is used to project the aggregated representation onto the latent space.
[0093] Regarding the apparatus in the above embodiments, the specific manner in which each unit or module performs its operation has been described in detail in the embodiments related to the method, and will not be elaborated upon here.
[0094] For the device embodiments, since they basically correspond to the method embodiments, the relevant parts can be referred to in the description of the method embodiments. The device embodiments described above are merely illustrative, and the hyperspectral data amplification module and the band attention-based contrastive learning network construction module may or may not be physically separate. Furthermore, the functional modules in this invention can be integrated into one processing unit, or each module can exist physically separately, or two or more modules can be integrated into one unit. The integrated modules or units described above can be implemented in hardware or as software functional units, selecting some or all of the modules according to actual needs to achieve the purpose of this application.
[0095] To verify the effectiveness of this invention, experiments were conducted on real hyperspectral images. The specific implementation method is illustrated below using the IndianPines dataset and the Pavia University dataset as examples. The experiments are as follows:
[0096] The Indian Pines dataset used in this embodiment consists of hyperspectral images captured by the AVIRIS sensor, such as... Figure 3 As shown, the size is 145×145 pixels. After removing the water vapor absorption band and the low signal-to-noise ratio bands, 185 bands remained for the experiment. The Pavia University dataset used in this embodiment consists of hyperspectral images taken by the ROSIS sensor, such as... Figure 4 As shown, the size is 610×340 pixels, with a total of 103 bands.
[0097] To further verify the application effect of the present invention, the results obtained by the method of the present invention and other methods were used for pixel classification. To more intuitively compare the impact of various band selection methods on the accuracy of downstream classification tasks, Figure 5 The graph shows the classification accuracy of different band selection methods as a function of the number of selected bands when using an SVM classifier on the Indian Pines dataset. The horizontal axis represents the number of selected bands, and the vertical axis represents the overall classification accuracy. Figure 5 As shown, for the Indian Pines dataset, when selecting different numbers of bands, the specific instance of this invention can always achieve significantly higher classification accuracy than other band selection methods.
[0098] Figure 6 The curves show the classification accuracy of different band selection methods as a function of the number of selected bands when using the SVM classifier on the Pavia University dataset. The horizontal axis represents the number of selected bands, and the vertical axis represents the overall classification accuracy. Figure 6 The results show that the specific examples of the present invention can achieve significantly better classification results than other band selection methods on the Pavia University dataset.
[0099] Table 1 Comparison of classification performance of different band selection methods on SVM classifier
[0100] Method OA (%) AA (%) 1. MVPCA [1] ]] 64.81 50.83 2. LCMV BCC [2] ]] 58.95 49.74 3. LCMV BCM [2] ]] 66.90 60.98 4. OPBS [3] ]] 72.33 62.97 5. MR [4] ]] 78.42 71.24 6. BS-Net-Conv [5] ]]> 78.91 72.27 7. The present invention 80.94 74.01
[0101] [1]C.-I.Chang,Q.Du,T.-L.Sun,and M.L.Althouse,“A joint bandprioritization and band-decorrelation approach to band selection forhyperspectral image classification,”IEEE Transactions on Geoscience andRemote Sensing,vol.37,no.6,pp.2631–2641,1999.
[0102] [2]C.-I.Chang and S.Wang,“Constrained band selection forhyperspectral imagery,”IEEE Transactions on Geoscience and Remote Sensing,vol.44,no.6,pp.1575–1585,2006.
[0103] [3]W.Zhang,X.Li,Y.Dou,and L.Zhao,“A geometry-based band selectionapproach for hyperspectral image analysis,”IEEE Transactions on Geoscienceand Remote Sensing,vol.56,no.8,pp.4318–4333,2018.
[0104] [4]Q.Wang,J.Lin,and Y.Yuan,“Salient band selection for hyperspectralimage classification via manifold ranking,”IEEE transactions on neuralnetworks and learning systems,vol.27,no.6,pp.1279–1289,2016.
[0105] [5] Y.Cai,
[0106] Table 1, using k=15 as an example, shows the classification accuracy obtained by different band selection methods when using an SVM classifier on the Indian Pines dataset. The table presents the results of two quantitative evaluation metrics for pixel classification: OA (Overall Accuracy) and AA (Average Accuracy). The former refers to the ratio of correctly classified samples to the total number of samples, while the latter refers to the average classification accuracy for each land cover category. As can be seen from Table 1, the hyperspectral image band selection method based on contrastive learning proposed in this invention can improve the classification performance of band selection.
[0107] This invention has been described with reference to specific embodiments to simplify the invention. However, it should be understood that the invention is not limited to the described embodiments, and various modifications are possible without departing from the basic principles. These equivalent forms also fall within the scope defined by the appended claims.
Claims
1. A method for selecting bands in hyperspectral images based on contrastive learning, characterized in that, Includes the following steps: Step 1) Divide the hyperspectral image into blocks, and perform two random data augmentation operations on each hyperspectral image block to obtain two random augmented views; Step 2) Construct a contrastive learning network based on band attention, which includes: 2.1) Construct an attention encoder and input two enhanced views of a hyperspectral image patch into two identical attention encoders for processing. The two attention encoders share weights, and the calculation formula is expressed as follows: Z j =f(X Pj ;θ) Among them, Z j These represent two feature vectors obtained from the two augmented views after passing through the attention encoder, j = 1, 2, X Pj θ represents the augmented view, f(·) represents the attention encoder function, and θ represents the trainable parameters in the attention encoder. The attention encoder mainly includes a band attention module; the band attention module takes the enhanced view as input to obtain the band weight vector, and the calculation formula is expressed as: oh j =F(X Pj ;θ A ) Where, ω j =[ω j,1 ,ω j,2 ,...,ω j,L ] T This represents the band attention weight vector obtained from the j-th augmented view, where j = 1, 2, L represents the number of bands, F(·) represents the band attention module function, and θ A These represent the trainable parameters in the band attention module; 2.2) Construct a predictor by inputting the feature vector obtained from one view through the attention encoder into the predictor and matching the predicted value with the feature vector obtained from another view through the attention encoder; The predictor is constructed using a multilayer perceptron; the matching refers to calculating the symmetric loss between the predicted value obtained from one augmented view and the feature vector obtained from another augmented view. Step 3) Define a loss function applicable to the band selection network based on contrastive learning. The loss function of the band selection network based on contrastive learning includes a symmetric loss term and a weight vector sparsity constraint term. The optimization objectives are to minimize the symmetric loss and the band weight vector sparsity. By minimizing the loss function, the contrastive learning network based on band attention is trained. Step 4) Measure the importance of each band using the average band weights learned after network training. The calculation formula is as follows: in, This represents the average weight of the t-th band; The attention weights for the t-th band are obtained for the two enhanced views of the i-th hyperspectral image patch, where n is the number of samples in the original hyperspectral image patch; Step 5) Sort all bands from highest to lowest importance, and select the required number of bands at the top as the most valuable subset of bands.
2. The hyperspectral image band selection method based on contrastive learning as described in claim 1, characterized in that, In step 1), the two random augmented views are represented as follows: X P1 =aug(X P ) X P2 =aug(X P ) Among them, X P1 and X P2 Represents an augmented view, aug(·) represents a random data augmentation operation, X P Represents a hyperspectral image block.
3. The hyperspectral image band selection method based on contrastive learning as described in claim 1 or 2, characterized in that, The random enhancement operations in step 1) include random cropping, Gaussian blur, random horizontal flipping of the image, or normalization.
4. The hyperspectral image band selection method based on contrastive learning as described in claim 1, characterized in that, The attention encoder described in step 2) also includes a 2D convolution module and a mapping module; The 2D convolution module utilizes the spatial information of the hyperspectral image, taking a reweighted enhanced view as input, and outputs a 3D cube. The reweighted enhanced view is obtained by reweighting each band of the enhanced view using the band weight vector obtained from the band attention module. The calculation formula is as follows: Among them, Y j Represents the reweighted augmented view, j = 1, 2, Represents the multiplication symbol by band; The mapping module consists of a global average pooling layer and a multilayer perceptron. The global average pooling layer takes the 3D cube output by the 2D convolution module as input and a one-dimensional vector as output, and is used to aggregate the spatial information of the 3D cube. The multilayer perceptron takes the one-dimensional aggregated representation output by the global average pooling layer as input and outputs a one-dimensional vector, which is used to project the aggregated representation onto the latent space.
5. The hyperspectral image band selection method based on contrastive learning as described in claim 1, characterized in that, The formula for calculating the loss function of the band selection network based on contrastive learning is as follows: Where n is the number of samples in the original hyperspectral image patch. The negative cosine similarity between h(Z1) and Z2 is represented by , h(·) represents the predictor function, stopgrad(·) represents the stopping gradient operation, η represents the balance coefficient, and the superscript i indicates the i-th hyperspectral image patch. The band attention weight vectors are obtained for the two enhanced views of the i-th hyperspectral image patch.
6. A hyperspectral image band selection device based on contrastive learning, characterized in that, For implementing the hyperspectral band selection method of claim 1, the hyperspectral image band selection device includes: The hyperspectral data augmentation module divides the hyperspectral image into blocks, with each hyperspectral image block serving as a sample; it then performs two random data augmentations on each hyperspectral image block to obtain two randomly augmented views. A band-attention-based contrastive learning network construction module is used to construct a band-attention-based contrastive learning network. The band-attention-based contrastive learning network includes an attention encoder and a predictor. The attention encoder is used to apply more attention to valuable bands while utilizing the spatial information of the hyperspectral image. The predictor is used to predict the feature vector obtained by the attention encoder module for one view and match the result with the feature vector obtained by the attention encoder module for another view. The loss function definition module for band selection networks based on contrastive learning is used to define the loss function applicable to band selection networks based on contrastive learning and to train the network. The band importance measurement module uses the average band weights learned after network training to measure the importance of each band. The module for selecting the most valuable band subset sorts all bands from highest to lowest importance and selects the required number of bands at the top of the list as the most valuable band subset. The band selection result output module is used to output the selected band subset results.
7. The hyperspectral image band selection device based on contrastive learning according to claim 6, characterized in that, The band selection device also includes an application module, which uses the selected band subset to perform hyperspectral image classification or target detection.
8. The hyperspectral image band selection device based on contrastive learning according to claim 6, characterized in that, The hyperspectral data amplification module includes: The image segmentation module is used to segment hyperspectral images into blocks, with each hyperspectral image block serving as a sample. The random data augmentation module is used to perform random data augmentation twice on the hyperspectral image patch to obtain two randomly augmented views.
9. The hyperspectral image band selection device based on contrastive learning according to claim 6, characterized in that, The attention encoder includes a band attention module, a 2D convolution module, and a mapping module; The band attention module takes the enhanced view as input to obtain the band weight vector; The 2D convolution module is used to utilize the spatial information of the hyperspectral image. It takes a reweighted enhanced view as input and outputs a 3D cube. The reweighted enhanced view is obtained by reweighting each band of the enhanced view using the band weight vector obtained by the band attention module. The mapping module consists of a global average pooling layer and a multilayer perceptron. The global average pooling layer takes a 3D cube output from a 2D convolutional module as input and a one-dimensional vector as output, and is used to aggregate the spatial information of the 3D cube. The multilayer perceptron takes a one-dimensional aggregated representation output from the global average pooling layer as input and a one-dimensional vector of the latent space as output, and is used to project the aggregated representation onto the latent space.
Citation Information
Patent Citations
Hyperspectral band selection method and device based on band attention reconstruction network
CN113378979A
Hyperspectral image target detection method based on self-supervised contrast learning
CN115115933A