Wheat multi-component content synchronous prediction method, medium, equipment and product

By combining hyperspectral technology and deep learning methods, and employing CNN watershed segmentation and multi-task modeling strategies, the problem of neglected component correlation in wheat component detection is solved, enabling rapid and accurate simultaneous detection of multiple wheat components. This method is suitable for raw material quality testing in liquor production.

CN121260293AActive Publication Date: 2026-01-02SICHUAN UNIVERSITY OF SCIENCE AND ENGINEERING
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511831066.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-12-06
Publication Date
2026-01-02
Estimated Expiration
2045-12-06

AI Technical Summary

Technical Problem

Existing methods for detecting wheat component content fail to effectively address the potential relationships between components, making it impossible to simultaneously detect multiple components. Furthermore, traditional chemical methods are highly destructive, have low efficiency in rapid and non-destructive detection, ignore inter-component relationships in single-task detection, and exhibit poor model generalization performance.

Method used

This study employs hyperspectral technology combined with deep learning methods, using a CNN-guided watershed multi-step segmentation algorithm to segment wheat grains. A multi-task modeling strategy combining GhostNet and LSTM is constructed to establish a synchronous prediction model for the content of multiple wheat components. By utilizing feature extraction and sequence modeling of spectral data to capture the correlation between components, a fast and accurate prediction of multiple components can be achieved.

Benefits of technology

This method enables rapid, simultaneous, and accurate prediction of multiple components in wheat, including fat, protein, moisture, and amylose, improving detection efficiency and accuracy and providing an efficient method for real-time quality detection of raw materials in liquor production.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121260293A_ABST
    Figure CN121260293A_ABST
Patent Text Reader

Abstract

The invention discloses a wheat multi-component content synchronous prediction method, medium, equipment and product, and relates to the technical field of food detection.The method comprises the steps that a hyperspectral image of a wheat sample is obtained, and reflectivity correction is conducted; measuring the contents of wheat fat, protein, moisture and amylose as label data; segmenting wheat grains in the hyperspectral image, averaging spectral information of all pixel elements in each wheat grain after segmentation, and constructing a spectral data set; a wheat multi-component content synchronous prediction model is constructed, the wheat multi-component content synchronous prediction model comprises a feature extraction module, a sequence modeling module, a feature weight generation module and an output module, GhostNet is adopted in the feature extraction module, and the sequence modeling module comprises three layers of stacked LSTMs. According to the method, rapid, synchronous and accurate prediction of multiple components of wheat fat, protein, moisture and amylose is realized.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of food detection, and in particular to a wheat multi-component content synchronous prediction method, medium, device and product. BACKGROUND

[0002] In the liquor brewing industry, the large koji used for producing liquor plays a crucial role in the liquor brewing process, and its main raw material is wheat, and the quality of wheat will directly affect the fermentation of large koji. In liquor brewing, the content of each component of wheat directly affects the flavor and fermentation of liquor, and the changes in the content of fat, protein, moisture and amylose will significantly affect the fermentation process and the flavor of liquor. At present, the detection of the content of these components mainly relies on traditional chemical detection methods, such as Soxhlet extraction method for determining fat and Kjeldahl method for determining protein. However, these traditional chemical methods have long analysis period and are destructive to raw materials, and cannot meet the actual production control requirements in time. The existing rapid non-destructive detection methods (such as near-infrared and hyperspectrum) all use single-task (single-component) detection, i.e. the detection of each component content index needs to establish a model separately, and each component content is detected separately. This method is easy to ignore the potential correlation between components, resulting in poor generalization performance of the model, and the detection efficiency of this modeling method is low, which cannot meet the synchronous timeliness requirements of product control indicators in the production site.

[0003] In the prior art, patent application CN111122470A discloses a single-grain wheat amylose content detection method, which uses a chemical method to simply determine the amylose content in single-grain wheat. However, the method for determining the wheat amylose content disclosed in the invention is a destructive detection method, and has high requirements for sample preparation. In addition, the detection method in the invention has a long period, and cannot realize rapid detection of wheat amylose. In addition, the method in the invention can only obtain the percentage of amylose, and cannot realize the detection of the specific content of amylose.

[0004] Patent application CN112683840A discloses a method for rapidly and non-destructively determining the amylose content of single wheat kernels using near-infrared spectroscopy technology. The invention includes: collecting single wheat kernel samples and collecting near-infrared diffuse reflectance spectra; using a kit enzyme digestion program to determine the total starch content and amylose content of the sample; preprocessing the obtained near-infrared spectral optical data to filter out useless and interfering signals; establishing a mathematical model; constructing a prediction model between the chemical value of the amylose content of single wheat kernels and the near-infrared spectrum and performing a validation experiment; collecting the near-infrared spectrum of the sample to be tested, and rapidly and non-destructively determining the amylose content of the sample to be tested using the constructed near-infrared prediction model. However, the single kernel amylose content detection method in the invention does not have efficiency and accuracy. The near-infrared spectroscopy technology used is a single-point detection, which can only analyze one or a few points, making it difficult to evaluate the chemical properties of the entire target; in addition, the method does not mention which mathematical model is used for amylose detection; in addition, the mathematical model established by the method can only detect a single physicochemical component, and it is extremely tedious to re-establish the corresponding mathematical model for different physicochemical indicators.

[0005] Patent application CN114693636A discloses a method for detecting the content of mixed sorghum amylose and amylopectin. The method includes: using a visible light and near-infrared hyperspectral imaging system to collect hyperspectral images of mixed sorghum samples, and simultaneously using a chemical analysis method to determine the starch content in the samples; the sorghum kernels in the hyperspectral images of the samples are segmented, spectral data is extracted, and characteristic wavelengths or spectral features are extracted; a model is established using feature fusion data to predict the starch content of mixed sorghum. However, the method for determining the content of mixed sorghum amylose and amylopectin belongs to single-task detection, which is inefficient and requires a separate model for each component, wasting computing resources; the more core defect is that the internal relationship between components is ignored, resulting in poor generalization of learned features and easy overfitting. SUMMARY

[0006] The purpose of the present invention is to solve the problem that the existing wheat component content detection method does not pay attention to the potential correlation between components and cannot achieve multi-component synchronous detection. A wheat multi-component content synchronous prediction method is proposed, including the following steps: S1, obtaining a hyperspectral image of a wheat sample and performing reflectance correction; determining the fat, protein, moisture, and amylose content of the wheat as label data; S2, segmenting the wheat kernels in the hyperspectral image, averaging the spectral information of all pixel elements in each segmented wheat kernel, and constructing a spectral data set; S3. Construct a synchronous prediction model for the multi-component content of wheat, including: a feature extraction module, a sequence modeling module, a feature weight generation module, and an output module; the feature extraction module uses GhostNet, the sequence modeling module includes a three-layer stacked LSTM, and the feature weight generation module uses scaled dot product attention; the feature extraction module is used to extract features from spectral data and construct feature maps, the sequence modeling module is used to capture the correlation and dependency between different wavelengths of spectral data based on the feature maps, the output of the sequence modeling module is passed through the feature weight generation module to assign attention weights to the spectral data features, and the output of the feature weight generation module is passed through the output module to obtain the predicted multi-component content of wheat; S4. Train the model using spectral dataset and label data, and use the trained model to predict the wheat fat, protein, moisture and amylose content of wheat.

[0007] Furthermore, the hyperspectral images of the wheat samples include hyperspectral images in the visible-near infrared and near-infrared bands.

[0008] Furthermore, the formula for reflectivity correction is as follows:

[0009] in, These are corrected hyperspectral image data. It is the raw spectral image data. and These are standard whiteboard image data and blackboard image data with the camera lens covered, respectively.

[0010] Furthermore, a CNN-guided depth-based watershed multi-step segmentation algorithm is used to segment wheat grains in hyperspectral images, specifically including: Generate mask images from hyperspectral images using threshold segmentation; Wheat grains are separated using H-mini transformation based on mask images, and the effective region of wheat grains is determined by edge processing. The shape of each wheat grain is processed morphologically. The CNN deep guided algorithm is used to mark the location of each wheat grain, transforming the physical segmentation into countable independent data units. Each wheat grain is used as a ROI to obtain an ROI image.

[0011] Furthermore, GhostNet employs three cascaded Ghost modules.

[0012] Furthermore, the kernels of both the standard convolution and depthwise convolution in the Ghost module are replaced with 5×5 convolutions.

[0013] The present invention also proposes a computer-readable storage medium storing a computer program that, when executed by a processor, implements the above-described method for simultaneous prediction of wheat multi-component content.

[0014] The present invention also proposes an electronic device, including a processor and a memory, wherein the processor and the memory are interconnected, the memory is used to store a computer program, the computer program including computer-readable instructions, and the processor is configured to invoke the computer-readable instructions to execute the above-described method for simultaneous prediction of wheat multi-component content.

[0015] The present invention also proposes a computer program product, including a computer program / instruction, which, when executed by a processor, implements the steps of the above-described method for simultaneous prediction of wheat multi-component content.

[0016] The beneficial effects of the technical solution provided by this invention are: This invention utilizes visible-near-infrared and near-infrared hyperspectral technologies combined with deep learning methods and multi-task modeling strategies. It employs a CNN-guided watershed multi-step segmentation algorithm (DG-WS) to achieve high-precision segmentation of wheat grain images and constructs a synchronous prediction model for the content of multiple wheat components. The Ghost module for feature extraction builds information-rich feature maps, and LSTM captures the sequence correlations between spectral wavelengths as well as local and global features. A nonlinear mapping relationship is established between spectral features and the content of multiple components in the analyte, enabling rapid, synchronous, and accurate prediction of multiple components in wheat, including fat, protein, moisture, and amylose. This provides an efficient method for real-time detection of raw material quality and quality control in liquor production. Attached Figure Description

[0017] Figure 1 This is a flowchart of the wheat multi-component content synchronous prediction method according to an embodiment of the present invention; Figure 2 This is a flowchart of the multi-step segmentation process for sticky wheat grains according to an embodiment of the present invention; Figure 3 This is a structural diagram of the GLSNet model for simultaneous prediction of wheat multi-component content according to an embodiment of the present invention; Figure 4 These are the prediction results of the GLSNet model (the model constructed in this invention) based on visible-near infrared (VIS-NIR) in the embodiments of this invention. Figure 5 These are the prediction results of the GLSNet model constructed based on near-infrared (NIR) spectroscopy in this embodiment of the invention; Figure 6 This is a block diagram of an electronic device according to an exemplary embodiment of the present invention. Detailed Implementation

[0018] To make the objectives, technical solutions, and advantages of the present invention clearer, the embodiments of the present invention will be further described below with reference to the accompanying drawings.

[0019] The flowchart of the wheat multi-component content simultaneous prediction method of this invention is as follows: Figure 1 Specifically, it includes the following steps: S1. Obtain hyperspectral images of wheat samples and perform reflectance correction; determine the fat, protein, moisture and amylose content of wheat as label data.

[0020] In this embodiment of the invention, 11 different brewing wheat varieties were selected, specifically: Cotton Wheat (variety number 827), Cotton Wheat (variety number 161), Cotton Wheat (variety number 51), Cotton Wheat (variety number 367), Cotton Wheat (variety number 907), Cotton Wheat (variety number 312), Sichuan Wheat (variety number 88), Sichuan Wheat (variety number 1247), Sichuan Agricultural Wheat (variety number 30), Southern Wheat (variety number 660), and Sichuan Wheat (variety number 830). During sample preparation, 20 samples were prepared for each variety, totaling 220 samples (11 varieties × 20 samples). Each sample contained 100 wheat grains, evenly spread in an 80mm petri dish for subsequent hyperspectral data acquisition.

[0021] This example uses two hyperspectral acquisition systems to acquire data. The visible-near-infrared (VIS-NIR) acquisition system consists of a hyperspectral camera (Specim FX10, Finland), two 160W halogen light sources, an electrically controlled moving platform, and a computer loaded with Lumo-scanner scanning software. This system can continuously acquire hyperspectral images of 448 wavelength channels in the 400-1000nm band, with a spatial resolution of 1024×632 and a spectral resolution of 5nm. The system is preheated for 10 minutes before acquisition to ensure stability. The optimal parameters are set as follows: exposure frequency of 50Hz, exposure time of 8ms, and platform scanning speed of 0.84mm / s. The near-infrared (NIR) system is equipped with a near-infrared hyperspectral camera (Specim FX17, Finland), four 55W halogen lamps, a standard calibration plate, and a computer with SpacVIEW data acquisition software. The camera's spectral acquisition range is 886-1735nm, including 512 continuous bands, with a spatial resolution of 660×640 and a spectral resolution of 5nm. The system parameters are set as follows: motor start position 0.55cm, scanning distance 1cm, forward speed 0.075cm / s, backward speed 0.2cm / s, and exposure time 2ms.

[0022] To reduce the impact of noise, camera dark current, and uneven illumination on spectral data, reflectance correction is required for the acquired wheat hyperspectral image data. Black and white correction is performed using a black and white image covering the camera lens background and a uniform white board as the black and white image. The correction formula is as follows:

[0023] in, These are corrected hyperspectral image data. It is the raw spectral image data. and These are standard whiteboard image data and blackboard image data with the camera lens covered, respectively.

[0024] The near-infrared hyperspectral camera acquired a spectral range of 886-1735 nm, comprising 512 bands. However, strong spectral vibrations and severe information distortion occurred at the beginning and end of the spectral range, likely due to instrument and environmental noise. To improve the signal-to-noise ratio of the spectral data, this invention removed 8 bands with poor signal-to-noise ratios at the beginning and 19 bands at the end of the original spectral range, retaining 485 bands in the 900.96-1705 nm range for subsequent modeling and analysis. All bands in the visible light spectrum were retained.

[0025] Furthermore, spectral preprocessing can eliminate interference factors such as environmental noise, baseline drift, and radio scattering, enhancing spectral characteristics and thus improving model prediction accuracy. Multivariate scattering correction (MSC) can reduce baseline drift and spectral scattering, while the first derivative (1st) can achieve baseline correction. This invention employs a combination of multivariate scattering correction (MSC) and the first derivative (1st) (MSC-1st) for spectral data preprocessing. After preprocessing, the samples are divided into calibration and test sets at a 4:1 ratio based on the joint XY distance (SPXY).

[0026] In this embodiment of the invention, the fat content in wheat samples was determined using the Soxhlet extraction method (GB 5009.3-2016), the protein content was determined using the Kjeldahl method according to GB 5009.5-2016, the moisture content was determined using the direct drying method (GB5009.3-2016), and the amylose content was determined using a colorimetric method according to GB / T15683-2008. To avoid the influence of experimental errors, three parallel experiments were set up for each component determination, and the average value was taken as the determination result after removing outlier results.

[0027] S2. Segment the wheat grains in the hyperspectral image, average the spectral information of all pixels in each segmented wheat grain, and construct a spectral dataset.

[0028] Hyperspectral images contain wheat grains and irrelevant background information, and the wheat grains may be adhered together, which is detrimental to subsequent accurate data analysis. This invention employs a CNN-based Depth Guided Watershed Segmentation (DG-WS) algorithm to segment wheat grains in hyperspectral images to obtain the precise location of all wheat grains. A flowchart of the wheat grain segmentation process using the CNN-based Depth Guided Watershed Segmentation (DG-WS) algorithm is provided in the following embodiment. Figure 2 Specifically, it includes: First, a grayscale image is generated from the hyperspectral image through band extremum mapping. Based on this grayscale image, a binarized image is obtained using the Otsu thresholding method. Edge processing is performed on the binarized image to determine the effective regions of wheat grains, and morphological operations are used to ensure that the segmented regions maintain consistency with the actual shape of the wheat grains. Subsequently, background removal is performed on the binarized image, and adhering wheat grains are segmented based on minimum transformation. A CNN algorithm is used to detect and label the location of each wheat grain, transforming the physical segmentation into independently countable individual data units. After obtaining the precise location of each wheat grain, it is used as an independent Region of Interest (ROI), and the corresponding ROI image is extracted. The spectral information of all pixels within each ROI is averaged, and finally, the average spectrum of all wheat grains in the sample is used as the spectral feature data of this variety.

[0029] S3. Construct a simultaneous prediction model for the content of multiple wheat components. Since there are inherent correlations among the components of wheat raw materials, the multi-task modeling strategy, through a shared feature extraction layer, can capture these correlations, thereby achieving parallel prediction of the content of multiple components and improving the model's generalization ability. Based on the multi-task modeling strategy (MT), the structure diagram of the simultaneous prediction model for the content of multiple wheat components in this embodiment of the invention is shown in the GLISNet diagram. Figure 3 The system includes: a feature extraction module, a sequence modeling module, a feature weight generation module, and an output module. The feature extraction module uses GhostNet, the sequence modeling module includes a three-layer stacked LSTM, and the feature weight generation module uses scaled dot product attention. The feature extraction module is used to extract features from spectral data and construct feature maps. The sequence modeling module is used to capture the correlation and dependency between different wavelengths of spectral data based on the feature maps. The output of the sequence modeling module is passed through the feature weight generation module to assign attention weights to the spectral data features. The output of the feature weight generation module is then passed through the output module to obtain the predicted multi-component content of wheat.

[0030] GhostNet employs three cascaded Ghost modules. These modules utilize a division of labor between main convolutions and low-cost operations, leveraging redundancy between feature maps to generate feature representations equivalent to traditional convolutions with lower computational cost. The main convolution uses standard convolution operations to generate some core feature maps, while the low-cost operations use depthwise convolutions to perform linear transformations or local convolutions on the main features, generating the remaining auxiliary feature maps. The main and auxiliary feature maps are then concatenated along the channel dimension to form a more information-rich and complete output feature map. High redundancy often exists between adjacent correlated bands in the spectral spectrum. The Ghost modules exploit and utilize this inherent redundancy to further improve the model's efficiency and expressive power. This mechanism not only reduces computation but also maintains the model's representational ability, making it suitable for processing spectral data with local correlations. In this invention, the kernels of the standard and depthwise convolutions in the Ghost modules are replaced with 5×5 convolutions to expand the receptive field and more fully capture the correlated features of local patterns in the spectrum. Meanwhile, the stride and padding in the standard convolution are set to 2 to achieve downsampling, further compressing the size of the feature map and providing more efficient input for subsequent LSTM and attention mechanisms.

[0031] After feature extraction, the model performs sequence modeling using a three-layer stacked LSTM network. The gating mechanism and memory units of LSTM effectively capture complex cross-wavelength correlation patterns in the spectral data, helping the model identify global and local features. Following LSTM, GLSNet introduces a Scaled Dot-Product Attention (SDPA) mechanism. This mechanism adaptively assigns importance weights to features by calculating attention scores. The attention mechanism dynamically captures the importance of different wavelength regions and cross-wavelength global correlations in the spectral sequence through the correlation between query, key, and value vectors, providing contextual information to the model.

[0032] The attention mechanism uses the output of the last time step of the LSTM as the query vector, and the complete LSTM output sequence as the key and value vectors. Through this mechanism, the model can dynamically capture the importance of different wavelength regions in the spectral sequence and their global correlations across wavelengths. Compared to the memory mechanism of LSTM, the attention mechanism focuses more on capturing features at key positions in the sequence. This mechanism complements the sequential modeling capabilities of LSTM, enabling the model to exhibit stronger robustness and predictive ability when dealing with the nonlinear characteristics of spectral data.

[0033] The output module uses a fully connected layer to output the predicted wheat fat, protein, moisture, and amylose content.

[0034] S4. The model is trained using the spectral dataset and label data, with the cross-entropy loss function. The response of spectral reflectance to the chemical bond interactions in the content of various wheat components is analyzed. The trained model is then used to predict the wheat fat, protein, moisture, and amylose content.

[0035] This invention uses the calibration set determination coefficient ( ) and the coefficient of determination of the prediction set ( The model's overall capability is evaluated using five metrics: root mean square error of calibration (RMSEC), root mean square error of prediction (RMSEP), and residual prediction bias (RPD). and RPD (Revised Probability Difference) measures the correlation between model predictions and actual values; a value closer to 1 indicates a higher good fit. RMSEC and RMSEP measure the model's prediction accuracy; lower values ​​indicate better prediction performance. RPD is an important indicator for evaluating model predictability and robustness. Generally, an RPD value between 1.5 and 2.0 indicates poor model prediction performance; between 2.0 and 2.5 indicates the model can make effective quantitative predictions; and greater than 2.5 indicates high predictive ability. A reliable model should have a high RPD. , And RPD value, while RMSEC and RMSEP values ​​should be kept at a low level. The formulas for calculating these parameters are as follows:

[0036]

[0037]

[0038]

[0039]

[0040] In the formula, and It represents the predicted and measured component content of the i-th wheat sample. and It is the average content of wheat sample components in the calibration set and the prediction set. and These are the number of samples in the calibration set and the prediction set, respectively.

[0041] Based on both visible-near-infrared and near-infrared spectra, and under a multi-task (MT) modeling strategy, a one-dimensional convolutional neural network (1DCNN) and a bidirectional convolutional fusion network (GLSNet) prediction model were constructed. The mapping relationship between effective spectral data and wheat fat, protein, moisture, and amylose was quantitatively analyzed. A traditional partial least squares (PLSR) deep learning model, CLNet, was used as a comparative model. Performance comparisons of each model are shown in Table 1.

[0042] Table 1

[0043] Table 1 shows the prediction results of the MT prediction models based on visible-near-infrared (VNIIR) and near-infrared (NIIR) spectral data for multiple wheat components. As can be seen from the table, the modeling results of the MT prediction models based on VNIIR and NIIR are similar. MT-GLSNet has the highest prediction accuracy and the best model stability, followed by MT-CLNet, while MT-PLSR performs the worst. Specifically, among the MT prediction models using VNIIR, the fusion network MT-GLSNet, compared to MT-CLNet, has a higher average prediction accuracy for the content of each wheat component. The average RPD increased by 0.5799, an increase of 0.0927; compared with MT-PLSR, the average prediction of wheat components improved. The average RPD was improved by 0.1944 and 0.8824, respectively; in the wheat multi-task prediction model based on NIR, MT-GLSNet improved the average RPD of wheat components compared with MT-CLNet and MT-PLSR. The improvements were 0.0807 and 0.2013, respectively, and the average RPD improved by 5.5145 and 6.609, respectively. Although CLNet can meet certain detection requirements, its structure limits its ability to capture key position sequences, and there is still room for improvement. PLSR performs poorly in multi-task regression, mainly because its linear characteristics and uniform feature space limit its ability to model heterogeneity and complex nonlinear relationships between tasks. The above results fully demonstrate that the GLSNet model has outstanding performance in balancing prediction performance, stability, and efficiency, and is better able to meet the needs of simultaneous prediction of multi-component content in wheat in practical applications.

[0044] By comparing the modeling results of the two spectra, it can be seen that the model... Similar to RPD changes, but modeling results based on near-infrared spectroscopy are superior to those based on visible-near-infrared spectroscopy. The optimal prediction model, MT-GLSNet, shows better predictions for fats, proteins, water, and amylose. The values ​​were 0.9729, 0.9702, 0.9607, and 0.9775, respectively; the RPD values ​​were 6.0732, 8.6194, 6.2370, and 15.1575, respectively. These results indicate that the near-infrared spectral range is more suitable for predicting the content of internal components in wheat than the visible-near-infrared spectral range.

[0045] Furthermore, to effectively evaluate model performance, this invention uses scatter plots to visually demonstrate the performance of the GLSNet model in simultaneously predicting the content of four wheat components (fat, protein, moisture, and amylose). The prediction results of the GLSNet model constructed based on visible-near-infrared (VIS-NIR) and near-infrared (NIR) spectra are shown below. Figure 4 As shown and Figure 5 As shown, blue represents the prediction results for the calibration set, and orange represents the prediction results for the prediction set. In contrast, Figure 4 The Chinese model based on visible-near-infrared spectroscopy is slightly inferior in fitting accuracy to... Figure 5 Mid-to-near infrared spectral models, but Figure 4 The predictive performance remains good, still possessing strong predictive ability, with predictive determination coefficients for each component ( ). All values ​​are above 0.81, and the residual prediction deviation (RPD) is above 2.42, basically meeting the requirements of practical applications. Figure 5 As can be seen, when using NIR spectral data, the calibration curves and predicted curves of the GLSNet model for the four components are in high agreement with the measured values, showing a near-perfect fit, with data points closely distributed near the ideal fitting line. In summary, the GLSNet model can stably and accurately capture the complex relationship between wheat spectral features and component content across different spectral ranges, demonstrating excellent generalization ability and predictive performance.

[0046] Effects after implementation This invention establishes a rapid and accurate method for the simultaneous detection of wheat fat, protein, moisture, and amylose by combining HSI with the MT-GLSNet multi-task prediction model. A deep-guided watershed multi-step segmentation algorithm (DG-WS) based on CNN is used to segment individual wheat grains, ensuring an image segmentation accuracy of ≥99.9%. This invention employs hyperspectral imaging (HSI) technology with different spectral ranges (VIS-NIR: 400-1000nm and NIR: 900-1700nm) to simultaneously predict the content of these four components in wheat. Based on single-task (ST) and multi-task (MT) modeling strategies, a hybrid model (GLSNet) combining a one-dimensional convolutional neural network (1DCNN) and a bidirectional long short-term memory neural network (BiLSTM) is developed. The results are compared between a least squares regression (PLSR) model preprocessed with MSC-1st and the 1DCNN deep learning model. The results show that the multi-task MT-GLSNet model performs best within the NIR spectral range, achieving an average accuracy (Rp2) of 0.9703 and an average RPD of 9.0218 for simultaneous prediction of wheat fat, protein, moisture, and amylose. These results demonstrate that the combination of HSI and the MT-GLSNet model can simultaneously and accurately predict the content of these four wheat components, providing an efficient method for the quality detection of raw materials for baijiu (Chinese liquor).

[0047] This invention proposes a novel deep learning regression model, "GLSNet". This model employs a cascaded architecture design, using multi-level feature extraction and modeling strategies to process high-dimensional spectral sequence data. The GLSNet model combines feature extraction, sequence modeling, and attention mechanisms, enabling efficient handling of complex spectral patterns. Using the average spectral data of 11 wheat varieties as the input for target index prediction, the model automatically performs convolutional learning to establish an accurate mapping between wavelength and component content. Through time-series processing, it achieves accurate prediction of the multi-component content of wheat. Specifically, it includes: (1) Based on the integration of hyperspectral imaging and image, this invention proposes a new method for grain segmentation based on image adhesion to address the problem of severe grain adhesion when wheat is piled up. It is the first to use the watershed multi-step segmentation algorithm (DG-WS) based on CNN depth guidance to segment individual wheat grain images. By using the improved watershed algorithm and combining it with the marker point detection of grain coordinate position based on CNN depth guidance algorithm, the wheat image is segmented to achieve a grain segmentation accuracy of ≥99.9%.

[0048] (2) To address the problems of low computational efficiency, difficulty in variable selection and interpretation, and thus impact on model prediction capabilities when capturing complex nonlinear relationships in hyperspectral data, this invention innovatively integrates the advantages of GhostNet, LSTM, and Scaled Dot-Product Attention to construct a GLSNet combined architecture model, targeting the spatial-spectral characteristics and strong inter-band correlations of hyperspectral data. Its Ghost module constructs a more information-rich feature map by introducing a division of labor mechanism between main convolution and inexpensive operations; the three-layer stacked LSTM can effectively capture complex cross-wavelength correlation patterns in spectral data, helping the model better identify global and local features in the spectral data; the Attention module can dynamically capture the importance of different wavelength regions in the spectral sequence and the global correlation across wavelengths. The organic combination of these three modules can effectively handle the nonlinear characteristics of spectral data while capturing the wavelength correlation of different internal component contents, achieving simultaneous prediction of wheat multi-component content.

[0049] (3) This invention combines hyperspectral technology with a multi-task modeling strategy. The multi-task modeling strategy is based on the principle of "inductive bias". Through the shared representation learning mechanism, it utilizes complementary information between tasks to optimize related tasks at the same time. Since there is a certain intrinsic correlation between the components of wheat raw materials, the multi-task modeling strategy can capture these correlations by sharing the feature extraction layer, thereby realizing the parallel prediction of the content of multiple components and improving the generalization ability of the model. Based on the multi-task modeling strategy (MT), a multi-task hybrid model (MT-GLSNet) was developed by integrating GhostNet, LSTM and Scaled Dot-Product Attention modules. MT-GLSNet has the highest prediction accuracy and the best model stability, realizing efficient and accurate synchronous detection of wheat fat, protein, moisture and amylose.

[0050] (4) This invention utilizes visible-near-infrared (VIS-NIR) and near-infrared (NIR) hyperspectral technologies combined with deep learning methods and multi-task modeling strategies to establish a deep learning network model (MT-GLSNet). The study analyzes the response of spectral reflectance to the chemical bond interactions in the content of various components in wheat and finds that the model performs best in the NIR spectral range. This indicates that the MT-GLSNet algorithm is more suitable for predicting the content of internal components in wheat in the NIR spectral range than in the VIS spectral range.

[0051] (5) The method for simultaneous detection of wheat fat, protein, moisture and amylose established in this invention has a prediction accuracy of Rp2=0.9703 and an average RPD=9.0218, achieving excellent prediction accuracy and stability. The HSI combined with the MT-GLSNet multi-task hybrid model can simultaneously and accurately predict the content of the four components in wheat, providing a multi-component accurate and efficient prediction method for rapid and non-destructive detection of multiple components in wheat.

[0052] In one exemplary embodiment, a computer-readable storage medium is included, which stores a computer program that, when executed by a processor, implements the above-described method for simultaneous prediction of wheat multi-component content.

[0053] Please see Figure 6 In one exemplary embodiment, the device further includes an electronic device including at least one processor, at least one memory, and at least one communication bus.

[0054] The memory stores a computer program, which includes computer-readable instructions. The processor calls the computer-readable instructions stored in the memory through the communication bus to execute the above-mentioned method for synchronous prediction of wheat multi-component content.

[0055] In one exemplary embodiment, a computer program product is proposed, including a computer program / instructions that, when executed by a processor, implement the steps of the above-described method for simultaneous prediction of wheat multi-component content.

[0056] The above description of the disclosed embodiments enables those skilled in the art to make or use the invention. Various modifications to these embodiments will be readily apparent to those skilled in the art, and the general principles defined herein may be implemented in other embodiments without departing from the spirit or scope of the invention. Therefore, the invention is not to be limited to the embodiments shown herein, but is to be accorded the widest scope consistent with the principles and novel features disclosed herein.

Claims

1. A method for simultaneous prediction of the content of multiple components in wheat, characterized in that, Includes the following steps: S1. Acquire hyperspectral images of wheat samples and perform reflectance correction; determine the fat, protein, moisture, and amylose content of wheat as label data; S2. Segment the wheat grains in the hyperspectral image, average the spectral information of all pixels in each segmented wheat grain, and construct a spectral dataset. S3. Construct a synchronous prediction model for the multi-component content of wheat, including: a feature extraction module, a sequence modeling module, a feature weight generation module, and an output module; the feature extraction module uses GhostNet, the sequence modeling module includes a three-layer stacked LSTM, and the feature weight generation module uses scaled dot product attention; the feature extraction module is used to extract features from spectral data and construct feature maps, the sequence modeling module is used to capture the correlation and dependency between different wavelengths of spectral data based on the feature maps, the output of the sequence modeling module is passed through the feature weight generation module to assign attention weights to the spectral data features, and the output of the feature weight generation module is passed through the output module to obtain the predicted multi-component content of wheat; S4. Train the model using spectral dataset and label data, and use the trained model to predict the wheat fat, protein, moisture and amylose content of wheat.

2. The method for simultaneous prediction of multi-component content in wheat according to claim 1, characterized in that, Hyperspectral images of wheat samples include those in the visible-near-infrared and near-infrared bands.

3. The method for simultaneous prediction of multi-component content in wheat according to claim 1, characterized in that, The formula for reflectivity correction is as follows: in, These are corrected hyperspectral image data. It is the raw spectral image data. and These are standard whiteboard image data and blackboard image data with the camera lens covered, respectively.

4. The method for simultaneous prediction of multi-component content in wheat according to claim 1, characterized in that, The watershed multi-step segmentation algorithm guided by CNN depth is used to segment wheat grains in hyperspectral images, specifically including: Generate mask images from hyperspectral images using threshold segmentation; Wheat grains are separated using H-mini transformation based on mask images, and the effective region of wheat grains is determined by edge processing. The shape of each wheat grain is processed morphologically. The CNN deep guided algorithm is used to mark the location of each wheat grain, transforming the physical segmentation into countable independent data units. Each wheat grain is used as a ROI to obtain an ROI image.

5. The method for simultaneous prediction of multi-component content in wheat according to claim 1, characterized in that, GhostNet uses three cascaded Ghost modules.

6. The method for simultaneous prediction of multi-component content in wheat according to claim 1, characterized in that, Replace the kernels of both the standard convolution and depthwise convolution in the Ghost module with 5×5 convolutions.

7. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, it implements the method as described in any one of claims 1-6.

8. An electronic device, characterized in that, The device includes a processor and a memory, the processor being interconnected with the memory, wherein the memory is used to store a computer program, the computer program including computer-readable instructions, and the processor is configured to invoke the computer-readable instructions to perform the method as described in any one of claims 1-6.

9. A computer program product comprising a computer program / instructions, characterized in that, When the computer program / instructions are executed by the processor, they implement the steps of the method according to any one of claims 1-6.

Citation Information

Patent Citations

  • Single-grain wheat amylose content detection method

    CN111122470A

  • Method for rapidly and nondestructively measuring amylose content of single wheat grain by utilizing near infrared spectrum technology

    CN112683840A

  • Wheat grain quality nondestructive testing method and device, electronic equipment and medium

    CN116660262A

  • Automated stereology for determining tissue characteristics

    US20220058369A1