Deep learning model-based imperfect soybean hyperspectral imaging classification method
By adopting a dual-channel feature fusion model and attention mechanism method in soybean quality detection, we can effectively distinguish and utilize the spectral information of imperfect particles and normal particles, and solve the problem of low classification accuracy in the existing technology, and realize high-precision soybean quality grading and defect detection.
Patent Information
- Application Number
- CN202510184443.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-19
- Publication Date
- 2025-06-27
AI Technical Summary
The prior art is difficult to effectively distinguish and utilize the spectral information of imperfect particles and normal particles in soybean quality detection, resulting in a decrease in classification accuracy and affecting the actual application effect.
A method of imperfect soybean hyperspectral imaging classification based on the dual-channel feature fusion model is proposed. By constructing a dual-channel feature extraction model, the attention mechanism is used to perform feature fusion, and the comprehensive characterization of imperfect soybean characteristics is achieved.
The accuracy of soybean quality grading and defect detection is significantly improved, with classification accuracy reaching 95.13% and 94.00%, which is better than the traditional support vector machine and convolutional neural network methods.
Smart Images

Figure CN120219792A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of agricultural information technology, especially the application of hyperspectral imaging technology in the quality detection of agricultural products. Specifically, it relates to a classification method for imperfect soybean hyperspectral imaging based on a dual-channel feature fusion model, aiming to provide a new solution for the rapid and accurate classification of imperfect soybeans. Background Art
[0002] In recent years, hyperspectral imaging technology, as a rapid, non-destructive, and accurate detection technology, has shown great potential in the field of agricultural product quality detection. This technology combines spectroscopy and imaging technology, and can simultaneously obtain the image information and spectral information of the object to be measured, so as to comprehensively reflect the physical and chemical properties of the object to be measured. There have been many studies on using hyperspectral imaging technology to identify and classify different grades of soybeans, providing a new technical means for the rapid, non-destructive, and accurate detection of soybean quality, which is of great significance for ensuring food safety and improving agricultural production efficiency.
[0003] Most of the existing research on soybean quality detection based on hyperspectral imaging technology focuses on analyzing the spectral characteristics of soybean varieties, often ignoring the influence of imperfect grains (such as insect damage, mildew, breakage, etc.) that may exist in soybeans on spectral information. However, due to the influence of external environment or biological factors, the internal physical and chemical properties of these imperfect parts have changed, such as changes in moisture content, protein denaturation, mold growth, etc., and thus will show spectral characteristics different from those of the intact parts. Imperfect grains may exhibit phenomena such as peak position shift, peak shape change, and absorption peak intensity change on the spectral curve, and these changes reflect the changes in their internal composition and structure. If the traditional spectral feature analysis method is still used, these differential information will be mixed together, making it difficult for the model to accurately identify and distinguish soybeans of different qualities, resulting in misjudgment and ultimately leading to a decrease in classification accuracy and affecting the actual application effect.
[0004] Therefore, how to effectively distinguish and utilize the spectral information of imperfect grains and normal grains is crucial for improving the accuracy of soybean quality grading and defect detection. More precisely identifying and removing the spectral information of imperfect parts can improve the discrimination ability of the model for soybeans of different qualities, thereby improving the classification accuracy. At the same time, analyzing the imperfect spectral features can further explore the defect information contained therein, such as the degree of insect damage, the type of mildew, etc., providing more basis for the refined grading of soybeans. This is also the main problem that the present invention hopes to solve, that is, aiming at the deficiencies of the existing technology, a classification method that can effectively distinguish and utilize the spectral information of imperfect grains and intact grains is proposed to improve the accuracy of soybean quality grading and defect detection. Summary of the Invention
[0005] In the existing soybean quality grading and defect detection technologies, how to accurately distinguish and utilize the spectral information of imperfect grains and normal grains has always been a technical bottleneck. Traditional classification methods often ignore the characteristics of imperfect grains, resulting in the classification accuracy being difficult to meet the actual requirements. To solve this problem, the present invention proposes a hyperspectral imaging classification method for imperfect soybeans based on a dual-channel feature fusion model. The core of this method is to construct a dual-channel feature extraction model to ensure that both spectral and image features are fully captured and utilized. On this basis, advanced feature fusion strategies such as the attention mechanism are adopted to adaptively fuse the features extracted from the two channels to achieve a comprehensive characterization of the features of imperfect soybeans. Finally, a high-precision classification model is constructed using the fused feature information to achieve accurate classification of soybeans of different qualities. The present invention significantly improves the accuracy of soybean quality grading and defect detection by effectively distinguishing and utilizing the spectral information of imperfect grains and normal grains, providing technical support for the intelligent development of the soybean industry. To achieve the above object, the present invention provides the following solutions:
[0006] Step 1: Strictly follow the national standards of GB 1352-2023 and GB / T 5494-2019 to systematically select five types of soybean samples. These five types are normal soybeans, damaged soybeans, moldy soybeans, spotted soybeans, and insect-eaten soybeans. This process not only needs to ensure the diversity of the samples but also their representativeness to better reflect the actual situation of imperfect soybeans. During the sample selection process, focus on the appearance characteristics and growth environment of each type of soybean to ensure the quality and applicability of the samples. These samples will lay the foundation for subsequent hyperspectral imaging and data analysis;
[0007] Step 2: Use hyperspectral imaging technology to collect detailed imaging data of the selected soybean samples. This process will cover two bands: visible-near infrared and short-wave infrared. When imaging, ensure the use of high-resolution imaging equipment to obtain high-quality spectral image data. By recording imaging parameters such as wavelength range, spectral resolution, and spatial resolution, etc., provide an accurate data basis for subsequent analysis. In addition, consider the impact of environmental factors on imaging quality, such as light intensity, temperature, and humidity, etc., to ensure the consistency and reliability of the data;
[0008] Step 3: Construct a soybean classification prediction model based on dual-channel feature fusion and attention mechanism. Design a dual-channel input structure to input one-dimensional spectral data and two-dimensional image data respectively. Through this structure, the complementary characteristics of spectral information and image information can be fully utilized to improve the classification ability of the model. Use a convolutional neural network to extract spectral features and image features to ensure the comprehensiveness and accuracy of feature extraction. Implement feature fusion, and effectively combine the features of spectral data and image data through methods such as feature concatenation and feature addition. At the same time, introduce an attention mechanism to enable the model to pay more attention to important features and suppress the interference of irrelevant features. In addition, a residual connection structure will be adopted to alleviate the problem of gradient disappearance during the training process of deep networks, thereby accelerating model convergence and improving the learning ability of the model. Model training will be based on the labeled soybean sample data, and the cross-validation method will be used to optimize the model parameters to ensure the robustness and stability of the model. During the training process, the performance of the model will be continuously monitored, and hyperparameters such as the learning rate and the number of training epochs will be adjusted. Construct a soybean classification prediction model of support vector machine and convolutional neural network. Perform preprocessing on spectral data to eliminate noise and background interference. Adopt methods such as the first derivative and standard normal variate transformation to improve the signal-to-noise ratio. This step is crucial because hyperspectral data is usually subject to various interferences, and good preprocessing can significantly improve the accuracy of subsequent analysis. Through a feature selection algorithm, select the feature bands that have a significant response to soybean classification. This process not only helps to reduce the data dimension, improve the computational efficiency, but also enhances the model's recognition ability for specific categories. Adopt methods such as the gray-level co-occurrence matrix to extract the texture features of the image in order to more comprehensively describe the external features of soybeans. In this process, morphological feature extraction techniques will also be combined to analyze information such as the shape and size of soybeans to further enrich the feature library. After feature extraction is completed, the spectral information of the extracted feature bands will be fused with the image features. By constructing feature vectors, the soybean classification prediction will be carried out using support vector machine and convolutional neural network models respectively. At this stage, the model will be optimized for parameters, and appropriate kernel functions, penalty coefficients, network structures, and learning rates will be selected to improve the classification performance of the model. After successfully constructing a deep learning model based on traditional methods (support vector machine, convolutional neural network) and dual-channel feature fusion, it is necessary to comprehensively evaluate and compare their classification performance. For this purpose, five key indicators are adopted: accuracy, precision, recall, specificity, and F1 score. Accuracy reflects the correct proportion of the overall classification of the model, precision measures the accuracy of the model's prediction for a specific category, recall evaluates the model's recognition ability for specific category samples, specificity reflects the model's ability to distinguish different categories, and the F1 score comprehensively considers precision and recall. By calculating and comparing the performance of the three models on these indicators, their respective advantages and disadvantages can be clearly understood.By comparing the performance of the support vector machine, convolutional neural network model, and dual-channel feature fusion model, the impact of the feature fusion strategy on the model performance can be analyzed.
[0009] To ensure the reliability of the model in practical applications, an independent validation set needs to be used to evaluate the generalization ability of the model. For this purpose, an independent validation set containing 50 soybean samples that did not participate in the model training is used. After using the trained model to predict the data in the validation set, the classification results of the model will be displayed in a visual way, and the generalization ability and practical application potential of the model can be evaluated. If the model performs well on the validation set, it indicates that the model has strong generalization ability and can be applied to actual scenarios; otherwise, the model structure needs to be further optimized or the training strategy needs to be adjusted.
[0010] Step four, use the soybean classification prediction model for soybean hyperspectral imaging classification.
[0011] The imperfect soybean samples in the first step need to meet the standards of GB 1352-2023 and GB / T 5494-2019, and include various visible defects, such as insect damage, mildew, and breakage, covering different types of imperfect features to ensure the diversity and reliability of model training and validation.
[0012] In the second step, the hyperspectral images are collected by a visible light-near infrared system and a short-wave infrared system. Among them, the visible light-near infrared system uses an ICLB1620CCD camera with 804×440 pixels, an ImSpectorV10E imaging spectrometer with a spectral resolution of 2.8nm (382.67 - 1010.64nm), a halogen light source, and a moving platform. The speed of the moving platform is set to 7mm / s, the moving distance is set to 80 to 280mm, and the exposure time is 3 milliseconds. The short-wave infrared system uses an EM285CL camera with 320×256 pixels, an ImSpectorN25E imaging spectrometer with a wavelength range of 982.38 - 2562.36nm and a spectral resolution of 6.5nm, a halogen light source with an intensity set to 250, and a moving platform. The speed of the moving platform is set to 17mm / s, the moving distance is set to 80 to 300mm, and the exposure time is 1.5 milliseconds. Both systems are placed in a dark box to avoid light interference, and are preheated for 30 minutes before data collection to avoid light source interference.
[0013] The model construction, feature band selection, feature fusion strategy optimization, and model performance evaluation in Step 3 are all carried out in this environment. In the model construction stage, the PyTorch deep learning framework is used to implement a dual-channel feature extraction architecture based on convolutional neural networks. The design purpose of this architecture is to process the spectral and spatial features in hyperspectral remote sensing images separately. The spectral channel is responsible for capturing the correlations and variations between different bands, while the spatial channel focuses on the texture, shape, and context information in the image. Through this dual-channel design, the model can more comprehensively understand and utilize the multi-dimensional characteristics of hyperspectral data. In the feature band selection step, the ReliefF algorithm is used, which is an instance-based feature selection method. This algorithm screens out the set of bands that are most valuable for target recognition and classification by evaluating the contribution of each band to the classification result. This step can not only improve the efficiency of the model but also reduce data redundancy, highlight key information, and thus improve the classification accuracy. In terms of feature fusion strategy optimization, two main methods are compared: simple feature addition and a more complex attention mechanism. Feature addition is a direct fusion method that directly superimposes spectral and spatial features. The attention mechanism can dynamically adjust the weights of different features and adaptively highlight important information according to the characteristics of the input data. By experimentally comparing the performance of these two methods, the optimal fusion strategy is finally selected to achieve the best synergistic effect of spectral and spatial information. Model performance evaluation is a key link in the entire research process, and a variety of advanced tools and methods are used to comprehensively evaluate the model's performance. This process mainly relies on several core libraries in the Python ecosystem: Scikit-learn, NumPy, and Pandas, as well as libraries for data visualization. The Scikit-learn library is used for quantitative evaluation of model performance. This widely used machine learning library provides a rich set of evaluation metrics, including accuracy, precision, recall, F1-score, etc. These metrics can not only reflect the overall performance of the model but also deeply analyze the model's performance on different classes, helping to identify the advantages and disadvantages of the model. NumPy is used for efficient array operations and numerical calculations. NumPy's high-performance array objects and related tools provide strong support for large-scale data processing, especially important when dealing with high-dimensional remote sensing data. It can be used to calculate various statistics, such as mean, standard deviation, etc., which are important indicators for evaluating the stability and reliability of the model. The Pandas library is used for structured processing and analysis of data. It provides data structures such as DataFrame, making complex data operations simple and intuitive. In this step, Pandas can be used to organize and manage evaluation results, perform data cleaning, transformation, and aggregation operations, and prepare for subsequent analysis and visualization. Data visualization libraries are used to generate intuitive charts. Through this comprehensive evaluation method, the performance of the constructed model can be comprehensively and deeply understood.This includes not only the overall classification accuracy, but also the performance of the model in dealing with samples of different categories, as well as the stability and generalization ability of the model. This multi-angle and multi-dimensional evaluation lays a solid foundation for the further optimization and practical application of the model, and also provides a reliable methodological reference for hyperspectral remote sensing image classification research.
[0014] Model inversion visualization is also included in Step 4. Model inversion visualization is the last key link in the research process. It converts the classification results of the model into an intuitively visible image form, making the research results easier to understand and display. This process is mainly realized with the help of the OpenCV library. OpenCV is a powerful open-source computer vision library widely used in image processing and computer vision tasks. In this step, the image processing function of the OpenCV library is used to cleverly combine the classification results of the model with the original hyperspectral remote sensing image to generate a visualization result. This process mainly includes the following aspects: Reading the original hyperspectral remote sensing image using OpenCV. Converting the classification results of the model into color coding. Each classification category is assigned a unique color, so that different ground object types can be clearly distinguished in the final visualization result. Overlaying the color-coded classification results on the original image. This classification map is completely composed of the classification results of the model, and the color of each target object represents the category to which the point is classified. This visualization method highlights the classification results of the model more, helping to comprehensively evaluate the performance of the model.
[0015] Advantages of the present invention
[0016] The present invention proposes an imperfect soybean classification method based on a dual-channel feature fusion model and an attention mechanism, realizing the effective fusion of one-dimensional spectral data and two-dimensional image data. This method innovatively constructs a dual-channel deep learning model to extract spectral features and image features respectively, and realizes the adaptive fusion of the two features through the attention mechanism, thus more comprehensively capturing the feature information of imperfect soybeans. By deeply optimizing the model, the present invention effectively improves the classification accuracy of imperfect soybeans. In the visible-near infrared and short-wave infrared spectral ranges, this method shows excellent classification performance, with accuracies reaching 95.13% and 94.00% respectively, significantly superior to traditional support vector machine and convolutional neural network methods. This result shows that the dual-channel feature fusion model can more effectively extract and utilize the multi-source feature information of imperfect soybeans, thereby improving the classification accuracy. In addition, the research also found that the visible-near infrared spectral range is more effective for identifying imperfect soybeans. This may be because this band contains more feature information related to the morphology, color and texture of imperfect soybeans. This discovery provides an important reference for subsequent research. In the future, more attention can be focused on the visible-near infrared band to develop more accurate imperfect soybean identification technologies. Brief description of the drawings
[0017] To more clearly illustrate the technical solutions of this application, the following briefly introduces the drawings required in the embodiments. Obviously, the drawings in the following description are only some embodiments of this application. For those of ordinary skill in the art, without creative efforts, other drawings can also be obtained based on these drawings.
[0018] Figure 1 It is a flowchart of an imperfect soybean hyperspectral imaging classification method based on a dual-channel feature fusion model.
[0019] Figure 2 They are images of five types of imperfect soybeans.
[0020] Figure 3 It is a structural diagram of the dual-channel feature fusion model.
[0021] Figure 4 They are the results of model inversion visualization. Detailed implementation manners
[0022] The technical solutions of the present invention will be further described in detail in conjunction with the following specific examples.
[0023] The object of the present invention is to provide an imperfect soybean hyperspectral imaging classification method based on a dual-channel feature fusion model, which can effectively fuse one-dimensional spectral data and two-dimensional image data, improve the classification accuracy of imperfect soybeans, and provide a theoretical basis for optimizing the feature fusion strategy. The present invention aims to solve the problems existing in traditional classification methods when dealing with high-dimensional hyperspectral data, such as insufficient feature extraction and insufficient model generalization ability, so as to achieve rapid, accurate, and non-destructive detection of imperfect soybeans.
[0024] To make the above objects, features, and advantages of the present invention more obvious and understandable, the present invention will be further described in detail below in conjunction with the drawings and specific implementation manners. The embodiments of the present invention are exemplary and are intended to illustrate the principles of the present invention rather than limit the scope of the present invention. Those skilled in the art can modify or equivalently replace it after reading the technical solutions of the present invention without departing from the spirit and scope of the present invention.
[0025] As Figure 1 shown, the present invention provides an imperfect soybean hyperspectral imaging classification method based on a deep learning model, including the following steps:
[0026] Step 1: Strictly follow the national standards of GB 1352-2023 and GB / T 5494-2019 to systematically select five types of soybean samples. These five types are normal soybeans, damaged soybeans, moldy soybeans, spotted soybeans, and insect-eaten soybeans. This process not only ensures the diversity of the samples but also their representativeness to better reflect the actual situation of imperfect soybeans. During the sample selection process, focus on the appearance characteristics and growth environment of each type of soybean to ensure the quality and applicability of the samples. These samples will lay the foundation for subsequent hyperspectral imaging and data analysis;
[0027] Step 2: Use hyperspectral imaging technology to collect detailed imaging data of the selected soybean samples. This process will cover two bands: visible-near infrared and short-wave infrared. When conducting imaging, ensure the use of high-resolution imaging equipment to obtain high-quality spectral image data. By recording imaging parameters such as wavelength range, spectral resolution, and spatial resolution, provide an accurate data basis for subsequent analysis. In addition, consider the impact of environmental factors on imaging quality, such as light intensity, temperature, and humidity, to ensure the consistency and reliability of the data;
[0028] Step 3: Construct a soybean classification prediction model based on dual-channel feature fusion and attention mechanism. Design a dual-channel input structure to input one-dimensional spectral data and two-dimensional image data respectively. Through this structure, the complementary characteristics of spectral information and image information can be fully utilized to improve the classification ability of the model. Use a convolutional neural network to extract spectral features and image features to ensure the comprehensiveness and accuracy of feature extraction. Implement feature fusion, and effectively combine the features of spectral data and image data through methods such as feature concatenation and feature addition. At the same time, introduce an attention mechanism to enable the model to pay more attention to important features and suppress the interference of irrelevant features. In addition, a residual connection structure will be adopted to alleviate the problem of gradient disappearance during the training process of the deep network, thereby accelerating model convergence and improving the learning ability of the model. Model training will be based on the labeled soybean sample data, and the cross-validation method will be used to optimize the model parameters to ensure the robustness and stability of the model. During the training process, the performance of the model will be continuously monitored, and hyperparameters such as the learning rate and the number of training epochs will be adjusted. Construct a soybean classification prediction model of support vector machine and convolutional neural network. Perform preprocessing on the spectral data to eliminate noise and background interference. Adopt methods such as the first derivative and standard normal variate transformation to improve the signal-to-noise ratio. This step is crucial because hyperspectral data is usually subject to various interferences, and good preprocessing can significantly improve the accuracy of subsequent analysis. Through a feature selection algorithm, select the feature bands that have a significant response to soybean classification. This process not only helps to reduce the data dimension, improve the computational efficiency, but also enhances the model's recognition ability for specific categories. Adopt methods such as gray-level co-occurrence matrix to extract the texture features of the image in order to more comprehensively describe the external features of soybeans. In this process, morphological feature extraction techniques will also be combined to analyze information such as the shape and size of soybeans to further enrich the feature library. After completing feature extraction, the spectral information of the extracted feature bands and the image features will be used for data fusion. By constructing feature vectors, the soybean classification prediction will be carried out using support vector machine and convolutional neural network models respectively. At this stage, the parameters of the model will be optimized, and appropriate kernel functions, penalty coefficients, network structures and learning rates will be selected to improve the classification performance of the model. After successfully constructing the deep learning models based on traditional methods (support vector machine, convolutional neural network) and dual-channel feature fusion, it is necessary to comprehensively evaluate and compare their classification performance. For this purpose, five key indicators are adopted: accuracy, precision, recall, specificity and F1 score. Accuracy reflects the correct proportion of the overall classification of the model, precision measures the accuracy of the model's prediction for a specific category, recall evaluates the model's recognition ability for specific category samples, specificity reflects the model's ability to distinguish different categories, and the F1 score comprehensively considers precision and recall. By calculating and comparing the performance of the three models on these indicators, their respective advantages and disadvantages can be clearly understood.By comparing the performance of the support vector machine, convolutional neural network model, and dual-channel feature fusion model, the impact of the feature fusion strategy on the model performance can be analyzed.
[0029] To ensure the reliability of the model in practical applications, an independent validation set is needed to evaluate the generalization ability of the model. For this purpose, an independent validation set containing 50 soybean samples that did not participate in the model training is used. After using the trained model to predict the data in the validation set, the classification results of the model will be displayed in a visual way, and the generalization ability and practical application potential of the model can be evaluated. If the model performs well on the validation set, it indicates that the model has strong generalization ability and can be applied to actual scenarios; otherwise, the model structure needs to be further optimized or the training strategy needs to be adjusted.
[0030] Step four, use the soybean classification prediction model to conduct soybean hyperspectral imaging classification.
[0031] Among them, step one specifically includes:
[0032] According to the provisions of GB 1352-2023 and GB / T 5494-2019, five types of samples were manually selected for subsequent research. A total of 11,160 soybean samples were selected, including 3,060 normal soybeans, 1,920 damaged soybeans, 2,280 moldy soybeans, 1,800 spotted soybeans, and 2,100 insect-eaten soybeans. The soybean variety is "Chuandou 155", provided by the Chengdu Customs Technical Center. Normal soybeans refer to soybeans with normal color and intact grains. Broken soybeans refer to soybean grains that are broken into pieces. Moldy soybeans refer to soybean grains with mold on the surface. Spotted soybeans refer to soybean grains with obvious disease symptoms on the surface. Insect-eaten soybeans refer to soybeans with holes on the surface. Images of the five types of soybeans are as Figure 2 shown. All samples are stored in a dry environment to maintain the stability of soybean quality and facilitate subsequent research. In addition, 50 additional soybean samples (10 normal soybeans, 10 damaged soybeans, 10 moldy soybeans, 10 spotted soybeans, and 10 insect-eaten soybeans) are prepared for independent validation experiments, and these samples are also stored under the same conditions to evaluate the generalization ability of the model.
[0033] Among them, step two specifically includes:
[0034] The hyperspectral images are acquired by a visible and near-infrared system and a short-wave infrared system. Among them, the visible-near-infrared system uses an ICLB1620CCD camera with 804×440 pixels, an ImSpectorV10E imaging spectrometer with a spectral resolution of 2.8nm (382.67 - 1010.64nm), a halogen light source, and a mobile platform. The speed of the mobile platform is set at 7mm / s, the moving distance is set at 80 to 280mm, and the exposure time is 3 milliseconds. The short-wave infrared system uses an EM285CL camera with 320×256 pixels, an ImSpectorN25E imaging spectrometer with a wavelength range of 982.38 - 2562.36nm and a spectral resolution of 6.5nm, a halogen light source with an intensity set at 250, and a mobile platform. The speed of the mobile platform is set at 17mm / s, the moving distance is set at 80 to 300mm, and the exposure time is 1.5 milliseconds. Both systems are placed in a dark box to avoid light interference and preheated for 30 minutes before data acquisition to avoid light source interference. Due to uneven light distribution, the original hyperspectral images can be calibrated by formula (1).
[0035] R Cal =(R Raw -R Dark ) / (R white -R Dark )(1)
[0036] Among them, R Cal is the calibrated hyperspectral image of soybeans, R Raw is the original hyperspectral image of soybeans, R Dark is the reference image with a reflectivity of 0%, and R White is the reference image with a reflectivity of 99%.
[0037] Among them, step three specifically includes:
[0038] The present invention proposes a dual-channel feature fusion model, which utilizes the spectral features and image features of hyperspectral imaging to achieve high-level data fusion for discriminating imperfect soybeans. The specific structure of the dual-channel feature fusion model is as Figure 3As shown. The dual-channel feature fusion model includes three main parts, namely the spectral feature extraction module, the image feature extraction module, and the feature fusion module. At the same time, the dual-channel feature fusion model is equipped with a dual-channel system, including a one-dimensional spectral data channel and a two-dimensional image data channel. The spectral feature extraction module includes five convolutional layers, five fully connected layers, and a squeeze-and-excitation attention mechanism, which is crucial for recalibrating channel feature responses and enhancing the feature expression ability of the classification model. The squeeze-and-excitation attention mechanism module is a lightweight channel attention mechanism that can be embedded in a convolutional neural network to adaptively calibrate the importance of channel features. The squeeze-and-excitation attention mechanism module performs global average pooling on the feature map of each channel, compressing the spatial information into a channel descriptor representing the global features of the channel. The channel descriptor is input into a gating mechanism composed of two fully connected layers to learn the weight coefficient of each channel, representing the importance of the channel. The learned weight coefficient is multiplied by the original feature map in the channel dimension to achieve weighting of different channel features, enhancing important features and suppressing irrelevant features. The squeeze module squeezes the global spatial information into the channel descriptor. This is achieved by generating channel statistics using global average pooling. Formally, the statistic z ∈ R C is generated by reducing U through the spatial dimensions H×W, so that the calculation of the c-th element of z is as shown in Equation (2). The excitation module can learn a non-mutually exclusive relationship to ensure that multiple channels can be emphasized (instead of enforcing single activation), and the calculation formula is as shown in Equation (3).
[0039]
[0040] s = F ex (z, W) = σ(g(z, W)) = σ(W2δ(W1z)) (3)
[0041] where δ refers to the ReLU function, W1 ∈ R C / r×C , W2 ∈ R C×C / r .
[0042] By introducing the squeeze-and-excitation attention mechanism module, the present invention can enhance the sensitivity of the model to key features, help the model pay more attention to the feature channels that contribute more to the classification task, thereby improving the expressive ability of the model. At the same time, the squeeze-and-excitation attention mechanism module can also adaptively adjust the weights of the channels according to different input data, enhancing the adaptability of the model to different data. In short, the introduction of the squeeze-and-excitation attention mechanism module further optimizes the process of dual-channel feature extraction, enabling the model to capture the key features of imperfect soybeans more accurately, thereby improving the classification accuracy. The image feature extraction module includes five convolutional layers, three fully connected layers, the squeeze-and-excitation attention mechanism, and residual connections. Residual connections allow gradients to flow from subsequent layers to layers located in the early stages of the network, thus alleviating the problem of gradient vanishing. The feature fusion module consists of an attention layer, residual connections, and two fully connected layers. One-dimensional spectra enter the spectral feature extraction module, and feature information is obtained through five convolutional layers. By using the squeeze-and-excitation attention mechanism, the dual-channel feature fusion model can adaptively learn the importance of each wavelength, and then outputs a weighted feature map through five fully connected layers. Two-dimensional images are fed into the image feature extraction module, and feature maps are obtained through three convolutional layers. The weights of each pixel point in the image are obtained through the squeeze-and-excitation attention mechanism. To prevent information loss in the convolutional layers, residual connections are used to retain important features. A weighted feature map is output through two convolutional layers and three fully connected layers. In the feature fusion module, the spectral features and image features are connected by weighted summation, and the result is output through the combination of the attention mechanism and residual connections and two fully connected layers.
[0043] As a classic machine learning method, the support vector machine distinguishes soybean samples of different categories by finding the optimal hyperplane and can select different kernel functions (such as linear kernel, radial basis function kernel) to process linearly or non-linearly separable data. As a powerful deep learning model, the convolutional neural network can automatically learn the features in the data. Its network structure usually includes convolutional layers, pooling layers, and fully connected layers, and is trained using optimization algorithms. To make full use of the information in spectral data and image data, a series of feature extraction and data fusion methods are adopted in this study. For spectral data, the research will explore different preprocessing methods, such as first derivative, standard normal variate transformation, SG smoothing, and autoscaling, and select the best preprocessing method to eliminate noise and background interference by comparing the data quality and model performance after preprocessing. The ReliefF algorithm is used to evaluate the importance of each band for soybean classification, and the feature bands with the highest contribution are selected as spectral features to effectively reduce the data dimension and retain key information. For image data, the gray-level co-occurrence matrix is used to extract texture information, which can effectively describe the texture features of the image, such as contrast, correlation, etc. The specific calculation methods are as shown in formulas (4)-(8). In addition, the morphological features of soybeans, such as area, perimeter, circularity, etc., will also be extracted, and the specific calculation methods are as shown in formulas (9)-(10). As a supplement to image features, to more comprehensively describe the external features of soybeans. The extracted spectral features and image features will be fused to construct a more comprehensive feature set, thereby improving the performance of the classification model.
[0044] Contrast = ∑ i,j |i - j| 2 p(i, j) (4)
[0045] Homogeneity = ∑ i,j p(i, j) / (1 + |i - j|) (5)
[0046] Entropy = ∑ i,j p(i, j)log2p(i, j) (6)
[0047] Energy = ∑ i,j (p(i, j)) 2 (7)
[0048] Correlation = ∑ i,j (i - u i )(i - u j )p(i, j) / σ i σ j (8)
[0049] Where, i and j represent the exponents of gray values, p(i, j) represents the probability value at position (i, j) in the gray-level co-occurrence matrix, μ is the average value of the gray-level co-occurrence matrix, and σ is the standard deviation of the gray-level co-occurrence matrix.
[0050] Circularity = 4 × Area / Perimeter (9)
[0051] Rectangularity = Area / Area of Minimum Bounding Circle (10)
[0052] Dividing the dataset into a training set and a test set in a 7:3 ratio is a widely adopted practice. This method takes into account both effective model training and reliable performance evaluation, thus ensuring that the model can generalize well to new data. Therefore, a total of 11,160 samples were randomly divided into a training set and a test set in a 7:3 ratio. The performance of the model is usually evaluated based on its classification and prediction capabilities. Accuracy is the ratio of correctly predicted instances to the total number of instances. Precision is the ratio of correctly predicted positive instances to the total number of predicted positive instances. Recall is the ratio of correctly predicted positive instances to all actual positive instances. Specificity is the ratio of correctly predicted negative instances to all actual negative instances. The F1 score is the harmonic mean of precision and recall, providing a single metric that balances these two aspects. Accuracy, precision, recall, specificity, and the F1 score are used as evaluation metrics for classification models, and the specific calculations are as shown in formulas (11)-(15).
[0053] Accuracy = (True Positives + True Negatives) / (True Positives + True Negatives + False Positives + False Negatives) × 100% (11)
[0054] Precision = True Positives / (True Positives + False Positives) × 100% (12)
[0055] Recall = True Positives / (True Positives + False Negatives) × 100% (13)
[0056] Specificity = True Negatives / (True Negatives + False Positives) × 100% (14) F1 score = 2 × Precision × Recall / (Precision + Recall) × 100% (15)
[0057] Among them, True Positives refer to instances where the model correctly predicts the positive class, True Negatives refer to instances where the model correctly predicts the negative class, False Positives refer to instances where the model incorrectly predicts the positive class, and False Negatives refer to instances where the model incorrectly predicts the negative class.
[0058] Table 1 shows the performance of support vector machines, convolutional neural networks, and dual-channel feature fusion models based on four preprocessing methods in the visible-near-infrared full band. By comparing the accuracy, precision, recall, specificity, and F1 score of different classification models on the test set after different preprocessing methods, the preprocessing method with the highest index is selected as the best preprocessing method. Auto-scaling - support vector machine (accuracy = 93.70%, precision = 93.63%, recall = 93.71%, specificity = 98.48%, F1 score = 93.66%), first derivative - convolutional neural network (accuracy = 92.38%, precision = 92.39%, recall = 92.27%, specificity = 98.17%, F1 score = 92.23%), and standard normal variate transformation - dual-channel feature fusion model (accuracy = 95.13%, precision = 95.49%, recall = 94.83%, specificity = 98.97%, F1 score = 95.12%) showed higher precision compared to the other three preprocessing methods, indicating that they are the best models for visible-near-infrared.
[0059] Table 1: Performance of different models based on four preprocessing methods in the visible-near-infrared full band
[0060]
[0061] Table 2 shows the performance of support vector machines, convolutional neural networks, and dual-channel feature fusion models based on four preprocessing methods in the short-wave infrared full wavelength. The evaluation criteria for short-wave infrared data are the same as those for visible-near-infrared data. Standard normal variate transformation - support vector machine (accuracy = 91.64%, precision = 92.64%, recall = 91.19%, specificity = 98.25%, F1 score = 91.90%), first derivative - convolutional neural network (accuracy = 92.00%, precision = 93.08%, recall = 91.57%, specificity = 98.37%, F1 score = 92.21%), and first derivative - dual-channel feature fusion model (accuracy = 94.00%, precision = 94.43%, recall = 94.16%, specificity = 98.67%, F1 score = 94.27%) showed higher accuracy when applied to short-wave infrared data, indicating that they are superior to the other three methods.
[0062] Table 2: Performance of different models based on four preprocessing methods in the short-wave near-infrared full band
[0063]
[0064] The inherent redundancy and irrelevance in hyperspectral imaging data may lead to the establishment of inferior classification models. Therefore, it is of great significance to utilize the selection of effective wavelengths to improve the performance and reliability of classification models. In the visible-near infrared band, the ReliefF algorithm was used to screen out 29 key characteristic wavelengths for the auto-scaling support vector machine model. These wavelengths showed importance scores higher than 0.03 in differentiating samples, effectively removing 93.1% of the redundant information, and finally forming a concise and efficient characteristic wavelength combination: 399.99nm, 401.32nm, 402.66nm, 404.00nm, 405.34nm, 406.69nm, 408.03nm, 409.37nm, 410.72nm, 412.06nm, 970.08nm, 971.54nm, 974.44nm, 975.89nm, 978.79nm, 980.25nm, 981.7nm, 983.15nm, 984.6nm, 986.05nm, 987.5nm, 988.95nm, 990.39nm, 993.29nm, 994.74nm, 996.19nm, 997.63nm, 999.08nm, 1000.53nm. The ReliefF algorithm was used to screen out 41 key characteristic wavelengths for the first derivative-convolutional neural network model. These wavelengths showed importance scores higher than 0.02 in differentiating samples, effectively removing 90.3% of the redundant information, and finally forming a concise and efficient characteristic wavelength combination: 654.69nm, 699.66nm, 704.02nm, 706.93nm, 711.3nm, 714.21nm, 715.67nm, 718.59nm, 720.04nm, 725.88nm, 728.8nm, 731.71nm, 734.63nm, 736.09nm, 739.01nm, 741.94nm, 744.86nm, 746.32nm, 750.7nm, 753.63nm, 756.55nm, 758.01nm, 759.48nm, 760.94nm, 762.4nm, 768.25nm, 769.72nm, 772.64nm, 774.11nm, 784.36nm, 787.29nm, 791.68nm, 797.54nm, 801.94nm, 803.4nm, 810.73nm, 812.2nm, 823.92nm, 832.72nm, 847.37nm, 867.89nm. In the short-wave near-infrared band, the ReliefF algorithm was used to screen out 23 key characteristic wavelengths for the standard normal variate transformation-support vector machine model.These wavelengths showed importance scores higher than 0.015 in differentiating samples, effectively removing 86% of the redundant information, and finally forming a concise and efficient characteristic wavelength combination: 1185.72nm, 1192.62nm, 1199.53nm, 1206.46nm, 1213.4nm, 1220.37nm, 1227.34nm, 1406.05nm, 1413.33nm, 1420.61nm, 1427.91nm, 1435.21nm, 1743.54nm, 1750.81nm, 1943.36nm, 1950.3nm, 1957.22nm, 1964.13nm, 1971.01nm, 1984.74nm, 1991.57nm, 1998.39nm, 2005.18nm. The ReliefF algorithm was used to screen out 9 key characteristic wavelengths for the first derivative-convolutional neural network model. These wavelengths showed importance scores higher than 0.035 in differentiating samples, effectively removing 94% of the redundant information, and finally forming a concise and efficient characteristic wavelength combination: 1213.4nm, 1220.37nm, 1312.21nm, 1326.53nm, 1663.06nm, 1677.74nm, 1692.4nm, 1707.04nm, 1714.35nm.
[0065] As shown in Table 3, on the test set, the accuracy of the dual-channel feature fusion model was 0.98% higher than that of the support vector machine and 3.76% higher than that of the convolutional neural network. In addition, the dual-channel feature fusion model was determined as the best model, and its accuracy, precision, recall, specificity, and F1 score on the visible light-near infrared test set reached 95.13%, 95.49%, 94.83%, 98.97%, and 95.12% respectively.
[0066] Table 3: Performance of classification models based on intermediate and advanced data fusion in the visible light-near infrared band
[0067]
[0068]
[0069] As shown in Table 4, the dual-channel feature fusion model has a higher accuracy rate (4.18%) compared with the support vector machine; compared with the convolutional neural network, the dual-channel feature fusion model has a higher accuracy rate (2.36%). On the short-wave infrared test set, the accuracy, precision, recall rate, specificity, and F1 score of the dual-channel feature fusion model are 94.00%, 94.43%, 94.16%, 98.67%, and 94.27% respectively, indicating that it is the best model. In addition, the classification accuracy of visible light-near infrared is higher than that of short-wave infrared, and the classification accuracy of the dual-channel feature fusion model has increased by 1.13%, ensuring that visible light-near infrared can identify imperfect soybeans more effectively than short-wave infrared.
[0070] Table 4: Performance of classification models for intermediate and advanced data fusion in the short-wave near-infrared band
[0071]
[0072]
[0073] The dual-channel feature fusion model has demonstrated excellent performance in the fields of visible light-near infrared and short-wave infrared. This achievement stems from its unique and advanced design concept. With the continuous development of technology, the demand for the analysis of image and spectral data is increasing day by day, and the limitations of traditional processing methods are gradually emerging. The dual-channel feature fusion model has successfully overcome these challenges through its multi-dimensional information fusion ability. The most significant advantage of this model is its ability to integrate spectral information and image information simultaneously. This multi-dimensional information fusion not only enhances the model's recognition ability and accuracy but also enables the model to have stronger adaptability and be able to work effectively in various complex environments. In addition, the attention mechanism introduced by the model further optimizes the feature extraction process by dynamically evaluating and adjusting the importance of each variable. The attention mechanism enables the model to adaptively focus on the most distinguishable features in a large amount of data, avoiding the noise interference that may occur in traditional methods. This innovation not only improves the processing efficiency of the model but also provides a more accurate basis for subsequent classification and recognition.
[0074] Compared with traditional intermediate data fusion methods, the dual-channel feature fusion model adopts a high-level data fusion strategy. This method can utilize the information in the original data more comprehensively and effectively avoid the problem of information loss that may occur in intermediate fusion. In intermediate data fusion, it is often necessary to compress high-dimensional data into low-dimensional data, and this process may lead to the loss of some key information. The dual-channel feature fusion model, on the other hand, makes the final output results more accurate and reliable by retaining more original information. In the structural design of the model, the introduction of residual connections also plays a crucial role. This structure not only reduces the error accumulation during the training process but also significantly improves the generalization ability of the model, making it more stable and reliable when facing unseen data. The characteristic of residual connections is that it allows information to flow more freely in the network, enabling the model to learn more complex feature representations. This design concept has been widely applied in the field of deep learning, demonstrating its effectiveness and importance.
[0075] Most current research still relies on intermediate data fusion techniques, such as feature wavelength selection, gray-level co-occurrence matrix texture extraction, two-dimensional to one-dimensional data conversion, etc. Although these methods have their advantages, they often lead to the loss of some important information and cannot fully capture all the features of spectra and images. For example, in some application scenarios, feature wavelength selection may ignore some wavelength information crucial for classification, resulting in an unsatisfactory final classification result. In contrast, the dual-channel feature fusion model using advanced data fusion shows a higher classification accuracy, and this performance advantage stems from its ability to utilize spectral and image data more comprehensively and identify hidden information patterns.
[0076] The successful application of the dual-channel feature fusion model not only provides new technical means for research but also brings new opportunities to practical application scenarios. For example, in agricultural monitoring, the model can effectively identify the health status of crops, helping farmers take timely measures to improve yield and quality. This new type of data processing and analysis paradigm is not only applicable to the visible-near infrared and short-wave infrared fields but also expected to play an important role in other fields that require multi-source data fusion. It breaks through the limitations of traditional methods and provides a more advanced solution for the processing of complex data. In future research, the dual-channel feature fusion model is expected to be combined with other advanced technologies, such as deep learning and transfer learning, to further improve the efficiency and accuracy of data processing. In short, through its innovative design and advanced data processing methods, the dual-channel feature fusion model has achieved remarkable results in the visible-near infrared and short-wave infrared fields. It not only overcomes the limitations of traditional methods but also opens up new paths for future research and applications, and is expected to have a profound impact in multiple fields. The present invention adopts an innovative method to verify and visualize the performance of different models in identifying imperfect soybeans. Fifty soybean samples were selected as the visualization validation set, including five different types of imperfect soybeans, with 10 samples of each type. This balanced sample distribution ensures the reliability and representativeness of the experimental results. By arranging the imperfect soybeans of the same type in the same column, a clear foundation is laid for subsequent visual analysis. The collected spectral and image data are input into the trained model. This process involves complex data preprocessing and model optimization to ensure the quality of the input data and the performance of the model. The output results of the model are ingeniously transformed into color coding, so that different types of imperfect soybeans can be intuitively distinguished by different colors. This visualization method not only improves the accuracy of detection but also greatly enhances the interpretability of the results, which is crucial for practical applications. Figure 4 The visualization results of different models for imperfect soybeans are presented, providing strong support for the intuitive comparison of model performance. The results show that the dual-channel feature fusion model exhibits excellent generalization ability and can accurately identify various imperfect soybeans. In contrast, although support vector machines and convolutional neural networks have classification errors in some cases, they can still accurately identify most imperfect soybeans overall. This indicates that these classical methods still have certain practical value, but there may be some limitations in complex scenarios. The research results clearly show that the dual-channel feature fusion model using an advanced data fusion strategy has achieved better results compared to the method using intermediate data fusion. This finding emphasizes the importance and potential of advanced data fusion in processing complex data.
[0077] Step 4: Use the soybean classification prediction model to classify soybean hyperspectral imaging, and visualize the classification results through model inversion. The research team successfully transformed complex data analysis into an intuitively understandable visual presentation, providing important technical support for on-line detection in actual agricultural production.
[0078] It should be emphasized that the disclosed implementation cases of the present invention are only for more clearly and completely elaborating the technical solutions, and are not intended to limit the protection scope of the present invention. Based on a full understanding of the disclosed content of the present invention, those skilled in the art can make various forms of modifications or deformations to the implementation cases without departing from the technical essence of the present invention. For example, specific parameters, materials, dimensions, etc. in the implementation cases can be adjusted, or equivalent technical means can be used to replace some technical features, or even the technical solutions of the present invention can be applied to other related fields. Any equivalent replacement, modification or deformation of the present invention, as long as it does not depart from the technical essence of the technical solutions of the present invention, shall be regarded as falling within the protection scope of the claims of the present invention.
Claims
1. An imperfect soybean hyperspectral imaging classification method based on a deep learning model, characterized in that: The following steps are involved: Step 1, select imperfect soybean samples; Step 2, measuring the hyperspectral imaging data of soybean samples; Step 3: Construct a soybean classification prediction model based on dual-channel feature fusion and attention mechanism; Step 4: Use the soybean classification prediction model to classify soybean hyperspectral imaging.
2. The method according to claim 1, characterized in that: In step 1, five types of soybean samples were selected, namely: normal soybeans, damaged soybeans, moldy soybeans, diseased soybeans and insect-infested soybeans.
3. The method according to claim 2, characterized in that In step 1, the process of selecting five types of soybean samples must ensure the diversity and representativeness of the samples, and pay attention to the appearance characteristics of each type of soybean and its growth environment to ensure the quality and applicability of the samples.
4. The method according to claim 2, characterized in that: In step 1, the process of selecting five types of soybean samples follows the national standards of GB 1352-2023 and GB / T 5494-2019.
5. The method according to claim 1, characterized in that In step 2, hyperspectral imaging technology is used to collect detailed imaging data of the selected soybean samples; this process will cover two bands: visible light-near infrared and short-wave infrared; when imaging, ensure the use of high-resolution imaging equipment to obtain high-quality spectral image data; by recording imaging parameters, provide an accurate data basis for subsequent analysis; consider the consistency and reliability of environmental factors; and select the first-order derivative as the preprocessing method.
6. The method according to claim 5, characterized in that Hyperspectral images are collected by visible-near infrared and short-wave infrared systems, including: The visible-near infrared system uses an ICLB1620CCD camera with 804×440 pixels, an ImSpectorV10E imaging spectrometer with a spectral resolution of 2.8nm, a halogen light source, and a mobile platform; In the visible light-near infrared system: the moving platform speed is set to 7 mm / s, the moving distance is set to 80 to 280 mm, and the exposure time is 3 milliseconds; The short-wave infrared system uses an EM285CL camera with 320×256 pixels, an ImSpectorN25E imaging spectrometer with a wavelength range of 982.38-2562.36nm and a spectral resolution of 6.5nm, a halogen light source with an intensity setting of 250, and a mobile platform; In the short-wave infrared system: the moving platform speed is set to 17 mm / s, the moving distance is set to 80 to 300 mm, and the exposure time is 1.5 milliseconds; Both systems were placed in a dark box to avoid light interference and were preheated for 30 min before data collection to avoid light source interference.
7. The method according to claim 1, characterized in that In step three, the soybean classification prediction model based on dual-channel feature fusion and attention mechanism is constructed as follows: Design a dual-channel input structure to input one-dimensional spectral data and two-dimensional image data respectively; Use convolutional neural networks to extract spectral features and image features to ensure the comprehensiveness and accuracy of feature extraction; Implement feature fusion, effectively combine the features of spectral data and image data through feature concatenation and feature addition; at the same time, introduce the attention mechanism so that the model can pay more attention to important features and suppress the interference of irrelevant features; The residual connection structure is used to alleviate the gradient vanishing problem in the deep network training process, thereby accelerating the model convergence and improving the model's learning ability; Model training is based on labeled soybean sample data, and the cross-validation method is used to optimize model parameters to ensure the robustness and stability of the model; During the training process, the performance of the model is constantly monitored and the learning rate and number of training rounds hyperparameters are adjusted.
8. The method according to claim 1, characterized in that: In the model building phase, the PyTorch deep learning framework was used to implement a dual-channel feature extraction architecture based on a convolutional neural network to process the spectral and spatial features in hyperspectral remote sensing images respectively. The spectral channel is responsible for capturing the correlation and changes between different bands, while the spatial channel focuses on the texture, shape, and contextual information in the image. The characteristic band screening stage uses the ReilefF algorithm to determine the optimal wavelengths: 399.99nm, 401.32nm, 402.66nm, 404.00nm, 405.34nm, 406.69nm, 408.03nm, 409.37nm, 410.72nm, 412.06nm, 970.08nm, 971.54nm, 974.44nm, 975.89nm, 978.79nm, 980.25nm, 981.7nm, 983.15nm, 984.6nm, 986.05nm, 987.5nm, 988.95nm, 990.39nm, 993.29nm, 994.74nm, 996.19nm, 997.63nm, 999.08nm, 1000.53nm; 654.69nm, 699.6 6nm, 704.02nm, 706.93nm, 711.3nm, 714.21nm, 715.67nm, 718.59nm, 720. 04nm, 725.88nm, 728.8nm, 731.71nm, 734.63nm, 736.09nm, 739.01nm, 74 1.94nm, 744.86nm, 746.32nm, 750.7nm, 753.63nm, 756.55nm, 758.01nm, 7 59.48nm, 760.94nm, 762.4nm, 768.25nm, 769.72nm, 772.64nm, 774.11nm , 784.36nm, 787.29nm, 791.68nm, 797.54nm, 801.94nm, 803.4nm, 810.73 nm, 812.2nm, 823.92nm, 832.72nm, 847.37nm, 867.89nm; 1185.72nm, 119 2.62nm, 1199.53nm, 1206.46nm, 1213.4nm, 1220.37nm, 1227.34nm, 1406. 05nm, 1413.33nm, 1420.61nm, 1427.91nm, 1435.21nm, 1743.54nm, 1750. 81nm, 1943.36nm, 1950.3nm, 1957.22nm, 1964.13nm, 1971.01nm, 1984.74 nm, 1991.57nm, 1998.39nm, 2005.18nm; 1213.4nm, 1220.37nm, 1312.21n m, 1326.53nm, 1663.06nm, 1677.74nm, 1692.4nm, 1707.04nm, 1714.35nm. In terms of feature fusion strategy optimization, a feature fusion solution combining feature addition with attention mechanism is selected.
9. The method according to claim 1, characterized in that: Step 4 also includes model inversion visualization, which converts the classification results of the model into intuitive and visible images, making the research results easier to understand and display. This process is implemented with the help of the OpenCV library, which uses the image processing function of the OpenCV library to combine the classification results of the model with the original hyperspectral remote sensing image to generate visualization results.
10. The method according to claim 9, characterized in that The specific steps of model inversion visualization include: Use OpenCV to read the original hyperspectral remote sensing image and convert the model's classification results into color coding; Each classification category is assigned a unique color to clearly distinguish different feature types in the final visualization results; Overlay the color-coded classification results onto the original image; This classification map is composed entirely of the classification results of the model, and the color of each target object represents the category into which the point is classified.
Citation Information
Cited By
Rice quality evaluation method and system based on spectral data analysis
CN120408121A
A rice quality evaluation method and system based on spectral data analysis
CN120408121B
Intelligent spectrum-integrated inspection system based on ultra-wide spectrum and physical evidence image
CN121068529A