A hyperspectral image classification method based on dictionary learning and related products

By using a dictionary learning method to transform hyperspectral data into a unified feature space, the problem of interference between old and new data in hyperspectral image classification is solved, achieving high-precision and highly scalable classification results.

CN119992201BActive Publication Date: 2025-11-11NANCHANG HANGKONG UNIVERSITY
View PDF 3 Cites 0 Cited by

Patent Information

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

Smart Images

  • Figure CN119992201B_ABST
    Figure CN119992201B_ABST
Patent Text Reader

Abstract

The application discloses a hyperspectral image classification method based on dictionary learning and related products, and relates to the technical field of image classification. The method comprises the following steps: acquiring n batches of hyperspectral data and a hyperspectral image to be classified; 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; acquiring a sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary by using the dictionary learning algorithm; training a classification model by using the sparse matrix of each batch of hyperspectral data respectively, and obtaining n hyperspectral image classification models; acquiring a sparse matrix of the hyperspectral image to be classified according to the hyperspectral data dictionary by using the dictionary learning algorithm; inputting the sparse matrix of the hyperspectral image to be classified into each hyperspectral image classification model respectively, and obtaining n classification results; and selecting the classification probability result with the highest probability in all classification results as a final classification result. The application can have high classification precision and high expansibility simultaneously.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of image classification technology, and in particular to a dictionary-based hyperspectral image classification method and related products. Background Technology

[0002] Hyperspectral image classification technology plays a crucial role in fields such as environmental protection and land planning. While numerous mature algorithms have been proposed in recent years, most assume that the data categories to be classified are static and can only recognize categories the model has already learned. When encountering new categories of data, the model cannot maintain its learning ability. Specifically, if the model is trained directly on new data of a new category, its recognition ability will be biased towards the new category, leading to a significant decline in the classification performance of older categories—a phenomenon known as "catastrophic forgetting." Training with both new and old data together consumes significant amounts of memory, time, and other resources, greatly increasing costs.

[0003] Incremental learning without replay, on the other hand, trains the model using only new data without using old data, ensuring the model maintains good classification ability for both old and new data. Currently, research on incremental learning without replay is still in its early stages and relatively limited, and can be broadly divided into two categories:

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

[0005] 2. Methods based on network structure adjustment train parameters for different parts of the network according to different data categories, allowing the entire network to continuously adapt to new data; or by adding network nodes to adapt to new data. However, the network capacity is limited, and this type of method performs poorly when encountering a large batch of new data, thus limiting its scalability. 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 simultaneously achieve high classification accuracy and high scalability.

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

[0008] Firstly, this application provides a dictionary-based hyperspectral image classification method, which includes:

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

[0010] A dictionary learning algorithm is used to obtain the hyperspectral data dictionary for the first batch of hyperspectral data in n batches of the hyperspectral data.

[0011] The sparse matrix of each batch of hyperspectral data is obtained by using a dictionary learning algorithm based on the hyperspectral data dictionary.

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

[0013] The sparse matrix of the hyperspectral image to be classified is obtained using a dictionary learning algorithm based on the hyperspectral data dictionary.

[0014] The sparse matrix of the hyperspectral image to be classified is input into each hyperspectral image classification model to obtain n classification results; each classification result includes: classification probability result and corresponding probability;

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

[0016] Optionally, a hyperspectral data dictionary is obtained from the first batch of hyperspectral data in the n batches of hyperspectral data using a dictionary learning algorithm, specifically including:

[0017] The K-singular value decomposition algorithm is used to obtain the hyperspectral data dictionary of the first batch of hyperspectral data in the n batches of hyperspectral data.

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

[0019] Based on the hyperspectral data dictionary, the sparse matrix of each batch of hyperspectral data is obtained using the orthogonal matching pursuit algorithm.

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

[0021]

[0022] Where 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 as 100; the sparsity constraint threshold is selected as 10.

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

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

[0026] Optionally, each batch of hyperspectral data may be categorized differently from other batches of hyperspectral data.

[0027] In a second aspect, this application provides a computer device, including: 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 dictionary-based hyperspectral image classification method described above.

[0028] Thirdly, this application provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the dictionary-based hyperspectral image classification method described above.

[0029] Fourthly, this application provides a computer program product, including a computer program that, when executed by a processor, implements the dictionary-based hyperspectral image classification method described above.

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

[0031] This application provides a hyperspectral image classification method and related products based on dictionary learning. The method includes: acquiring n batches of hyperspectral data and hyperspectral images to be classified; using a dictionary learning algorithm to acquire a hyperspectral data dictionary for the first batch of hyperspectral data from the n batches; using the dictionary learning algorithm to acquire a sparse matrix for each batch of hyperspectral data based on the hyperspectral data dictionary; training classification models using the sparse matrices of each batch of hyperspectral data to obtain n hyperspectral image classification models; using the dictionary learning algorithm to acquire a sparse matrix for the hyperspectral image to be classified based on the hyperspectral data dictionary; inputting the sparse matrix of the hyperspectral image 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. This application uses the same dictionary to acquire sparse matrices from different batches of hyperspectral data, thereby transforming new and old data into a unified feature space, ensuring data consistency. Since the new and old models do not interfere with each other, it can prevent catastrophe forgetting to a certain extent, thus improving classification accuracy. Furthermore, the classification models for each batch in this application are trained separately and do not affect each other, thus exhibiting high scalability. Therefore, this application can simultaneously achieve both high classification accuracy and high scalability. Attached Figure Description

[0032] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0033] Figure 1 This is an application environment diagram of a dictionary-based hyperspectral image classification method according to an embodiment of this application;

[0034] Figure 2 A flowchart illustrating a dictionary-based hyperspectral image classification method provided in Embodiment 1 of this application;

[0035] Figure 3 This is a flowchart illustrating a dictionary-based hyperspectral image classification method provided in Embodiment 2 of this application.

[0036] Figure 4 This is a schematic diagram of the training phase provided in Embodiment 2 of this application;

[0037] Figure 5 This is a schematic diagram of the testing phase provided in Embodiment 2 of this application;

[0038] Figure 6 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0039] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort 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 simultaneously achieve high classification accuracy and high scalability. The main steps are: 1. Input the first batch of hyperspectral data and use a dictionary learning algorithm to obtain the dictionary and sparse matrix of the hyperspectral data; 2. Use the sparse matrix as the feature of the hyperspectral data and train a 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 and train a new classification model; 5. Input the nth batch of hyperspectral data and obtain the corresponding classification model; 6. Repeat step 5 until no new data is input; 7. Use the N trained classification models to classify the hyperspectral data to be predicted. The no-replay incremental learning method proposed in this application allows new and old data to be projected onto the same feature space, standardizing the distribution of data features and improving classification accuracy. Furthermore, the models are independent of each other, giving the algorithm high scalability and maintaining good classification performance even with multiple batches of new data. Because the same dictionary is used for transformation, the new and old data are converted to a unified feature space, ensuring data consistency. Furthermore, the new and old models do not interfere with each other, which can prevent catastrophe forgetting to some extent, thus improving classification accuracy. Since the classification models for each batch are trained separately and do not affect each other, they have high scalability.

[0041] To make the above-mentioned objectives, features and advantages of this application more apparent and understandable, the application will be further described in detail below with reference to the accompanying drawings and specific embodiments.

[0042] The hyperspectral image classification method based on dictionary learning provided in this application can be applied to, for example... Figure 1 In the application environment shown, terminal 102 communicates with server 104 via a network. A data storage system can store the data that server 104 needs to process. The data storage system can be set up independently, integrated into server 104, or placed in the cloud or on another server.

[0043] The terminal 102 can be, but is not limited to, various desktop computers, laptops, smartphones, tablets, IoT devices, and portable wearable devices. IoT devices can include smart speakers, smart TVs, smart air conditioners, and smart in-vehicle devices. Portable wearable devices can include smartwatches, smart bracelets, and head-mounted devices. The server 104 can be implemented using a standalone server or a server cluster composed of multiple servers, or it can be a cloud server.

[0044] Example 1:

[0045] In one exemplary embodiment, such as Figure 2As shown, a dictionary-based hyperspectral image classification method is provided. This method is executed by a computer device, specifically a terminal or server, or both. This embodiment provides a non-replay incremental learning method, applicable when previous data is unavailable during model training, and training data is sent in batches. Furthermore, after training the corresponding model, each batch of data is not retained. In this embodiment, this method is applied to... Figure 1 Taking server 104 as an example, the explanation includes the following steps S1 to S7. Wherein:

[0046] S1. Acquire n batches of hyperspectral data and hyperspectral images to be classified. Each batch of hyperspectral data belongs to a different category. Furthermore, in this embodiment, the category of the hyperspectral image to be classified can be optionally included in the categories of the n batches of hyperspectral data. The hyperspectral data in this embodiment is data acquired using a hyperspectral imager.

[0047] S2. Use a dictionary learning algorithm to obtain the hyperspectral data dictionary for the first batch of hyperspectral data in the n batches of hyperspectral data.

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

[0049] S3. Using a dictionary learning algorithm, obtain the sparse matrix of each batch of hyperspectral data according to the hyperspectral data dictionary.

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

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

[0052] Specifically, using a dictionary learning algorithm, we can choose the K-Singular Value Decomposition (K-SVD) algorithm to solve for D and S1, as shown below:

[0053]

[0054] Where D is the hyperspectral data dictionary, and the number of atoms in dictionary D is empirically chosen to be 100; S1 is the sparse matrix; X1 is the first batch of hyperspectral data in the hyperspectral data; L is the sparsity constraint threshold, and L is empirically set to 10.

[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 steps for generating the sparse matrix S2 are as follows:

[0057] S2 is solved using the orthogonal matching pursuit (OMP) algorithm based on the hyperspectral data dictionary D.

[0058] Input the nth batch of hyperspectral data X n , where X n The category c∈C n ,and X is obtained using the hyperspectral data dictionary D n sparse matrix S n Based on the hyperspectral data dictionary D, the OMP algorithm is used to solve for S. n After the first batch of hyperspectral data dictionary D is obtained, the processing procedure for each subsequent batch is the same as described above.

[0059] S4. 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 to the classification model is a 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 steps for training the hyperspectral image classification model M1 are as follows:

[0062] First, a Support Vector Machine (SVM) model with a linear kernel function is constructed. Then, the SVM classifier is trained using a sparse matrix S1 and its corresponding class labels. The sparse matrix S1 serves as the input data for the classifier, and the output of the classifier is the class corresponding to each data point in S1. After training, a hyperspectral image classification model M1 is obtained.

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

[0064] The specific steps for training the classification model M2 are as follows:

[0065] First, a Support Vector Machine (SVM) model with a linear kernel function is constructed. Then, the SVM classifier is trained using a sparse matrix S2 and its corresponding class labels to obtain the hyperspectral image classification model M2.

[0066] Repeat the above calculations until the nth batch of data has been processed. The processing procedure for the nth batch of data is as follows: The sparse matrix S... n As hyperspectral data X n The characteristics of sparse matrix S are utilized. n The SVM classifier is trained using the class labels and their corresponding categories to obtain the hyperspectral image classification model M. n .

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

[0068] S5. Using a dictionary learning algorithm, obtain the sparse matrix of the hyperspectral image to be classified based on the hyperspectral data dictionary.

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

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

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

[0072] The specific steps are as follows:

[0073] The first step is to use the hyperspectral data dictionary D and the OMP algorithm to obtain the sparse matrix S of the hyperspectral image X to be classified.

[0074] The second step involves feeding the sparse matrix S into n pre-trained hyperspectral image classification models for classification. Then, each data point in X will yield 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,kThe first index indicates which classifier output the result, and the second index indicates which data category it belongs to.

[0075] Third step, calculate the following formula:

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

[0077] To obtain 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 This refers to the m-th category in the n-th batch of data.

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

[0079] 1. Extract a dictionary matrix from the initial data, and then use this dictionary to generate corresponding sparse matrices for all subsequent new data. This method transforms the new and old data into a unified feature space, ensuring data consistency across different time periods and thus improving the overall classification accuracy of the algorithm.

[0080] 2. The classification models for new and old data are trained independently. The training of the new model will not affect the old model, thus alleviating the problem of the algorithm's declining classification performance on old data.

[0081] 3. This algorithm only needs to retain the initial dictionary matrix and the classification model corresponding to each batch of data, requiring little storage memory and having high scalability.

[0082] Example 2:

[0083] In one exemplary embodiment, such as Figure 3 As shown, a hyperspectral image classification method based on dictionary learning is provided, including 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 for D and S1, as shown below:

[0086]

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

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

[0089] First, a Support Vector Machine (SVM) model with a linear kernel function is constructed. Then, the SVM classifier is trained using a sparse matrix S1 and its corresponding class labels to obtain the classification model M1.

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

[0091] S2 is solved using the Orthogonal Matching Pursuit (OMP) algorithm based on dictionary D.

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

[0093] First, a Support Vector Machine (SVM) model with a linear kernel function is constructed. Then, the SVM classifier is trained using a sparse matrix S2 and its corresponding class 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 Obtain the classification model M n :

[0095] First, based on dictionary D, the OMP algorithm is used to solve for S. n Next, using the sparse matrix S n The SVM classifier is trained using the class labels and their corresponding class labels to obtain the classification model M. n .

[0096] Step f and step e are repeated until no new data is input. At this point, a total of n batches of data have been input, resulting in n classification models.

[0097] Step g: Classify the hyperspectral data X using the trained model, where the categories of X are c∈C1∪C2...∪C N :

[0098] The first step is to use the dictionary D and the OMP algorithm to obtain the sparse matrix S of the hyperspectral data X.

[0099] The second step is to feed the sparse matrix S into n pre-trained classification models for classification, so that each data point in X can obtain 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 The first subscript represents the output result of which classifier, and the second subscript represents the class of data in the corresponding data category.

[0100] Third step, calculate the following formula:

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

[0102] To obtain the maximum probability p n,m Then the category of the input hyperspectral data X is y. n,m This refers to the m-th category in the n-th batch of data.

[0103] The following simulation experiments further illustrate the effectiveness of this application:

[0104] The hardware testing platform used in the simulation experiment of this embodiment is: an Intel Core i5-12490F processor with a main frequency of 3.00GHz and 16GB of memory.

[0105] The simulation dataset used in this embodiment is the Salinas hyperspectral dataset. This dataset contains 16 land cover classes. In this experiment, the entire dataset was divided into four batches: classes 1-4 were the first batch, classes 5-8 were the second batch, classes 9-12 were the third batch, and classes 13-16 were the fourth batch, as shown in Table 1 below.

[0106] Table 1. Salinas Hyperspectral Dataset

[0107]

[0108] Use 70% of each batch of data to train the classification model, and mix the remaining 30% in random order as test data. (See also...) Figure 4 The training phase includes: Using the K-SVD algorithm, a dictionary D and a sparse matrix S1 are obtained from the first batch of training data. S1 and the class label corresponding to each data point are then fed into an SVM for training to obtain classifier M1. Next, the second, third, and fourth batches of training data are input sequentially. Based on the OMP algorithm, sparse matrices S2, S3, and S4 are obtained from dictionary D. Classifiers M2, M3, and M4 are then obtained using S2, S3, and S4. (See also...) Figure 5 The testing phase includes: for the test data (containing 16 categories), a sparse matrix S is obtained through dictionary D and OMP algorithm. S is then sent to 4 classifiers, and each data point is assigned 4 category probabilities. The corresponding category is determined by comparing the highest probability. The final overall classification accuracy reaches 75.58%.

[0109] This application also provides an application scenario in which the above-mentioned dictionary-based hyperspectral image classification method is applied. Specifically, a hyperspectral imager is used to acquire hyperspectral image data of a certain area, and this dictionary-based hyperspectral image classification method is used to classify the acquired hyperspectral image data.

[0110] In one exemplary embodiment, a computer device is provided, which may be a server or a terminal, and its internal structure diagram may be as follows. Figure 6 As shown, this computer device includes a processor, memory, input / output (I / O) interfaces, and a communication interface. The processor, memory, and I / O interfaces are connected via a system bus, and the communication interface is also connected to the system bus via the I / O interfaces. The processor provides computational and control capabilities. The memory includes non-volatile storage media and internal memory. The non-volatile storage media stores the operating system, computer programs, and databases. The internal memory provides the environment for the operating system and computer programs stored in the non-volatile storage media. The I / O interfaces are used for exchanging information between the processor and external devices. The communication interface is used for communicating with external terminals via a network connection. When executed by the processor, the computer program implements a dictionary-based hyperspectral image classification method.

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

[0112] In one exemplary embodiment, a computer device is also provided, including a memory and a processor, wherein the memory stores a computer program, and the processor executes the computer program to implement the steps in the above-described method embodiments.

[0113] In one exemplary embodiment, a computer-readable storage medium is provided storing a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[0114] In one exemplary embodiment, a computer program product is provided, including a computer program that, when executed by a processor, implements the steps in the above-described method embodiments.

[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, data stored, data displayed, 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 the relevant data must comply with relevant regulations.

[0116] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments of the above methods. Any references to memory, databases, or other media used in the embodiments provided in this 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 can take many forms, such as Static Random Access Memory (SRAM) or Dynamic Random Access Memory (DRAM).

[0117] The databases involved in the embodiments provided in this application may include at least one type of relational database and non-relational database. Non-relational databases may include, but are not limited to, blockchain-based distributed databases. The processors involved in the embodiments provided in this application may be general-purpose processors, central processing units, graphics processing units, digital signal processors, programmable logic devices, quantum computing-based data processing logic devices, etc., and are not limited to these.

[0118] The technical features of the above embodiments can be combined in any way. For the sake of brevity, 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 document uses specific examples to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. Furthermore, those skilled in the art will recognize that, based on the ideas of this application, there will be changes in the specific implementation methods and application scope. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A hyperspectral image classification method based on dictionary learning, characterized in that, The dictionary-based hyperspectral image classification method includes: Acquire n batches of hyperspectral data and hyperspectral images to be classified; the category of each batch of hyperspectral data is different from the categories of other batches of hyperspectral data. A dictionary learning algorithm is used to obtain the hyperspectral data dictionary for the first batch of hyperspectral data in n batches of the hyperspectral data. The sparse matrix of each batch of hyperspectral data is obtained by using a dictionary learning algorithm based on the hyperspectral data dictionary. The classification model is trained using the sparse matrix of each batch of hyperspectral data to obtain n hyperspectral image classification models; The sparse matrix of the hyperspectral image to be classified is obtained using a dictionary learning algorithm based on the hyperspectral data dictionary. The sparse matrix of the hyperspectral image to be classified is input into each hyperspectral image classification model to obtain n classification results; each classification result includes: classification probability result and corresponding probability; The classification result with the highest probability among all classification results is selected as the final classification result. The hyperspectral data dictionary for the first batch of hyperspectral data from n batches of hyperspectral data is obtained using a dictionary learning algorithm, specifically including: The K-singular value decomposition algorithm is used to obtain the hyperspectral data dictionary of the first batch of hyperspectral data in the n batches of hyperspectral data; The step of using a dictionary learning algorithm to obtain the sparse matrix of each batch of hyperspectral data based on the hyperspectral data dictionary specifically includes: Based on the hyperspectral data dictionary, the sparse matrix of each batch of hyperspectral data is obtained using the orthogonal matching pursuit algorithm.

2. The hyperspectral image classification method based on dictionary learning according to claim 1, characterized in that, The formula for obtaining the hyperspectral data dictionary for the first batch of hyperspectral data from n batches of hyperspectral data using a dictionary learning algorithm is as follows: Where 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.

3. The hyperspectral image classification method based on dictionary learning according to claim 2, characterized in that, The number of atoms in the hyperspectral data dictionary is set to 100; the sparsity constraint threshold is set to 10.

4. 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 with 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.

5. A computer device, comprising: A memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement the dictionary-based hyperspectral image classification method according to any one of claims 1-4.

6. A computer-readable storage medium having a computer program stored thereon, characterized in that, When executed by a processor, the computer program implements the dictionary-based hyperspectral image classification method according to any one of claims 1-4.

7. A computer program product, comprising a computer program, characterized in that, When executed by a processor, the computer program implements the dictionary-based hyperspectral image classification method according to any one of claims 1-4.

Citation Information

Patent Citations

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

    CN104408478A

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

    CN114677379A

  • Model reasoning method based on incremental learning and electronic equipment

    CN116796842A