A method for hyperspectral image classification based on dynamic width-depth neural network and its training method
By adopting dynamic width-deep neural networks in the hyperspectral image classification model and using multiple EWSWS networks to gradually learn and adjust the structure, the problem of low training efficiency of hyperspectral image classification model in the existing technology is solved, and efficient and precise learning and generalization capabilities are achieved.
Patent Information
- Application Number
- CN202110615207.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-02
- Publication Date
- 2025-03-25
- Estimated Expiration
- 2041-06-02
AI Technical Summary
The prior art is not efficient when training hyperspectral image classification models, especially when training samples are limited, it is difficult to generate learning models with appropriate architectural complexity, resulting in low learning efficiency and accuracy.
Using a dynamic width-deep neural network-based method, a learning model with appropriate structural complexity is generated by cascaded and parallel multiple EWSWS networks in the width direction. Each EWSWS network contains multiple conversion layers, constructed by a width sliding window and a subsampling module, expanding the conversion core in the depth direction to fully learn spatial and spectral features.
The learning efficiency and accuracy of the hyperspectral image classification model are improved, incremental learning is achieved, catastrophic forgetting is overcome, and good generalization ability and rapid training ability are provided.
Smart Images

Figure CN113486923B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence and machine learning technology, and in particular to a method for classifying hyperspectral images based on a dynamic width-depth neural network and a training method thereof. Background Art
[0002] Deep learning is widely used in hyperspectral image classification to extract spatial and spectral features. In addition to deep convolutional neural networks, deep recurrent neural networks, spectral-spatial attention mechanism networks based on recurrent neural networks and convolutional neural networks, deep support vector machines are also widely used in hyperspectral image classification.
[0003] For training a learning model, if a large number of training samples come from only a single hyperspectral image, such training is usually not efficient. This is a major drawback of applying deep learning algorithms with a large number of hyperparameters and layers.
[0004] Incremental learning can learn new knowledge without forgetting the learned knowledge, overcoming catastrophic forgetting. It can also generate learning models according to the complexity of the learning task, which is very useful for hyperspectral image classification with limited training samples. In addition, the learning model can be generated in the depth direction and the width direction, with good generalization performance. Summary of the invention
[0005] In view of the problems existing in the prior art, the purpose of the present invention is to provide a method for hyperspectral image classification based on a dynamic width-depth neural network and a training method thereof, which can generate a learning model with appropriate architectural complexity according to the characteristics of hyperspectral image data and learn more effectively; an efficient width sliding window and subsampling network (EWSWS) has multiple conversion kernels, which expands the input samples in the depth direction and can fully learn spatial and spectral features.
[0006] In order to achieve the above object, the present invention adopts the following technical solutions to achieve it.
[0007] (i) A method for hyperspectral image classification based on a dynamic width-depth neural network, comprising P EWSWS networks in the width direction, wherein the P EWSWS networks are cascaded in sequence in a learning phase; in an application phase, the P EWSWS networks process the hyperspectral data to be processed in parallel; and the P EWSWS networks are added to the dynamic width-depth neural network one by one through a step-by-step learning process of the learning data;
[0008] Each EWSWS network contains L width downsampling layers cascaded sequentially in the depth direction, and each width downsampling layer contains multiple conversion layers; each conversion layer is constructed by a width sliding window module and a subsampling module; during the sliding process, each conversion layer expands in the depth direction.
[0009] Furthermore, the construction process of the dynamic width-depth neural network is as follows:
[0010] First, according to the data volume and classification accuracy requirements of the dataset to be learned, the number of EWSWS networks P in the initial width direction is determined. a , and set the number of width downsampling layers in the depth direction of each EWSWS network;
[0011] Then, the first EWSWS network learns the labels of the dataset to be learned, and the second EWSWS network learns the residual error of the first EWSWS network on the same dataset to be learned, and so on until the Pth a The EWSWS network learns the first (P a -1) The residual error of an EWSWS network; according to the gap between the residual error obtained by the current training and the target threshold, a new EWSWS network and a new training subset are further added in the width direction to learn the current residual error until the residual error of the training is less than the target threshold or the maximum number of networks is reached, that is, the final dynamic width-depth neural network is obtained.
[0012] (II) A training method for a method for hyperspectral image classification based on a dynamic width-depth neural network, the training method comprising the following steps: assuming that the training cycle is N c , take the residual error corresponding to the current training cycle as the initial expected output of the next training cycle, and gradually reduce the residual error of the training;
[0013] For each training cycle, follow these steps:
[0014] (1) Divide the dataset to be learned into N batch training subsets, the overlap factor between two adjacent training subsets is λ, 0<λ<1;
[0015] (2) Input the first training subset into the first EWSWS network, take the corresponding data label as the expected output, update the network weights of the first EWSWS network, and obtain the first residual error corresponding to its network output; take the first residual error as the expected output of the second EWSWS network, input the first training subset into the second EWSWS network, update the network weights of the second EWSWS network, and obtain the second residual error corresponding to its network output; take the second residual error as the expected output of the second EWSWS network, and input the first training subset into the third EWSWS network; and so on, until the residual error corresponding to the output of the last EWSWS network is obtained, completing one iteration process;
[0016] (3) The residual error obtained in the previous iteration is used as the expected output of the first EWSWS network in the next iteration, and the iterative process of step (2) is repeated until the residual error of the training is less than the target threshold or the maximum number of networks is reached;
[0017] (4) For the remaining training subsets, execute steps (2) and (3) in sequence to complete the learning of one training cycle.
[0018] Furthermore, after each training cycle is completed, the learning data set is reordered, and the new training batch is re-divided using the overlapping factor to obtain a new training subset; the number of EWSWS networks corresponding to each training cycle is determined according to the training residual error of the current training cycle. When the current training residual error reaches the target threshold, the current training cycle ends, otherwise, a new EWSWS network is added in the width direction to continue training.
[0019] Furthermore, when the feature matrix Φ extracted by P EWSWS networks is larger than ξ times the number of samples in the data set to be learned, the feature matrix Φ is segmented along the feature dimension so that the feature dimension is close to the number of samples; that is, the number of segmentations is set to Q, and the output matrix is rewritten as:
[0020] Y=ΦW=[Ψ1,Ψ2,…,Ψ Q ]W=Ψ1W′1+Ψ2W′2+…+Ψ Q W′ Q
[0021] Then, using [Ψ1,Ψ2,…,Ψ Q ] instead of [Φ1,Φ2,…,Φ P ] to train dynamic width-depth neural networks.
[0022] Furthermore, the process of acquiring the data set to be learned is as follows:
[0023] First, obtain the original hyperspectral image dataset X∈R w×H×B , w is the width of the original hyperspectral image, H is the height of the original hyperspectral image, and B is the number of bands of the original hyperspectral image;
[0024] Secondly, the original hyperspectral image dataset is subjected to principal component analysis and normalization in turn to obtain the normalized dataset X′∈R w×H×B′ ; B′ is the number of bands of the normalized hyperspectral image;
[0025] Then, the normalized dataset X′ is divided into multiple image blocks Each image block Extend to vector data to get vector set
[0026] Finally, the data is intercepted using a fixed stride in the width and height directions, splitting each vector into corresponding multiple vectors Form a data set to be learned; for The first vector to be intercepted with a fixed step.
[0027] Furthermore, the internal data processing process of each EWSWS network is:
[0028] (a) Input the data set to be learned into the EWSWS network, and assume that the output of the conversion kernel after the nth slide is:
[0029]
[0030] M n represents the number of conversion cores at the nth sliding; p n is the input vector intercepted by the nth sliding operation, represents a set of transformation kernel functions;
[0031] (b) sorting the output of the transformation kernel along the sample dimension and subsampling the sorted output;
[0032] (c) For each sliding window, the sub-sampled outputs in the width direction are merged to obtain the total output:
[0033] G EWSWS =[G S_1 ,G S_2 ,…,G S_N ]
[0034] Among them, G EWSWS represents the total output after the sliding conversion kernel output is sorted and the sub-sampled output is merged; G S_1 represents the output of the transformation kernel after sorting and subsampling after the first slide; G S_N It represents the output of the conversion kernel after sorting and subsampling after the Nth slide;
[0035] (d) Each width downsampling layer needs to use multiple conversion layers to expand in the depth direction, that is, in the depth direction, the output of the previous width downsampling layer is used as the input of the next width downsampling layer, and the number of sliding windows of each width downsampling layer is determined according to the length of the input vector of this layer, until the output of the conversion layer of the last layer is Then the final output of the current EWSWS network is:
[0036]
[0037] Among them, W is the fully connected layer weight corresponding to the current EWSWS network;
[0038] (e) Calculate the least squares estimate of the weights by minimizing the squared error
[0039]
[0040] Where D is the category truth vector;
[0041] (f) Based on The pseudo-inverse matrix calculate
[0042]
[0043] The superscript T indicates the matrix transpose.
[0044] Furthermore, the internally trained transformation kernel parameters of each width downsampling layer are obtained by unsupervised learning or randomly selected from training samples.
[0045] Compared with the prior art, the present invention has the following beneficial effects:
[0046] (1) The method and training method for hyperspectral image classification based on a dynamic width-depth neural network provided by the present invention generate a learning model with appropriate structural complexity for different learning data and tasks, which helps to improve learning efficiency and learning accuracy;
[0047] (2) The present invention can achieve incremental learning and overcome catastrophic forgetting; it has efficient and fast learning and testing, that is, it can use fewer numbers to optimize architecture parameters, reduce training time, and the application process can be carried out in parallel; it has robust generalization ability, which means that the learning model has good performance in testing previously unseen data.
[0048] (3) The EWSWS network of the present invention uses the conversion kernel as an extractor and uses a sliding window to make it wider to have sufficient representation ability to learn features. Then classification and subsampling processing are performed to obtain more important extracted features.
[0049] (4) The parameters of the transformation kernel in the EWSWS network used in the present invention can be directly randomly selected from the training samples, or can be obtained by unsupervised learning methods, so that the DWDNN can be easily trained. Only the weights of the fully connected layer can be calculated using the least squares method and the iterative method. BRIEF DESCRIPTION OF THE DRAWINGS
[0050] The present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0051] Figure 1A network structure diagram of a dynamic width-depth neural network of the present invention;
[0052] Figure 2 is a schematic diagram of hyperspectral image preprocessing and example preparation of the present invention;
[0053] Figure 3 It is a structural diagram of the EWSWS network of the present invention;
[0054] Figure 4 It is a structural schematic diagram of the dynamic iteration process of the DWDNN of the present invention. DETAILED DESCRIPTION
[0055] The embodiments of the present invention will be described in detail below with reference to examples, but those skilled in the art will understand that the following examples are only used to illustrate the present invention and should not be construed as limiting the scope of the present invention.
[0056] Example 1
[0057] refer to Figure 1 The present invention provides a method for hyperspectral image classification based on a dynamic width-depth neural network, comprising P EWSWS networks in the width direction. In the learning stage, the P EWSWS networks are cascaded in sequence; in the application stage, the P EWSWS networks process the hyperspectral data to be processed in parallel; the P EWSWS networks are added to the dynamic width-depth neural network one by one through a step-by-step learning process of the learning data to be processed; each EWSWS network comprises L width downsampling layers cascaded in sequence in the depth direction, and each width downsampling layer comprises multiple conversion layers; each conversion layer is constructed by a width sliding window module and a subsampling module; during the sliding process, each Gaussian kernel is expanded in the depth direction.
[0058] Specifically, the construction process of the dynamic width-depth neural network is:
[0059] First, according to the data volume and classification accuracy requirements of the dataset to be learned, the number of EWSWS networks P in the initial width direction is determined. a , and set the number of width downsampling layers in the depth direction of each EWSWS network;
[0060] Then, the first EWSWS network learns the labels of the dataset to be learned, and the second EWSWS network learns the residual error of the first EWSWS network on the same dataset to be learned, and so on until the Pth a The EWSWS network learns the first (P a-1) The residual error of an EWSWS network; according to the gap between the residual error obtained by the current training and the target threshold, a new EWSWS network and a new training subset are further added in the width direction to learn the current residual error until the residual error of the training is less than the target threshold or the maximum number of networks is reached, that is, the final dynamic width-depth neural network is obtained.
[0061] The network combines wide-area deep learning and incremental learning to generate learning models with appropriate structural complexity for different learning data and tasks. It is based on efficient wide sliding windows and subsampling networks organized in multiple dynamics. Each EWSWS network has multiple transform kernels with sliding windows that can be extended to a wider direction to fully learn spatial and spectral features, as well as sorting and subsampling operations. The parameters of these transform kernels can be learned from randomly selected training samples, thereby reducing the number of transform kernel outputs. By combining multiple wide downsampling layers in the deep direction, spatial and spectral features from low to high can be effectively learned with a smaller hyperparameter configuration. The EWSWS nets are generated one by one and gradually added to the DWDNN net. When the DWDNN net has a strong enough learning ability, the generation process automatically stops. In this way, the DWDNN network can learn features from HSI data more smoothly and efficiently, thereby overcoming the overfitting problem. The weights of the DWDNN network are mainly concentrated in the fully connected layer, which is easy to learn using the least squares iteration method.
[0062] Example 2
[0063] refer to Figure 3 and Figure 4 The present invention provides a training method for a method for hyperspectral image classification based on a dynamic width-depth neural network, comprising the following steps:
[0064] Let the training cycle be N c , take the residual error corresponding to the current training cycle as the initial expected output of the next training cycle, and gradually reduce the residual error of the training;
[0065] For each training cycle, follow these steps:
[0066] (1) Divide the dataset to be learned into batch training subsets, and the overlap factor between two adjacent training subsets is λ, 0<λ<1;
[0067] (2) Input the first training subset into the first EWSWS network, take the corresponding data label as the expected output, update the network weights of the first EWSWS network, and obtain the first residual error corresponding to its network output; take the first residual error as the expected output of the second EWSWS network, input the first training subset into the second EWSWS network, update the network weights of the second EWSWS network, and obtain the second residual error corresponding to its network output; take the second residual error as the expected output of the second EWSWS network, and input the first training subset into the third EWSWS network; and so on, until the residual error corresponding to the output of the last EWSWS network is obtained, completing one iteration process;
[0068] (3) The residual error obtained in the previous iteration is used as the expected output of the first EWSWS network in the next iteration, and the iterative process of step (2) is repeated until the residual error of the training is less than the target threshold or the maximum number of networks is reached;
[0069] (4) For the remaining training subsets, execute steps (2) and (3) in sequence to complete the learning of one training cycle.
[0070] This example uses the Botswana dataset to test the performance of the EWSWS network. The dataset was acquired by NASA EO-1 satellite over the Okavango Delta in Botswana from 2001 to 2004. The data has a 30m pixel resolution on 7.7 km strips in 242 bands. The spectral range is 400-2500 nanometers. After removing the uncalibrated and noisy bands containing water absorption, 145 bands are used as candidate features, with a total of 14 types of land cover.
[0071] First, refer to Figure 2 , for the original hyperspectral image dataset X∈R w×H×B Preprocessing: First, principal component analysis and normalization are performed to X′∈R w×H×B′ , and then divide the normalized data into image blocks And extended to vector data Split into multiple vectors with a fixed step size After principal component analysis, the data set retains 15 bands. The image block size is set to 9*9. The ratio of the training set to the validation set is 0.14 and 0.01, and the rest of the data is used for testing.
[0072] After that, the preprocessed data is input into the EWSWS network for high-resolution dynamic feature extraction. The specific process is as follows:
[0073] (a) The preprocessed data is input into the EWSWS network, the sliding window size is 12, and the stride 12 is used in the width and height directions to reduce the number of redundant sliding times. When sliding for the nth time, the intercepted data of the sliding window is input into the EWSWS network, which is mainly composed of multiple width downsampling layers, each of which is composed of multiple conversion layers. The output of the conversion kernel after the nth slide can be expressed as:
[0074]
[0075] M n Indicates the number of conversion cores at the nth slide.
[0076] (b) Sorting along the sample dimension. To reduce the number of outputs of the transformation kernel, sub-sample the sorted outputs. These two steps can be expressed as:
[0077]
[0078] G S_n = subsampling(G sort_n ,N nS )
[0079] Where N nS represents the sub-sampling interval, in the first EWSWS network of the embodiment, N nS =50. N p is the total number of input samples;
[0080] (c) For each sliding window, the sub-sampled outputs in the width direction are merged to obtain the total output:
[0081] G EWSWS =[G S_1 ,G S_2 ,…,G S_N ]
[0082] Among them, G EWSWS represents the total output after the sliding conversion kernel output is sorted and the sub-sampled output is merged; G S_1 represents the sub-sampled output of the first EWSWS network; G S_N It represents the output of the conversion kernel after sorting and subsampling after the Nth slide;
[0083] On the other hand, in order to obtain deeper features, each EWSWS network needs to use multiple width downsampling layers to expand in the depth direction: each width downsampling layer needs to use multiple conversion layers to expand in the depth direction, that is, in the depth direction, the output of the previous width downsampling layer is used as the input of the next width downsampling layer, and the sliding window of each width downsampling layer is determined according to the length of the input vector of this layer until the output of the conversion layer of the last layer is
[0084] Assume that the output of the first layer is:
[0085]
[0086] Then each subsequent layer can be expressed as:
[0087]
[0088] Where N (l) Represents the number of sliding windows in the lth layer of the transformation kernel.
[0089] Assuming there are L layers, the output of the transformation kernel of the Lth layer is The final output of the fully convolutional connection layer and the final EWSWS network is expressed as:
[0090]
[0091] Among them, W is the fully connected layer weight corresponding to the current EWSWS network;
[0092] Compute the least squares estimate of the weights by minimizing the squared error
[0093]
[0094] Where D is the category truth vector;
[0095] based on The pseudo-inverse matrix calculate
[0096]
[0097] The superscript T indicates the matrix transpose.
[0098] Incrementally generate dynamic width-depth networks (DWDNNs), starting with the first EWSWS network, and then adding subsequent EWSWS networks one by one based on the error of the previous EWSWS network. If the scale of the problem can be estimated and a certain number of EWSWS networks can be given in advance, then the DWDNN can grow quickly to reach the appropriate number of EWSWS networks.
[0099] In order to fully learn the information in the training set, the training samples are decomposed into different numbers of processing batches, but each batch of training has a certain overlap ratio, which can be determined by an overlap factor λ. For hyperspectral image classification, the 3D training block can be divided into different batches of training subsets with overlap factors, expressed as:
[0100]
[0101] Using iterative least squares method, we can batch After each training, the training set is shuffled, i.e. rearranged, and the overlap factor is used to split the new training batches.
[0102] (1) Assume that the first EWSWS network is Net1 and use the first subset p tr_1 To train the network. The output of the first iteration of the width downsampling layer is G EWSWS1 The learning of the expected output D, the calculated weight W1(1) and the output Y1(1) is as follows:
[0103] G EWSWS1 W1(1)=D
[0104]
[0105]
[0106] The residual error of Net1 is:
[0107]
[0108] (2) Add the second EWSWS Net2 to reduce the learning error, G EWSWS2 is the output of the width downsampling layer. The residual error e2(1), the calculated weight W2(1) and the output The learning can be expressed as:
[0109] G EWSWS2 W2(1)=e1(1)
[0110]
[0111]
[0112] The residual error of Net2 is:
[0113]
[0114] According to the needs of the learning task, the error threshold ε and the maximum number of EWSWS network layers N required by the DWDNN network are givenmax Once the residual error is less than ε or the number of network layers reaches N max , the EWSWS network will no longer increase.
[0115] Assume that P1 EWSWS networks are generated in the first iteration, and then the second training subset p tr_2 Train the residual error of the current P1 EWSWS network during the first iteration, and calculate the weight W1(2) and output Y1(2) as:
[0116]
[0117]
[0118]
[0119] in, represents the residual error of the P1th EWSWS network on the first subset.
[0120] The residual error of the network during the second iteration is:
[0121]
[0122] The weights of the subsequent EWSWS network are updated, and the residual error of the second iteration P1 EWSWS network is:
[0123]
[0124] in, represents the residual error of the P1-1th EWSWS network after the second iteration, Represents the output of the P1th EWSWS network after the second iteration.
[0125] If the residual error of P1 EWSWS networks does not meet the training requirements in the second iteration, new EWSWS networks will continue to be added until the residual error is less than the threshold ε or the number of EWSWS networks reaches the maximum number N max , and P2 EWSWS networks are obtained. The training process of the remaining training subsets is similar. The final DWDNN network result is composed of all EWSWS network combinations generated by each iterative training process. The total number of EWSWS networks is:
[0126]
[0127] In the actual process, the validation set can be used to stop training during the generation of each training subset to avoid overfitting.
[0128] Finally, dynamic least squares learning iteratively updates the weights and outputs the results.
[0129] When the feature matrix Φ extracted by EWSWS is much larger than the number of training samples, the feature matrix Φ is split along the feature dimension to make the feature dimension close to the number of samples. Assuming the number of splits is Q, the output matrix is:
[0130] Y=ΦW=[Ψ1,Ψ2,…,Ψ Q ]W=Ψ1W′1+Ψ2W′2+…+Ψ Q W′ Q
[0131] [Ψ1,Ψ2,…,Ψ Q ] is used to replace [Φ1,Φ2,…,Φ P ] to train the DWDNN network.
[0132] In this embodiment, a total of four EWSWS networks are added to the DWDNN network, and the basic parameters of each EWSWS network are shown in Table 1.
[0133] Table 1. Basic parameters of each EWSWS network in DWDNN
[0134]
[0135]
[0136] The DWDNN network of the present invention and the current mainstream learning models, including support vector machine (SVM), multilayer perceptron (MLP), traditional radial basis function network (RBF), convolutional neural network (CNN), 2D CNN (two-dimensional convolutional neural network), 3D CNN (three-dimensional convolutional neural network) and other learning models, are used to train, verify and test the preprocessed data set, and the classification accuracy of the test results is shown in Table 2.
[0137] Table 2 Comparison of classification accuracy of different learning models on the Botswana dataset
[0138]
[0139]
[0140] From the results in Table 2, it can be seen that compared with the current mainstream learning models, the learning model of the present invention has the best classification accuracy, and the final classification accuracy reaches 99.64%.
[0141] Based on the above results, the neural network learning model and learning method of the present invention have the following characteristics: (1) efficient and fast learning and testing, which means that fewer architectural parameters can be optimized, the training process can be accelerated, and the testing process can be carried out in parallel; (2) robust generalization ability, which means that the learning model has good performance in testing previously unseen data; (3) overcoming catastrophic forgetting through incremental learning, which means that it will not forget what it has learned while learning new knowledge, that is, it can learn throughout life.
[0142] Although the present invention has been described in detail in general terms and in specific embodiments in this specification, it is obvious to those skilled in the art that some modifications or improvements may be made to the present invention. Therefore, these modifications or improvements made without departing from the spirit of the present invention all fall within the scope of protection claimed by the present invention.
Claims
1. A method for hyperspectral image classification based on dynamic width-depth neural network, characterized in that: It includes P EWSWS networks in the width direction. In the learning stage, the P EWSWS networks are cascaded in sequence. In the application stage, the P EWSWS networks process the hyperspectral data to be processed in parallel. The P EWSWS networks are added to the dynamic width-depth neural network one by one through the step-by-step learning process of the learning data. Each EWSWS network contains multiple width downsampling layers cascaded in sequence in the depth direction, and each width downsampling layer contains multiple conversion layers; each conversion layer is constructed by a width sliding window module and a subsampling module; during the sliding process, each conversion layer expands in the depth direction; The internal data processing process of each EWSWS network is: (a) Input the data set to be learned into the EWSWS network, and assume that the output of the conversion kernel after the nth slide is: M n represents the number of conversion cores at the nth sliding; p n is the input vector intercepted by the nth sliding operation, represents a set of transformation kernel functions; (b) sorting the output of the transformation kernel along the sample dimension and subsampling the sorted output; (c) For each sliding window, the sub-sampled outputs in the width direction are merged to obtain the total output: G EWSWS =[G S_1 ,G S_2 ,…,G S_N ] Among them, G EWSWS represents the total output after the sliding conversion kernel output is sorted and the sub-sampled output is merged; G S_1 represents the output of the transformation kernel after sorting and subsampling after the first slide; G S_N It represents the output of the conversion kernel after sorting and subsampling after the Nth slide; (d) Each width downsampling layer needs to use multiple conversion layers to expand in the depth direction, that is, in the depth direction, the output of the previous width downsampling layer is used as the input of the next width downsampling layer, and the number of sliding windows of each width downsampling layer is determined according to the length of the input vector of the current layer until the output of the conversion layer of the last layer is Then the final output of the current EWSWS network is: Among them, W is the fully connected layer weight corresponding to the current EWSWS network; (e) Calculate the least squares estimate of the weights by minimizing the squared error Where D is the category truth vector; (f) Based on The pseudo-inverse matrix calculate The superscript T indicates the matrix transpose.
2. The method for hyperspectral image classification based on dynamic width-depth neural network according to claim 1, characterized in that: The construction process of the dynamic width-depth neural network is as follows: First, according to the data volume and classification accuracy requirements of the dataset to be learned, the number of EWSWS networks P in the initial width direction is determined. a , and set the number of width downsampling layers in the depth direction of each EWSWS network; Then, the first EWSWS network learns the labels of the dataset to be learned, and the second EWSWS network learns the residual error of the first EWSWS network on the same dataset to be learned, until the Pth a The EWSWS network learns the first (P a -1) The residual error of an EWSWS network; according to the gap between the residual error obtained by the current training and the target threshold, a new EWSWS network and a new training subset are further added in the width direction to learn the current residual error until the residual error of the training is less than the target threshold or the maximum number of networks is reached, that is, the final dynamic width-depth neural network is obtained.
3. A training method for the method for hyperspectral image classification based on a dynamic width-depth neural network according to any one of claims 1 or 2, characterized in that: The training method comprises the following steps: assuming that the training period is N c , take the residual error corresponding to the current training cycle as the initial expected output of the next training cycle, and gradually reduce the residual error of the training; For each training cycle, follow these steps: (1) Divide the dataset to be learned into N batch training subsets, the overlap factor between two adjacent training subsets is λ, 0<λ<1; (2) Input the first training subset into the first EWSWS network, take the corresponding data label as the expected output, update the network weights of the first EWSWS network, and obtain the first residual error corresponding to its network output; take the first residual error as the expected output of the second EWSWS network, input the first training subset into the second EWSWS network, update the network weights of the second EWSWS network, and obtain the second residual error corresponding to its network output; take the second residual error as the expected output of the second EWSWS network, and input the first training subset into the third EWSWS network; and so on, until the residual error corresponding to the output of the last EWSWS network is obtained, completing one iteration process; (3) The residual error obtained in the previous iteration is used as the expected output of the first EWSWS network in the next iteration, and the iterative process of step (2) is repeated until the residual error of the training is less than the target threshold or the maximum number of networks is reached; (4) For the remaining training subsets, execute steps (2) and (3) in sequence to complete the learning of one training cycle.
4. The training method according to claim 3, characterized in that: After each training cycle is completed, the learning data set is reordered, and the overlapping factor is used to re-split the new training batch to obtain a new training subset; the number of EWSWS networks corresponding to each training cycle is determined according to the training residual error of the current training cycle. When the current training residual error reaches the target threshold, the current training cycle ends, otherwise, a new EWSWS network is added in the width direction to continue training.
5. The training method according to claim 4, characterized in that P1 EWSWS networks are generated in the first iteration, and then the second training subset p tr_2 The residual error of the current P1 EWSWS network during the first iteration of training; If the training residual error of P1 EWSWS networks does not meet the training requirements in the second iteration, new EWSWS networks will continue to be added until the residual error is less than the threshold or the number of EWSWS networks reaches the maximum number N. max , and obtain P2 EWSWS networks corresponding to the second iteration process; and so on, the remaining training subsets are trained, and the final dynamic width-depth neural network is composed of all EWSWS network combinations generated by each iterative training process.
6. The training method according to claim 3, characterized in that: When the feature matrix Φ extracted by P EWSWS networks is larger than ξ times the number of samples in the data set to be learned, the feature matrix Φ is split along the feature dimension to make the feature dimension close to the number of samples; that is, let the number of splits be Q, then rewrite the output matrix as: Y=ΦW=[Ψ1,Ψ2,…,Ψ Q ]W=Ψ1W′1+Ψ2W′2+…+Ψ Q W′ Q Then, using [Ψ1,Ψ2,…,Ψ Q ] instead of [Φ1,Φ2,…,Φ P ] to train dynamic width-depth neural networks.
7. The training method according to claim 3, characterized in that: The process of obtaining the data set to be learned is as follows: First, obtain the original hyperspectral image dataset X∈R w×H×B , w is the width of the original hyperspectral image, H is the height of the original hyperspectral image, and B is the number of bands of the original hyperspectral image; Secondly, the original hyperspectral image dataset is subjected to principal component analysis and normalization in turn to obtain the normalized dataset X′∈R w×H×B′ ; B′ is the number of bands of the normalized hyperspectral image; Then, the normalized dataset X′ is divided into multiple image blocks Each image block Extend to vector data to get vector set Finally, the data is intercepted using a fixed stride in the width and height directions, splitting each vector into corresponding multiple vectors Form a data set to be learned; P M ' T The first vector to be intercepted with a fixed step.
8. The training method according to claim 3, characterized in that: The internally trained transformation kernel parameters of each width downsampling layer are obtained by unsupervised learning or randomly selected from training samples.
Citation Information
Patent Citations
Hyperspectral image deep learning classification method and device, equipment and storage medium
CN110852227A
Hyperspectral image classification method based on auto-encoder and 3D deep residual network
CN112232280A