Hyperspectral target detection method based on generative self-supervised learning and wavelet transform
Through the combination of generative self-supervised learning and wavelet transformation, a dual branch information embedding module and sample reconstruction module are built, which solves the problems of insufficient multi-scale feature extraction and insufficient utilization of prior target spectra in hyperspectral target detection, and achieves the accuracy of hyperspectral target detection.
Patent Information
- Application Number
- CN202510340370.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-21
- Publication Date
- 2025-07-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing deep learning methods have low detection accuracy in hyperspectral object detection, insufficient multi-scale feature extraction capability, and insufficient utilization of local discriminant features of prior target spectra.
Generative self-supervised learning combined with wavelet transformation is used to build a dual branch information embedding module and sample reconstruction module. Multi-scale features are extracted through wavelet transformation, and cross-entropy loss function with prior constraints is used for fine-tuning training to improve detection accuracy.
有效提取和融合多尺度特征,增强了目标检测的精度,抑制背景干扰,提高了高光谱目标检测的准确性。
Smart Images

Figure CN120279411A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of image processing, and relates to a hyperspectral target detection method based on generative self-supervised learning and wavelet transform, which can be used in fields such as resource exploration, precision agriculture, and military target reconnaissance. Background Technique
[0002] As a kind of remote sensing image, hyperspectral images have hundreds of spectral bands, and each band covers the spectral information of substances. Since the spectral information of each substance is different, the specific spectral information contained in the spectral vector corresponding to the image pixel can be used to judge the specific substance type represented by the pixel, so as to realize the detection, identification and positioning of the target substance. Due to the above characteristics, hyperspectral target detection has been widely used in fields such as resource exploration, precision agriculture, and military target reconnaissance.
[0003] In recent years, hyperspectral target detection methods based on deep learning have gradually become a research hotspot. They automatically mine the high-dimensional feature representation of hyperspectral data by constructing a multi-layer neural network, getting rid of the limitation of traditional methods relying on manually designed spectral features and improving the accuracy of hyperspectral target detection. However, existing deep learning methods usually require a large number of accurately labeled training samples to support model optimization. However, the proportion of target pixels in the hyperspectral target detection task is extremely low, and it is difficult to generate rich and accurate labeled samples. At the same time, existing methods usually only process hyperspectral data at a single scale and have poor multi-scale feature extraction ability. In addition, existing methods usually only use simple matching strategies for target detection and do not make full use of the local discriminative features of the prior target spectrum.
[0004] To improve the accuracy of hyperspectral image target detection, for example, China University of Geosciences (Wuhan) disclosed a generative self-supervised hyperspectral image target detection method based on spatial-spectral masks in its patent document "Generative Self-Supervised Hyperspectral Image Target Detection Method Based on Spatial-Spectral Masks" (Application No.: 202311694328.3, Publication No.: CN 117746235 A). This method first encodes and decodes hyperspectral remote sensing data through a generative model and a spatial-spectral mask strategy, learns general feature representations in the absence of labeled samples, and constructs a transfer learning model based on a lightweight transformer encoder, a fully connected layer, and a sigmoid layer. Combining a small number of training samples and weighted binary cross-entropy loss, it fine-tunes a detector composed of a single fully connected layer and a sigmoid layer to achieve rapid training of the transfer learning model and effectively transfer the pre-trained model to different target detection tasks. This method can make full use of the characteristics of hyperspectral remote sensing images themselves, learn general feature representations from unlabeled data according to the self-supervised learning theory using generative tasks, and transfer the pre-trained model to various detection tasks, improving detection accuracy and time efficiency. However, it directly uses unspatial-masked pixel blocks to input into the encoder to learn feature representations, enabling the encoder to only learn feature representations from single-scale spatial-spectral information, resulting in insufficient ability to extract and fuse multi-scale features of hyperspectral data; and fine-tuning the detector through weighted binary cross-entropy loss underutilizes the local discriminative features of the prior target spectrum, resulting in relatively low target detection accuracy. Summary of the Invention
[0005] The object of the present invention is to overcome the defects existing in the above-mentioned prior art and propose a hyperspectral target detection method based on generative self-supervised learning and wavelet transform to solve the technical problem of relatively low detection accuracy in the prior art.
[0006] To achieve the above object, the technical solution adopted by the present invention includes the following steps:
[0007] (1) Obtain a pre-training / testing sample set and a fine-tuning sample set:
[0008] Preprocess a hyperspectral image X composed of I = M×N spectral vectors including different backgrounds or target classes, and form a pre-training set and a testing sample set from the I preprocessed hyperspectral image blocks, and at the same time form a fine-tuning sample set from the J preprocessed hyperspectral image blocks and their pseudo-labels;
[0009] (2) Construct a spatial-spectral reconstruction model based on wavelet transform and perform generative self-supervised pre-training on it:
[0010] Construct an empty-spectrum reconstruction model W including a cascaded dual-branch information embedding module and a sample reconstruction module. The dual-branch information embedding module includes a cascaded dimension conversion module, a spatial transformation branch composed of a cascaded wavelet transform module and a spatial convolution module, and a spectral convolution module arranged in parallel with it as a spectral transformation branch, as well as a fusion module connected to these two branches. And perform generative self-supervised pre-training on W through a pre-training sample set to obtain a pre-trained empty-spectrum reconstruction model W * ;
[0011] (3) Construct a hyperspectral target detection network model with prior constraints and perform fine-tuning training on it:
[0012] Construct a hyperspectral target detection network model Q including a cascaded dual-branch information embedding module, the pre-trained encoder in * , a fully connected layer, and a Softmax activation function, and the loss function is a cross-entropy loss function with prior constraints. And perform fine-tuning training on Q through a fine-tuning sample set to obtain a fine-tuned hyperspectral target detection network model Q * ;
[0013] (4) Obtain hyperspectral target prediction results and detection results:
[0014] Use the test sample set as the input of the fine-tuned hyperspectral target detection network model Q * to perform forward propagation, and perform non-linear transformation on the prediction results R of the I hyperspectral image patches obtained by prediction to obtain the detection result Detc of the hyperspectral image X.
[0015] Compared with the prior art, the present invention has the following advantages:
[0016] (1) In the process of generative self-supervised pre-training, the present invention can effectively extract and fuse multi-scale spatial and spectral features through a dual-branch information embedding module combining wavelet transform, enabling the encoder to learn feature representations from multi-scale empty-spectrum information; at the same time, using the pre-trained encoder as a component in the hyperspectral target detection network model, during the fine-tuning training of the hyperspectral target detection network model, by fine-tuning the parameters of the encoder obtained through pre-training, its ability to extract multi-scale features can be retained, avoiding the defect of insufficient ability to extract and fuse multi-scale features of hyperspectral data in the prior art, and effectively improving the accuracy of hyperspectral target detection.
[0017] (2) During the fine-tuning training process of the hyperspectral target detection network model of the present invention, the cross-entropy loss function based on prior constraints calculates the constraint coefficient of each fine-tuning sample by computing the difference between each fine-tuning sample and the prior target spectrum, and can impose a constraint coefficient on each fine-tuning sample when calculating the cross-entropy loss, so as to control the model to optimize in the direction of enhancing the target and suppressing the background, avoiding the defect of insufficient utilization of local discriminative features of the prior target spectrum in the prior art, and further improving the accuracy of hyperspectral target detection. Description of the Drawings
[0018] Figure 1 is the implementation flowchart of the present invention;
[0019] Figure 2 is the comparison chart of the detection results between the present invention and the prior art;
[0020] Figure 3 is the comparison chart of the ROC curves between the present invention and the prior art. Detailed Embodiments
[0021] The present invention will be further described in detail below with reference to the drawings and specific embodiments.
[0022] Refer to Figure 1 , the present invention includes the following steps:
[0023] Step 1) Obtain the pre-training / test sample set and the fine-tuning sample set:
[0024] (1a) Obtain a hyperspectral image X including I = M × N spectral vectors, where each spectral vector contains K bands, and a prior target spectral vector d similar to the spectral curve of the target to be detected included in X, where M ≥ 50, N ≥ 50, and K ≥ 100;
[0025] In this embodiment, the hyperspectral image X is a real hyperspectral image collected by an airborne visible / infrared imaging spectrometer AVIRIS hyperspectral sensor, which includes 100 × 100 spectral vectors and each spectral vector contains 204 bands.
[0026] (1b) Extract L bands of each spectral vector in the hyperspectral image X by using the principal component analysis method, and normalize the hyperspectral image after band extraction to obtain the normalized hyperspectral image X * , and then perform mirror data filling on the boundary with a width of * of X to implement the preprocessing of X. The dimension of the preprocessed image is M * × N * × L, where when P is an even number, M * = M + P, N * = N + P; when P is an odd number, The value is rounded down, M * = M + P - 1, N * = N + P - 1; In this embodiment, L = 20 and P = 9.
[0027] (1c) Using the normalized hyperspectral image X * As the center of each spectral vector, select all spectral vectors within a square region of size P to form image patches, and then obtain I image patches of dimension P×P×L containing mirror data padding to form a pre-training sample set and a test sample set, where X * The first Rows and columns, and the last Rows and columns of each spectral vector when forming image patches contain vectors with mirror data padding in the preprocessed image. When P is odd, The value is rounded down; In this embodiment, P = 9, L = 20, and I = 10000.
[0028] (1d1) Perform an initial detection on the hyperspectral image X through the prior target spectral vector d. The implementation steps are as follows:
[0029] Calculate the coefficient vector w, and based on w and the spectral vector x a Calculate the target confidence c of the a-th spectral vector in X a , and then arrange the M×N elements reflecting the target confidence into a matrix of size M×N to obtain an image C of dimension M×N after the initial detection, where:
[0030]
[0031] c a = w T x a
[0032] Where A represents the autocorrelation matrix of the hyperspectral image X, A -1 Represents the inverse result of A, d T Represents the transpose result of d, x a Represents the a-th spectral vector of dimension L×1 in X, Represents x a Of the transpose result, 1 ≤ a ≤ M×N, w T Represents the transposed coefficient vector, c a The larger the value of, the higher the probability that the a-th pixel is the target;
[0033] (1d2) Obtain J pseudo-labels through the image C after the initial detection. The implementation steps are as follows:
[0034] For each element c in C aNormalize to obtain the normalized element c'. a , and arrange the M×N elements of the reaction target confidence levels obtained by normalization in ascending order. Then, change the values of the first M×N×B% elements to 0 and the values of the last M×N×U% elements to 1 to obtain J = M×N×(B% + U%) pseudo-labels with a spectral vector background of 0 and a target of 1. In this embodiment, M = 100, N = 100, B = 50, U = 1.5, J = 5150, where:
[0035]
[0036] where max{·} represents the operation of finding the maximum value, and min{·} represents the operation of finding the minimum value.
[0037] (1d3) Using the spectral vectors in the normalized hyperspectral image X corresponding to each pseudo-label * as the center, select all spectral vectors within a square region of size P to form image patches. Then, combine the obtained J image patches with dimensions of P×P×L and the corresponding pseudo-labels to form a fine-tuning sample set. When the spectral vector corresponding to the pseudo-label is at the boundary of the width of X * of , the vectors filled with mirror data in the preprocessed image need to be included when forming the image patches. Among them, when P is odd, is rounded down; in this embodiment, P = 9, L = 20, J = 5150.
[0038] Step 2) Construct a spatial-spectral reconstruction model based on wavelet transform and perform generative self-supervised pre-training on it:
[0039] Construct a spatial-spectral reconstruction model W including a cascaded dual-branch information embedding module and a sample reconstruction module:
[0040] The dual-branch information embedding module includes a cascaded dimension conversion module, a spatial transformation branch composed of a cascaded wavelet transform module and a spatial convolution module, a spectral convolution module arranged in parallel with it to form a spectral transformation branch, and a fusion module connected to these two branches.
[0041] The sample reconstruction module includes a cascaded position encoding module, a random masking module, an encoder, a decoder, a fully connected layer, and a dimension reshaping module, and the random masking module is connected to the decoder with a residual connection.
[0042] Perform generative self-supervised pre-training on the spatial-spectral reconstruction model:
[0043] (2a) Initialize the number of iterations as t, the maximum number of iterations as T, T≥200, and the weight parameter of the spatial-spectral reconstruction model W at the t-th iteration as ω t , and set t = 1;
[0044] (2b1) The dual-branch information embedding module embeds spatial and spectral information for each training sample x i as follows:
[0045] The dimension transformation module flattens x i to obtain a flattened image with dimensions P×(P×L)
[0046] In the spatial transformation branch, the wavelet transform module first performs time-frequency domain decomposition on through 2D-Harr wavelet transform to obtain a low-pass filter f LL The decomposed low-frequency feature map containing the overall structural information of the image and high-pass filters f LH 、f HL and f HH The decomposed high-frequency feature maps containing detailed information such as edges and textures and
[0047]
[0048] where WT(·) represents the 2D-Harr wavelet transform.
[0049] Perform depth convolution on the decomposed low-frequency feature map and high-frequency feature map Perform inverse wavelet transform on the feature map obtained after depth convolution to obtain the reconstructed feature map
[0050]
[0051] where Conv(·) represents the depth convolution operation, and W represents a depth convolution kernel with a stride of 1 and a size of 3×3.
[0052] At the same time, perform the same depth convolution operation on the flattened image Sum the obtained convolution map with to obtain an image with enhanced time-frequency domain features
[0053]
[0054] The spatial convolution module extracts spatial features from to obtain spatial features containing L spatial feature vectors with dimensions of 1×D
[0055]
[0056] Among them, SpaConv(·) represents the spatial convolution operation, and W1 represents a convolution kernel with a quantity of D, a size and a stride both of (P×P). In this embodiment, D = 64 and P = 9.
[0057] The spectral convolution module performs spectral feature extraction on the flattened image to obtain a spectral feature containing L spectral feature vectors with a dimension of 1×D
[0058]
[0059] Among them, SpeConv(·) represents the spatial convolution operation, and W2 represents a convolution kernel with a quantity of D, a size of (1, P×P) and a stride of (1, P×P). represents the transposed flattened image. In this embodiment, D = 64 and P = 9.
[0060] The fusion module and first perform element-wise addition, normalize the result of the addition, and pass the normalized result through the GELU activation function to obtain a fused empty-spectrum feature containing L empty-spectrum vectors with a dimension of 1×D
[0061]
[0062] Among them, GELU(·) represents the GELU activation function, and LN(·) represents the normalization function. In this embodiment, D = 64.
[0063] The dual-branch information embedding module combined with wavelet transform can extract the key features of hyperspectral data in the time-frequency domain and jointly represent multi-scale features by combining low-frequency and high-frequency features.
[0064] (2b2) The sample reconstruction module reconstructs the embedded empty-spectrum feature as follows:
[0065] The position encoding module adds a learnable position information mapping E to each empty-spectrum vector in the embedded empty-spectrum feature pos to retain the original position information of each empty-spectrum vector, obtaining the empty-spectrum feature with added position information
[0066]
[0067] Among them, represents a real number.
[0068] The random masking module Perform random masking on the empty spectral vectors in [[]] with a masking rate of G%, and the unmasked empty spectral features are composed of L×G% masked empty spectral vectors The unmasked empty spectral features are composed of L×(1 - G%) unmasked empty spectral vectors Among them, the values in the masked empty spectral vectors are all replaced by zeros. In this embodiment, G = 75.
[0069] The encoder processes the unmasked empty spectral features after random masking to perform global feature extraction:
[0070]
[0071] Among them, Encoder(·) represents the encoder, including 5 Transformer blocks and 4 attention layers.
[0072] The Transformer block mainly performs alternating calculations of normalization, multi-head self-attention layer, and multi-layer perceptron:
[0073] x n = MLP(LN(x' n ) + x' n )
[0074] x' n = MSA(LN(x n-1 ) + x n-1 )
[0075] Among them, x' n represents the calculation result of multi-head self-attention, MSA(·) represents the mapping function of multi-head self-attention, LN(·) represents the normalization function, MLP(·) represents the calculation function of multi-layer perceptron, x n and x n-1 respectively represent the output of the current layer and the output of the previous layer, and x' n represents the calculation result of multi-head self-attention.
[0076] The calculation of multi-head self-attention includes linearly transforming the unmasked empty spectral features and using three different weight matrices to calculate a single self-attention from the query Q, key K, and value V matrices obtained by the linear transformation, and then combining different linear transformations to perform multi-head self-attention calculation:
[0077] MSA = Concat(h1, h2, …, h m )W O
[0078]
[0079]
[0080] Among them, Concat(·) represents the concatenation operation, and W O represents the weight matrix of the linear transformation, which combines the representations of different self-attention heads, and h m represents the calculation result of the m-th self-attention, and d k represents the scaling factor, k represents the dimensions of Q and K, and softmax(·) represents the softmax activation function.
[0081] The decoder performs empty-spectrum feature reconstruction on the empty-spectrum features after global feature extraction and the masked empty-spectrum features after random masking to obtain the reconstructed empty-spectrum features:
[0082]
[0083] Among them, Decoder(·) represents a decoder including 4 Transformer blocks and 3 attention layers, and →(·) represents embedding the empty-spectrum vectors in into according to the position information.
[0084] The fully connected layer performs a linear transformation on the reconstructed empty-spectrum features ; the dimension reshaping module adjusts the dimensions of the empty-spectrum features after the linear transformation to obtain training samples with a reconstructed dimension of P×P×L
[0085]
[0086] Among them, FC(·) represents a fully connected layer with D input nodes and P×P output nodes, and Reshape(·) represents the dimension adjustment operation. In this embodiment, D = 64 and P = 9.
[0087] (2c) The mean squared error loss function is adopted, and the loss value of the empty-spectrum reconstruction model W is calculated through the training samples x i before and after reconstruction and Then, the weights ω are updated through t to obtain the empty-spectrum reconstruction model W after this iteration t , where:
[0088]
[0089] Among them, Σ represents the summation operation, η represents the gradient descent parameter, and ω t+1 represents ωt Update result, indicating the partial derivative operation;
[0090] (2d) Judge whether t = T holds. If so, obtain the trained hyperspectral reconstruction model W * , otherwise, let t = t + 1, W t = W, and execute step (2b).
[0091] Step 3) Construct a prior-constrained hyperspectral target detection network model and perform fine-tuning training on it:
[0092] Construct a prior-constrained hyperspectral target detection network model Q, including a cascaded double-branch information embedding module, the * pre-trained encoder in W, a fully connected layer, and a Softmax activation function, and the loss function is a prior-constrained cross-entropy loss function.
[0093] Perform fine-tuning training on Q through a fine-tuning sample set. The implementation steps are as follows:
[0094] (3a) Initialize the number of iterations as s, the maximum number of iterations as S, S ≥ 50, and the weight parameter of the hyperspectral target detection network model Q in the s-th iteration is ψ s , and let s = 1. The parameters of the encoder in Q come from the pre-trained parameters;
[0095] (3b1) The double-branch information embedding module performs spatial and spectral information embedding on each fine-tuning sample x j , and the implementation steps are the same as (2b1);
[0096] (3b2) The encoder performs global feature extraction on the embedded hyperspectral features to obtain the hyperspectral features after global feature extraction , and the implementation steps are the same as (2b2);
[0097] (3b3) The fully connected layer performs discriminative feature extraction on the feature matrix of dimension L × D , calculates the mean of the extracted discriminative features in the first dimension, and performs probability prediction on the discriminative features of dimension 1 × D after mean calculation through the activation function. This process can be described as:
[0098]
[0099] where FC(·) represents a fully connected layer with D input nodes and 1 output node, mean(·) represents the operation of calculating the mean of the input in the first dimension, and Softmax(·) represents the Softmax activation function. In this embodiment, L = 20 and D = 64.
[0100] (3c) Adopt a cross - entropy loss function with prior constraints, and calculate the loss value of Q through the pseudo - label y of each fine - tuning sample x j and the corresponding prediction result j Calculate Q s 's loss value Then, through update the weights ψ in the hyperspectral target detection network model Q s to obtain the hyperspectral target detection network model Q after this iteration s , where: s
[0101]
[0102] α = exp[-λ·(x j - d) 2
[0103]
[0104] Among them, α represents the constraint coefficient, λ represents the adjustable parameter, μ represents the preset gradient - descent parameter, ψ s+1 represents the updated result of ψ s , represents the partial - derivative operation. In this embodiment, λ = 0.01.
[0105] (3d) Judge whether s = S holds. If so, obtain the trained hyperspectral target detection network model Q * , otherwise, let s = s + 1, Q s = Q, and execute step (3b).
[0106] Step 4) Obtain the hyperspectral target prediction result and detection result:
[0107] Use the test sample set as the input of the fine - tuned hyperspectral target detection network model Q * to perform forward propagation, and perform a non - linear transformation on the prediction result R of the I hyperspectral image patches obtained by prediction to obtain the detection result Detc of the hyperspectral image X. The formula for performing the non - linear transformation on R is:
[0108] Detc = κ⊙R
[0109] κ = 1 - e -0.05·θ·C
[0110] Among them, κ represents the non - linear transformation function under exponential constraints, ⊙ represents the dot - product operation, θ represents the adjustable parameter and θ ∈ (0,1). In this embodiment, θ = 0.001.
[0111] The technical effects of the present invention will be further described below in combination with simulation experiments:
[0112] 1. Simulation conditions and content:
[0113] The hardware platform for the simulation experiment is: a central processing unit of Intel(R) Core(TM) i5-12400F CPU with a main frequency of 2.5 GHz, 32 GB of memory, and a graphics processing unit of NVIDIA GeForce RTX 3090 24 GB. The software platform is: an operating system of Ubuntu 22.10, Visual Studio Code 2024 1.95, and Matlab R2023a.
[0114] Simulation 1: Conduct a comparative simulation on the detection result graphs of the present invention and the existing generative self-supervised hyperspectral image target detection method based on spatial-spectral masks. The results are as Figure 2 (a) and Figure 2 (b) shown.
[0115] Simulation 2: Conduct a comparative simulation on the ROC curves and the area under the curve (AUC) values of the present invention and the existing generative self-supervised hyperspectral image target detection method based on spatial-spectral masks. The results are as Figure 3 (a), Figure 3 (b) and Table 1 shown.
[0116] The present invention uses the receiver operating characteristic curve (ROC) and the area under the curve (AUC) to quantitatively analyze the detection results, and takes the AUC value as the evaluation index for the detection accuracy of the hyperspectral target detection algorithm. The ROC curve is plotted according to the detection rate P d and the false alarm rate P f The AUC value is obtained by integrating the ROC curve, where:
[0117]
[0118] where N1 represents the true target pixels detected under a given confidence threshold, N2 represents the true target pixels in the image, N3 represents the background pixels misclassified as targets in the detection results, and N4 represents all the pixels in the image;
[0119] 2. Analysis of simulation results:
[0120] Referring to Figure 2 , where Figure 2 (a) and Figure 2 (b) respectively represent the detection result graphs obtained by the present invention and the prior art. Among them, the white bright spots represent the detected target pixels. It can be seen from the figure that the present invention can detect more target pixels, and the contour details of the targets are clearer. At the same time, the suppression of background interference is more sufficient;
[0121] Refer to Figure 3 , where Figure 3 (a) and Figure 3 (b) respectively represent the ROC curves obtained by the present invention and the prior art. Among them, the vertical axis represents the detection rate P under different confidence thresholds d , with a range of [0, 1], and the horizontal axis represents the false alarm rate P d corresponding to the detection rate P f , with a range of [0, 1]. It can be seen from the figure that the ROC curve of the present invention is closer to the upper left corner of the coordinate axis, proving better target detection performance.
[0122] Refer to Table 1. AUC1 and AUC2 respectively represent the AUC values of the prior art and the present invention under their respective ROC curves.
[0123] Table 1
[0124] Method type Prior art <![CDATA[AUC1 = 0.93894]]> The present invention <![CDATA[AUC2 = 0.99874]]>
[0125] It can be seen from Table 1 that the AUC2 value of the present invention has been significantly improved compared with the AUC1 value of the prior art.
[0126] During the process of fine-tuning and training the hyperspectral target detection network model of the present invention, by combining the double-branch information embedding module of wavelet transform and the pre-trained encoder, it can effectively extract and fuse multi-scale spatial and spectral features, and fully utilize the prior target spectrum to constrain the hyperspectral target detection network model, and can obtain a detection result that suppresses background interference information while enhancing target information. The simulation results show that the present invention has stronger target detection ability compared with the prior art.
Claims
1. A hyperspectral target detection method based on generative self-supervised learning and wavelet transform, characterized in that, It includes the following steps: (1) Obtain the pre-training / test sample set and the fine-tuning sample set: Preprocess the hyperspectral image X consisting of I = M × N spectral vectors including different backgrounds or target classes, and form the pre-training set and the test sample set from the I preprocessed hyperspectral image patches. At the same time, form the fine-tuning sample set from the J preprocessed hyperspectral image patches and their pseudo-labels; (2) Construct a spatial-spectral reconstruction model based on wavelet transform and perform generative self-supervised pre-training on it: Construct an empty-spectrum reconstruction model W that includes a cascaded dual-branch information embedding module and a sample reconstruction module. The dual-branch information embedding module includes a cascaded dimension conversion module, a spatial transformation branch composed of a cascaded wavelet transform module and a spatial convolution module, and a spectral transformation branch composed of a spectral convolution module arranged in parallel with it, as well as a fusion module connected to these two branches. And perform generative self-supervised pre-training on W using a pre-training sample set to obtain a pre-trained empty-spectrum reconstruction model W * ; (3) Construct a hyperspectral target detection network model with prior constraints and perform fine-tuning training on it: Construct a hyperspectral target detection network model Q that includes a cascaded dual-branch information embedding module, a pre-trained encoder in W * , a fully connected layer, and a Softmax activation function, and the loss function is a cross-entropy loss function with prior constraints. Then, fine-tune the model Q using a fine-tuning sample set to obtain a fine-tuned hyperspectral target detection network model Q * ; (4) Obtain the hyperspectral target prediction results and detection results: Use the test sample set as the input of the fine-tuned hyperspectral target detection network model Q * to perform forward propagation, and perform a non-linear transformation on the prediction results R of the I hyperspectral image patches obtained by prediction to obtain the detection result Detc of the hyperspectral image X.
2. The method according to claim 1, wherein The implementation steps for obtaining the pre-training / test sample set and the fine-tuning sample set described in step (1) are: (1a) Obtain the hyperspectral image X including I = M × N spectral vectors, where each spectral vector contains K bands, and the prior target spectral vector d similar to the spectral curve of the target to be detected included in X, where M ≥ 50, N ≥ 50, and K ≥ 100; (1b) Extract L bands of each spectral vector in the hyperspectral image X using the principal component analysis method, and normalize the hyperspectral image after band extraction to obtain the normalized hyperspectral image X * , and then for X * with a width of mirror data padding is performed on the boundary to achieve preprocessing of X; (1c)Centered on each spectral vector in the normalized hyperspectral image X * select all spectral vectors within a square region of size P to form image patches, and then obtain I image patches of dimension P×P×L containing mirror data padding, which together form the pre-training sample set and the test sample set. Among them, X * for the first rows and columns, and the last rows and columns, each spectral vector contains a vector with mirror data padding in the preprocessed image when forming the image patches; (1d)Perform preliminary detection on the hyperspectral image X using the prior target spectral vector d, obtain J pseudo-labels through the image C after preliminary detection, and use the spectral vectors in the normalized hyperspectral image X corresponding to each pseudo-label as the center to select all spectral vectors within a square region of size P to form image patches. Then, combine the obtained J image patches with dimensions of P×P×L and the corresponding pseudo-labels to form a fine-tuning sample set, where all spectral vectors within the selected square region of size P may include vectors filled with mirror data in the preprocessed image. * Among them, all spectral vectors within the selected square region of size P may include vectors filled with mirror data in the preprocessed image.
3. The method according to claim 2, wherein The implementation method for obtaining J pseudo-labels from the image C after preliminary detection described in step (1d) is: Use the constrained energy minimization (CEM) detection algorithm to perform preliminary target detection on X to obtain the preliminarily detected image C with dimensions M × N. Each element in C is the target confidence of the spectral vector corresponding to X. After normalizing C, arrange the M × N target confidences obtained by normalization in ascending order. Then change the values of the first M × N × B% elements to 0, and change the values of the last M × N × U% elements to 1 to obtain J = M × N × (B% + U%) pseudo-labels with a spectral vector background of 0 and a target of 1.
4. The method according to claim 1, characterized in that, The spatial-spectral feature reconstruction module described in step (2) includes a cascaded position encoding module, a random masking module, an encoder, a decoder, a fully connected layer, and a dimension reshaping module, and the random masking module is residually connected to the decoder.
5. The method according to claim 4, wherein The implementation steps for performing generative self-supervised pre-training on it described in step (2) are: (2a) Initialize the number of iterations as t, the maximum number of iterations as T, where T ≥ 200, and the weight parameter of the empty spectrum reconstruction model W for the t-th iteration is ω t , and set t = 1; (2b) The dual-branch information embedding module embeds spatial and spectral information for each training sample x i and performs spatial and spectral information embedding; The sample reconstruction module reconstructs the empty spectral features obtained by embedding to obtain the reconstructed training samples (2c) The mean square error loss function is adopted, and the loss value of the spatial spectrum reconstruction model W is calculated through the training samples x before and after reconstruction i and Calculate the loss value of the spatial spectrum reconstruction model W Then, through Update the weight ω t to obtain the spatial spectrum reconstruction model W after this iteration t , where: where ∑ represents the summation operation, η represents the gradient descent parameter, and ω t+1 represents the updated result of ω t , and represents the partial derivative operation; (2d) Determine whether t = T holds. If so, obtain the trained empty-spectrum reconstruction model W * , otherwise, set t = t + 1, W t = W, and execute step (2b).
6. The method according to claim 5, wherein The dual-branch information embedding module described in step (2b) embeds spatial and spectral information for each training sample x i The implementation steps are as follows: The dimensionality conversion module flattens x i ; the wavelet transform module enhances the time-frequency domain features of the flattened image ; the spatial convolution module extracts spatial features from the image with enhanced time-frequency domain features to obtain spatial features The spectral convolution module performs spectral feature extraction on to obtain spectral features The fusion module fuses and to obtain the fused spatial-spectral features 7. The method according to claim 5, wherein The sample reconstruction module described in step (2b) reconstructs the empty spectral features obtained by embedding The implementation steps are as follows: (2b1) The position encoding module adds position information to the embedded empty spectral features The random masking module performs random masking on the empty spectral features after adding position information and performs random masking. (2b2) The encoder performs global feature extraction on the unmasked empty spectral features after random masking ; The empty spectral features after the decoder extracts the global features and the masked empty spectral features after random masking are used for empty spectral feature reconstruction to obtain the reconstructed empty spectral features (2b3) The fully connected layer performs a linear transformation on the reconstructed empty spectral features ; the dimension reshaping module adjusts the dimensions of the linearly transformed empty spectral features to obtain the reconstructed training samples 8. The method according to claim 1, characterized in that The implementation steps for performing fine-tuning training on it described in step (3) are: (3a) Initialize the number of iterations as s, the maximum number of iterations as S, where S ≥ 50, and the weight parameters of the hyperspectral target detection network model Q at the s-th iteration are ψ s , and set s = 1; (3b) The dual-branch information embedding module embeds spatial and spectral information into each fine-tuned sample x j ; the encoder extracts global features from the embedded spatial-spectral features ; the fully connected layer extracts discriminative features from the spatial-spectral features after global feature extraction, and performs probability prediction on the extracted discriminative features through the Softmax activation function to obtain the prediction result Y j ; (3c) Adopt the cross entropy loss function with prior constraints and pass each fine-tuning sample x j The pseudo label y j And the corresponding prediction results Calculate Q s The loss value Then pass Hyperspectral target detection network model Q s The weight ψ s Update to obtain the hyperspectral target detection network model Q after this iteration s ,in: α = exp[-λ·(x j - d) 2 where α represents a constraint coefficient, λ represents an adjustable parameter, μ represents a preset gradient descent parameter, and ψ s+1 represents the update result of ψ s , and represents the partial derivative operation; (3d) Determine whether s = S holds. If so, obtain the trained hyperspectral target detection network model Q * , otherwise, let s = s + 1, Q s = Q, and execute step (3b).
9. The method according to claim 1, wherein The non-linear transformation of the prediction result R of the I hyperspectral image patches predicted in step (4) is performed according to the transformation formula: Detc = κR κ = 1 - e -0.05·θ·C where κ represents the non-linear transformation function under exponential constraints, represents the dot product operation, and θ represents the adjustable parameter.
Citation Information
Patent Citations
Hyperspectral anomaly detection method based on spectrum-preserving sparse auto-encoder
CN111461087A
Hyperspectral image change detection method based on local information enhancement
CN115564721A
Multi-incentive fusion zero sample lesion detection method based on visual language model
CN117633558A
Generative self-supervision hyperspectral image target detection method based on spatial spectrum mask
CN117746235A
Hyperspectral target detection method based on attention mechanism
CN118038271A
Cited By
Open vocabulary multi-target tracking method based on confidence adjustment and wavelet convolution
CN120807587A
Red tide dominant species broadband three-dimensional sample generation and identification integrated method and system
CN121438086A