NAS hyperspectral image crop classification method improved by combining noise inspiration and attention mechanism
By adopting neural architecture search technology in hyperspectral image classification, combining channel attention and focus loss function, the problem of insufficient efficiency and accuracy of traditional methods in noise data processing is solved, and higher robustness and accuracy are achieved. Suitable for classification tasks for complex hyperspectral data.
Patent Information
- Application Number
- CN202411310186.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-19
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional hyperspectral image classification methods are inefficient and insufficiently accurate when processing complex and diverse data, making it difficult to adapt to rapidly changing application needs, especially in datasets where noise labels exist, making it difficult to improve the robustness and accuracy of the model.
Using a neural architecture search method, combining efficient channel attention mechanism, enhanced position and scale perception mechanism and focus loss function, network structure is automatically designed and the model is optimized to improve the processing capability and classification accuracy of noise data.
It significantly improves the accuracy of hyperspectral image classification and the robustness of the model, reduces the time and experience dependence of artificial design, improves operational efficiency and prediction performance, and can process complex hyperspectral data more effectively.
Smart Images

Figure BDA0005050416890000041 
Figure BDA0005050416890000081 
Figure HDA0005050416900000011
Abstract
Description
Technical Field
[0001] The present invention relates to the field of remote sensing image classification, and in particular to a NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement. Background Art
[0002] Hyperspectral imaging (HSI) technology plays a vital role in crop classification because it can obtain detailed spectral information of objects. This technology can provide accurate and rapid crop species identification for large areas of farmland in a short period of time, greatly improving the efficiency and refined management level of agricultural production. Compared with traditional image analysis methods, hyperspectral imaging technology can accurately distinguish different types of crops by obtaining full spectral information of reflected light from objects, and can effectively identify them even in similar vegetation. This provides strong technical support for guiding modern agricultural production, pest and disease monitoring, and crop growth status assessment. Existing studies have shown that by using hyperspectral data, crop lesions can be accurately detected and identified at an early stage, allowing agricultural producers to take timely measures to avoid potential large-scale losses. At the same time, the application of hyperspectral technology also helps to monitor soil quality and moisture conditions.
[0003] Faced with complex hyperspectral images, traditional classification methods, although effective in some cases, often show inefficiency and lack of accuracy when processing such data. Hand-designed feature extraction and classification models are often time-consuming and labor-intensive when dealing with the diversity and complexity of data, and are difficult to adapt to rapidly changing application requirements, especially in crop classification. In contrast, deep learning-based methods, especially convolutional neural networks (CNNs), have become a more popular choice because of their ability to automatically learn and extract complex features of data. These models are able to capture rich spatial-spectral information from large amounts of data end-to-end, providing powerful data processing capabilities for hyperspectral image classification.
[0004] To further improve the adaptability and accuracy of the model, this study used the neural architecture search (NAS) technique based on differentiable architecture search (DARTS), which can automatically design the network structure that is most suitable for hyperspectral data. In addition, we also combined the processing strategy for noisy data, using efficient channel attention (ECA) and enhanced position and scale awareness (EPSA) attention mechanisms, as well as the focal loss function. The combination of these innovative technologies not only significantly improves the accuracy of the classification task, but also enhances the robustness of the model when dealing with complex data, especially in datasets with noisy labels. With this DARTS-based approach, we are able to more accurately identify and classify various features in hyperspectral images, greatly improving the operation efficiency and prediction performance. Summary of the invention
[0005] This paper conducts in-depth research on the processing of complex data and noisy labels in hyperspectral image classification, innovatively combines efficient channel attention modules and focal loss functions, and achieves efficient optimization and robustness improvement of the model in the neural architecture search framework. This innovative method not only significantly enhances the model's ability to handle noisy data, but also improves the accuracy and adaptability of classification through enhanced position and scale perception mechanisms, profoundly promoting the development of hyperspectral image classification technology, and providing important scientific and practical value for processing complex and high-dimensional data.
[0006] The object of the present invention is achieved in that:
[0007] A NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement includes the following steps:
[0008] Step a: Obtain a hyperspectral image dataset, artificially inject random noise into the image data, and normalize the processed data using the min-max normalization method to ensure that all eigenvalues are processed at the same scale for subsequent analysis and processing;
[0009] Step b, construct a neural network architecture search model for hyperspectral image classification, by defining the search space, search strategy and performance evaluation method, integrating the channel attention mechanism and the position scale perception mechanism to improve the computational efficiency and the adaptability of the model, and using the focal loss function to enhance the processing of difficult samples and the noise resistance performance;
[0010] Step c: Searching for neural network architectures and performing architecture evaluation, using the training data set to train the search model, evaluating the performance of different architectures, selecting the best architecture based on predetermined evaluation criteria, and outputting it for subsequent training and application;
[0011] Step d: Use the final output architecture to train the model, initialize the model with the optimal network architecture parameters, monitor the performance of the model during training, and adjust the learning rate, batch size, etc. as needed to further improve the model effect;
[0012] Step e: Evaluation and verification: Use the complete test set to conduct a comprehensive evaluation of the model through various indicators and output the classification results;
[0013] The above-mentioned NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement, step b specifically includes the following steps:
[0014] Step b1, design a neural network architecture search model for hyperspectral image crop classification. By defining a broad search space covering a variety of possible network layers and connection methods, combined with a differential architecture search method, various architecture options can be efficiently searched in a continuous space;
[0015] Step b2: Integrate an efficient channel attention mechanism into the search model and use one-dimensional convolution to replace the fully connected layer to reduce computational complexity and parameter quantity;
[0016] Step b3: Introduce a position and scale perception mechanism to enable the model to dynamically adjust its attention to features at different positions and scales in the image, thereby more accurately classifying complex hyperspectral images. This mechanism helps the model to more effectively capture local and global features when processing hyperspectral images, and optimizes its adaptability to complex scenes and classification accuracy;
[0017] Step b4: Use the focus loss function to give higher weights to samples that are difficult to classify during the training process, reducing the adverse effects of noisy labels. In this way, the model can focus more on challenging samples and improve the accuracy and stability of classification;
[0018] In the above-mentioned NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement, step c specifically includes the following steps:
[0019] Step c1: Use the prepared training data set to train the constructed neural network architecture search model. During the training process, the architecture parameters are gradually optimized through the DARTS method to ensure efficient exploration of possible network structures in the search space;
[0020] Step c2: During the training process, the candidate architectures are evaluated in real time. The performance of each candidate architecture is quantified based on the model's classification accuracy, computational efficiency, number of parameters, model complexity and other predetermined evaluation criteria;
[0021] Step c3: Comprehensively evaluate the results and select the best neural network architecture based on the set optimal performance balance target. Output the architecture with the best performance as the final selected architecture for subsequent model training and use;
[0022] The above-mentioned NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement, step d specifically includes the following steps:
[0023] Step d1: Initialize the model using the optimal network architecture selected from the architecture search. During the initialization process, load the architecture design obtained from the search, including the type of each layer, connection method, and hyperparameter settings, to ensure that the model structure meets the expected optimization design;
[0024] Step d2: Train the model on the training data set and use the Adam optimizer to update the model weights. By gradually adjusting the weights, the model learns the features and patterns of the hyperspectral data, while dynamically monitoring the model's focal loss function and classification accuracy to ensure that the model converges to the optimal state;
[0025] Step d3: Adjust the training hyperparameters, including learning rate, batch size, regularization coefficient, etc., according to the convergence speed of the model, change of loss function, and improvement of accuracy during training;
[0026] Step d4: After the training is completed, save the weights and structural configuration of the final model to ensure that the model can be accurately reproduced and the classification task can be completed in subsequent tests and actual applications;
[0027] Beneficial effects:
[0028] The hyperspectral image classification method based on neural architecture search proposed in the present invention has achieved improvements in classification performance and model robustness by introducing a channel-based attention mechanism, a position and scale perception mechanism, and a focal loss function. Specifically, this method reduces the time and experience dependence of human design by automatically searching for optimized network architectures, and significantly improves the classification accuracy and convergence speed of the model. In addition, by adopting one-dimensional convolution to replace the traditional fully connected layer and introducing multiple attention mechanisms, the computational complexity is significantly reduced, and the model's responsiveness to changes in different positions and scales is improved; the use of the focal loss function further enhances the robustness of the model when processing data with noisy labels. Overall, this method can more effectively process complex hyperspectral data and improve the robustness and reliability of the model in practical applications. BRIEF DESCRIPTION OF THE DRAWINGS
[0029] Figure 1 This is the overall flow chart of the NAS hyperspectral image crop classification method that combines noise inspiration and attention mechanism improvement in the method of the present invention.
[0030] Figure 2 This is a schematic diagram of the overall network structure of the NAS hyperspectral image crop classification method that combines noise inspiration and attention mechanism improvement in the method of the present invention.
[0031] Figure 3 Schematic diagram of the efficient channel attention mechanism in the method of the present invention
[0032] Figure 4 It is a pseudo-color image of the Xuzhou data set in the method of the present invention.
[0033] Figure 5 This is a comparison chart of the classification results of different methods of the Xuzhou data set in the method of the present invention under noise-free conditions.
[0034] Figure 6 It is a comparison chart of classification results of different methods of the Xuzhou data set under 12% noise conditions in the method of the present invention.
[0035] Figure 7 It is a comparison chart of classification results of different methods of the Xuzhou data set under 24% noise conditions in the method of the present invention. DETAILED DESCRIPTION
[0036] In order to make the objectives, technical solutions and features of the present invention more clear, the specific implementation methods of the present invention are further described in detail below with reference to the accompanying drawings.
[0037] A NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement in this specific implementation method is shown in the flowchart as follows: Figure 1 The overall network structure diagram is shown in Figure 2 As shown, the following steps are included:
[0038] Step a: Obtain a hyperspectral image dataset and artificially add random noise to the data to enhance the robustness of the model to noise. You can choose to add Gaussian noise or salt and pepper noise, etc., and set the type and intensity of noise to simulate the noise conditions that may be encountered under actual observation conditions. Perform min-max normalization on the processed data and scale the data values to between 0 and 1 to eliminate differences between different scales, enhance the stability of model training, and ensure comparability between data.
[0039] In this specific implementation, the public Xuzhou hyperspectral dataset is used. After adding noise to the dataset, the input samples are min-max normalized. The formula is:
[0040]
[0041] Among them, x i is the i-th sample, and the sample data is mapped to [0,1] after normalization.
[0042] Xuzhou hyperspectral dataset: The Xuzhou hyperspectral image dataset used in the method of the present invention was collected by the airborne HYSPEX hyperspectral camera in November 2014, covering a typical mixed landscape area in the suburbs of Xuzhou. The dataset has a spatial range of 500×260 pixels and a high spatial resolution of 0.73 meters, which can accurately capture different types of surface features. The dataset contains nine different types of feature coverage, including bare land, lakes, coal piles, cement ground, crops, trees, and buildings with red tiles, reflecting the complex and diverse distribution characteristics of features. The complexity of the Xuzhou dataset is reflected in the rich spectral information and fine spatial resolution in its hyperspectral images, which makes it significantly challenging to distinguish between classes of features with similar spectral characteristics but different spatial distributions. The scenes of this dataset are not only diverse, but also the number of samples in each category is unbalanced, which increases the difficulty of data classification and puts higher requirements on the generalization ability, noise resistance and classification accuracy of the model.
[0043] Step b: Construct a neural network architecture search model, that is, build a network model for searching the final architecture of the neural network according to the specific requirements of different hyperspectral image data sets, including constructing search space, search strategy, and performance evaluation strategy. The model integrates a channel-based attention mechanism and replaces the traditional fully connected layer with a one-dimensional convolution to improve computational efficiency. The position and scale perception mechanism is introduced to optimize the model's response to images at different positions and scales, and enhance the model's adaptability and classification accuracy. The focal loss function is implemented to process difficult classification samples and reduce the impact of noise labels on classification results. The specific steps include:
[0044] Step b1, design a neural network architecture search model for hyperspectral image crop classification. By defining a broad search space covering a variety of possible network layers and connection methods, combined with a differential architecture search method, various architecture options can be efficiently searched in a continuous space;
[0045] Step b2: Integrate the channel attention mechanism into the search model by replacing the fully connected layer with a one-dimensional convolution in the ECA module to reduce the computational complexity and the number of parameters.
[0046] The specific steps are as follows:
[0047] The channel attention mechanism is integrated into the model by replacing the traditional SE module with a more efficient ECA module. Although the SE module can effectively learn the correlation of feature channels, the fully connected layer it uses introduces a large number of parameters when performing channel attention calculations, resulting in increased computational complexity and storage requirements, which is particularly evident in hyperspectral image classification tasks. To solve this problem, the ECA module uses a one-dimensional convolution operation to replace the fully connected layer in the SE module. This approach not only simplifies the calculation process, but also avoids the introduction of additional parameters. Specifically, the ECA module realizes cross-channel information interaction through local one-dimensional convolution operations, without the need for the fully connected layer to perform global calculations on all channels, such as Figure 3 The calculation formula is as follows:
[0048] ECA(F)=σ(Conv1D(GlobalAvgPool(F)))
[0049] Among them, F represents the input feature map, GlobalAvgPool is a global average pooling operation that reduces the feature map to the channel dimension, Conv1D is a one-dimensional convolution operation for local interactions across channels, and σ is a Sigmoid activation function used to generate attention weights for each channel. Therefore, while maintaining sensitivity to important feature channels, the ECA module significantly reduces the computational complexity and memory overhead of the model, making the model more efficient and robust when processing hyperspectral data.
[0050] Step b3: Introduce a position and scale perception mechanism to enable the model to dynamically adjust the attention paid to features of different positions and scales in the image, thereby classifying complex hyperspectral images more accurately.
[0051] The specific steps are as follows:
[0052] By introducing a multi-scale feature reweighting module into the network, the model's sensitivity to image features at different positions and scales is enhanced. Specifically, the EPSA mechanism reweights spatial features at multiple scales, so that the model can not only maintain the ability to recognize large-scale structures, but also capture local detail changes more accurately. First, the input feature map F is rescaled, and feature representations of different scales are generated through convolution and pooling operations. Then, the features of each scale are weighted and recombined using an attention-based weight generator. The core calculation formula of the EPSA mechanism is:
[0053] EPSA(F)=τ(Sclae–Adjust(F))
[0054] Among them, the Sclae-Adjust (F) module dynamically adjusts the responses of different scales according to the image content, and τ is a variable activation function for feature fusion of different scales. This function adjusts the weights of features of different scales so that the model can better adapt to position and scale changes when processing hyperspectral images with complex structures.
[0055] Step b4: Use the focal loss function so that the model gives higher weights to samples that are difficult to classify during training, reducing the adverse effects caused by noisy labels;
[0056] The specific steps are as follows:
[0057] The focus loss function is used to optimize the model. The focus loss function adjusts the loss weight in the traditional cross entropy loss function so that the model pays more attention to samples that are difficult to classify during training, thereby effectively reducing the negative impact of noise labels. By introducing a modulation factor, samples that are easy to classify contribute less loss, while samples that are difficult to classify contribute more loss, allowing the model to focus more on challenging samples. Its calculation formula is:
[0058] FL(p t )=-α t (1-p t ) γ log(p t )
[0059] Among them, p t is the model’s predicted probability for the correct category, α t is a balancing factor used to adjust the weights of samples of different categories, and γ is a modulation factor used to control the loss weight of difficult-to-classify samples, which is usually set to 2.
[0060] Step c: Searching for neural network architectures and evaluating the searched architectures. Use the training data to train the search model, evaluate the performance of different searched architectures, select the best architecture based on the predetermined evaluation criteria, and output it for subsequent training and application, specifically including the following steps:
[0061] Step c1: Use the prepared training data set to train the constructed neural network architecture search model. During the training process, the architecture parameters are gradually optimized through the DARTS method to ensure efficient exploration of possible network structures in the search space;
[0062] The specific steps are as follows:
[0063] The DARTS method first defines multiple candidate operations for each layer of the network (such as different types of convolutional layers, pooling layers, etc.), then introduces differentiable slack variables, and represents the weight of each candidate operation as a parameter α. During the training process, by optimizing these architectural parameters α, the weighted sum of the candidate operations is calculated to select the best performing operation. The goal of this optimization process is to minimize the joint loss function between the architectural parameters α and the weight parameters ω:
[0064] L val (ω * (α),α)+L train (ω(α),α)
[0065] Among them, L val and L train Represent the loss functions on the training set and the validation set respectively, ω * (α) represents the optimal value of weight ω under the condition of fixed architecture parameter α. By optimizing the weight parameters on the training data and optimizing the architecture parameters on the validation data, the network architecture with the best performance can be efficiently searched.
[0066] Step c2: During the training process, the candidate architectures are evaluated in real time. The performance of each candidate architecture is quantified based on the model's classification accuracy, computational efficiency, number of parameters, model complexity and other predetermined evaluation criteria;
[0067] Step c3: Comprehensively evaluate the results and select the best neural network architecture based on the set optimal performance balance target. Output the architecture with the best performance as the final selected architecture for subsequent model training and use;
[0068] Step d: Use the final output architecture to train the model, initialize the model with the optimal network architecture parameters, monitor the performance of the model during training, and adjust the learning rate, batch size, etc. as needed to further improve the model effect. The specific steps include:
[0069] Step d1: Initialize the model using the optimal network architecture selected from the architecture search. During the initialization process, load the architecture design obtained from the search, including the type of each layer, connection method, and hyperparameter settings, to ensure that the model structure meets the expected optimization design;
[0070] Step d2: Use the Adam optimizer to update the model weights on the training data set. By adjusting the weights, the model learns the characteristics and patterns of the hyperspectral data, and dynamically monitors the loss function and classification accuracy to ensure effective convergence of the model.
[0071] The specific steps are as follows:
[0072] The model is trained on the training data set, and the Adam optimizer is used to dynamically update the model weights. First, the output of the model is calculated through forward propagation, and the selected loss function is used to evaluate the prediction error of the model. Based on the gradient information of the error, the Adam optimizer combines the mechanism of momentum and adaptive learning rate to gradually adjust the update step size of each parameter, so that the parameters of the model are constantly approaching the optimal solution. During the training process, the key performance indicators of the model are continuously monitored, including the change of loss value and classification accuracy, to ensure that the error in the training process is gradually reduced and convergence is achieved. If the model shows problems such as drastic fluctuations in loss value or unstable accuracy during training, it is necessary to check the convergence of the model and keep its training stable, so that the performance of the model can finally reach the ideal state. Through these dynamic monitoring and optimization, it is ensured that the model continuously improves the classification effect and robustness of hyperspectral data during the training process.
[0073] Step d3: Adjust the training hyperparameters, including learning rate, batch size, regularization coefficient, etc., according to the convergence speed of the model, change of loss function, and improvement of accuracy during training;
[0074] Step d4: After the training is completed, save the weights and structural configuration of the final model to ensure that the model can be accurately reproduced and the classification task can be completed in subsequent tests and actual applications;
[0075] Step e: Evaluation and verification: Use the complete test set to conduct a comprehensive evaluation of the model through various indicators and output the results;
[0076] The specific steps are as follows:
[0077] The model was evaluated using the complete test set, and the model performance was comprehensively analyzed using indicators such as overall accuracy, average accuracy, and Kappa coefficient. Table 1 shows the classification results of the proposed method on the Xuzhou hyperspectral dataset, as well as the classification performance under different noise levels (no noise, 12% noise, and 24% noise). The comparison methods include a method based on a three-dimensional convolutional neural network (3DCNN) and a multi-scale 3D convolutional neural network architecture search method (MS3ANAS). The results show that under all noise conditions, the overall accuracy (OA), average accuracy (AA), and Kappa coefficient of the proposed method are mostly better than those of other comparison methods, indicating that it has higher stability and adaptability when dealing with noise interference and uncertainty. Figure 4 , 5 , 6 show the comparison of classification results of different methods under different noise conditions.
[0078] Table 1 Comparison of the accuracy of different classification methods for Xuzhou hyperspectral data under various noises
[0079]
Claims
1. A NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement, characterized by: The following steps are involved: Step a: Obtain a hyperspectral image dataset, artificially inject random noise into the image data, and normalize the processed data using the min-max normalization method to ensure that all data are processed at the same scale for subsequent analysis and processing; Step b, construct a neural network architecture search model for hyperspectral image classification, by defining the search space, search strategy and performance evaluation method, integrating the channel attention mechanism and the position scale perception mechanism to improve the computational efficiency and the adaptability of the model, and using the focal loss function to enhance the processing of difficult samples and the noise resistance performance; Step c: Search for neural network architecture and perform architecture evaluation. Use the training data to train the search model, perform performance evaluation on the different architectures searched, select the best architecture based on the predetermined evaluation criteria, and output it for subsequent training and application; Step d: Use the final output architecture to train the model, initialize the model with the optimal network architecture parameters, monitor the performance of the model during training, and adjust the learning rate, batch size, etc. as needed to further improve the model effect; Step e: Evaluation and verification: Use the complete test set to conduct a comprehensive evaluation of the model through various indicators and output the results.
2. According to the NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement according to claim 1, step b specifically comprises the following steps: Step b1: Design a neural network architecture search model for hyperspectral image crop classification, define a wide search space, and combine the differential architecture search method to efficiently optimize the network architecture. Step b2: Integrate the channel attention mechanism into the search model and use one-dimensional convolution instead of the fully connected layer to reduce the computational complexity and the number of parameters. Step b3: Introduce a position and scale perception mechanism to enable the model to dynamically adjust the attention paid to features of different positions and scales in the image, thereby classifying complex hyperspectral images more accurately. Step b4: Use the focal loss function so that the model gives higher weights to samples that are difficult to classify during training, reducing the adverse effects of noisy labels.
3. According to the NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement according to claim 1, step c specifically comprises the following steps: Step c1, using the prepared training data set to train the constructed neural network architecture search model; Step c2: During the training process, the candidate architectures are evaluated in real time. The performance of each candidate architecture is quantified based on the model's classification accuracy, computational efficiency, number of parameters, model complexity and other predetermined evaluation criteria; Step c3: Comprehensively evaluate the results and select the best neural network architecture based on the set optimal performance balance target. Output the architecture with the best performance as the final selected architecture for subsequent model training and use.
4. According to the NAS hyperspectral image crop classification method combining noise inspiration and attention mechanism improvement according to claim 1, step d specifically comprises the following steps: Step d1, initialize the model using the optimal network architecture selected from the architecture search; Step d2: Use the Adam optimizer to update the model weights on the training data set. By adjusting the weights, the model learns the characteristics and patterns of the hyperspectral data, and dynamically monitors the loss function and classification accuracy to ensure effective convergence of the model. Step d3: Adjust the training hyperparameters, including learning rate, batch size, regularization coefficient, etc., according to the convergence speed of the model, change of loss function, and improvement of accuracy during training; Step d4: After training is completed, save the weights and structural configuration of the final model to ensure that the model can be accurately reproduced and the classification task can be completed in subsequent tests and actual applications.
Citation Information
Cited By
Neural network architecture searching method and system based on state feedback and loss perception
CN122635442A