Hyperspectral image classification method based on dictionary learning and related products

Through the hyperspectral image classification method based on dictionary learning, the problems of ‘catastrophic forgetting’ and limited scalability in the existing technology are solved, and the combination of high classification accuracy and high scalability is achieved, which avoids the degradation of old data classification performance and reduces storage and computing costs.

CN119992201AActive Publication Date: 2025-05-13NANCHANG HANGKONG UNIVERSITY
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202510088575.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-13
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

When facing new categories of data, existing hyperspectral image classification technology is prone to ‘catastrophic forgetting’, that is, the classification performance of old categories of data has significantly decreased, and the method based on playback-free incremental learning is limited in its scalability.

Method used

The hyperspectral image classification method based on dictionary learning is adopted. By obtaining dictionary and sparse matrices of multiple batches of hyperspectral data, the classification model is trained separately, and the sparse matrix of the images to be classified is input to each model to obtain the classification results. The result with the highest probability is finally selected as the final classification result.

Benefits of technology

This method can maintain high classification accuracy while having high scalability to prevent ‘catastrophic forgetting’, and since the old and new models do not interfere with each other, it can effectively reduce storage and computing costs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119992201A_ABST
    Figure CN119992201A_ABST
Patent Text Reader

Abstract

The invention discloses a hyperspectral image classification method based on dictionary learning and a related product, and relates to the technical field of image classification, and the method comprises the steps: obtaining n batches of hyperspectral data and a to-be-classified hyperspectral image; acquiring a hyperspectral data dictionary of the first batch of hyperspectral data in the n batches of hyperspectral data by using a dictionary learning algorithm; respectively acquiring a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary by utilizing a dictionary learning algorithm; training a classification model by using the sparse matrix of each batch of hyperspectral data to obtain n hyperspectral image classification models; obtaining a sparse matrix of the to-be-classified hyperspectral image according to the hyperspectral data dictionary by using a dictionary learning algorithm; inputting the sparse matrix of the to-be-classified hyperspectral image into each hyperspectral image classification model to obtain n classification results; and selecting the classification probability result with the highest probability in all the classification results as a final classification result. The method has high classification precision and high expansibility at the same time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of image classification, and in particular to a hyperspectral image classification method based on dictionary learning and related products. Background Art

[0002] Hyperspectral image classification technology plays an important role in environmental protection, land planning and other fields. Although many mature algorithms have been proposed in recent years, most algorithms believe that the data categories that need to be classified are immutable and can only recognize the categories that the model has learned. When encountering new category data, the model cannot maintain the ability to continue learning. Specifically, if new category data is encountered and the model is directly trained using the new data, the model's recognition ability will be biased towards the new category data, resulting in a significant decrease in the classification performance of the old category data. People call this phenomenon "catastrophic forgetting." If the new and old data are trained together, a lot of memory, time and other expenses will be consumed, greatly increasing the cost.

[0003] Incremental learning without replay is to train the model with new data only without using old data, and to make the model maintain good classification ability for both new and old data. Currently, research on incremental learning without replay is still in its infancy, with relatively few studies, and can be roughly divided into two categories:

[0004] 1. Regularized non-replay incremental learning: This method mainly adds constraints to the model to make the output of the new and old models as consistent as possible, thereby ensuring the model's ability to process old data. However, strong constraints sometimes cause the data to deviate from the original distribution, resulting in poor final classification results.

[0005] 2. Methods based on network structure adjustment: This type of method trains parameters of different parts of the network according to different data categories, so that the entire network can continuously adapt to new data; or increase network nodes to adapt to new data. However, the capacity of the network is limited. When encountering a large number of batches of new data, this type of method is not effective, resulting in limited scalability of this type of method. Summary of the invention

[0006] The purpose of this application is to provide a hyperspectral image classification method and related products based on dictionary learning, which can have both high classification accuracy and high scalability.

[0007] To achieve the above objectives, this application provides the following solutions:

[0008] In a first aspect, the present application provides a hyperspectral image classification method based on dictionary learning, and the hyperspectral image classification method based on dictionary learning includes:

[0009] Obtain n batches of hyperspectral data and hyperspectral images to be classified;

[0010] Obtaining a hyperspectral data dictionary of a first batch of hyperspectral data among the n batches of hyperspectral data by using a dictionary learning algorithm;

[0011] Using a dictionary learning algorithm to obtain a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary;

[0012] The sparse matrix of each batch of hyperspectral data is used to train the classification model to obtain n hyperspectral image classification models;

[0013] Obtaining a sparse matrix of the hyperspectral image to be classified according to the hyperspectral data dictionary using a dictionary learning algorithm;

[0014] Inputting the sparse matrix of the hyperspectral image to be classified into each of the hyperspectral image classification models respectively to obtain n classification results; each of the classification results includes: a classification probability result and a corresponding probability;

[0015] The classification probability result with the highest probability among all classification results is selected as the final classification result.

[0016] Optionally, obtaining a hyperspectral data dictionary of a first batch of hyperspectral data among the n batches of hyperspectral data by using a dictionary learning algorithm specifically includes:

[0017] A hyperspectral data dictionary of a first batch of hyperspectral data among the n batches of hyperspectral data is obtained by using a K-singular value decomposition algorithm.

[0018] Optionally, the using a dictionary learning algorithm to obtain a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary specifically includes:

[0019] According to the hyperspectral data dictionary, an orthogonal matching pursuit algorithm is used to obtain a sparse matrix of each batch of hyperspectral data.

[0020] Optionally, a formula for obtaining a hyperspectral data dictionary of a first batch of hyperspectral data among n batches of hyperspectral data using a dictionary learning algorithm is:

[0021]

[0022] Wherein, D is the hyperspectral data dictionary; S1 is the sparse matrix; X1 is the first batch of hyperspectral data in the hyperspectral data; and L is the sparse constraint threshold.

[0023] Optionally, the number of atoms in the hyperspectral data dictionary is selected to be 100; and the sparse constraint threshold is selected to be 10.

[0024] Optionally, the classification model is a support vector machine model of a linear kernel function;

[0025] The input for training a classification model is a sparse matrix, and the output is the category and probability corresponding to the sparse matrix.

[0026] Optionally, the category of each batch of hyperspectral data is different from the categories of other batches of hyperspectral data.

[0027] In a second aspect, the present application provides a computer device, comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement any of the above-described hyperspectral image classification methods based on dictionary learning.

[0028] In a third aspect, the present application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements any of the above-mentioned hyperspectral image classification methods based on dictionary learning.

[0029] In a fourth aspect, the present application provides a computer program product, including a computer program, which, when executed by a processor, implements any one of the above-mentioned hyperspectral image classification methods based on dictionary learning.

[0030] According to the specific embodiments provided in this application, this application discloses the following technical effects:

[0031] The present application provides a method for classifying hyperspectral images based on dictionary learning and related products, the method comprising: obtaining n batches of hyperspectral data and hyperspectral images to be classified; obtaining a hyperspectral data dictionary of the first batch of hyperspectral data in the n batches of hyperspectral data by using a dictionary learning algorithm; obtaining a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary by using a dictionary learning algorithm; training a classification model by using the sparse matrix of each batch of hyperspectral data to obtain n hyperspectral image classification models; obtaining a sparse matrix of the hyperspectral images to be classified according to the hyperspectral data dictionary by using a dictionary learning algorithm; inputting the sparse matrix of the hyperspectral images to be classified into each hyperspectral image classification model to obtain n classification results; each classification result includes: a classification probability result and a corresponding probability; selecting the classification probability result with the highest probability among all classification results as the final classification result. The present application uses the same dictionary to obtain the sparse matrices of different batches of hyperspectral data, so that the new and old data are converted to a unified feature space, ensuring the uniformity of the data. Since the new and old models do not interfere with each other, disaster forgetting can be prevented to a certain extent, thereby improving the classification accuracy. At the same time, the classification models of each batch of this application are trained separately and do not affect each other, so it has high scalability. Therefore, this application can have both high classification accuracy and high scalability. BRIEF DESCRIPTION OF THE DRAWINGS

[0032] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0033] Figure 1 This is an application environment diagram of a hyperspectral image classification method based on dictionary learning in one embodiment of the present application;

[0034] Figure 2 A flowchart of a hyperspectral image classification method based on dictionary learning provided in Example 1 of the present application;

[0035] Figure 3 A flowchart of a hyperspectral image classification method based on dictionary learning provided in Example 2 of the present application;

[0036] Figure 4 A schematic diagram of the training phase provided in Example 2 of the present application;

[0037] Figure 5 A schematic diagram of the test phase provided in Example 2 of the present application;

[0038] Figure 6 A schematic diagram of the structure of a computer device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0039] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of this application.

[0040] The purpose of this application is to provide a hyperspectral image classification method and related products based on dictionary learning, which can have high classification accuracy and high scalability at the same time. The main steps are: 1. Input the first batch of hyperspectral data, and use the dictionary learning algorithm to obtain the dictionary and sparse matrix of hyperspectral data; 2. Use the sparse matrix as the feature of hyperspectral data and train the classification model using the sparse matrix; 3. Input the second batch of hyperspectral data and use the dictionary to obtain its corresponding sparse matrix; 4. Use the sparse matrix obtained in the previous step as the feature of the second batch of hyperspectral data to train a new classification model; 5. Input the nth batch of hyperspectral data to obtain the corresponding classification model; 6. Repeat step 5 until no new data is input; 7. Use the trained N classification models to classify the hyperspectral data to be predicted. The non-replay incremental learning method proposed in this application can project new and old data into the same feature space, standardize the data feature distribution, and improve the classification accuracy. In addition, the models are independent of each other, which makes the algorithm highly scalable and still has good classification effect when facing multiple batches of new data. Because the same dictionary is used for conversion, the new and old data are converted to a unified feature space, ensuring the uniformity of the data; in addition, the new and old models do not interfere with each other, which can prevent disaster forgetting to a certain extent, thus improving the classification accuracy. Because the classification models of each batch are trained separately and do not affect each other, they are highly scalable.

[0041] In order to make the above-mentioned objects, features and advantages of the present application more obvious and easy to understand, the present application is further described in detail below with reference to the accompanying drawings and specific implementation methods.

[0042] The hyperspectral image classification method based on dictionary learning provided in the embodiment of the present application can be applied to Figure 1 In the application environment shown, the terminal 102 communicates with the server 104 through a network. The data storage system can store data that the server 104 needs to process. The data storage system can be set up separately, integrated on the server 104, or placed on the cloud or other servers.

[0043] The terminal 102 may be, but is not limited to, various desktop computers, laptop computers, smart phones, tablet computers, IoT devices, and portable wearable devices. The IoT devices may be smart speakers, smart TVs, smart air conditioners, smart vehicle-mounted devices, etc. The portable wearable devices may be smart watches, smart bracelets, head-mounted devices, etc. The server 104 may be implemented as an independent server or a server cluster consisting of multiple servers, or may be a cloud server.

[0044] Embodiment 1:

[0045] In an exemplary embodiment, Figure 2As shown, a method for hyperspectral image classification based on dictionary learning is provided. The method is executed by a computer device, and can be executed by a computer device such as a terminal or a server alone, or by a terminal and a server together. This embodiment provides a method for incremental learning without playback. Its application scenario is that there is no previous data when training the current model, and the training data is sent in batches. After the corresponding model is trained, the batch data is not retained. In the embodiment of the present application, the method is applied to Figure 1 The server 104 in the example is used as an example to illustrate the method, which includes the following steps S1 to S7. Among them:

[0046] S1. Obtain n batches of hyperspectral data and hyperspectral images to be classified. The categories of each batch of hyperspectral data are different. In addition, in this embodiment, the category of the hyperspectral images to be classified can also be selected to be included in the categories of the n batches of hyperspectral data. The hyperspectral data in this embodiment is data collected using a hyperspectral imager.

[0047] S2. Obtaining a hyperspectral data dictionary of a first batch of hyperspectral data among the n batches of hyperspectral data by using a dictionary learning algorithm.

[0048] This embodiment uses the K-singular value decomposition algorithm to obtain a hyperspectral data dictionary for the first batch of hyperspectral data among the n batches of hyperspectral data. The K-singular value decomposition algorithm is an algorithm for solving dictionary learning problems.

[0049] S3. Obtain a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary using a dictionary learning algorithm.

[0050] In this embodiment, the sparse matrix of each batch of hyperspectral data is obtained by using the orthogonal matching pursuit algorithm according to the hyperspectral data dictionary. After the first batch of hyperspectral data is input, the hyperspectral data dictionary D and the sparse matrix S1 are solved by using the K-singular value decomposition algorithm. After each subsequent batch of hyperspectral data is input, the hyperspectral data dictionary D is used to obtain the sparse matrix corresponding to each batch of hyperspectral data.

[0051] In this embodiment, a first batch of hyperspectral data X1 is input, whose category c∈C1, and a hyperspectral data dictionary D and a sparse matrix S1 of the hyperspectral data X1 are obtained by using a dictionary learning algorithm.

[0052] Specifically, using the dictionary learning algorithm, you can select the K-singular value decomposition algorithm, and use the K-singular value decomposition (K-SVD) algorithm to solve D and S1, as shown below:

[0053]

[0054] Wherein, D is a dictionary of hyperspectral data, and the number of atoms in the dictionary D is empirically selected as 100; S1 is a sparse matrix; X1 is the first batch of hyperspectral data in the hyperspectral data; L is a sparse constraint threshold, and L=10 is empirically set.

[0055] Input the second batch of hyperspectral data X2, whose category c∈C2, and The sparse matrix S2 of X2 is obtained using the hyperspectral data dictionary D.

[0056] The specific operations for generating the sparse matrix S2 are as follows:

[0057] Based on the hyperspectral data dictionary D, the Orthogonal Matching Pursuit (OMP) algorithm is used to solve S2.

[0058] Input the nth batch of hyperspectral data X n , where X n The category c∈C n ,and Using the hyperspectral data dictionary D, we can get X n The sparse matrix S n Based on the hyperspectral data dictionary D, the OMP algorithm is used to solve S n Among them, after the first batch of hyperspectral data dictionary D is obtained, the subsequent processing process of each batch is the same as the above process.

[0059] S4, respectively train the classification model using the sparse matrix of each batch of hyperspectral data to obtain n hyperspectral image classification models. In this embodiment, the input of the classification model training is the sparse matrix, and the output is the category and probability corresponding to the sparse matrix.

[0060] Specifically, in this embodiment, the sparse matrix S1 is used as the feature of the hyperspectral data X1, and the classification model is trained using S1 to obtain the hyperspectral image classification model M1.

[0061] The specific operations for training the hyperspectral image classification model M1 are as follows:

[0062] First, a linear kernel function support vector machine (SVM) model is constructed, and then the SVM classifier is trained using the sparse matrix S1 and its corresponding category labels, where the sparse matrix S1 is the input data of the classifier and the output of the classifier is the category corresponding to each data in S1. After training, the hyperspectral image classification model M1 is obtained.

[0063] The sparse matrix S2 is used as the feature of the hyperspectral data X2, and S2 is used to train the hyperspectral image classification model M2.

[0064] The specific operations of training classification model M2 are as follows:

[0065] Firstly, a support vector machine (SVM) model with a linear kernel function is constructed, and then the SVM classifier is trained using the sparse matrix S2 and its corresponding category labels to obtain the hyperspectral image classification model M2.

[0066] Repeat the above calculation until the nth batch of data is processed. The processing process of the nth batch of data is as follows: n As hyperspectral data X n The features of n The SVM classifier is trained with its corresponding category labels to obtain the hyperspectral image classification model M n .

[0067] Repeat the above steps until no new data is input. At this time, a total of n batches of data have been input, and n hyperspectral image classification models are obtained.

[0068] S5. Obtain a sparse matrix of the hyperspectral image to be classified according to the hyperspectral data dictionary using a dictionary learning algorithm.

[0069] S6. Input the sparse matrix of the hyperspectral image to be classified into each of the hyperspectral image classification models to obtain n classification results; each of the classification results includes: a classification probability result and a corresponding probability.

[0070] S7. Select the classification probability result with the highest probability among all classification results as the final classification result.

[0071] In this embodiment, the trained model is used to classify the hyperspectral image X, where the category c∈C1∪C2…∪C n .

[0072] The specific operations are as follows:

[0073] In the first step, the sparse matrix S of the hyperspectral image X to be classified is obtained using the hyperspectral data dictionary D and the OMP algorithm.

[0074] In the second step, the sparse matrix S is sent to n trained hyperspectral image classification models for classification, so that each data in X can get N classification probability results y. 1,i ,y 2,j ,...,y N,k , and its corresponding probability p 1,i ,p 2,j ,...,p N,kAmong them, the first subscript represents the result of the classifier output, and the second subscript represents the data of the corresponding data category.

[0075] The third step is to calculate the following formula:

[0076] max{p 1,i ,p 2,j ,...,p N,k};

[0077] Get the maximum probability p n,m , then the category of the input hyperspectral image X to be classified is the probability p n,m The corresponding classification probability result y n,m , which is the mth category in the nth batch of data.

[0078] Compared with the existing technology, this embodiment has the following advantages:

[0079] 1. Use the initial data to extract the dictionary matrix, and let the new data obtained later obtain the corresponding sparse matrix under the dictionary. This method converts new and old data into a unified feature space, ensuring the consistency of data in different periods, thereby improving the classification accuracy of the entire algorithm.

[0080] 2. The classification models corresponding to new and old data are trained independently of each other. The training of the new model will not affect the old model, thereby alleviating the problem of decreased classification effect of the algorithm on old data.

[0081] 3. The algorithm only needs to retain the initial dictionary matrix and the classification model corresponding to each batch of data. It requires small storage memory and has high scalability.

[0082] Embodiment 2:

[0083] In an exemplary embodiment, Figure 3 As shown, a hyperspectral image classification method based on dictionary learning is provided, comprising the following steps:

[0084] Step a: Input the first batch of hyperspectral data X1, whose category c∈C1, and use the dictionary learning algorithm to obtain the dictionary D and sparse matrix S1 of the hyperspectral data:

[0085] The K-Singular Value Decomposition (K-SVD) algorithm is used to solve D and S1 as follows:

[0086]

[0087] Where L is the sparse constraint threshold, and L is empirically set to 10. The number of atoms in the dictionary D is empirically selected to be 100.

[0088] Step b: Use the sparse matrix S1 as the feature of the hyperspectral data X1 and use S1 to train the classification model M1:

[0089] Firstly, a support vector machine (SVM) model with a linear kernel function is constructed, and then the SVM classifier is trained using the sparse matrix S1 and its corresponding category labels to obtain the classification model M1.

[0090] Step c: Input the second batch of hyperspectral data X2, whose category c∈C2, and Use dictionary D to get the sparse matrix S2 of X2:

[0091] Based on the dictionary D, the Orthogonal Matching Pursuit (OMP) algorithm is used to solve S2.

[0092] Step d: Use the sparse matrix S2 as the feature of the hyperspectral data X2 and use S2 to train the classification model M2:

[0093] Firstly, a support vector machine (SVM) model with a linear kernel function is constructed, and then the SVM classifier is trained using the sparse matrix S2 and its corresponding category labels to obtain the classification model M2.

[0094] Step e: Input the nth batch of hyperspectral data X n , where X n The category c∈C n ,and Get the classification model M n :

[0095] First, based on the dictionary D, the OMP algorithm is used to solve S n ; Next, use the sparse matrix S n And its corresponding category labels to train the SVM classifier and obtain the classification model M n .

[0096] Step f: Repeat step e until no new data is input. At this time, a total of n batches of data have been input and n classification models have been obtained.

[0097] Step g: Use the trained model to classify the hyperspectral data X, where the category of X is c∈C1∪C2...∪C N :

[0098] In the first step, the sparse matrix S of the hyperspectral data X is obtained using the dictionary D and the OMP algorithm.

[0099] In the second step, the sparse matrix S is sent to n trained classification models for classification, so that each data in X can get n classification probability results y. 1,i ,y 2,j ,...,y N,k , and its corresponding probability p 1,i ,p 2,j ,...,p N,k , where the first subscript represents the result of the classifier output, and the second subscript represents the data type in the corresponding data category.

[0100] The third step is to calculate the following formula:

[0101] max{p 1,i ,p 2,j ,...,p N,k};

[0102] Get the maximum probability p n,m , then the category of the input hyperspectral data X is y n,m , which is the mth category in the nth batch of data.

[0103] The effect of this application is further explained below in combination with simulation experiments:

[0104] The hardware test platform used in the simulation experiment of this embodiment is: the processor is Inter Core i5-12490F, the main frequency is 3.00GHz, and the memory is 16GB.

[0105] The simulation data set of this embodiment uses the Salinas hyperspectral data set. This data set has a total of 16 types of objects. In this experiment, the entire data is divided into 4 batches: 1-4 types are divided into the first batch of data, 5-8 types are divided into the second batch of data, 9-12 types are divided into the third batch of data, and 13-16 types are divided into the fourth batch of data, as shown in Table 1 below:

[0106] Table 1 Salinas hyperspectral dataset

[0107]

[0108] Take 70% of each batch of data to train the classification model, and the remaining 30% is mixed in random order as test data. Figure 4 The training phase includes: using the K-SVD algorithm to obtain the dictionary D and sparse matrix S1 for the first batch of training data, sending S1 and the category label corresponding to each data to SVM for training, and obtaining the classifier M1. Then, the second, third, and fourth batches of training data are input in turn, and based on the OMP algorithm, the sparse matrices S2, S3, and S4 are obtained according to the dictionary D. Using S2, S3, and S4, classifiers M2, M3, and M4 are obtained. Please refer to Figure 5 ,The testing phase includes : for the test data (containing 16 categories), the sparse matrix S is obtained through the dictionary D and the OMP algorithm, S is sent to 4 classifiers, and 4 category probabilities are obtained for each data. The corresponding category is determined by comparing the maximum probability, and the final overall classification accuracy reaches 75.58%.

[0109] The present application also provides an application scenario, which applies the above-mentioned hyperspectral image classification method based on dictionary learning. Specifically: using a hyperspectral imager to collect hyperspectral image data of a certain area, and using this hyperspectral image classification method based on dictionary learning to classify the acquired hyperspectral image data.

[0110] In an exemplary embodiment, a computer device is provided. The computer device may be a server or a terminal. The internal structure diagram thereof may be as follows: Figure 6 As shown. The computer device includes a processor, a memory, an input / output interface (Input / Output, referred to as I / O) and a communication interface. The processor, the memory and the input / output interface are connected through a system bus, and the communication interface is connected to the system bus through the input / output interface. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The input / output interface of the computer device is used to exchange information between the processor and an external device. The communication interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a hyperspectral image classification method based on dictionary learning is implemented.

[0111] Those skilled in the art will understand that Figure 6 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0112] In an exemplary embodiment, a computer device is further provided, including a memory and a processor, wherein a computer program is stored in the memory, and the processor implements the steps in the above-mentioned method embodiments when executing the computer program.

[0113] In an exemplary embodiment, a computer-readable storage medium is provided, storing a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0114] In an exemplary embodiment, a computer program product is provided, including a computer program, and when the computer program is executed by a processor, the steps in the above method embodiments are implemented.

[0115] It should be noted that the user information (including but not limited to user device information, user personal information, etc.) and data (including but not limited to data used for analysis, stored data, displayed data, etc.) involved in this application are all information and data authorized by the user or fully authorized by all parties, and the collection, use and processing of relevant data must comply with relevant regulations.

[0116] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to the memory, database or other medium used in the embodiments provided in the present application can include at least one of non-volatile and volatile memory. Non-volatile memory can include read-only memory (ROM), magnetic tape, floppy disk, flash memory, optical memory, high-density embedded non-volatile memory, resistive random access memory (ReRAM), magnetic random access memory (MRAM), ferroelectric random access memory (FRAM), phase change memory (PCM), graphene memory, etc. Volatile memory can include random access memory (RAM) or external cache memory, etc. By way of illustration and not limitation, RAM may be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0117] The database involved in each embodiment provided in this application may include at least one of a relational database and a non-relational database. The non-relational database may include a distributed database based on blockchain, etc., but is not limited thereto. The processor involved in each embodiment provided in this application may be a general-purpose processor, a central processing unit, a graphics processor, a digital signal processor, a programmable logic device, a data processing logic device based on quantum computing, etc., but is not limited thereto.

[0118] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0119] This article uses specific examples to illustrate the principles and implementation methods of this application. The description of the above embodiments is only used to help understand the method and core ideas of this application. At the same time, for those skilled in the art, according to the ideas of this application, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting this application.

Claims

1. A hyperspectral image classification method based on dictionary learning, characterized in that: The hyperspectral image classification method based on dictionary learning includes: Obtain n batches of hyperspectral data and hyperspectral images to be classified; Obtaining a hyperspectral data dictionary of a first batch of hyperspectral data among the n batches of hyperspectral data by using a dictionary learning algorithm; Using a dictionary learning algorithm to obtain a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary; The sparse matrix of each batch of hyperspectral data is used to train the classification model to obtain n hyperspectral image classification models; Obtaining a sparse matrix of the hyperspectral image to be classified according to the hyperspectral data dictionary using a dictionary learning algorithm; Inputting the sparse matrix of the hyperspectral image to be classified into each of the hyperspectral image classification models respectively to obtain n classification results; each of the classification results includes: a classification probability result and a corresponding probability; The classification probability result with the highest probability among all classification results is selected as the final classification result.

2. The hyperspectral image classification method based on dictionary learning according to claim 1, characterized in that: The method of obtaining a hyperspectral data dictionary of the first batch of hyperspectral data among the n batches of hyperspectral data by using a dictionary learning algorithm specifically includes: A hyperspectral data dictionary of a first batch of hyperspectral data among the n batches of hyperspectral data is obtained by using a K-singular value decomposition algorithm.

3. The hyperspectral image classification method based on dictionary learning according to claim 1, characterized in that: The method of using a dictionary learning algorithm to obtain a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary specifically includes: According to the hyperspectral data dictionary, an orthogonal matching pursuit algorithm is used to obtain a sparse matrix of each batch of hyperspectral data.

4. The hyperspectral image classification method based on dictionary learning according to claim 1, characterized in that: The formula for obtaining the hyperspectral data dictionary of the first batch of hyperspectral data among n batches of hyperspectral data using the dictionary learning algorithm is: Wherein, D is the hyperspectral data dictionary; S1 is the sparse matrix; X1 is the first batch of hyperspectral data in the hyperspectral data; and L is the sparse constraint threshold.

5. The hyperspectral image classification method based on dictionary learning according to claim 4 is characterized in that: The number of atoms in the hyperspectral data dictionary is selected as 100; the sparse constraint threshold is selected as 10.

6. The hyperspectral image classification method based on dictionary learning according to claim 1, characterized in that: The classification model is a support vector machine model of a linear kernel function; When training a classification model, the input is a sparse matrix and the output is the category and probability corresponding to the sparse matrix.

7. The hyperspectral image classification method based on dictionary learning according to claim 1, characterized in that: The category of each batch of hyperspectral data is different from the categories of other batches of hyperspectral data.

8. A computer device comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the hyperspectral image classification method based on dictionary learning according to any one of claims 1 to 7.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the hyperspectral image classification method based on dictionary learning described in any one of claims 1 to 7 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the hyperspectral image classification method based on dictionary learning described in any one of claims 1 to 7 is implemented.

Citation Information

Patent Citations

  • Hyperspectral image classification method based on hierarchical sparse discriminant feature learning

    CN104408478A

  • A hyperspectral image classification method for multi-feature class sub-dictionary learning

    CN108985301A

  • Method for positioning scalp electroencephalogram epilepsy region based on artificial intelligence

    CN114677379A

  • Model reasoning method based on incremental learning and electronic equipment

    CN116796842A