Construction method of fresh tobacco leaf harvesting maturity discrimination system
By combining hyperspectral images and metabolite data, a deep learning model was constructed, which solved the problems of large sample size and single function in the existing technology, and achieved accurate identification of tobacco leaf maturity and chemical substances, improving the accuracy of tobacco leaf harvesting and Quality control.
Patent Information
- Application Number
- CN202411485286.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-10-23
- Publication Date
- 2025-01-17
AI Technical Summary
The existing tobacco leaf maturity discrimination system requires a large number of samples for modeling, and the chemical content of tobacco leaves cannot be calculated through hyperspectral images. It has a single function and cannot achieve comprehensive identification of tobacco leaf maturity and chemical substances.
The hyperspectral image acquisition system is used to obtain the hyperspectral images of tobacco leaf samples, and combined with metabolite experimental data, data augmentation is performed through the spectral curve random extraction algorithm and Gaussian mixed model to build a deep learning model, combining one-dimensional convolutional neural network and convolution Neural network establishes a tobacco leaf maturity identification and metabolite prediction model, and integrates it into the fresh tobacco leaf harvest maturity discrimination system.
Effectively use fewer tobacco leaf samples to establish an accurate maturity and metabolite recognition model, and the maturity, metabolites and quality information of tobacco leaf can be obtained by inputting the spectral curve of unknown tobacco leaf, so as to achieve comprehensive identification of tobacco leaf maturity and chemical substances.
Smart Images

Figure CN119322935A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an intelligent tobacco leaf identification and grading method, and in particular to a method for constructing a fresh tobacco leaf harvest maturity discrimination system. Background Art
[0002] With the popularization of refined tobacco management, refined operations have been deepened and refined in all links of the tobacco industry. Taking tobacco leaf picking as an example, it is required that the maturity of the picked tobacco leaves should be consistent during picking, so as to ensure the quality of the tobacco leaves baked later. However, in actual operation engineering, the picked fresh tobacco leaves still exist in under-ripe, half-ripe, mature, fully ripe, and over-ripe states. At present, many people in this field have proposed an intelligent discrimination system based on hyperspectral graphics for identifying the maturity of tobacco leaves, such as the application publication number CN 115494009A, named as a method and system for intelligent discrimination of tobacco leaf maturity, the system collects tobacco leaf samples of different maturity and obtains hyperspectral images; divides the data to obtain training sets and test sets; extracts spectral data from the hyperspectral images of the training sets and test sets, and uses principal component analysis to reduce the dimension of the spectral data; uses the reduced-dimensional training set to train the constructed tobacco leaf maturity discrimination model to obtain a trained tobacco leaf maturity discrimination model; uses the reduced-dimensional test set to evaluate the performance of the trained tobacco leaf maturity discrimination model, and constructs a classification model to realize intelligent discrimination of tobacco leaf maturity. Those skilled in the art believe that the system can quickly and accurately classify the picked tobacco leaves, so that the tobacco leaves can be packed according to the classification in the subsequent flue-curing process, thereby improving the overall quality of the tobacco leaves.
[0003] However, the existing use of hyperspectral images is mostly to directly build models by collecting a large amount of data and form a recognition system through the model. However, in order to form a high degree of recognition with this method, a large number of tobacco leaf samples need to be collected for the model to learn. At the same time, the existing hyperspectral image information only uses its visible part and is not linked to the chemical substances of the tobacco leaves. As a result, the existing fresh tobacco leaf harvest maturity discrimination system has a single function and cannot infer the chemical content of the tobacco leaves through the discrimination of the tobacco leaves. Summary of the invention
[0004] In view of this, one of the purposes of the present invention is to provide a method for constructing a fresh tobacco leaf harvest maturity discrimination system to solve the technical problems of large demand for modeling samples and inability to infer tobacco leaf metabolites using tobacco leaf identification spectra.
[0005] One of the purposes of the present invention is achieved through the following technical solutions:
[0006] The method for constructing a fresh tobacco leaf harvest maturity discrimination system comprises the following steps:
[0007] a. Collect fresh tobacco leaves of different maturity as tobacco leaf samples;
[0008] b. photographing tobacco leaf samples using a hyperspectral image acquisition system to obtain hyperspectral images of the tobacco leaf samples, and performing image correction on the photographed hyperspectral images;
[0009] c. performing metabolite determination on the tobacco leaf samples collected in step a to obtain tobacco leaf metabolite test data;
[0010] d. Using spectral curve random extraction algorithm to obtain randomly sampled hyperspectral image sets;
[0011] e. Sampling the tobacco metabolite test data using a Gaussian mixture model to expand the tobacco metabolite test data to form a tobacco metabolite test data set;
[0012] f. Combine the hyperspectral image set and the tobacco metabolite test data set, divide the training set, validation set, and test set in proportion, and use deep learning methods to build a tobacco maturity recognition model and a tobacco metabolite prediction model;
[0013] g. Use PyQt5 to design the interface of the fresh tobacco leaf harvest maturity discrimination system, including the interface for inputting spectral curves, integrate the tobacco leaf maturity recognition model and the tobacco leaf metabolite prediction model into the software, and establish the data transmission and interaction mechanism between the tobacco leaf maturity recognition model and the tobacco leaf metabolite prediction model.
[0014] The method for constructing the above-mentioned fresh tobacco leaf harvest maturity discrimination system is to use the OTSU method to remove the main stem, branch veins, wrinkles and background interference items when sampling in step d.
[0015] The method for constructing the aforementioned fresh tobacco leaf harvest maturity discrimination system is that the tobacco leaf maturity recognition model is constructed using a one-dimensional convolutional neural network.
[0016] The method for constructing the aforementioned fresh tobacco leaf harvest maturity discrimination system is that the tobacco leaf metabolite prediction model is constructed using a convolutional neural network.
[0017] The method for constructing the aforementioned fresh tobacco leaf harvest maturity discrimination system is that when a tobacco leaf maturity recognition model is constructed using a one-dimensional convolutional neural network, the training set used uses a pixel-level annotation method to annotate each pixel in the hyperspectral image.
[0018] The method for constructing the aforementioned fresh tobacco leaf harvest maturity discrimination system is to perform image correction on the captured hyperspectral image, including lens calibration and reflectivity correction, through the analysis tool module in the SpecView software.
[0019] The method for constructing the aforementioned fresh tobacco leaf harvest maturity discrimination system is that in step c, it is also necessary to compare and analyze the obtained tobacco leaf metabolite test data to find out the metabolites with significant differences in tobacco leaf samples of different maturity, and then associate and correspond the metabolite data of the tobacco leaf samples with the corresponding hyperspectral images, and find out the corresponding areas of the significantly different metabolites in the hyperspectral bands, and use the association and corresponding areas of the two for convolutional neural networks.
[0020] The method for constructing the aforementioned fresh tobacco leaf harvest maturity discrimination system is that the metabolites with significant differences in different maturity are chlorophyll, alkaloids, total nitrogen, total phenols, and protein.
[0021] The method for constructing the aforementioned fresh tobacco leaf harvest maturity discrimination system is that the hyperspectral image acquisition system includes a GaiaSky-mini2 hyperspectral imager, a display, a standard whiteboard, a halogen lamp light source and a dark box.
[0022] The beneficial effects of the present invention are:
[0023] The present invention obtains metabolite experimental data of the collected fresh tobacco leaves while acquiring hyperspectral images thereof, and at the same time, makes one-to-one correspondence between the metabolite experimental data and the corresponding average spectral curves, clarifies the correlation between the metabolite information and the hyperspectral information, and then effectively utilizes the metabolite experimental data and the hyperspectral image data of the fresh tobacco leaves to establish a tobacco leaf maturity recognition model and a tobacco leaf metabolite prediction model, and utilizes the tobacco leaf maturity recognition model and the tobacco leaf metabolite prediction model and the correlation between the two models to form a fresh tobacco leaf maturity recognition system, so that the model required by the system can be established more accurately with fewer tobacco leaf samples, and the final recognition system can obtain comprehensive data on tobacco leaf maturity, metabolites and quality information by inputting the spectral curve of unknown tobacco leaves.
[0024] Other advantages, objectives and features of the present invention will be described in the following description to some extent, and to some extent, will be obvious to those skilled in the art based on the following examination and study, or can be taught from the practice of the present invention. The objectives and other advantages of the present invention can be realized and obtained through the following description and claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] In order to make the purpose, technical solutions and advantages of the present invention more clear, the present invention will be further described in detail below with reference to the accompanying drawings, in which:
[0026] Figure 1 These are fresh tobacco leaf samples of different maturity levels;
[0027] Figure 2 Take a photo of the hyperspectral image acquisition system;
[0028] Figure 3 Spectral curves of fresh tobacco leaves before and after reflectance correction;
[0029] Figure 4 The average spectral curve of the region of interest of 150 fresh tobacco leaves of different maturity;
[0030] Figure 5 The spectral curves of fresh tobacco leaves with different maturity after SNV treatment;
[0031] Figure 6 The spectral curves of fresh tobacco leaves of different maturity after being treated with SNV-SG;
[0032] Figure 7 The spectral curves of fresh tobacco leaves of different maturity after being treated with SNV-SG-Norm;
[0033] Figure 8 is the average spectral curve of fresh tobacco leaves with different maturity;
[0034] Fig. 9 The left figure shows the data distribution and probability curve of the metabolite curcumenol content in four fresh tobacco leaf samples of M3 maturity, and the right figure shows the distribution and probability curve of 3600 data obtained by sampling using the Gaussian mixture model; DETAILED DESCRIPTION
[0035] The preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the preferred embodiments are only for illustrating the present invention, rather than for limiting the protection scope of the present invention.
[0036] 1. Collection of fresh tobacco leaf samples
[0037] Fresh tobacco leaf samples were collected at designated test sites in Bozhou District, Zunyi City, Guizhou Province from July to August 2022. The collected variety was Yunyan 87, and the collection site was the middle leaf (9th to 11th from the bottom of the tobacco plant).
[0038] To ensure the consistency and representativeness of the samples, the selection of tobacco fields was based on standardized production management practices and uniformity of tobacco leaf growth. The experimental fields were divided into five plots according to their area. The first collection began on the 15th day after topping, and then was collected every 4 days, for a total of five times. Table 1 shows the maturity grades of fresh tobacco leaves collected on different dates and their corresponding appearance characteristics.
[0039] Table 1 Maturity grades and main appearance characteristics of fresh tobacco leaves collected on different dates
[0040]
[0041] Fresh tobacco leaf samples of different maturity levels Figure 1 shown.
[0042] The hyperspectral image acquisition system was used to capture the hyperspectral images of fresh tobacco leaves immediately after they were picked. To ensure that the samples can fully reflect the characteristics of the entire batch, 30 representative tobacco leaves were selected for each maturity level. During the entire data collection process, a total of 150 hyperspectral images of the middle leaves of Yunyan 87 with different maturity levels were taken, and the size of each hyperspectral image was 991×960×176.
[0043] 2. Hyperspectral Image Acquisition System Construction
[0044] The GaiaSky-mini2 hyperspectral imager (Sichuan Shuangli Hepu Technology Co., Ltd., Chengdu, Sichuan) was used. The wavelength range of this hyperspectral imager is from 400nm to 1000nm, with 176 channels, which provides rich spectral information for the study. Its main performance index parameters are shown in Table 2.
[0045] Table 2 Main performance indicators and parameters of GaiaSky-mini2 hyperspectral imager
[0046]
[0047] With the hyperspectral imager as the core, a hyperspectral image acquisition system is built, such as Figure 2 As shown, high-quality and accurate data acquisition is ensured. The main components of the system include:
[0048] (1) GaiaSky-mini2 hyperspectral imager: As the core device, this imager can capture the hyperspectral information of tobacco leaves in the visible and near-infrared ranges. Its 176 channels can provide rich spectral details, allowing researchers to deeply analyze the optical properties of tobacco samples.
[0049] (2) Display: used to monitor and adjust the image acquisition process in real time. The acquired hyperspectral image can be observed through the display to ensure the clarity and accuracy of the image.
[0050] (3) Standard white plate: used to calibrate the hyperspectral image. By acquiring the spectral information (white frame) of the standard white plate, changes in lighting conditions and sensor response during the experiment can be compensated. At the same time, acquiring a black frame with the camera lens cover closed can record background noise and exclude interference from stray light. This helps ensure the reliability and consistency of the collected spectral data under different conditions.
[0051] (4) Halogen light source: Provides light source to illuminate tobacco samples and ensures sufficient illumination during image acquisition. Strict control of lighting conditions helps improve the quality and accuracy of spectral data.
[0052] (5) Dark box: To minimize the impact of external light sources on the experiment, the hyperspectral images were collected in a dark box environment. This design effectively blocks ambient light, ensures the accuracy of the measurement, and reduces potential noise sources that may affect image quality.
[0053] During the entire image capture process, the exposure time and gain settings were kept consistent to facilitate image correction of the captured hyperspectral images. The hyperspectral image acquisition system built in this study can obtain high-quality and accurate spectral data while reducing external interference, laying the foundation for the spectral characteristics analysis of fresh tobacco leaf samples of different maturity.
[0054] 3. Hyperspectral Image Correction
[0055] In order to eliminate the influence of uneven illumination intensity and the noise associated with dark current in the hyperspectral imager lens, it is necessary to perform image correction on the captured hyperspectral image. The correction process includes lens calibration and reflectivity correction, which is completed through the analysis tool module in the SpecView software. SpecView hyperspectral image acquisition and data preprocessing software was developed by Sichuan Shuangli Hepu Technology Co., Ltd. for its hyperspectral camera. It has the main functions of controlling the spectral imaging system, image acquisition and data preprocessing.
[0056] The hyperspectral imaging acquisition system uses slit scanning to acquire data. The distance between the slit and the imaging lens may lead to inconsistent brightness during imaging. Therefore, the lens is calibrated on the original hyperspectral image using standard light source files and black frames to eliminate potential distortion or artifacts to ensure consistent brightness at each position during the imaging process.
[0057] In addition, the data collected by the hyperspectral image acquisition system is also affected by many other factors, such as light source spectrum, light source intensity, lens transmittance, diffraction efficiency of the spectrometer, spectral response efficiency of the camera, and reflectivity of the object being measured. The final acquisition is the pixel brightness value (Digital Number, DN value) of the image. The DN value records the grayscale value of the sample being photographed. In order to obtain the reflectivity of the hyperspectral data, the collected DN value needs to be corrected for reflectivity. According to Noviyanto and Abdulla
[58] The proposed method uses the collected black and white frames to perform reflectivity correction. The reflectivity correction formula is as follows:
[0058]
[0059] Where R is the reflectance of the hyperspectral image after black and white correction; D is the hyperspectral image data after lens correction; D0 is the black frame data; and D1 is the white frame data.
[0060] The spectral curves before and after reflectivity correction are as follows: Figure 3Reflectance correction effectively normalizes the hyperspectral data, accounting for variations in lighting conditions and sensor response.
[0061] 4. Metabolite determination of fresh tobacco leaf samples
[0062] 150 fresh tobacco leaf samples for hyperspectral photography were sent to the laboratory for testing. The average results after testing are shown in Table 3. Table 3 Average metabolite values of sweet-flavor fresh tobacco leaves tested in the laboratory
[0063]
[0064]
[0065] From Table 3, we can clearly see the changes in the content of substances in fresh tobacco leaves of different maturity, among which the differences in chlorophyll, alkaloids, total nitrogen, total phenols and protein are more significant.
[0066] At the same time, in order to prove this conclusion, the metabolites of sweet-flavored fresh tobacco leaves were tested. The test results are shown in Table 4. Table 4 Average values of metabolites detected in the laboratory of sweet-flavored fresh tobacco leaves
[0067]
[0068] Table 4 can further prove the changes in the content of substances in fresh tobacco leaves of different maturity, among which the differences in chlorophyll, alkaloids, total nitrogen, total phenols and protein are more significant.
[0069] 5. Matching of laboratory data and hyperspectral data of fresh tobacco leaf metabolites
[0070] 1. Hyperspectral data preparation
[0071] 1) Labeling of hyperspectral data, the steps are as follows:
[0072] (1) Region of interest selection: Determine the range of the hyperspectral data by selecting the region of interest in the hyperspectral image of fresh tobacco leaves.
[0073] (2) Extracting the average spectral curve of the region of interest: For the selected region of interest, extract its average spectral curve to obtain the spectral information of the region.
[0074] (3) Preprocessing the spectral curve: Preprocessing the extracted spectral curve, such as denoising, smoothing or other processing, to ensure the accuracy of subsequent steps.
[0075] (4) Transforming the spectral curve: Transforming the preprocessed spectral curve, such as calculating the spectral vegetation index, extracting characteristic wavelengths or principal components, etc., to better express the spectral characteristics related to maturity.
[0076] (5) Feature marking: Mark the preprocessed spectral curve or transformed spectral feature according to the maturity level of the tobacco leaves.
[0077] The selection of the region of interest is to import the tobacco leaf hyperspectral image into relevant image processing tools, such as ENVI, through which the hyperspectral image can be visualized to better understand the content and structure of the image. The region of interest containing the target information is manually selected in the image.
[0078] In order to select the appropriate region of interest, the OTSU method was used to remove interference items such as the main stem, branch veins, wrinkles and background, and then 6 points were randomly selected from the leaf part and their average value was calculated.
[0079] The algorithm for extracting the average spectral curve of the region of interest (Table 5) includes the steps of preprocessing the RGB image, image segmentation, selecting the region of interest, extracting hyperspectral information, and calculating the average spectral curve. Through this algorithm, the average spectral curve of the region of interest in 150 tobacco leaf samples was successfully extracted.
[0080] Table 5 Algorithm for extracting average spectral curve of fresh tobacco leaf region of interest
[0081]
[0082] The average spectral curves of 150 fresh tobacco leaves of different maturity are as follows: Figure 4 shown.
[0083] 2. Spectral preprocessing
[0084] It uses three methods: standard normal transformation, SG smoothing and maximum and minimum normalization for preprocessing.
[0085] (1) Standard Normal Variate (SNV):
[0086] SNV is mainly used to eliminate the influence of scattering on the spectrum caused by uneven particle distribution and different particle sizes. The processing process includes centering and standardization. Centering is to subtract the average value of each band from the spectral data of the band to ensure that the mean of the data set is 0. Standardization is to divide the centered data by the standard deviation of each band so that the standard deviation of the data set is 1. The main advantage of SNV is that it can eliminate the spectral offset caused by some instruments or sample preparation, improve the comparability of the data and the stability of the model. The spectral curve after SNV processing is as follows Figure 5 shown.
[0087] Depend on Figure 5It can be observed that the smoothness and consistency of the spectral curves have been significantly improved, indicating that SNV preprocessing effectively eliminates the scattering effect in the original spectrum. The shape and characteristics of the spectral curves remain unchanged, but are more stable and comparable overall, which helps to improve the accuracy of subsequent data analysis and the stability of the model.
[0088] (2) SG smoothing (Savitzky-Golay smoothing):
[0089] SG smoothing is a method commonly used in signal processing and spectral preprocessing. Its main function is to smooth the spectral curve, remove noise, and highlight potential spectral features. By fitting a polynomial to the spectral data of each band. And use the fitted polynomial to calculate the smoothing coefficient. Finally, the smoothing coefficient is convolved with the original spectral curve to obtain the smoothed spectral curve. SG smoothing helps to remove high-frequency noise, making the spectral curve smoother, which is more conducive to subsequent feature extraction and analysis. The spectral curve processed by SNV is smoothed by SG, and the results are as follows Figure 6 shown.
[0090] from Figure 6 It can be seen that the spectral curve becomes smoother after SG smoothing, and the noise is effectively suppressed. This shows that SG smoothing can maintain the continuity and characteristics of the spectral curve while removing high-frequency noise, making the spectral data more suitable for subsequent feature extraction and analysis.
[0091] (3) Maximum and minimum normalization:
[0092] Maximum and minimum normalization (Norm) is a simple and effective normalization method used to eliminate problems caused by differences in the numerical ranges of different bands. The maximum value Max and the minimum value Min are determined for the spectral data of each band. The spectral data of each band is normalized using the following formula:
[0093] Where X normalized is the normalized data; X is the original spectral data; Min is the minimum value in the original spectral data; Max is the maximum value in the original spectral data.
[0094] Maximum and minimum normalization helps ensure that data in different bands have similar numerical ranges, making the model easier to learn and generalize. The normalized spectral curve is as follows Figure 7 As shown. Figure 7It can be seen that through normalization, the absorption spectra of tobacco leaves of different maturity can be mapped to the same reference range, which makes it easier to compare their characteristic absorption peaks and relative intensities. In addition, the normalization method can also help eliminate the influence of irrelevant factors and highlight the interesting features of tobacco leaves of different maturity. The reflectivity in the wavelength range of 700-1000nm in the figure shows good discrimination.
[0095] 3) Correlation between metabolite experimental data and corresponding average spectral curves
[0096] After preprocessing the 150 collected hyperspectral images, the average spectra of fresh tobacco leaves of different maturity are as follows: Figure 8 shown.
[0097] from Figure 8 It can be seen that the average spectral period of fresh tobacco leaves of different maturity shows obvious peaks and troughs, which is consistent with the specific properties of photosynthetic plants, and there is a significant deviation in the wavelength range of 700-800nm. The maturity of tobacco leaves has a significant effect on the reflectance in this wavelength range, and the increase in maturity shows a gradually increasing relationship with the reflectance. This phenomenon is related to the significant differences in tobacco leaves of different maturity. Taking chlorophyll, which is the most analyzed, as an example, as the chlorophyll content increases, the reflectance value decreases, which is caused by the interaction between biochemical components and incident light. It should be noted that the reflectance spectrum of tobacco leaves with M5 maturity shows an abnormal deviation from the preset standard. There is no significant peak and the reflectance is significantly lower than other maturity stages. This situation may be related to the overabsorption state, which is manifested by a significant reduction in the content of multiple compounds, among which the reduction of chlorophyll causes a significant change in the absorption pattern of specific spectral bands. Generally speaking, over-mature tobacco leaves often show an increase in the concentration of secondary metabolites, which will also lead to changes in light absorption and scattering characteristics. By making a one-to-one correspondence between the metabolite experimental data and the corresponding average spectral curve, the consistency of the metabolite information and the hyperspectral information is ensured. The correlation between the two lays the foundation for the subsequent expansion of the data set for model building. When selecting, we can focus on selecting the band area with significant differences, so that the model can be better established with a relatively small sample size.
[0098] 6. Hyperspectral Image Collection
[0099] The average spectral curve extraction algorithm of the fresh tobacco leaf region of interest used in Table 5 is continued, 100 points are randomly selected from each of the 150 selected hyperspectral images, and 15,000 new hyperspectral images are formed and merged with the 900 hyperspectral images previously acquired in the fifth part of the embodiment to form a hyperspectral image set.
[0100] 7. Using Data Augmentation to Build Metabolite Experimental Datasets
[0101] Data augmentation is the process of generating more training data by transforming or adding new samples to an existing dataset. This helps improve the performance of the model, reduce overfitting, and increase the robustness of the model to various input changes. In the process of augmenting metabolite data, the stratified sampling method was mainly used. The metabolite data was divided into three layers according to the different maturity of fresh tobacco leaves, and random sampling was performed in each layer.
[0102] Metabolite data augmentation uses Gaussian Mixture Model (GMM), which is a flexible and powerful probabilistic model for modeling data containing multiple latent components. GMM belongs to the category of generative models. Its basic idea is to assume that the observed data is a mixture of multiple Gaussian distributions, each of which corresponds to a potential hidden state in the model. This model has a wide range of applications in many fields, such as image processing, speech recognition, and cluster analysis.
[0103] The core concepts of GMM include the weight, mean, and covariance matrix of each hidden state. The model adapts to the observed data by making reasonable estimates of these parameters. The probability density function of the model is expressed as a linear combination of all components, where each component is a Gaussian distribution. In GMM, each data point is assigned a probability to each Gaussian component, which provides the model with the ability to model uncertainty. GMM usually estimates parameters through the expectation maximization algorithm. It mainly includes two main steps: E step and M step. The E step updates the weight of the hidden state by calculating the posterior probability that each data point belongs to each component. The M step estimates the mean and covariance matrix of each component by maximizing the likelihood function. These two steps are performed alternately until convergence. The specific calculation steps are shown below.
[0104] (1) First, randomly initialize the mean μ of each Gaussian component k , covariance matrix∑ k and weight π k .
[0105] (2) Solving the posterior probability (step E): For each data point x i , and for each Gaussian component k, calculate its posterior probability γ(z ik ).
[0106]
[0107] (3) Update component parameters (M step): Use the posterior probability calculated in the E step to update the parameters of each component.
[0108]
[0109]
[0110]
[0111] (4) Then repeat steps E and M until convergence, and exit the loop by observing the increase of the likelihood function or the change of the parameter less than a certain threshold. Finally, the converged parameters are obtained, including the mean μ of each component. k , covariance matrix∑ k and weight π k .
[0112] Fig. 9 The left figure shows the data distribution and probability curve of the metabolite curcumenol content in 4 fresh tobacco leaf samples of M3 maturity, and the right figure shows the distribution of 3600 data obtained by sampling using the Gaussian mixture model and its probability curve.
[0113] from Fig. 9 It can be seen that the probability curve fitted by the distribution of the original data conforms to the normal distribution; the probability curve of the data obtained by sampling the original data using the Gaussian mixture model shows a parabolic trend, which is close to the normal distribution.
[0114] By introducing different sampling methods, 10,800 metabolite data were randomly extracted, further expanding the sample size of metabolite data. The process of metabolite data expansion not only makes the data richer and more diverse, but also helps solve the problem of model overfitting that may be caused by insufficient sample size. By determining the distribution characteristics of the data and randomly extracting metabolite data, new samples with certain differences are generated. This method effectively increases the diversity of the data set and helps improve the generalization ability of the model.
[0115] 8. Dataset Construction
[0116] To build a comprehensive dataset, the hyperspectral dataset and metabolite test dataset were combined and divided into training, validation, and test sets according to a ratio of 7:1:2.
[0117] 9. Construction of prediction model based on deep learning
[0118] The tobacco leaf maturity recognition model and tobacco leaf metabolite prediction model were built using one-dimensional convolutional neural network and convolutional neural network respectively.
[0119] The main steps of the one-dimensional convolutional neural network algorithm include data preprocessing, model construction, loss function definition, optimizer selection, model training, model evaluation and application. Through these steps, the one-dimensional convolutional neural network can learn meaningful representations from sequence data and provide efficient solutions for various practical problems. The specific algorithm pseudocode implementation is shown in Table 6:
[0120] Table 6 One-dimensional convolutional neural network model algorithm
[0121]
[0122]
[0123] The model used was trained in the following hardware and software environment. The hardware environment includes an Intel(R) Core(TM) i5-10200H CPU@2.40GHz processor and an NVIDIA GeForce RTX 1650 graphics card. In terms of the software environment, the operating system used is Windows 10, the programming language is Python 3.9, and the deep learning framework is PyTorch 1.10.1. The optimizer selected is Adam, the learning rate is 0.0005, and the batch size is 32. The loss function uses the cross entropy function, which effectively measures the difference between the predicted results and the actual results, prompting the model to converge to accurate and detailed maturity predictions.
[0124] 10. Construction of fresh tobacco leaf harvest maturity identification system
[0125] PyQt5 was used to design the interface of the fresh tobacco leaf harvest maturity discrimination system, including the interface for inputting spectral curves. The tobacco leaf maturity recognition model and the tobacco leaf metabolite prediction model were integrated into the software, and the data transmission and interaction mechanism between the tobacco leaf maturity recognition model and the tobacco leaf metabolite prediction model was established.
[0126] Finally, it should be noted that the above embodiments are only used to illustrate the technical solution of the present invention rather than to limit it. Although the present invention has been described in detail with reference to the preferred embodiments, those skilled in the art should understand that the technical solution of the present invention can be modified or replaced by equivalents without departing from the purpose and scope of the technical solution, which should be included in the scope of the claims of the present invention.
Claims
1. A method for constructing a fresh tobacco leaf harvest maturity discrimination system, characterized in that: The method comprises the following steps: a. Collect fresh tobacco leaves of different maturity as tobacco leaf samples; b. photographing tobacco leaf samples using a hyperspectral image acquisition system to obtain hyperspectral images of the tobacco leaf samples, and performing image correction on the photographed hyperspectral images; c. performing metabolite determination on the tobacco leaf samples collected in step a to obtain tobacco leaf metabolite test data; d. Using spectral curve random extraction algorithm to obtain randomly sampled hyperspectral image sets; e. Sampling the tobacco metabolite test data using a Gaussian mixture model to expand the tobacco metabolite test data to form a tobacco metabolite test data set; f. Combine the hyperspectral image set and the tobacco metabolite test data set, divide the training set, validation set, and test set in proportion, and use deep learning methods to build a tobacco maturity recognition model and a tobacco metabolite prediction model; g. Use PyQt5 to design the interface of the fresh tobacco leaf harvest maturity discrimination system, including the interface for inputting spectral curves, integrate the tobacco leaf maturity recognition model and the tobacco leaf metabolite prediction model into the software, and establish the data transmission and interaction mechanism between the tobacco leaf maturity recognition model and the tobacco leaf metabolite prediction model.
2. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 1, characterized in that: In step d, the OTSU method was used to remove the main stem, branch veins, wrinkles and background interference during sampling.
3. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 1, characterized in that: The tobacco leaf maturity recognition model is constructed using a one-dimensional convolutional neural network.
4. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 1, characterized in that: The tobacco leaf metabolite prediction model is constructed using a convolutional neural network.
5. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 3, characterized in that: When using a one-dimensional convolutional neural network to build a tobacco leaf maturity recognition model, the training set used annotated each pixel in the hyperspectral image using a pixel-level annotation method.
6. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 5, characterized in that: Image correction of the captured hyperspectral images includes lens calibration and reflectance correction, which is completed through the analysis tool module in the SpecView software.
7. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 5, characterized in that: In step c, it is also necessary to compare and analyze the obtained tobacco leaf metabolite test data to find out the metabolites with significant differences in tobacco leaf samples of different maturity, then associate and correspond the metabolite data of the tobacco leaf samples with the corresponding hyperspectral images, and find out the corresponding areas of the significantly different metabolites in the hyperspectral bands, and use the association and corresponding areas of the two for convolutional neural networks.
8. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 7, characterized in that: The metabolites with significant differences in different maturity levels are chlorophyll, alkaloids, total nitrogen, total phenols, and protein.
9. The method for constructing a fresh tobacco leaf harvest maturity discrimination system according to claim 1, characterized in that: The hyperspectral image acquisition system includes a GaiaSky-mini2 hyperspectral imager, a display, a standard whiteboard, a halogen light source and a dark box.
Citation Information
Patent Citations
Method and system for intelligently judging maturity of tobacco leaves
CN115494009A
Cited By
Method and system for realizing head and neck tumor immunohistochemical classification by using hyperspectrum
CN119832339A
Method and system for realizing head and neck tumor immunohistochemical classification by using hyperspectrum
CN119832339B