A hyperspectral image target intelligent detection method
Patent Information
- Application Number
- CN202210874030.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-07-22
- Publication Date
- 2026-09-04
- Estimated Expiration
- 2042-07-22
AI Technical Summary
一些基于深度学习的高光谱目标检测算法在复杂的真实场景下达到较好的检测性能,但仍有一些问题值得关注
[0040] (1) This invention proposes a spectral aggregation and separation network for hyperspectral target detection. This network performs target detection by simultaneously judging the similarity or difference between the positive and negative samples of the upper and lower branches and the prior target spectrum of the middle branch. It can highlight the target while suppressing the background, effectively separating the target from the background and achieving superior detection performance.
Smart Images

Figure CN117496342B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of hyperspectral remote sensing image processing technology, and specifically relates to an intelligent target detection method for hyperspectral images. Background Technology
[0002] Hyperspectral images are three-dimensional images with rich spectral bands acquired by spectral imagers. They possess extremely high spectral resolution and can effectively describe ground features. Hyperspectral target detection is a pixel-by-pixel detection method that combines limited prior target spectra with the differences in spectral information between the background and the target. It has been extensively studied in recent decades and plays a crucial role in fields such as biomedicine, ground feature observation, military reconnaissance, and mineral exploration. The main challenge of hyperspectral target detection algorithms is how to quickly and accurately locate the target of interest while ensuring sufficient separation between the background and the target.
[0003] Over the past few decades, numerous scholars have proposed various detection algorithms for hyperspectral target detection. Traditional hyperspectral target detection algorithms mainly include those based on probabilistic statistical models, original spatial models, and subspace projection models. Most traditional detectors are based on linear mixture models where a pixel is composed of multiple ground features, and are designed based on the assumption of a multivariate normal distribution of the target and background. This approach only achieves good detection results under ideal conditions. However, real hyperspectral images typically exhibit spectral variability and nonlinear correlations between spectra, causing traditional hyperspectral target detectors to fall short of their intended detection levels and creating difficulties for practical applications. To better adapt to target detection in real-world scenarios, scholars have proposed many machine learning-based hyperspectral target detection algorithms, which can be mainly categorized into those based on sparse representation and cooperative representation, low-rank decomposition, tensor decomposition, and kernel functions. Machine learning-based hyperspectral target detectors are designed based on the characteristics of hyperspectral images and can achieve high detection accuracy in practical applications. However, they often require manual feature selection and extraction, resulting in a lack of feature expressiveness.
[0004] In recent years, end-to-end deep learning, which requires no expert experience, has provided new insights for hyperspectral object detection due to its powerful ability to automatically mine inherent patterns in data and extract deep features. Some deep learning-based hyperspectral object detection algorithms have achieved good detection performance in complex real-world scenes, but several issues remain. First, constructing reasonable and class-balanced training samples using the hyperspectral image itself and a limited set of prior targets is the biggest challenge facing deep learning-based hyperspectral object detection. Second, hyperspectral object detection should not only locate the target but also suppress background pixels while highlighting the target, improving the separation between the target and background to optimize the visual effect, which also presents difficulties for hyperspectral object detection algorithms. Summary of the Invention
[0005] The purpose of this invention is to overcome the shortcomings of existing deep learning-based hyperspectral target detection technologies and provide a hyperspectral image target intelligent detection method with high detection accuracy and high target-background separation.
[0006] To achieve the above objectives, this invention provides a method for intelligent target detection in hyperspectral images, implemented through the following technical solution:
[0007] S1: Select hyperspectral image Typical background training sample D b , where d and N are the number of spectral bands per pixel in the hyperspectral image and the total number of pixels contained in the hyperspectral image, respectively;
[0008] S2: Using a priori goals Generate target training sample D t ;
[0009] S3: Transfer the background training samples D b A priori target pixel x t and target training sample D t The data are respectively input into the spectral aggregation and separation networks for training;
[0010] The spectral aggregation and separation network is divided into three branches: upper, middle, and lower. During the training phase, the upper branch receives the background training sample D. b The intermediate branch input is the prior target x. t The lower branch input target training sample D t The three branches have the same network structure and parameter settings, and share network parameters during training. The structure of each branch includes: 9 convolutional-ReLU activation layers, 4 SE channel attention mechanisms, 8 residual connections, and 4 feature sums. Each of the three branches obtains its own feature vector after a fully connected operation. Then, the feature vector of the upper branch is subtracted from the feature vector of the middle branch for the first time to obtain a feature map representing spectral differences. The feature vector of the lower branch is subtracted from the feature vector of the middle branch for the second time to obtain a feature map representing spectral similarities. The above two difference feature maps are then processed by a fully connected operation and a Sigmoid activation function, and finally, the network's final output prediction value is obtained by feature summation.
[0011] S4: Input the pixels to be tested and the prior target in the hyperspectral image into the upper and lower branches and the middle branch of the trained spectral aggregation and separation network, respectively, to obtain the corresponding predicted values;
[0012] S5: Use the obtained predicted value as the target detection result of the pixel to be tested, and obtain the target detection result of the entire hyperspectral image.
[0013] As a preferred technical solution of the present invention: in step S1, the density-based noisy spatial clustering method DBSCAN and the spectral angle mapping method SAM are used to select typical background training samples D in the hyperspectral image. b Specifically, it includes the following steps:
[0014] Initialize a known pixel sequence containing a prior target Q = {x} t} and initialize the known pixel x q =x t Initialize i = 1;
[0015] A1: For hyperspectral images Using DBSCAN-based clustering, the clustering results include one cluster representing the noise class and n clusters representing different land cover categories. Each cluster is represented as...
[0016]
[0017] Where, m (i) C represents the total number of pixels in the i-th cluster. (0) Represent the noise cluster and discard it;
[0018] A2: Regarding C (i) Each pixel in the image is compared with a known pixel x. q The spectral angle is calculated using SAM based on spectral angle mapping and denoted as Θ. (i) ={θ(x, x)} q )|x∈C (i)};
[0019] A3: Θ (i) Center front The original pixels corresponding to the largest spectral angles are used as part of the background training samples, denoted as:
[0020]
[0021] in, N s This represents the total number of typical background pixels selected in the final analysis.
[0022] A4: Update the known pixel sequence Q = {Q, D} (i)}, and average the pixels in Q along the spectral dimension to obtain the new known pixel x. q , i = i + 1, if i ≤ n, then go to step A2;
[0023] A5: Combine the selected background pixels with the negative sample label 0 to form the final background training sample D. b ,|D b |=N s .
[0024] As a preferred technical solution of the present invention: step S2 uses a priori target x t = [l1, l2, ..., l d ] T A random spectral band zero-masking data augmentation method for generating target training samples Specifically, the steps include the following:
[0025] B1: In generating each target training sample Previously, k was a positive integer, and the value of k ranged from 1 to N. s Randomly generate a sequence of zero-masking positions s for spectral bands, where s satisfies 0 ≤ |s| ≤ d;
[0026] B2: The j-th spectral band value Determined based on the following criteria:
[0027]
[0028] Generate target samples And together with the positive sample label 1, they constitute the target training sample;
[0029] B3: Proceed to step B1 until a total of N is generated. s Target training samples constitute D t ,|D t |=N s .
[0030] As a preferred embodiment of the present invention: the number N of background / target training samples selected or generated in steps S1 and S2 is... s The optimal value was found to be 1000 through cross-validation experiments.
[0031] As a preferred embodiment of the present invention: the network structure of the spectral aggregation and separation network, consisting of upper, middle, and lower branches, includes nine convolutional layers, wherein each pair of convolutions forms a group, and the feature map obtained from the first convolution, the feature map obtained from the second convolution, and the feature map after passing through the SE channel attention mechanism are combined. Figure 3 The features of the three branches are summed and then fed into the next convolutional layer. The last convolutional layer is immediately followed by a fully connected operation, which represents the feature map of the three branches after the fully connected operation as follows: and And perform feature subtraction operations respectively, as follows:
[0032]
[0033] The feature map f representing spectral differences and similarities is obtained. difference and fsimilarity After another fully connected operation and a sigmoid activation function, we obtain f′. difference and f′ similarity Finally, the network's final output prediction value f is obtained by summing the features. output =f′ difference +f′ similarity .
[0034] As a preferred technical solution of the present invention: all convolutional layers in the spectral aggregation and separation network are one-dimensional convolutions of size 1×3, with 30 convolutional kernels, wherein the stride of the 3rd, 5th, 7th and 9th convolutional layers is 2, and the stride of the remaining convolutional layers is 1.
[0035] As a preferred embodiment of the present invention: the spectral aggregation and separation network uses a triple soft loss function Loss TS Optimize training, Loss TS The expression is as follows:
[0036]
[0037] in, B represents the number of samples input to the network during one training session. Let represent the i-th feature vector output by each branch of the network after the first fully connected layer during a single training iteration.
[0038] As a preferred embodiment of the present invention: in the triple soft loss function of the spectral aggregation and separation network, ρ represents the Pearson correlation coefficient.
[0039] The intelligent target detection method for hyperspectral images described in this invention has the following advantages compared with existing technologies:
[0040] (1) This invention proposes a spectral aggregation and separation network for hyperspectral target detection. This network performs target detection by simultaneously judging the similarity or difference between the positive and negative samples of the upper and lower branches and the prior target spectrum of the middle branch. It can highlight the target while suppressing the background, effectively separating the target from the background and achieving superior detection performance.
[0041] (2) This invention proposes a background sample selection method based on unsupervised clustering and spectral angle mapping, which can select pure background pixels that are representative and have a relatively rich variety of categories, providing reasonable background training samples for network training.
[0042] (3) This invention proposes a target training sample data augmentation method based on zero masking of random spectral bands. The spectrum of the generated target training sample is not mixed with background information or other unreal information, which cleverly avoids the redundancy of spectral band information.
[0043] (4) In this invention, a triple soft loss function is proposed in the spectral aggregation and separation network, which enables the network training to focus on the aggregation of target sample spectrum and prior target spectrum, and the separation of background sample spectrum, prior target spectrum and target sample spectrum. As a result, the network model used for testing has a strong ability to separate the target from the background, thus improving the final detection performance. Attached Figure Description
[0044] To more clearly illustrate the technical solutions in the embodiments of the present invention, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0045] Figure 1 A flowchart illustrating the method provided for an example of the present invention;
[0046] Figure 2 A schematic diagram of the background sample selection process provided for an example of the present invention;
[0047] Figure 3 A schematic diagram illustrating the process of generating target samples for an example of the present invention;
[0048] Figure 4 A structural diagram of the spectral polymerization and separation network provided as an example of the present invention;
[0049] Figure 5 The images shown are real ground cover maps and detection results from the San Diego hyperspectral dataset used in the simulation experiments of this invention.
[0050] Figure 6 The images shown are real ground cover maps and detection results from the Urban hyperspectral dataset used in the simulation experiment of this invention.
[0051] Figure 7 This is the ROC curve of the detection results from the San Diego hyperspectral dataset in the simulation experiment of this invention;
[0052] Figure 8 This is the ROC curve of the detection results of the Urban hyperspectral dataset in the simulation experiment of this invention;
[0053] Figure 9 This is a separation mapping diagram of the detection results from the San Diego hyperspectral dataset in the simulation experiment of this invention;
[0054] Figure 10 This is a separation mapping diagram of the detection results of the Urban hyperspectral dataset in the simulation experiment of this invention. Detailed Implementation
[0055] The present invention will be further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.
[0056] This invention discloses an intelligent target detection method for hyperspectral images, such as... Figure 1-4 As shown, the process specifically includes three parts: training sample preparation, network training, and target detection. The training sample preparation stage includes selecting typical background training samples and generating sufficient target training samples. Using a prior target pixel, typical background pixels in the hyperspectral image are selected through density-based unsupervised clustering and spectral angle mapping, and these are combined with negative sample label 0 to construct background training samples. Sufficient target samples are generated using random spectral band zero-occlusion data augmentation for a prior target, and these are combined with positive sample label 1 to construct target training samples. In the network training stage, the background training samples, a prior target pixel, and target training samples are input into the upper, middle, and lower branches of the network, respectively. A triple soft loss function is used to guide the network training towards separating the background training samples from the prior target and target training samples, resulting in a network model with a strong ability to separate targets from the background. In the target detection stage, the pixel to be detected and a prior target are input into the upper, lower, and middle branches of the trained network, respectively. After passing through the trained network, the detection value is obtained as the detection result for the pixel to be detected, and the final hyperspectral target detection result is constructed.
[0057] In this embodiment, the prior target used is a known target pixel in a hyperspectral image. The method of this invention utilizes the spectral similarity and difference between the pixel to be tested and the prior target pixel for target detection.
[0058] In the embodiment, the matrix corresponding to the hyperspectral image and a priori target pixel spectral vector (Where d and N are the number of spectral bands per pixel and the total number of pixels, respectively) Perform the following operations:
[0059] S1: Use the density-based noisy spatial clustering method DBSCAN and the spectral angle mapping-based method SAM to select typical background training samples D from the hyperspectral image. b ;
[0060] In this embodiment, step S1 includes the following steps, and the specific process is as follows: Figure 2 As shown:
[0061] Initialize the known pixel sequence containing a prior target pixel Q = {x} t}, and initialize the known pixel x q =x tSince noise clusters are not considered when selecting typical background samples, i is initialized to 1.
[0062] A1: Perform DBSCAN clustering on matrix X. The clustering results include one cluster representing the noise class and n clusters representing different land cover categories. Each cluster is represented as...
[0063]
[0064] Where, m (i) C represents the total number of pixels in the i-th cluster. (0) This represents a noise cluster. Since noise can affect network training, C will be used in the following steps. (0) give up.
[0065] A2: Regarding C (i) Each pixel in the image is compared with a known pixel x. q The spectral angle is calculated using SAM based on spectral angle mapping and denoted as Θ. (i) ={θ(x, x)} q )|x∈C (i)};
[0066] A3: Θ (i) Center front The original pixels corresponding to the largest spectral angles are used as part of the background training samples, denoted as:
[0067]
[0068] in, N s N represents the total number of typical background pixels selected in the final selection, with the preferred recommendation being N. s It is 1000.
[0069] The larger the spectral angle, the less similar the pixel is to the known pixels. This means that the selected typical background pixels are not only significantly different from the prior target, but also have large differences between each background pixel. This allows the selected background samples to come from as many different categories as possible, making them more representative and providing more reasonable samples for network training.
[0070] A4: Update the known pixel sequence Q = {Q, D} (i)}, and average the pixels in Q along the spectral dimension to obtain the new known pixel x. q , i = i + 1, if i ≤ n, then go to step A2;
[0071] A5: Combine the selected background pixels with the negative sample label 0 to form the final background training sample D. b ,|D b |=N s .
[0072] The density-based noisy spatial clustering method DBSCAN and the spectral angle mapping method SAM are well-known technologies in this field and will not be elaborated here.
[0073] S2: Using a priori target pixel spectral vector x t Generate sufficient target training samples D t ;
[0074] In the embodiment, step S2 uses a priori target x t = [l1,l2,...,l d ] T A random spectral band zero-masking data augmentation method for generating target training samples The specific operation includes the following steps. Figure 4 The diagram shows the algorithm flow for generating a target training sample.
[0075] B1: B1: In generating each target training sample Previously, k was a positive integer, and the value of k ranged from 1 to N. s Randomly generate a sequence of zero-masking positions s for spectral bands, where s satisfies 0 ≤ |s| ≤ d;
[0076] B2: Target training samples The j-th spectral band value Determined based on the following criteria:
[0077]
[0078] Generate target samples And together with the positive sample label 1, they constitute the target training sample;
[0079] B3: Proceed to step B1 until a total of N is generated. s 1 target training sample, constituting D t ,|D t |=N s Preferred suggestion N s Setting it to 1000 ensures a balance between positive and negative samples used for network training;
[0080] The data augmentation target training sample generation method using random spectral band zero-masking can cleverly avoid the redundancy of spectral bands in hyperspectral images. In addition, this method forces the network to learn and understand the features of all bands in a global sense, rather than just focusing on the local information of certain key bands, which increases the stability and overall performance of the network model to a certain extent.
[0081] S3: Select the background training samples D b A priori target x t and generate target training samples Dt The data are respectively input into the spectral aggregation and separation networks for training;
[0082] In this embodiment, step S3 specifically involves inputting positive and negative training samples and prior targets into the spectral aggregation and separation network for training, thereby obtaining the trained network model and parameters. The structure diagram of the spectral aggregation and separation network is shown below. Figure 4 As shown. The upper branch input background training sample D b The intermediate branch input is the prior target x. t The lower branch input target training sample D t The three branches of the network have identical network structures and parameter settings, and share network parameters during training. Each branch's structure includes: 9 convolutional-ReLU activation layers, 4 SE channel attention mechanisms, 8 residual connections, and 4 feature summations. Additionally, the network includes: two feature subtraction operations, two fully connected operations, two Sigmoid activation operations, and one feature summation. In the spectral aggregation and separation network, all convolutional layers are one-dimensional convolutions of size , with 30 kernels. The stride of the 3rd, 5th, 7th, and 9th convolutional layers is 2, and the stride of the remaining convolutional layers is 1. It is recommended that the batch size be set to 256 for each training session, and the learning rate be set to 10%. -5 The number of training epochs was set to 400.
[0083] Specifically, the network structure of the spectral aggregation and separation network consists of three branches: upper, middle, and lower. Each pair of convolutions forms a group, combining the feature map obtained from the first convolution, the feature map obtained from the second convolution, and the feature map processed by the SE channel attention mechanism. Figure 3 The features of each branch are summed and then fed into the next convolutional layer. The last convolutional layer is immediately followed by a fully connected operation, which represents the feature maps of the three branches after the fully connected operation as follows: and And perform feature subtraction operations respectively, denoted as
[0084]
[0085] The feature map f representing spectral differences and similarities is obtained. difference and f similarity After undergoing another fully connected operation and a Sigmoid activation function, f′ is obtained. difference and f′ similarity Finally, the network's final output prediction value f is obtained by summing the features. output =f′ difference +f′ similarity .
[0086] The use of the SE channel attention mechanism enables the network to focus more on highly discriminative features, while residual connections allow for more complete extraction of spectral feature information. The network structure and parameter settings of the SE channel attention mechanism are well-known techniques in this field and will not be elaborated upon here.
[0087] The spectral aggregation and separation network uses a triple soft loss function Loss TS Optimize training, Loss TS The expression is as follows:
[0088]
[0089] in, B represents the number of samples input to the network during one training session. Let represent the i-th feature vector output by each branch of the network after the first fully connected layer during a single training iteration.
[0090] Wherein, ρ represents the Pearson correlation coefficient. The method for calculating the Pearson correlation coefficient is a well-known technique in this field and will not be elaborated here.
[0091] The triple soft loss function makes the spectra of positive samples more similar to those of the prior target, i.e., Δ + The smaller the value, the greater the spectral difference between the negative sample and the prior target, and the greater the difference between the positive and negative samples, i.e., Δ. - With Δ * The larger the value, the better the trained network model can separate the target from the background. Additionally, the spectral aggregation and separation network uses the binary cross-entropy loss function (Loss) on the output feature map of the Sigmoid activation function. BCE The final overall loss function of the network is obtained by adding the triple soft loss function and the binary cross-entropy loss function, i.e., Loss = Loss TS +Loss BCE The binary cross-entropy loss function is a well-known technique in this field and will not be elaborated upon here.
[0092] S4: Input the pixels to be tested and the prior target in the hyperspectral image into the upper and lower branches and the middle branch of the trained spectral aggregation and separation network, respectively, to obtain the corresponding predicted values;
[0093] In this embodiment, step S4 specifically involves: inputting each pixel to be tested in matrix X into the upper and lower branches of the spectral aggregation and separation network, and inputting a priori target pixel spectral vector x. t The input is fed into the intermediate branch of the network, and the trained network automatically determines the category of the pixel to be tested and outputs the corresponding predicted value.
[0094] S5: Use the obtained predicted value as the target detection result of the pixel to be tested, and obtain the target detection result of the entire hyperspectral image.
[0095] In this embodiment, step S5 specifically involves the following steps: the spectral aggregation and separation network outputs predicted values for N pixels to be tested. The higher the predicted value, the higher the probability that the pixel is the target pixel. The closer the predicted value is to 0, the higher the probability that the pixel is the background pixel. Finally, the target detection result of the hyperspectral image is obtained.
[0096] In practical implementation, the process can be automated using software. The device for running the process should also be within the scope of protection of this invention. The deep learning experiments in the embodiments were conducted using Python 3.9.12, Conda 4.12.0, and PyTorch 1.2.0; all others were implemented using MATLAB R2019a.
[0097] Based on the above scheme, the following comparative experiments are used to verify the beneficial effects of the method of the present invention.
[0098] In this embodiment, the public hyperspectral data used are the San Diego hyperspectral dataset and the Urban hyperspectral dataset. The San Diego dataset is a public hyperspectral dataset acquired by an airborne visible / infrared imaging spectrometer at San Diego Airport, California, USA. It contains 189 spectral bands, with a two-dimensional image space size of 100 pixels × 100 pixels. An aircraft composed of 134 pixels is selected as the target of interest. The Urban dataset is a hyperspectral dataset acquired by a hyperspectral digital image acquisition experimental sensor located in urban areas of California, USA. It contains 204 spectral bands, with a two-dimensional image space size of 100 pixels × 100 pixels. A car and a roof composed of 67 pixels are selected as targets. Four comparative algorithms are used to compare and analyze the method of this invention. The comparative algorithms are the classic traditional detection algorithms: Adaptive Cosine / Consistent Estimation Algorithm (ACE) (Method 1) and Constrained Energy Minimization Detector (CEM) (Method 2); the machine learning-based detection algorithm: Sparse Representation-Based Target Detection Algorithm (SRTD) (Method 3); and the deep learning-based detection algorithm: Dual-Branch Convolutional Neural Network Hyperspectral Target Detection Algorithm (TSCNTD) (Method 4). The method of this invention is exemplified by the specific implementation method.
[0099] In this embodiment, the Receiver Operational Characteristic (ROC) curve, AUC value (area under the ROC curve), and separation map are used as evaluation metrics. Specifically, the closer the ROC curve is to the top left corner of the map, the larger the corresponding AUC value, indicating better detection performance of the algorithm. The separation map can be used to evaluate the degree of separation between the background and target classes in the detection results, and it can also be used to observe the data distribution, verifying the algorithm's suppression of background pixels.
[0100] Table 1 Optimal parameter settings for DBSCAN
[0101] San Diego dataset 0.10 16 Urban Dataset 0.35 8
[0102] Table 2 shows the AUC values of the comparative experimental results.
[0103] Method 1 ACE 0.93792 0.98986 Method 2 CEM 0.96683 0.96915 Method 3 SRTD 0.84781 0.97077 Method 4 TSCNTD 0.95357 0.98916 Method of the present invention 0.99785 0.99381
[0104] As shown in Table 2, compared with other detection algorithms, the method of this invention achieved the highest AUC values for both datasets.
[0105] like Figure 5-9 As shown, Figure 5 and Figure 6 The images show the detection results of different detection algorithms on the San Diego and Urban datasets, respectively. As can be seen, the method of this invention can accurately locate the target position, highlight the complete target pixels well, and suppress background pixels to a very high degree. Figure 7 and Figure 8 The figures show the ROC curves for the detection results on the San Diego and Urban datasets, respectively. For the San Diego dataset, the ROC curve for the method of this invention is closest to the top left corner, and its detection probability reaches 1 earliest as the false alarm probability increases. For the Urban dataset, although the ROC curve for method 3's SRTD is initially at the top, its detection probability reaches 1 last, while the ROC curve for the method of this invention is above other methods, showing the best overall performance. All of this indicates that the method of this invention has higher detection accuracy. Figure 9 and Figure 10 The separation mapping diagrams of the detection results on the San Diego and Urban datasets are shown. The background bin corresponding to the method of this invention is closest to the statistical value of 0, indicating that it has the strongest ability to suppress the background. The larger distance between the background and the target bin indicates that the target-background separation ability of the algorithm of this invention is better. As can be seen from the experimental results, compared with other comparative experiments, the target detection results of the method of this invention achieve the best detection accuracy and target-background separation effect.
[0106] It should be understood that any undescribed parts of this invention are the same as or implemented using existing technology.
[0107] It should be understood that the present invention is not limited to the above-described embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention, and all such changes fall within the protection scope of the present invention. The scope of protection of the present invention should be determined by the appended claims.
Claims
1. A method for intelligent target detection in hyperspectral images, characterized in that, Includes the following steps: S1: Select hyperspectral image Typical background training sample D b , where d and N are the number of spectral bands per pixel in the hyperspectral image and the total number of pixels contained in the hyperspectral image, respectively; S2: Using a priori goals Generate sufficient target training samples D t ; S3: Transfer the background training samples D b A priori target pixel x t and target training sample D t The data are respectively input into the spectral aggregation and separation networks for training; The spectral aggregation and separation network is divided into three branches: upper, middle, and lower. During the training phase, the upper branch receives the background training sample D. b The intermediate branch input is the prior target x. t The lower branch input target training sample D t The three branches have the same network structure and parameter settings, and share network parameters during training. The structure of each branch includes: 9 convolutional-ReLU activation layers, 4 SE channel attention mechanisms, 8 residual connections, and 4 feature sums. Each of the three branches obtains its own feature vector after a fully connected operation. Then, the feature vector of the upper branch is subtracted from the feature vector of the middle branch for the first time to obtain a feature map representing spectral differences. The feature vector of the lower branch is subtracted from the feature vector of the middle branch for the second time to obtain a feature map representing spectral similarities. The above two difference feature maps are then processed by a fully connected operation and a Sigmoid activation function, and finally, the network's final output prediction value is obtained by feature summation. S4: Input the pixels to be tested and the prior target in the hyperspectral image into the upper and lower branches and the middle branch of the trained spectral aggregation and separation network, respectively, to obtain the corresponding predicted values; S5: Use the obtained predicted value as the target detection result of the pixel to be tested, and obtain the target detection result of the entire hyperspectral image.
2. The intelligent target detection method for hyperspectral images according to claim 1, characterized in that: In step S1, the density-based noisy spatial clustering method DBSCAN and the spectral angle mapping-based method SAM are used to select typical background training samples D from the hyperspectral image. b The specific implementation method is as follows: Initialize the known pixel sequence containing a prior target pixel Q = {x} t } and initialize the known pixel x q =x t Initialize i = 1; A1: For hyperspectral images DBSCAN clustering was performed, and the clustering results include one cluster representing the noise class and n clusters representing different land cover categories. Each cluster is represented as... Where, m (i) C represents the total number of pixels in the i-th cluster. (0) Represent the noise cluster and discard it; A2: Regarding C (i) Each pixel in the image is associated with a known pixel x. q The spectral angle is calculated using SAM based on spectral angle mapping and expressed as follows: I (i) ={θ(x,x q )|x∈C (i) }; A3: Θ (i) Center front The original pixels corresponding to the largest spectral angles are used as part of the background training samples, denoted as: in, N s This represents the total number of typical background pixels selected in the final analysis. A4: Update the known pixel sequence Q = {Q, D} (i) The pixels in Q are averaged along the spectral dimension to obtain the new known pixel x. q , i = i + 1, if i ≤ n, then go to step A2; A5: Combine the selected background pixels with the negative sample label 0 to form the final background training sample D. b ,|D b |=N s .
3. The intelligent target detection method for hyperspectral images according to claim 1, characterized in that: Step S2 uses a priori target x t = [l1, l2, ..., l d ] T A random spectral band zero-masking data augmentation method for generating target training samples The specific implementation method is as follows: B1: In generating each target training sample Previously, k was a positive integer, and the value of k ranged from 1 to N. s Randomly generate a sequence of zero-masking positions s for spectral bands, where s satisfies 0 ≤ |s| ≤ d; B2: The j-th spectral band value Determined based on the following criteria: Generate target samples And together with the positive sample label 1, they constitute the target training sample; B3: Proceed to step B1 until a total of N is generated. s Target training samples constitute D t ,|D t |=N s .
4. A method for intelligent target detection in hyperspectral images according to claim 2 or claim 3, characterized in that: Through cross-validation via experiments, N s The optimal value for is 1000.
5. The intelligent target detection method for hyperspectral images according to claim 1, characterized in that: The spectral aggregation and separation network has a three-branch structure consisting of nine convolutional layers. Each pair of convolutions forms a group, where the feature maps obtained from the first, second, and SE channels (after the SE channel attention mechanism) are summed before being fed into the next convolutional layer. The last convolutional layer is immediately followed by a fully connected operation. The feature maps of the three branches after the fully connected operation are represented as follows: and And perform feature subtraction operations respectively, as follows: The feature map f representing spectral differences and similarities is obtained. difference and f similarity After undergoing another fully connected operation and a Sigmoid activation function, f′ is obtained. difference and f′ similaarity Finally, the network's final output prediction value f is obtained by summing the features. output =f′ difference +f′ similarity .
6. The intelligent target detection method for hyperspectral images according to claim 5, characterized in that: In the aforementioned spectral aggregation and separation network, all convolutional layers are one-dimensional convolutions of size 1×3, with 30 convolutional kernels. The stride of the 3rd, 5th, 7th, and 9th convolutional layers is 2, while the stride of the remaining convolutional layers is 1.
7. The intelligent target detection method for hyperspectral images according to claim 5, characterized in that: The spectral aggregation and separation network uses a triple soft loss function Loss TS Optimize training, Loss TS The expression is as follows: in, B represents the number of samples input to the network during one training session. denoted as i-th feature vectors output by each branch of the network after the first fully connected layer during a training iteration; ρ is the Pearson correlation coefficient, used to measure the degree of linear correlation between two feature vectors.