Hyperspectral image intelligent classification method and system
Through the combination of DenseNet model and SVM classifier, the problems of high-dimensionality and computing resource limitation in hyperspectral image processing are solved, and high-precision and robust image classification are achieved, which improves the applicability and efficiency of the model.
Patent Information
- Application Number
- CN202411312745.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-20
- Publication Date
- 2025-01-07
AI Technical Summary
The high dimensions and complexity of hyperspectral images make traditional image processing algorithms difficult to process, manual feature extraction efficiency is low, and generalization capabilities are insufficient on different data sets, and computing resources are limited, which limits the application of the model.
DenseNet model combined with SVM classifier, DenseNet automatically extracts features of high-spectral images, and uses SVM for classification, and uses cross entropy loss and Adam optimizer for model training, further improving the applicability of the model through data normalization and feature extraction. and computational efficiency.
Improve the accuracy and robustness of hyperspectral image classification, enhance the generalization ability of the model, reduce the dependence on manual feature extraction, realize efficient operation under limited computing resources, and provide the model through comprehensive evaluation indicators. Performance analysis.
Smart Images

Figure CN119273974A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image data processing, and in particular to a hyperspectral image intelligent classification method and system thereof. Background Art
[0002] In the field of traditional hyperspectral image processing, image classification usually relies on manual feature extraction and simple machine learning algorithms. These methods often require a lot of domain knowledge and experience to design effective features, and their performance is limited when processing complex or large-scale data sets. With the development of deep learning technology, convolutional neural networks (CNNs) have become a powerful tool in image classification tasks. However, for data such as hyperspectral images with high dimensions and rich spectral information, more complex network structures are required to capture their inherent features and patterns.
[0003] The dimensionality of hyperspectral image data is much higher than that of regular images, which poses a challenge to traditional image processing algorithms because they usually have difficulty processing high-dimensional data;
[0004] Manual feature extraction methods are inefficient and difficult to adapt to changing image environments and complex classification tasks;
[0005] Existing classification models may perform well on a specific dataset but have poor generalization capabilities on new or different hyperspectral image datasets;
[0006] The complexity of hyperspectral images requires the model to have high computing resources, which limits the application of the model in resource-constrained environments. Summary of the invention
[0007] In order to solve the above-mentioned technical problems, the present invention provides a hyperspectral image intelligent classification method and system.
[0008] The technical solution of the present invention is achieved in this way:
[0009] A hyperspectral image intelligent classification method comprises the following steps:
[0010] S1, input hyperspectral image data and corresponding label data;
[0011] S2, normalizing the hyperspectral image data and the corresponding label data;
[0012] S3, build a hyperspectral image dataset for training;
[0013] S4, output hyperspectral image classification results;
[0014] S5. Evaluate the classification results.
[0015] Furthermore, the process of S2 normalizing the hyperspectral data and the corresponding label data is specifically to use StandardScaler to normalize the data, calculate the mean of each feature in the hyperspectral image data set, that is, the spectrum of each pixel, and standardize the data using the mean and standard deviation of each feature to ensure that the mean of each feature is 0 and the standard deviation is 1.
[0016] Furthermore, S3 specifically constructs a DenseNet model and defines a DenseNet model class, including input dimension, growth rate, number of layers, and number of classifications;
[0017] Construct the classifier linear layer (nn.Linear), flatten the convolution layer output and input it into the classifier, the input dimension is num_channels*(input_dim / / (2**num_layers)), and the output dimension is num_classes;
[0018] Implement the DenseNet model code by following the steps below:
[0019] Define the initialization function of the DenseNet model; the main structure of the model needs to be defined in the initialization function, including the feature extraction part (Dense block) and the classifier;
[0020] In the initialization function, the feature extraction part and the classifier are defined; the feature extraction part consists of several Dense blocks, each of which contains multiple densely connected layers; the classifier is one or more fully connected layers, which are used to map the output of the feature extraction part to the final classification result;
[0021] Each Dense block consists of multiple layers. After all Dense blocks are processed, global average pooling is used to compress the spatial dimension of the feature map to 1x1. Finally, the output after global average pooling is flattened and classified through a fully connected layer.
[0022] Implement the forward propagation function and define the process of data passing through the network; the forward propagation function defines the process of data passing through the network, including how the data passes through the feature extraction part and the classifier.
[0023] Furthermore, it also includes training the constructed DenseNet model. The training steps of DenseNet are: using cross entropy loss and Adam optimizer to train the model for 50 epochs; using the trained DenseNet model to extract features and use SVM for classification.
[0024] Furthermore, the process of model training using cross entropy loss and Adam optimizer is as follows: loading and preprocessing training data and validation data; creating an instance of the DenseNet model; using the cross entropy loss function; using the Adam optimizer; performing training for multiple epochs, each epoch including traversing the training data and updating the model parameters; and evaluating the performance of the model on the validation set.
[0025] Use the extracted features F(I) and the corresponding labels Y to train the SVM classifier. The training process of SVM involves solving an optimization problem.
[0026] For the new hyperspectral image I new , use the trained SVM model for classification to get the predicted category of the new image.
[0027] Furthermore, the step of evaluating the classification results in S5 includes calculating a confusion matrix, an overall accuracy (OA), an average accuracy (AA) and a Kappa coefficient.
[0028] A hyperspectral image intelligent classification system includes a data management and preprocessing module, a model building and training module, a classifier training and prediction module, a performance evaluation module and a user interaction and result display module.
[0029] The data management and preprocessing module integrates the functions of data input, data preprocessing and data normalization, and is responsible for receiving hyperspectral image data and its labels, and performing cleaning, format conversion, normalization and feature scaling;
[0030] The model building and training module integrates the functions of DenseNet model building, model training and feature extraction, and is responsible for designing and building deep learning models, using training data sets for model training, and extracting features for classification;
[0031] The classifier training and prediction module integrates the functions of SVM classifier training and classification prediction, is responsible for training the SVM classifier using the extracted features, and uses the trained classifier to predict new images;
[0032] The performance evaluation module is responsible for evaluating the performance of the classification results, including calculating the confusion matrix, overall accuracy (OA), average accuracy (AA) and Kappa coefficient, providing a comprehensive analysis of the classifier performance, helping to determine the effectiveness of the classifier and make necessary adjustments;
[0033] The user interaction and result display module integrates the functions of user interface and result visualization, provides a user interaction interface, and allows users to upload data, start classification, view evaluation results and visualization, and export classification reports.
[0034] Compared with the prior art, the present invention has the following beneficial effects:
[0035] 1. The present invention can automatically learn and extract complex features from hyperspectral images by using the DenseNet model, reducing the reliance on manual feature extraction. The densely connected structure of DenseNet helps to improve the learning ability of the model, thereby achieving higher accuracy in hyperspectral image classification tasks;
[0036] 2. By learning features in multiple Dense blocks, the model can be better generalized to different hyperspectral image datasets, improving the applicability of the model. The design of DenseNet reduces the amount of calculation by reusing feature maps, allowing the model to run efficiently under limited computing resources;
[0037] 3. Based on the features extracted by DenseNet, the use of SVM for classification further improves the accuracy and robustness of classification. It not only achieves classification, but also includes comprehensive evaluation indicators such as confusion matrix, overall accuracy, average accuracy and Kappa coefficient, providing a comprehensive evaluation of the model's performance. BRIEF DESCRIPTION OF THE DRAWINGS
[0038] Figure 1 This is one of the flow charts of a hyperspectral image intelligent classification method according to Example 1;
[0039] Figure 2 This is a second flow chart of a hyperspectral image intelligent classification method according to Example 1;
[0040] Figure 3 This is a system framework diagram of a hyperspectral image intelligent classification system according to Example 2. DETAILED DESCRIPTION
[0041] In order to make the purpose, features and advantages of the present invention more obvious and easy to understand, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the embodiments described below are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0042] Example 1
[0043] like Figure 1-2 As shown, this embodiment provides a hyperspectral image intelligent classification method, comprising the following steps:
[0044] S1, input hyperspectral image data and corresponding label data;
[0045] S2, normalizing the hyperspectral image data and the corresponding label data;
[0046] S3, build a hyperspectral image dataset for training;
[0047] S4, output hyperspectral image classification results;
[0048] S5. Evaluate the classification results.
[0049] Furthermore, the process of normalizing the hyperspectral data and the corresponding label data in S2 is specifically to use StandardScaler to normalize the data, and for each feature in the hyperspectral image data set, that is, the spectrum of each pixel, calculate its mean, and let X be an m×n matrix, where m is the number of samples, n is the number of features, that is, the number of spectral bands, and for the jth feature, its mean μ j The calculation formula is:
[0050] Where X ij is the jth eigenvalue of the i-th sample;
[0051] For each feature, calculate its standard deviation, standard deviation σ j It is used to measure the discreteness of data. The calculation formula is:
[0052]
[0053] The data is standardized using the mean and standard deviation of each feature. The standardized value X / , the calculation formula is:
[0054] It ensures that the mean of each feature is 0 and the standard deviation is 1.
[0055] When calculating the standard deviation, if all values of a feature are the same, the standard deviation will be zero. In this case, the standardization step will not be able to proceed, and the error of dividing by zero can be avoided by adding a small constant to the denominator; before standardization, missing values or outliers in the data should be checked and processed to ensure the accuracy of the standardization process.
[0056] Furthermore, S3 specifically constructs a DenseNet model and defines a DenseNet model class, including input dimension, growth rate, number of layers, and number of classifications;
[0057] In the model initialization function, add multiple Dense blocks, each containing the following layers:
[0058] a. Convolutional layer (nn.Conv2d), the number of input channels is num_channels, the number of output channels is growth_rate, the convolution kernel size is (1, 3), and the padding is (0, 1);
[0059] b. Batch normalization layer (nn.BatchNorm2d), normalizing growth_rate channels;
[0060] c. ReLU activation layer (nn.ReLU), using inplace activation;
[0061] d. Maximum pooling layer (nn.MaxPool2d), with a pooling window size of (1, 2);
[0062] Construct the classifier linear layer (nn.Linear), flatten the convolution layer output and input it into the classifier, the input dimension is num_channels*(input_dim / / (2**num_layers)), and the output dimension is num_classes;
[0063] Implement the DenseNet model code by following the steps below:
[0064] Define the initialization function of the DenseNet model; the main structure of the model needs to be defined in the initialization function, including the feature extraction part (Dense block) and the classifier;
[0065] For the input image X, the calculation of the initial convolutional layer can be expressed as:
[0066] X / =ReLU(BatchNorm2d(Conv2d(X,W init ,padding=(3,3),stride=2)));
[0067] Where X is the input image, W init is the weight of the initial convolutional layer, Conv2d represents a two-dimensional convolution operation, BatchNorm2d is a batch normalization operation, and ReLU is the activation function;
[0068] In the initialization function, the feature extraction part and the classifier are defined; the feature extraction part consists of several Dense blocks, each of which contains multiple densely connected layers; the classifier is one or more fully connected layers, which are used to map the output of the feature extraction part to the final classification result;
[0069] Each Dense block consists of multiple layers, and the calculation of each layer can be expressed as:
[0070]
[0071] is the concatenation of the outputs of all layers before the i-th layer, W (i) is the weight of the i-th layer, Concat represents the concatenation operation;
[0072] After all Dense blocks are processed, global average pooling is used to compress the spatial dimension of the feature map to 1x1:
[0073] is the output of the last Dense block, GAP stands for global average pooling;
[0074] Finally, the output of the global average pooling is flattened and passed through a fully connected layer for classification:
[0075] Y=Softmax(Linear(X global ,W classifier )), X global is the output after global average pooling, W classifier is the weight of the classifier layer, Linear represents the fully connected layer, and Softmax is the activation function used to convert the output into a probability distribution. In the actual model implementation, these operations will be encapsulated in different functions and classes and optimized and accelerated through the deep learning framework.
[0076] Implement the forward propagation function and define the process of data passing through the network; the forward propagation function defines the process of data passing through the network, including how the data passes through the feature extraction part and the classifier.
[0077] Furthermore, it also includes training the constructed DenseNet model. The training steps of DenseNet are: using cross entropy loss and Adam optimizer to train the model for 50 epochs; using the trained DenseNet model to extract features and use SVM for classification.
[0078] Furthermore, the process of model training using cross entropy loss and Adam optimizer is as follows: loading and preprocessing training data and validation data; creating an instance of the DenseNet model; using the cross entropy loss function; using the Adam optimizer; performing training for multiple epochs, each epoch including traversing the training data and updating the model parameters; and evaluating the performance of the model on the validation set.
[0079] Furthermore, the data preprocessing steps are as follows: / =Normalize(x,μ,σ), where x is the original image data, μ and σ are the normalized mean and standard deviation, X / is the normalized image data;
[0080] The loss function L is expressed as: N is the number of samples in the batch, C is the number of categories, and y i,c is the one-hot encoding of the true label of the i-th sample, is the probability distribution predicted by the model; on each batch of data, the weight W of the model is updated by back propagation: W new =W-η· Where η is the learning rate, is the gradient of the loss function L with respect to the weight W;
[0081] The Adam optimizer updates the weights in each iteration, specifically,
[0082]
[0083] m t and v t are the first- and second-order moment estimates, β1 and β2 are hyperparameters, is the gradient of the loss at time step t;
[0084]
[0085] and are the bias-corrected first- and second-order moment estimates;
[0086]
[0087] ∈ is a small constant used to prevent the denominator from being zero;
[0088] Perform multiple epochs of training and calculate the model output for each sample i in the batch Calculating Losses Perform back propagation and update the weights W new , repeat the above steps until all batches are processed, verify the model performance, and calculate the accuracy on the validation set;
[0089] For each sample i in the validation set, calculate the model output Calculate predicted category Comparing forecast categories and the true category c i , update the number of correct predictions.
[0090] Furthermore, the step of using SVM for classification is to use the trained DenseNet model to extract the features of the hyperspectral image, F(I)=f(I;θ), where I is the input hyperspectral image and f represents the feature extraction function of the DenseNet model;
[0091] Use the extracted features F(I) and the corresponding labels Y to train the SVM classifier. The training process of SVM involves solving an optimization problem:
[0092]
[0093] w is the normal vector of the decision plane, b is the bias term, ξ i is a slack variable used to handle incompletely separable data, C is a regularization parameter that controls the penalty intensity of the interval width, is the kernel function that maps features to a higher dimensional space, N is the number of training samples, and y i is the label of the i-th sample;
[0094] For the new hyperspectral image I new , use the trained SVM model to classify and get the predicted category y of the new image new :
[0095] Furthermore, the step of evaluating the classification results in S5 includes calculating the confusion matrix, the overall accuracy (OA), the average accuracy (AA) and the Kappa coefficient, as follows:
[0096] Confusion Matrix: CM ij =|{k:ify k,pred =i and y k,ture =j}|,y k,pred is the predicted label of the kth sample, y k,ture is the true label of the kth sample;
[0097] The confusion matrix CM is a C×C matrix, where C is the number of categories and each element CM ij Indicates the number of samples predicted to be category i but actually category j;
[0098] The overall accuracy is the ratio of correctly classified samples to the total number of samples:
[0099] The average accuracy is the average of the proportion of each category that is correctly classified:
[0100] The Kappa coefficient takes into account the probability of random classification and is the adjusted overall accuracy:
[0101]
[0102] PE is the expected value of the accuracy of the classifier's random classification.
[0103] For each sample in the test set, its predicted label and true label are recorded, and the confusion matrix is updated. The main diagonal elements of the confusion matrix are used to calculate the overall accuracy. For each category, the proportion of correct classification in that category is calculated, and then the average is taken to get the average accuracy. The Kappa coefficient is calculated by combining the overall accuracy and the expected accuracy of random classification to obtain the performance index of the SVM classifier, thereby evaluating its effect on the hyperspectral image classification task.
[0104] This embodiment utilizes the deep learning capability of the DenseNet model and the classification advantages of SVM to achieve automated feature extraction and high-precision image classification. Through the densely connected structure of DenseNet, this method effectively processes high-dimensional image data, improves the efficiency and accuracy of feature extraction, and enhances the generalization ability of the model. The end-to-end learning process simplifies the work steps and reduces human intervention, while comprehensive evaluation indicators provide in-depth analysis of model performance. In addition, optimized data preprocessing and effective use of computing resources further enhance the practicality and efficiency of this method, making it a powerful tool for various hyperspectral image processing and analysis tasks.
[0105] Example 2
[0106] like Figure 3 As shown, this embodiment aims to provide a hyperspectral image intelligent classification system, including a data management and preprocessing module, a model building and training module, a classifier training and prediction module, a performance evaluation module and a user interaction and result display module.
[0107] The data management and preprocessing module integrates the functions of data input, data preprocessing and data normalization, and is responsible for receiving hyperspectral image data and its labels, and performing cleaning, format conversion, normalization and feature scaling;
[0108] The model building and training module integrates the functions of DenseNet model building, model training and feature extraction, and is responsible for designing and building deep learning models, using training data sets for model training, and extracting features for classification;
[0109] The classifier training and prediction module integrates the functions of SVM classifier training and classification prediction, is responsible for training the SVM classifier using the extracted features, and uses the trained classifier to predict new images;
[0110] The performance evaluation module is responsible for evaluating the performance of the classification results, including calculating the confusion matrix, overall accuracy (OA), average accuracy (AA) and Kappa coefficient, providing a comprehensive analysis of the classifier performance, helping to determine the effectiveness of the classifier and make necessary adjustments;
[0111] The user interaction and result display module integrates the functions of user interface and result visualization, provides a user interaction interface, and allows users to upload data, start classification, view evaluation results and visualization, and export classification reports.
[0112] The data management and preprocessing module receives and processes the hyperspectral image data, including data cleaning, format conversion and normalization, to prepare high-quality input features. Next, the model building and training module uses deep learning technology, especially the DenseNet architecture, to automatically extract image features and train the model. Then, the classifier training and prediction module uses the extracted features to train the SVM classifier and make classification predictions for new images. Subsequently, the performance evaluation module comprehensively evaluates the classification performance by calculating indicators such as confusion matrix, overall accuracy, average accuracy and Kappa coefficient. Finally, the user interaction and result display module provides an interactive interface for users, enabling them to upload data, start the classification process, view the evaluation results, and intuitively understand the classification effect through visual display. The whole process realizes the automation and intelligence of hyperspectral image classification and improves the efficiency and accuracy of classification.
Claims
1. A hyperspectral image intelligent classification method, characterized in that: The following steps are involved: S1, input hyperspectral image data and corresponding label data; S2, normalizing the hyperspectral image data and the corresponding label data; S3, build a hyperspectral image dataset for training; S4, output hyperspectral image classification results; S5. Evaluate the classification results.
2. The method for intelligent classification of hyperspectral images according to claim 1, characterized in that: The process of normalizing the hyperspectral data and the corresponding label data in S2 is specifically to use StandardScaler to normalize the data, and for each feature in the hyperspectral image data set, that is, the spectrum of each pixel, calculate its mean, and let X be an m×n matrix, where m is the number of samples, n is the number of features, that is, the number of spectral bands, and for the jth feature, its mean μ j The calculation formula is: Where X ij is the jth eigenvalue of the i-th sample; For each feature, calculate its standard deviation, standard deviation σ j It is used to measure the discreteness of data. The calculation formula is: The data is standardized using the mean and standard deviation of each feature. The standardized value X / , the calculation formula is: It ensures that the mean of each feature is 0 and the standard deviation is 1.
3. The method for intelligent classification of hyperspectral images according to claim 1, characterized in that: Specifically, S3 constructs a DenseNet model and defines a DenseNet model class, including input dimension, growth rate, number of layers, and number of categories; In the model initialization function, add multiple Dense blocks, each containing the following layers: a. Convolutional layer (nn.Conv2d), the number of input channels is num_channels, the number of output channels is growth_rate, the convolution kernel size is (1, 3), and the padding is (0, 1); b. Batch normalization layer (nn.BatchNorm2d), normalizing growth_rate channels; c. ReLU activation layer (nn.ReLU), using inplace activation; d. Maximum pooling layer (nn.MaxPool2d), with a pooling window size of (1, 2); Construct a classifier linear layer (nn.Linear), flatten the convolutional layer output and input it into the classifier, the input dimension is num_channels*(input_dim / / (2**num_layers)), and the output dimension is num_classes; Implement the DenseNet model code by following the steps below: Define the initialization function of the DenseNet model; the main structure of the model needs to be defined in the initialization function, including the feature extraction part (Dense block) and the classifier; For the input image X, the calculation of the initial convolutional layer can be expressed as: X / =ReLU(BatchNorm2d(Conv2d(X,W init ,padding=(3,3),stride=2))); Where X is the input image, W init is the weight of the initial convolutional layer, Conv2d represents a two-dimensional convolution operation, BatchNorm2d is a batch normalization operation, and ReLU is the activation function; In the initialization function, the feature extraction part and the classifier are defined; the feature extraction part consists of several Dense blocks, each of which contains multiple densely connected layers; the classifier is one or more fully connected layers, which are used to map the output of the feature extraction part to the final classification result; Each Dense block consists of multiple layers, and the calculation of each layer can be expressed as: is the concatenation of the outputs of all layers before the i-th layer, W (i) is the weight of the i-th layer, Concat represents the concatenation operation; After all Dense blocks are processed, global average pooling is used to compress the spatial dimension of the feature map to 1x1: is the output of the last Dense block, GAP stands for global average pooling; Finally, the output of the global average pooling is flattened and passed through a fully connected layer for classification: Y=Softmax(Linear(X global ,W classifier )), X global is the output after global average pooling, W classifier is the weight of the classifier layer, Linear represents the fully connected layer, and Softmax is the activation function used to convert the output into a probability distribution; Implement the forward propagation function and define the process of data passing through the network; the forward propagation function defines the process of data passing through the network, including how the data passes through the feature extraction part and the classifier.
4. The method for intelligent classification of hyperspectral images according to claim 3, characterized in that: It also includes training the constructed DenseNet model. The training steps of DenseNet are to use cross entropy loss and Adam optimizer for model training for 50 epochs; use the trained DenseNet model to extract features and use SVM for classification.
5. The method for intelligent classification of hyperspectral images according to claim 4, characterized in that: The process of model training using cross entropy loss and Adam optimizer is as follows: loading and preprocessing training data and validation data; creating an instance of the DenseNet model; using the cross entropy loss function; using the Adam optimizer; training for multiple epochs, each epoch including traversing the training data and updating the model parameters; and evaluating the performance of the model on the validation set.
6. The method for intelligent classification of hyperspectral images according to claim 5, characterized in that: The data preprocessing steps are as follows: / =Normalize(x,μ,σ), where x is the original image data, μ and σ are the normalized mean and standard deviation, X / is the normalized image data; The loss function L is expressed as: N is the number of samples in the batch, C is the number of categories, and y i,c is the one-hot encoding of the true label of the i-th sample, is the probability distribution predicted by the model; on each batch of data, the weight W of the model is updated by back propagation: Where η is the learning rate, is the gradient of the loss function L with respect to the weight W; The Adam optimizer updates the weights in each iteration, specifically, m t and v t are the first- and second-order moment estimates, β1 and β2 are hyperparameters, is the gradient of the loss at time step t; and are the bias-corrected first- and second-order moment estimates; μ is a small constant used to prevent the denominator from being zero; Perform multiple epochs of training and calculate the model output for each sample i in the batch Calculating Losses Perform back propagation and update the weights W new , repeat the above steps until all batches are processed, verify the model performance, and calculate the accuracy on the validation set; For each sample i in the validation set, calculate the model output Calculate predicted category Comparing forecast categories and the true category c i , update the number of correct predictions.
7. The method for intelligent classification of hyperspectral images according to claim 4, characterized in that: The step of using SVM for classification is to use the trained DenseNet model to extract the features of the hyperspectral image, F(I)=f(I;θ), where I is the input hyperspectral image and f represents the feature extraction function of the DenseNet model; Use the extracted features F(I) and the corresponding labels Y to train the SVM classifier. The training process of SVM involves solving an optimization problem: w is the normal vector of the decision plane, b is the bias term, ξ i is a slack variable used to handle incompletely separable data, C is a regularization parameter that controls the penalty intensity of the interval width, is the kernel function that maps features to a higher dimensional space, N is the number of training samples, and y i is the label of the i-th sample; For the new hyperspectral image I new , use the trained SVM model to classify and get the predicted category y of the new image new :
8. The method for intelligent classification of hyperspectral images according to claim 1, characterized in that: The step of evaluating the classification results in S5 includes calculating the confusion matrix, the overall accuracy (OA), the average accuracy (AA) and the Kappa coefficient, as follows: Confusion Matrix: CM ij =|{k:ify k,pred =i and y k,ture =j}|,y k,pred is the predicted label of the kth sample, y k,ture is the true label of the kth sample; The confusion matrix CM is a C×C matrix, where C is the number of categories and each element CM ij Indicates the number of samples predicted to be category i but actually category j; The overall accuracy is the ratio of correctly classified samples to the total number of samples: The average accuracy is the average of the proportion of each category that is correctly classified: The Kappa coefficient takes into account the probability of random classification and is the adjusted overall accuracy: PE is the expected value of the accuracy of the classifier's random classification.
9. The method for intelligent classification of hyperspectral images according to claim 1, characterized in that: The S5 also includes visualizing the output final classification result, specifically, drawing a heat map, creating a matrix H, whose rows correspond to the classification results and columns correspond to the actual labels, and each element H in the matrix H ij Represents the number of samples predicted to be category i but actually category j, that is, the elements of the confusion matrix; Compare the classification results with the actual labels, and use a heatmap visualization tool or library to display the matrix H. The depth of the color in the heatmap can represent the size of the element value, thus intuitively showing the performance of the classifier on different categories; Output the final classification result and convert the classification result y pred With the actual label y ture The comparison is carried out and the classification results of each sample are output to comprehensively evaluate and demonstrate the performance of the SVM classifier in the hyperspectral image classification task.
10. A hyperspectral image intelligent classification system, characterized by: It includes data management and preprocessing module, model building and training module, classifier training and prediction module, performance evaluation module and user interaction and result display module; The data management and preprocessing module integrates the functions of data input, data preprocessing and data normalization, and is responsible for receiving hyperspectral image data and its labels, and performing cleaning, format conversion, normalization and feature scaling; The model building and training module integrates the functions of DenseNet model building, model training and feature extraction, and is responsible for designing and building deep learning models, using training data sets for model training, and extracting features for classification; The classifier training and prediction module integrates the functions of SVM classifier training and classification prediction, is responsible for training the SVM classifier using the extracted features, and uses the trained classifier to predict new images; The performance evaluation module is responsible for evaluating the performance of the classification results, including calculating the confusion matrix, overall accuracy (OA), average accuracy (AA) and Kappa coefficient, providing a comprehensive analysis of the classifier performance, helping to determine the effectiveness of the classifier and make necessary adjustments; The user interaction and result display module integrates the functions of user interface and result visualization, provides a user interaction interface, and allows users to upload data, start classification, view evaluation results and visualization, and export classification reports.