Hyperspectral remote sensing image classification method and device based on small sample classification model
By adopting a small sample classification model in hyperspectral remote sensing image processing, combining the adaptive mask and Brownian distance covariance representation module, the problems of inconsistent land space coverage and nonlinear correlation mining are solved, and higher classification accuracy and information generalization ability are achieved.
Patent Information
- Application Number
- CN202411926194.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-25
- Publication Date
- 2025-04-25
- Estimated Expiration
- 2044-12-25
AI Technical Summary
Due to the complexity and diversity of land objects, the spatial coverage of land objects in hyperspectral remote sensing images is inconsistent, making it difficult to accurately extract spatial context information, explore nonlinear correlations between different spectral dimensions, and cannot effectively obtain and generalize information from finite prior samples.
Using a method based on a small sample classification model, the pixel block processing of the hyperspectral remote sensing image is performed through the adaptive mask module and the Brownian distance covariance representation module, prediction labels are generated, and the model is trained through backpropagation loss to obtain the classification results of the hyperspectral remote sensing image.
The problem of inconsistency in land space coverage is alleviated by masking pixel blocks, and the Brownian distance covariance representation module is used to mine nonlinear correlations between different spectral dimensions, which improves classification accuracy and can better generalize a priori information to the samples to be predicted.
Smart Images

Figure CN119888317A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of remote sensing image processing, and in particular to a hyperspectral remote sensing image classification method and device based on a small sample classification model. Background Art
[0002] Hyperspectral images not only contain spatial information such as the size, shape, and relative position of objects, but also contain the spectral characteristics of each pixel. In addition, the spectral resolution of hyperspectral images can reach the nanometer level, which can capture the subtle differences between different objects. Therefore, hyperspectral imaging technology is widely used in mineral exploration, medical diagnosis, aerospace and other fields.
[0003] In related technologies, hyperspectral image classification can be performed through small sample classification. Small sample learning learns knowledge from limited prior samples and then generalizes it to a large number of unlabeled samples, thereby effectively solving the sample imbalance problem and improving the classification accuracy of small classes. It is also possible to combine the covariance matrix and traditional metric losses such as contrast loss and triplet loss to achieve classification of remote sensing images.
[0004] However, in related technologies, due to the complexity and diversity of ground objects, adjacent pixels may belong to completely different categories. This uneven coverage makes it difficult for traditional processing methods based on fixed windows or neighborhoods to accurately extract spatial context information. Secondly, there are often complex nonlinear relationships between spectral bands, which is crucial for distinguishing different ground objects. In addition, the high spectral dimension of hyperspectral images makes it difficult to capture the differences between samples, and the relationship between samples based on Euclidean distance cannot effectively obtain and summarize the information of limited prior samples, which is in urgent need of improvement. Summary of the invention
[0005] The present application provides a hyperspectral remote sensing image classification method and device based on a small sample classification model to solve the problems in the technology, such as inconsistent spatial coverage of objects due to the complexity and diversity of objects, difficulty in accurately extracting spatial context information, mining nonlinear correlations between different spectral dimensions, and inability to effectively obtain and summarize information from limited prior samples.
[0006] The first aspect of the present application provides a method for classifying hyperspectral remote sensing images based on a small sample classification model, comprising the following steps: inputting a pixel block of a hyperspectral remote sensing image into a pre-constructed adaptive mask module to obtain a mask pixel block corresponding to the pixel block; inputting the mask pixel block into a pre-constructed Brownian distance covariance representation module to obtain a predicted label corresponding to the pixel block using the Brownian distance covariance representation module; training the adaptive mask module and the Brownian distance covariance representation module based on the predicted label to obtain a small sample classification model of the hyperspectral remote sensing image, so as to obtain a classification result of the hyperspectral remote sensing image using the small sample classification model.
[0007] Optionally, in one embodiment of the present application, before inputting the pixel blocks of the hyperspectral remote sensing image into a pre-built adaptive mask module, it also includes: obtaining an initial hyperspectral remote sensing image of the sample to be classified, and preprocessing the initial hyperspectral remote sensing image to obtain a hyperspectral remote sensing image; generating pixel blocks of the hyperspectral remote sensing image and real labels corresponding to the pixel blocks based on the hyperspectral remote sensing image.
[0008] Optionally, in one embodiment of the present application, the step of inputting a pixel block of a hyperspectral remote sensing image into a pre-built adaptive mask module to obtain a mask pixel block corresponding to the pixel block includes: acquiring at least one pixel block of the hyperspectral remote sensing image; obtaining a central spectral vector in the pixel block based on the at least one pixel block; calculating, based on the pixel block and the central spectral vector, the Euclidean distance similarity between the central spectral vector and other pixel points in the pixel block except the central spectral vector; and generating an adaptive sampling mask matrix based on the Euclidean distance similarity to perform masking based on the adaptive sampling mask matrix to obtain the mask pixel block.
[0009] Optionally, in one embodiment of the present application, the mask pixel block is input into a pre-constructed Brownian distance covariance representation module to obtain the predicted label corresponding to the pixel block using the Brownian distance covariance representation module, including: extracting spectral information of the mask pixel block using deep convolution and deep deconvolution to obtain a first Brownian distance covariance matrix and a second Brownian distance covariance matrix of the mask pixel block; constructing a dual-channel Brownian distance covariance matrix based on the first Brownian distance covariance matrix and the second Brownian distance covariance matrix; and obtaining the predicted label using the dual-channel Brownian distance covariance matrix and a fully connected layer.
[0010] Optionally, in one embodiment of the present application, the adaptive mask module and the Brownian distance covariance representation module are trained based on the predicted label to obtain a small sample classification model of the hyperspectral remote sensing image, including: using a Gaussian kernel triplet loss function to calculate the Gaussian kernel triplet loss between the predicted label and the true label; using a cross entropy loss function to calculate the cross entropy loss between the predicted label and the true label; obtaining the back propagation loss between the predicted label and the true label based on the Gaussian kernel triplet loss and the cross entropy loss, and using the back propagation loss to train the adaptive mask module and the Brownian distance covariance representation module to obtain the small sample classification model.
[0011] Optionally, in one embodiment of the present application, the calculation formula of the back propagation loss may be but is not limited to:
[0012] L=λL KT +L CE ,
[0013] Among them, L KT is the Gaussian kernel triplet loss function, L CE is the cross entropy loss function, and λ is a hyperparameter used to weigh the two losses.
[0014] The second aspect of the present application provides a hyperspectral remote sensing image classification device based on a small sample classification model, including: a first generation module, used to input a pixel block of a hyperspectral remote sensing image into a pre-constructed adaptive mask module to obtain a mask pixel block corresponding to the pixel block; a second generation module, used to input the mask pixel block into a pre-constructed Brownian distance covariance representation module to obtain a predicted label corresponding to the pixel block using the Brownian distance covariance representation module; a third generation module, used to train the adaptive mask module and the Brownian distance covariance representation module based on the predicted label to obtain a small sample classification model of the hyperspectral remote sensing image, so as to obtain a classification result of the hyperspectral remote sensing image using the small sample classification model.
[0015] Optionally, in one embodiment of the present application, it also includes: a preprocessing module, which is used to obtain an initial hyperspectral remote sensing image of the sample to be classified before inputting the pixel block of the hyperspectral remote sensing image into a pre-built adaptive mask module, and preprocess the initial hyperspectral remote sensing image to obtain a hyperspectral remote sensing image; a fourth generation module, which is used to generate pixel blocks of the hyperspectral remote sensing image and real labels corresponding to the pixel blocks based on the hyperspectral remote sensing image.
[0016] Optionally, in one embodiment of the present application, the first generation module includes: an acquisition unit, used to acquire at least one pixel block of a hyperspectral remote sensing image; a first generation unit, used to obtain a central spectral vector in the pixel block based on the at least one pixel block; a first calculation unit, used to calculate the Euclidean distance similarity between the central spectral vector and other pixel points in the pixel block except the central spectral vector based on the pixel block and the central spectral vector; and a second generation unit, used to generate an adaptive sampling mask matrix based on the Euclidean distance similarity, so as to perform masking based on the adaptive sampling mask matrix to obtain the mask pixel block.
[0017] Optionally, in one embodiment of the present application, the second generation module includes: an extraction unit, used to extract the spectral information of the mask pixel block using deep convolution and deep deconvolution to obtain a first Brownian distance covariance matrix and a second Brownian distance covariance matrix of the mask pixel block; a construction unit, used to construct a dual-channel Brownian distance covariance matrix based on the first Brownian distance covariance matrix and the second Brownian distance covariance matrix; a third generation unit, used to obtain the predicted label using the dual-channel Brownian distance covariance matrix and a fully connected layer.
[0018] Optionally, in one embodiment of the present application, the third generation module includes: a second calculation unit, used to calculate the Gaussian kernel triplet loss between the predicted label and the true label using a Gaussian kernel triplet loss function; a third calculation unit, used to calculate the cross entropy loss between the predicted label and the true label using a cross entropy loss function; a fourth generation unit, used to obtain the back propagation loss between the predicted label and the true label based on the Gaussian kernel triplet loss and the cross entropy loss, and use the back propagation loss to train the adaptive mask module and the Brownian distance covariance representation module to obtain the small sample classification model.
[0019] Optionally, in one embodiment of the present application, the calculation formula of the back propagation loss may be but is not limited to:
[0020] L=λL KT +L CE ,
[0021] Among them, L KT is the Gaussian kernel triplet loss function, L CE is the cross entropy loss function, and λ is a hyperparameter used to weigh the two losses.
[0022] The third aspect of the present application provides an electronic device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hyperspectral remote sensing image classification method based on the small sample classification model as described in the above embodiment.
[0023] The fourth aspect of the present application provides a computer-readable storage medium, which stores a computer program. When the program is executed by a processor, it implements the above-mentioned hyperspectral remote sensing image classification method based on a small sample classification model.
[0024] The fifth aspect of the present application provides a computer program product, including a computer program, which, when executed, implements the above-mentioned hyperspectral remote sensing image classification method based on a small sample classification model.
[0025] The embodiment of the present application can perform adaptive masking based on the pixel blocks of the hyperspectral remote sensing image to obtain the mask pixel blocks corresponding to the pixel blocks, generate the corresponding prediction labels through the pre-constructed Brownian distance covariance representation module, and train the adaptive mask module and the Brownian distance covariance representation module based on the prediction labels, thereby obtaining a small sample classification model to obtain the classification results of the hyperspectral remote sensing image, alleviate the problem of inconsistent spatial coverage of objects through mask pixel blocks, and use the Brownian distance covariance representation module to mine the nonlinear correlation between different spectral dimensions. By training the adaptive mask module and the Brownian distance covariance representation module, the features of the labeled samples are mapped to a high-dimensional space to characterize the complex nonlinear relationship between them, and better generalize the prior information to the samples to be predicted. In this way, the problems in the related technology such as inconsistent spatial coverage of objects, difficulty in accurately extracting spatial context information, mining nonlinear correlations between different spectral dimensions, and inability to effectively obtain and summarize the information of limited prior samples are solved due to the complexity and diversity of objects.
[0026] Additional aspects and advantages of the present application will be given in part in the description below, and in part will become apparent from the description below, or will be learned through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] The above and / or additional aspects and advantages of the present application will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:
[0028] Figure 1 A flowchart of a hyperspectral remote sensing image classification method based on a small sample classification model provided according to an embodiment of the present application;
[0029] Figure 2A flowchart of the working principle of a hyperspectral remote sensing image classification method based on a small sample classification model provided according to an embodiment of the present application;
[0030] Figure 3 A block diagram of a hyperspectral remote sensing image classification device based on a small sample classification model provided according to an embodiment of the present application;
[0031] Figure 4 It is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. DETAILED DESCRIPTION
[0032] Embodiments of the present application are described in detail below, and examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals throughout represent the same or similar elements or elements having the same or similar functions. The embodiments described below with reference to the accompanying drawings are exemplary and are intended to be used to explain the present application, and should not be construed as limiting the present application.
[0033] The following describes a method and device for classifying hyperspectral remote sensing images based on a small sample classification model of an embodiment of the present application with reference to the accompanying drawings. In view of the problem mentioned in the above background technology that due to the complexity and diversity of the objects, the spatial coverage of the objects is inconsistent, it is difficult to accurately extract spatial context information, explore the nonlinear correlation between different spectral dimensions, and it is impossible to effectively obtain and summarize the information of limited prior samples, the present application provides a method for classifying hyperspectral remote sensing images based on a small sample classification model, in which an adaptive mask can be performed based on the pixel blocks of the hyperspectral remote sensing image to obtain a mask pixel block corresponding to the pixel block, and a corresponding prediction label is generated by a pre-constructed Brownian distance covariance representation module, and an adaptive mask module and a Brownian distance covariance representation module are trained based on the prediction label, thereby obtaining a small sample classification model to obtain the classification result of the hyperspectral remote sensing image, and the problem of inconsistent spatial coverage of the objects is alleviated by the mask pixel block, and the nonlinear correlation between different spectral dimensions is explored by using the Brownian distance covariance representation module, and the features of the labeled samples are mapped to a high-dimensional space by training the adaptive mask module and the Brownian distance covariance representation module, so as to characterize the complex nonlinear relationship between them and better generalize the prior information to the samples to be predicted. This solves the problems in related technologies caused by the complexity and diversity of ground objects, such as inconsistent spatial coverage of ground objects, difficulty in accurately extracting spatial context information, mining nonlinear correlations between different spectral dimensions, and inability to effectively obtain and summarize information from limited prior samples.
[0034] Specifically, Figure 1 The present invention provides a flowchart of a hyperspectral remote sensing image classification method based on a small sample classification model according to an embodiment of the present application.
[0035] like Figure 1As shown, the hyperspectral remote sensing image classification method based on the small sample classification model includes the following steps:
[0036] In step S101, a pixel block of a hyperspectral remote sensing image is input into a pre-built adaptive mask module to obtain a mask pixel block corresponding to the pixel block.
[0037] As a possible implementation method, the embodiment of the present application can input the pixel blocks of the hyperspectral remote sensing image into a pre-built adaptive mask module for masking, and then obtain the mask pixel blocks corresponding to each pixel block.
[0038] The embodiment of the present application can perform adaptive masking based on pixel blocks. By calculating adaptive Euclidean distance similarity, pixels that are dissimilar to pixels in the central spectral vector are masked and pixels that are similar to pixels in the central spectral vector are retained, thereby alleviating the problem of inconsistent spatial coverage of objects.
[0039] Optionally, in one embodiment of the present application, before inputting the pixel blocks of the hyperspectral remote sensing image into a pre-built adaptive mask module, it also includes: obtaining an initial hyperspectral remote sensing image of the sample to be classified, and preprocessing the initial hyperspectral remote sensing image to obtain a hyperspectral remote sensing image; generating pixel blocks of the hyperspectral remote sensing image and real labels corresponding to the pixel blocks based on the hyperspectral remote sensing image.
[0040] It can be understood that the hyperspectral remote sensing image in the embodiment of the present application is a data cube, which can be represented by a tensor, and the vector of each point in the tensor is the pixel radiation value corresponding to each band.
[0041] In some embodiments, the present invention can be used to classify the initial hyperspectral remote sensing image of the sample Preprocessing is performed to obtain a hyperspectral remote sensing image, and the hyperspectral remote sensing image is divided into pixel blocks to obtain at least one pixel block and a true label corresponding to each pixel block. Among them, H, W, and B are the length, width, and height of the hyperspectral remote sensing image, respectively.
[0042] Optionally, in one embodiment of the present application, a pixel block of a hyperspectral remote sensing image is input into a pre-built adaptive mask module to obtain a mask pixel block corresponding to the pixel block, including: acquiring at least one pixel block of the hyperspectral remote sensing image; obtaining a central spectral vector in the pixel block based on at least one pixel block; calculating the Euclidean distance similarity between the central spectral vector and other pixel points in the pixel block except the central spectral vector based on the pixel block and the central spectral vector; generating an adaptive sampling mask matrix based on the Euclidean distance similarity, masking based on the adaptive sampling mask matrix, and obtaining a mask pixel block.
[0043] As a possible implementation method, the embodiment of the present application can be to block the pixels of the hyperspectral remote sensing image As the input of the pre-built adaptive mask module, and from the pixel block P i,j Select the central spectral vector Then, calculate the central spectral vector x i,j and P i,j The Euclidean distance similarity SimED between other pixels in the image is used to obtain the Euclidean distance similarity mapping. It describes the spatial relationship modeled by the central spectral vector:
[0044] E i,j =EDSim(x i,j ,P i,j ).
[0045] Among them, e i′,j′ YesE i,j SimED value at (i′, j′) in , where i′=1,2,3,...,s, j′=1,2,3,...,s, e i′,j′ It can be expressed as, but not limited to:
[0046]
[0047] Among them, x i′,j′ P i,j Divide by x i,j The spectral vectors of other pixels besides i,j is normalized to a unified representation, e i′,j′ The closer the value is to 1, the i′,j′ and x i,j The higher the similarity.
[0048] Furthermore, in order to adaptively select high-confidence neighborhood pixels, the embodiment of the present application maps E i,j The mean value m s and standard deviation s s Set the sampling threshold t s Set to t s =m s –C×s s , where λ is a hyperparameter. Based on the sampling threshold t s , get the adaptive sampling mask matrix It can be expressed as, but not limited to:
[0049]
[0050] Among them, m i′,j′ is the value at (i′, j′) in M.
[0051] Furthermore, the embodiment of the present application performs masking based on the adaptive sampling mask matrix M to obtain a mask pixel block It can be expressed as, but not limited to:
[0052]
[0053] in, represents pixel-wise multiplication along the spectral dimension.
[0054] For example, the embodiment of the present application is written in PYTHON language, implemented using the classic deep learning framework PYTORCH, and the PYTHON remote sensing image reading and writing function is the implementation basis. Call the data processing library NUMPY library, SCIPY library and SPECTRAL library, input the remote sensing image file name to be read, and the remote sensing image is read into a tensor of size H×W×B. Each element in the tensor is the pixel radiation value corresponding to each band, where H is the length of the remote sensing image, W is the width of the remote sensing image, and B is the number of bands of the remote sensing image. The PYTHON remote sensing image reading and writing function is a well-known technology in the technical field and will not be described in detail here.
[0055] like Figure 2 As shown, in order to alleviate the problem of inconsistent spatial coverage of ground objects, the embodiment of the present application performs adaptive masking on pixel blocks. As the input of the pre-built adaptive mask module, and from the pixel block P i,j Select the central spectral vector Then, calculate the central spectral vector x i,j and P i,j The Euclidean distance similarity SimED between other pixels in the image is used to obtain the Euclidean distance similarity mapping.
[0056] Furthermore, in order to adaptively select high-confidence neighborhood pixels, the embodiment of the present application maps E i,j The mean value m s and standard deviation s s Set the sampling threshold t s , and based on the sampling threshold t s Get the adaptive sampling mask matrix Then, masking is performed based on the adaptive sampling mask matrix M to obtain the mask pixel block
[0057] In step S102, the mask pixel block is input into a pre-built Brownian distance covariance representation module, so as to obtain a predicted label corresponding to the pixel block by using the Brownian distance covariance representation module.
[0058] As a possible implementation method, the embodiment of the present application inputs the mask pixel block into a pre-built Brownian distance covariance representation module for feature extraction, and then inputs it into a multi-layer fully connected layer to convert it into category probability information, and selects the largest category probability as the predicted label of the pixel block.
[0059] The embodiment of the present application designs a lightweight dual-channel Brownian distance covariance representation module, in which the two channels use convolution and deconvolution to extract spectral features respectively, and then calculate their Brownian distance covariance representation to mine the nonlinear correlation between different spectral dimensions.
[0060] Optionally, in one embodiment of the present application, the mask pixel block is input into a pre-constructed Brownian distance covariance representation module to obtain a predicted label corresponding to the pixel block using the Brownian distance covariance representation module, including: extracting spectral information of the mask pixel block using deep convolution and deep deconvolution to obtain a first Brownian distance covariance matrix and a second Brownian distance covariance matrix of the mask pixel block; constructing a dual-channel Brownian distance covariance matrix based on the first Brownian distance covariance matrix and the second Brownian distance covariance matrix; and obtaining a predicted label using the dual-channel Brownian distance covariance matrix and a fully connected layer.
[0061] As a possible implementation method, the embodiment of the present application is to mask the pixel block X i,j As a pre-built Brownian distance covariance representation module, in order to obtain richer spectral feature representation, a parallel dual-channel structure is adopted without changing X i,j The original spatial size, where channel 1 extracts spectral information through deep convolution, and channel 2 extracts spectral information through deep deconvolution. The calculation process can be, but is not limited to, expressed as:
[0062]
[0063] Among them, DepthwiseConv and DepthwiseDeConv are depth convolution and depth deconvolution respectively. The output of the module is represented by the Brownian distance covariance in channel 1 and channel 2, respectively.
[0064] Furthermore, the embodiment of the present application converts the Brown distance covariance matrix As the distance covariance matrix Specifically, First it is reshaped into a 2D matrix Then calculate X c The Euclidean distance between any two bands It can be expressed as, but not limited to:
[0065]
[0066] in, and Represents X c The pth and qth spectral bands of is x p With x q The Euclidean distance of .
[0067] Therefore, the embodiment of the present application can generate a Euclidean distance matrix Then calculate the distance covariance matrix A c , which can be expressed as but not limited to:
[0068]
[0069] in, and They are The row mean, column mean, and average of all elements of .
[0070] Furthermore, in the embodiment of the present application, channel 1 and channel 2 respectively obtain the corresponding Brownian distance covariance matrix A c1 and A c2 , A c1 and A c2 Superposition is performed in the spectral dimension to obtain the dual-channel Brownian distance covariance matrix
[0071] In some embodiments, the present application embodiment converts the three-dimensional matrix A 0 Flattened into a one-dimensional feature vector, the spectral information is extracted through two fully connected layers, then nonlinear mapping is performed using Sigmoid and Dropout, and finally the predicted label A2 is obtained through a fully connected layer. The calculation process can be expressed as, but not limited to:
[0072] Alpha 1 =FC 2 (FC 1 (Flatten(A 0 ))),
[0073] A 2 =FC 3 (Dropout(Sigmoid(A 1 ))),
[0074] For example, in order to mine the nonlinear correlation between different spectral dimensions, the present embodiment uses a pre-built Brownian distance covariance representation module to uniformly model the spatial spectral information. i,jAs input, in order to obtain richer spectral feature representation, a parallel dual-channel structure is adopted, in which channel 1 extracts spectral information through deep convolution and channel 2 extracts spectral information through deep deconvolution.
[0075] In addition, the corresponding Brownian distance covariance matrix A can be obtained for channel 1 and channel 2 in the embodiment of the present application: c1 and A c2 , A c1 and A c2 Superposition is performed in the spectral dimension to obtain the dual-channel Brownian distance covariance matrix
[0076] Furthermore, in the embodiment of the present application, the three-dimensional matrix A 0 It is flattened into a one-dimensional feature vector, and the spectral information is extracted through two fully connected layers. Then, Sigmoid and Dropout are used for nonlinear mapping, and finally a fully connected layer is used to obtain the predicted label.
[0077] In step S103, an adaptive mask module and a Brownian distance covariance representation module are trained based on the predicted labels to obtain a small sample classification model of the hyperspectral remote sensing image, so as to obtain a classification result of the hyperspectral remote sensing image using the small sample classification model.
[0078] It can be understood by those skilled in the art that the embodiments of the present application can train an adaptive mask module and a Brownian distance covariance representation module based on predicted labels, calculate losses, and obtain a small sample classification model after multiple iterations, and use the small sample classification model to obtain classification results of hyperspectral remote sensing images.
[0079] The embodiment of the present application uses Gaussian kernel metric loss to map the features of labeled samples to a high-dimensional space to characterize the complex nonlinear relationship between them, which can better generalize the prior information to the samples to be predicted.
[0080] Optionally, in one embodiment of the present application, an adaptive mask module and a Brownian distance covariance representation module are trained based on the predicted label to obtain a small sample classification model for a hyperspectral remote sensing image, including: using a Gaussian kernel triplet loss function to calculate the Gaussian kernel triplet loss between the predicted label and the true label; using a cross entropy loss function to calculate the cross entropy loss between the predicted label and the true label; obtaining the back propagation loss between the predicted label and the true label based on the Gaussian kernel triplet loss and the cross entropy loss, and using the back propagation loss to train the adaptive mask module and the Brownian distance covariance representation module to obtain a small sample classification model. The calculation formula for the back propagation loss can be, but is not limited to,:
[0081] L=λL KT +L CE ,
[0082] Among them, L KT is the Gaussian kernel triplet loss function, L CE is the cross entropy loss function, and λ is a hyperparameter used to weigh the two losses.
[0083] As a possible implementation method, the embodiment of the present application can use Gaussian kernel triplet loss, cross entropy loss and back propagation loss to iteratively train the adaptive mask module and the Brownian distance covariance representation module to obtain a trained small sample classification model.
[0084] Among them, the embodiment of the present application can use the Gaussian kernel triplet loss function and the cross entropy loss function to calculate the back propagation loss L, which can be but is not limited to expressed as:
[0085] L=λL KT +L CE ,
[0086]
[0087] Among them, L KT is the Gaussian kernel triplet loss function, L CE is the cross entropy loss function, and λ is a hyperparameter used to weigh the two losses. i represents a sample feature, and N is the number of samples. (x i ,x p ) represents a positive sample pair, (x i ,x n ) represents a negative sample pair. Represents x i The loss caused by the most dissimilar positive sample, Represents x i The loss caused by the most similar negative sample. h(x) = max(0, x) is the hinge loss function, and α is a hyperparameter. Among them, U is the number of samples in the mini-batch, C is the total number of categories in the dataset, and y c and are the ground truth reference image and predicted label of the cth class respectively. k(x i ,x j ) represents the kernel distance function, and its expression can be but is not limited to:
[0088]
[0089] Among them, f(x i ) is the sample x i The characteristics of ||f(x i )-f(x j )|| 2 is f(x i) and f(x j ) between them. σ k is a standard deviation, and its expression can be, but is not limited to,:
[0090]
[0091] Among them, in the embodiment of the present application, σ k is the average distance multiplied by 2 k , the present embodiment uses five different values of standard deviation, namely N k =5, at this time, the range of this function value is 0 to N k The more similar two samples are, the closer its value is to 0.
[0092] For example, the embodiment of the present application can learn the distance measurement information between prior samples and generalize this prior information to unlabeled samples. Therefore, the Gaussian kernel triplet loss function, cross entropy loss function and back propagation loss can be used to repeatedly iteratively train the entire network to obtain a trained small sample classification model.
[0093] Furthermore, the embodiments of the present application are verified through comparative experiments.
[0094] (1) Dataset Introduction
[0095] The present application example selects Indian pine, Houston 2013 and Salinas hyperspectral datasets as experimental datasets.
[0096] Among them, the Indian pine was imaged by the airborne visible infrared imaging spectrometer XX in XX, and then the size of 145×145 was intercepted and marked for hyperspectral image classification test purposes. The imaging wavelength range of the XX imaging spectrometer is 0.4-2.5μm, and the ground objects are continuously imaged in 220 continuous bands. However, since the 104-108, 150-163 and 220 bands cannot be reflected by water, the remaining 200 bands after removing these 20 bands are generally used as the research object. The data has a total of 21025 pixels, but only 10249 pixels are ground object pixels, and the remaining 10776 pixels are background pixels. In actual classification, these pixels need to be eliminated. Since the intercepted area is all crops, there are a total of 16 categories, so different ground objects have relatively similar spectral curves, and the distribution of samples in these 16 categories is extremely uneven.
[0097] The Houston 2013 data was taken by the XX imaging spectrometer, and the dataset covers the University of Houston campus and surrounding urban areas. Its spatial resolution is 2.5 meters, and it contains a total of 144 spectral bands, with an imaging wavelength range of 0.364-1.046μm. The dataset contains a total of 15,029 ground object pixels and a total of 16 categories.
[0098] Like the Indian pine image, the Salinas data was also taken by the XX imaging spectrometer, and it is an image of the Salinas Valley in California, USA. Unlike the Indian pine dataset, its spatial resolution reaches 3.7m. The image originally has 224 bands. Similarly, the image generally uses the 204 bands left after removing the 108-112, 154-167, and 224 bands that cannot be reflected by water. The size of the image is 512×217, so it contains a total of 111,104 pixels, of which 56,975 pixels are background pixels, and 54,129 pixels can be used for classification. These pixels are divided into 16 categories in total.
[0099] (2) Introduction to comparison method
[0100] Among them, the embodiments of the present application respectively use a cross-domain small sample network (method 1), a class covariance measurement network (method 2), a deep measurement feature embedding network (method 3), a composite neighborhood-aware convolutional measurement network (method 4), a spatial-spectral twin network (method 5), a dual-metric multi-level relationship network (method 6) and a self-pooling Transformer network (method 7) for classification comparison.
[0101] (3) Introduction to evaluation indicators
[0102] The classification evaluation index of the embodiment of the present application can adopt a quantitative evaluation method. Data set 1 selects a total of 80 pixels as training samples and 10169 pixels as test samples, data set 2 selects a total of 75 pixels as training samples and 14954 pixels as test samples, and data set 3 selects a total of 80 pixels as training samples and 54049 pixels as test samples. The evaluation index can be, but is not limited to, the kappa coefficient, OA (Overall Accuracy) and AA (Average Accuracy).
[0103] Among them, the kappa coefficient is an authoritative evaluation indicator used to evaluate classification problems. The larger the kappa coefficient, the higher the accuracy.
[0104] OA is an evaluation indicator used to evaluate classification problems. The higher the overall accuracy, the higher the detection accuracy.
[0105] AA is an evaluation index used to evaluate classification problems. It is an index to measure the accuracy of the results calculated by category.
[0106] (4) Verification results
[0107] Kappa coefficient:
[0108] In the comparative test of the embodiment of the present application, the highest Kappa coefficient that can be obtained by methods 1 to 3 is selected to evaluate the detection ability of methods 1 to 7. Among them, the confusion matrix obtained by the sample of the embodiment of the present application is shown in Table 1, wherein Table 1 is a schematic table of the confusion matrix provided according to an embodiment of the present application.
[0109] Table 1
[0110]
[0111] Among them, TTO indicates the number of cases whose labels are category 1 and are predicted to be category 1; TF indicates the number of cases whose actual category is category 2 but are predicted to be category 1. FT indicates the number of cases whose actual category is category 1 but are predicted to be category 2. TTT indicates the number of cases whose labels are category 2 and are predicted to be category 2; NCO is the sum of TTO and FT, NCT is the sum of TF and TTT, NRO is the sum of TTO and TF, NRT is the sum of FT and TTT, and N is the total number of samples.
[0112] Furthermore, the embodiment of the present application calculates the Kappa coefficient according to the confusion matrix, and its calculation formula can be expressed as but not limited to:
[0113]
[0114] OA:
[0115] The calculation method of OA in the embodiment of the present application is also based on the confusion matrix shown in Table 1, and its calculation formula can be expressed as but not limited to:
[0116]
[0117] AA:
[0118] The calculation method of AA in the embodiment of the present application is also based on the confusion matrix shown in Table 1, and its calculation formula can be expressed as but not limited to:
[0119]
[0120] Furthermore, the embodiments of the present application are compared with the comparative experiments of Method 1-Method 7 and the embodiments of the present application based on the three evaluation indicators of kappa coefficient, OA and AA. The evaluation indicators are shown in Table 2, wherein Table 2 is a schematic table of comparative test results provided according to an embodiment of the present application.
[0121] Table 2
[0122]
[0123] As can be seen from Table 2, the embodiment of the present application has achieved the best results in the three indicators of OA, AA and Kappa value. Compared with other methods, the embodiment of the present application has higher classification accuracy and stronger classification ability, fully considers the correlation between prior samples and the correlation between spectral bands, and improves the classification accuracy.
[0124] Combine the following Figure 2 As shown, the working principle of the hyperspectral remote sensing image classification method based on a small sample classification model proposed in the embodiment of the present application is introduced with a specific embodiment.
[0125] in, Figure 2 The present invention is a flowchart of the working principle of a hyperspectral remote sensing image classification method based on a small sample classification model provided according to an embodiment of the present application.
[0126] Step S201: Obtain pixel blocks of a hyperspectral remote sensing image and true labels corresponding to the pixel blocks.
[0127] Among them, the embodiment of the present application can preprocess the initial hyperspectral remote sensing image of the sample to be classified to obtain a hyperspectral remote sensing image, and divide the hyperspectral remote sensing image into pixel blocks to obtain at least one pixel block and a true label corresponding to each pixel block.
[0128] Step S202: construct an adaptive mask module.
[0129] Among them, the embodiment of the present application can input the pixel blocks of the hyperspectral remote sensing image into a pre-built adaptive mask module for masking, and then obtain the mask pixel blocks corresponding to each pixel block.
[0130] Step S203: construct a Brownian distance covariance representation module.
[0131] In this embodiment of the present application, the mask pixel block X i,j As input, a parallel dual-channel structure is adopted to obtain the predicted label using the pre-built Brownian distance covariance representation module.
[0132] Furthermore, the embodiment of the present application obtains a small sample classification model of a hyperspectral remote sensing image based on an adaptive mask module and a Brownian distance covariance representation module. Among them, the embodiment of the present application can use Gaussian kernel triplet loss, cross entropy loss and back propagation loss to repeatedly iteratively train the adaptive mask module and the Brownian distance covariance representation module, thereby obtaining a trained small sample classification model.
[0133] Furthermore, the embodiments of the present application are verified through comparative experiments. As shown in Table 2, the embodiments of the present application achieve the best results in the three indicators of OA, AA and Kappa value, and have higher classification accuracy and stronger classification ability.
[0134] According to the hyperspectral remote sensing image classification method based on a small sample classification model proposed in the embodiment of the present application, an adaptive mask can be performed based on the pixel blocks of the hyperspectral remote sensing image to obtain the mask pixel blocks corresponding to the pixel blocks, and the corresponding prediction labels are generated through the pre-constructed Brownian distance covariance representation module, and the adaptive mask module and the Brownian distance covariance representation module are trained based on the prediction labels, so as to obtain the small sample classification model to obtain the classification results of the hyperspectral remote sensing image, and the problem of inconsistent spatial coverage of the ground objects is alleviated by the mask pixel blocks, and the nonlinear correlation between different spectral dimensions is mined by using the Brownian distance covariance representation module. By training the adaptive mask module and the Brownian distance covariance representation module, the features of the labeled samples are mapped to a high-dimensional space to characterize the complex nonlinear relationship between them, and the prior information is better generalized to the samples to be predicted. Thus, the problems in the related art that the spatial coverage of the ground objects is inconsistent due to the complexity and diversity of the ground objects, it is difficult to accurately extract spatial context information, to mine the nonlinear correlation between different spectral dimensions, and it is impossible to effectively obtain and summarize the information of limited prior samples are solved.
[0135] Next, a hyperspectral remote sensing image classification device based on a small sample classification model proposed in an embodiment of the present application is described with reference to the accompanying drawings.
[0136] Figure 3 A block diagram of a hyperspectral remote sensing image classification device based on a small sample classification model provided according to an embodiment of the present application.
[0137] like Figure 3 As shown, the hyperspectral remote sensing image classification device 10 based on a small sample classification model includes: a first generation module 100 , a second generation module 200 and a third generation module 300 .
[0138] The first generating module 100 is used to input the pixel block of the hyperspectral remote sensing image into a pre-built adaptive mask module to obtain a mask pixel block corresponding to the pixel block.
[0139] The second generation module 200 is used to input the mask pixel block into a pre-built Brownian distance covariance representation module to obtain a prediction label corresponding to the pixel block using the Brownian distance covariance representation module.
[0140] The third generation module 300 is used to train the adaptive mask module and the Brownian distance covariance representation module based on the predicted labels to obtain a small sample classification model of the hyperspectral remote sensing image, so as to obtain the classification result of the hyperspectral remote sensing image using the small sample classification model.
[0141] Optionally, in one embodiment of the present application, it also includes: a preprocessing module and a fourth generating module.
[0142] Among them, the preprocessing module is used to obtain the initial hyperspectral remote sensing image of the sample to be classified before inputting the pixel block of the hyperspectral remote sensing image into the pre-built adaptive mask module, and preprocess the initial hyperspectral remote sensing image to obtain the hyperspectral remote sensing image.
[0143] The fourth generating module is used to generate pixel blocks of the hyperspectral remote sensing image and real labels corresponding to the pixel blocks based on the hyperspectral remote sensing image.
[0144] Optionally, in one embodiment of the present application, the first generating module 100 includes: an acquiring unit, a first generating unit, a first calculating unit and a second generating unit.
[0145] Wherein, the acquisition unit is used to acquire at least one pixel block of the hyperspectral remote sensing image.
[0146] The first generating unit is configured to obtain a central spectrum vector in a pixel block based on at least one pixel block.
[0147] The first calculation unit is used to calculate the Euclidean distance similarity between the central spectrum vector and other pixel points in the pixel block except the central spectrum vector according to the pixel block and the central spectrum vector.
[0148] The second generating unit is used to generate an adaptive sampling mask matrix based on the Euclidean distance similarity, so as to perform masking based on the adaptive sampling mask matrix to obtain a mask pixel block.
[0149] Optionally, in one embodiment of the present application, the second generating module 200 includes: an extracting unit, a constructing unit and a third generating unit.
[0150] The extraction unit is used to extract the spectral information of the mask pixel block by using deep convolution and deep deconvolution to obtain a first Brownian distance covariance matrix and a second Brownian distance covariance matrix of the mask pixel block.
[0151] A construction unit is used to construct a dual-channel Brownian distance covariance matrix based on the first Brownian distance covariance matrix and the second Brownian distance covariance matrix.
[0152] The third generation unit is used to obtain the predicted label using the dual-channel Brownian distance covariance matrix and the fully connected layer.
[0153] Optionally, in one embodiment of the present application, the third generating module 300 includes: a second calculating unit, a third calculating unit and a fourth generating unit.
[0154] The second computing unit is used to calculate the Gaussian kernel triplet loss between the predicted label and the true label using the Gaussian kernel triplet loss function.
[0155] The third computing unit is used to calculate the cross entropy loss between the predicted label and the true label using the cross entropy loss function.
[0156] The fourth generation unit is used to obtain the back propagation loss between the predicted label and the true label based on the Gaussian kernel triplet loss and the cross entropy loss, and use the back propagation loss to train the adaptive mask module and the Brownian distance covariance representation module to obtain a small sample classification model.
[0157] Optionally, in one embodiment of the present application, the calculation formula of the back propagation loss may be, but is not limited to,:
[0158] L=λL KT +L CE ,
[0159] Among them, L KT is the Gaussian kernel triplet loss function, L CE is the cross entropy loss function, and λ is a hyperparameter used to weigh the two losses.
[0160] It should be noted that the aforementioned explanation of the embodiment of the hyperspectral remote sensing image classification method based on a small sample classification model is also applicable to the hyperspectral remote sensing image classification device based on a small sample classification model of this embodiment, and will not be repeated here.
[0161] According to the hyperspectral remote sensing image classification device based on the small sample classification model proposed in the embodiment of the present application, an adaptive mask can be performed based on the pixel blocks of the hyperspectral remote sensing image to obtain the mask pixel blocks corresponding to the pixel blocks, and the corresponding prediction labels are generated through the pre-constructed Brownian distance covariance representation module, and the adaptive mask module and the Brownian distance covariance representation module are trained based on the prediction labels, so as to obtain the small sample classification model to obtain the classification results of the hyperspectral remote sensing image, and the problem of inconsistent spatial coverage of the ground objects is alleviated by the mask pixel blocks, and the nonlinear correlation between different spectral dimensions is mined by using the Brownian distance covariance representation module. By training the adaptive mask module and the Brownian distance covariance representation module, the features of the labeled samples are mapped to the high-dimensional space to characterize the complex nonlinear relationship between them, and the prior information is better generalized to the samples to be predicted. Thus, the problems in the related technology that the spatial coverage of the ground objects is inconsistent due to the complexity and diversity of the ground objects, it is difficult to accurately extract spatial context information, to mine the nonlinear correlation between different spectral dimensions, and it is impossible to effectively obtain and summarize the information of limited prior samples are solved.
[0162] Figure 4 This is a schematic diagram of the structure of an electronic device provided according to an embodiment of the present application. The electronic device may include:
[0163] Memory 401 , processor 402 , and a computer program stored in the memory 401 and executable on the processor 402 .
[0164] When the processor 402 executes the program, the hyperspectral remote sensing image classification method based on the small sample classification model provided in the above embodiment is implemented.
[0165] Furthermore, the electronic device further comprises:
[0166] The communication interface 403 is used for communication between the memory 401 and the processor 402 .
[0167] The memory 401 is used to store computer programs that can be executed on the processor 402 .
[0168] The memory 401 may include a high-speed RAM memory, and may also include a non-volatile memory (non-volatile memory), such as at least one disk memory.
[0169] If the memory 401, the processor 402 and the communication interface 403 are implemented independently, the communication interface 403, the memory 401 and the processor 402 can be connected to each other through a bus and communicate with each other. The bus can be an Industry Standard Architecture (ISA) bus, a Peripheral Component Interconnect (PCI) bus or an Extended Industry Standard Architecture (EISA) bus. The bus can be divided into an address bus, a data bus, a control bus, etc. For ease of representation, Figure 4 Only one thick line is used in the diagram, but this does not mean that there is only one bus or only one type of bus.
[0170] Optionally, in a specific implementation, if the memory 401, the processor 402 and the communication interface 403 are integrated on a chip, the memory 401, the processor 402 and the communication interface 403 can communicate with each other through an internal interface.
[0171] The processor 402 may be a central processing unit (CPU), or an application specific integrated circuit (ASIC), or one or more integrated circuits configured to implement the embodiments of the present application.
[0172] An embodiment of the present application also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the above-mentioned hyperspectral remote sensing image classification method based on a small sample classification model.
[0173] An embodiment of the present application also provides a computer program product, including a computer program, which, when executed, implements the above-mentioned hyperspectral remote sensing image classification method based on a small sample classification model.
[0174] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "example", "specific example", or "some examples" etc. means that the specific features, structures, materials or characteristics described in conjunction with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described may be combined in any one or N embodiments or examples in a suitable manner. In addition, those skilled in the art may combine and combine the different embodiments or examples described in this specification and the features of the different embodiments or examples, without contradiction.
[0175] In addition, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Therefore, a feature defined as "first" or "second" may explicitly or implicitly include at least one of the features. In the description of this application, "N" means at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0176] Any process or method description in a flowchart or otherwise described herein may be understood to represent a module, fragment or portion of code comprising one or N executable instructions for implementing the steps of a custom logical function or process, and the scope of the preferred embodiments of the present application includes alternative implementations in which functions may not be performed in the order shown or discussed, including performing functions in a substantially simultaneous manner or in reverse order depending on the functions involved, which should be understood by technicians in the technical field to which the embodiments of the present application belong.
[0177] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as an ordered list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by an instruction execution system, device or apparatus (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or apparatus and execute instructions), or in combination with these instruction execution systems, devices or apparatuses. For the purpose of this specification, "computer-readable medium" can be any device that can contain, store, communicate, propagate or transmit a program for use by an instruction execution system, device or apparatus, or in combination with these instruction execution systems, devices or apparatuses. More specific examples of computer-readable media (a non-exhaustive list) include the following: an electrical connection with one or N wirings (electronic devices), a portable computer disk box (magnetic device), a random access memory (RAM), a read-only memory (ROM), an erasable and programmable read-only memory (EPROM or flash memory), a fiber optic device, and a portable compact disk read-only memory (CDROM). In addition, the computer-readable medium may even be paper or other suitable medium on which the program is printed, since the program may be obtained electronically by optically scanning the paper or other medium and then editing, interpreting or processing in other suitable ways as necessary and then storing it in a computer memory.
[0178] It should be understood that the various parts of the present application can be implemented by hardware, software, firmware or a combination thereof. In the above embodiment, the N steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. If implemented by hardware, as in another embodiment, it can be implemented by any one or a combination of multiple of the following technologies known in the art: a discrete logic circuit having a logic gate circuit for implementing a logic function for a data signal, a dedicated integrated circuit having a suitable combination of logic gate circuits, a programmable gate array (PGA), a field programmable gate array (FPGA), etc.
[0179] A person skilled in the art may understand that all or part of the steps in the method for implementing the above-mentioned embodiment may be completed by instructing related hardware through a program, and the program may be stored in a computer-readable storage medium, which, when executed, includes one or a combination of the steps of the method embodiment.
[0180] In addition, each functional unit in each embodiment of the present application may be integrated into a processing module, or each unit may exist physically separately, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. If the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium.
[0181] The storage medium mentioned above may be a read-only memory, a magnetic disk or an optical disk, etc. Although the embodiments of the present application have been shown and described above, it can be understood that the above embodiments are exemplary and cannot be understood as limiting the present application. A person of ordinary skill in the art may change, modify, replace and modify the above embodiments within the scope of the present application.
Claims
1. A hyperspectral remote sensing image classification method based on a small sample classification model, characterized in that: The following steps are involved: Inputting a pixel block of a hyperspectral remote sensing image into a pre-built adaptive mask module to obtain a mask pixel block corresponding to the pixel block; Inputting the mask pixel block into a pre-constructed Brownian distance covariance representation module, so as to obtain a predicted label corresponding to the pixel block by using the Brownian distance covariance representation module; The adaptive mask module and the Brownian distance covariance representation module are trained based on the predicted labels to obtain a small sample classification model of the hyperspectral remote sensing image, so as to obtain a classification result of the hyperspectral remote sensing image using the small sample classification model.
2. The method according to claim 1, characterized in that Before the pixel blocks of the hyperspectral remote sensing image are input into the pre-built adaptive mask module, it also includes: Acquire an initial hyperspectral remote sensing image of the sample to be classified, and preprocess the initial hyperspectral remote sensing image to obtain a hyperspectral remote sensing image; A pixel block of the hyperspectral remote sensing image and a true label corresponding to the pixel block are generated based on the hyperspectral remote sensing image.
3. The method according to claim 1, characterized in that The step of inputting the pixel block of the hyperspectral remote sensing image into a pre-built adaptive mask module to obtain a mask pixel block corresponding to the pixel block includes: Acquire at least one pixel block of a hyperspectral remote sensing image; Obtaining a central spectral vector in the pixel block based on the at least one pixel block; Calculating the Euclidean distance similarity between the central spectrum vector and other pixel points in the pixel block except the central spectrum vector according to the pixel block and the central spectrum vector; An adaptive sampling mask matrix is generated based on the Euclidean distance similarity, and masking is performed based on the adaptive sampling mask matrix to obtain the mask pixel block.
4. The method according to claim 1, characterized in that: The step of inputting the mask pixel block into a pre-built Brownian distance covariance representation module to obtain a prediction label corresponding to the pixel block by using the Brownian distance covariance representation module includes: Extracting spectral information of the mask pixel block by using deep convolution and deep deconvolution to obtain a first Brownian distance covariance matrix and a second Brownian distance covariance matrix of the mask pixel block; Constructing a dual-channel Brownian distance covariance matrix based on the first Brownian distance covariance matrix and the second Brownian distance covariance matrix; The predicted label is obtained using the dual-channel Brownian distance covariance matrix and the fully connected layer.
5. The method according to claim 2, characterized in that: The step of training the adaptive mask module and the Brownian distance covariance representation module based on the predicted labels to obtain a small sample classification model for the hyperspectral remote sensing image includes: Calculating the Gaussian kernel triplet loss between the predicted label and the true label using a Gaussian kernel triplet loss function; Calculating the cross entropy loss between the predicted label and the true label using a cross entropy loss function; The back propagation loss between the predicted label and the true label is obtained based on the Gaussian kernel triplet loss and the cross entropy loss, and the adaptive mask module and the Brownian distance covariance representation module are trained using the back propagation loss to obtain the small sample classification model.
6. The method according to claim 5, characterized in that The calculation formula of the back propagation loss is: L=λL KT +L CE , Among them, L KT is the Gaussian kernel triplet loss function, L CE is the cross entropy loss function, and λ is a hyperparameter used to weigh the two losses.
7. A hyperspectral remote sensing image classification device based on a small sample classification model, characterized in that: include: A first generation module is used to input a pixel block of a hyperspectral remote sensing image into a pre-built adaptive mask module to obtain a mask pixel block corresponding to the pixel block; A second generation module is used to input the mask pixel block into a pre-constructed Brownian distance covariance representation module to obtain a prediction label corresponding to the pixel block using the Brownian distance covariance representation module; The third generation module is used to train the adaptive mask module and the Brownian distance covariance representation module based on the predicted label to obtain a small sample classification model of the hyperspectral remote sensing image, so as to obtain the classification result of the hyperspectral remote sensing image using the small sample classification model.
8. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the hyperspectral remote sensing image classification method based on a small sample classification model as described in any one of claims 1 to 6.
9. A computer-readable storage medium having a computer program stored thereon, characterized in that: The program is executed by a processor to implement the hyperspectral remote sensing image classification method based on a small sample classification model as described in any one of claims 1 to 6.
10. A computer program product, characterized in that It comprises a computer program, which, when executed, is used to implement the hyperspectral remote sensing image classification method based on a small sample classification model as described in any one of claims 1 to 6.
Citation Information
Patent Citations
Small sample SAR image target identification method based on depth Brown distance
CN115481659A
Hyperspectral remote sensing image classification method based on mask spectral-space feature prediction
CN117115553A
Hyperspectral image classification method and apparatus, electronic device and storage medium
WO2022257407A1