A method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface
By using a biomimetic flexible mesh alignment and frequency domain topology graph transmission maturity discrimination model, the problem of aligning optical features of multiple regions on the entire surface of fresh tobacco leaves was solved, achieving high-precision maturity discrimination and integrating heterogeneous physiological information from the leaf tip, middle, and base.
Patent Information
- Application Number
- CN202611502750.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-09-24
- Publication Date
- 2026-11-17
AI Technical Summary
In existing technologies, the optical features of multiple regions across the entire surface of fresh tobacco leaves cannot be precisely aligned in the spatial dimension, resulting in the maturity discrimination model being unable to effectively integrate the heterogeneous physiological information from the leaf tip, middle, and base.
A biomimetic flexible mesh alignment process is used to align the pixel spatial relationships of leaf tip, leaf middle, and leaf base. A maturity discrimination model is then implemented by transmitting the frequency domain topology graph and integrating chlorophyll degradation gradient and tissue morphology evolution characteristics. A streaming dynamic threshold collaborative computing engine is used for real-time maturity discrimination.
It achieves precise alignment of optical features of multiple regions across the entire surface of fresh tobacco leaves in the spatial dimension, improving the discrimination accuracy and stability of the maturity discrimination model, and effectively integrating heterogeneous physiological information from the leaf tip, middle, and base.
Smart Images

Figure CN123116173A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the technical field of fresh tobacco leaf maturity, specifically, it relates to a method for determining the maturity of fresh tobacco leaves that considers multi-layer data fusion of the entire leaf surface. Background Technology
[0002] Determining the maturity of fresh tobacco leaves is a crucial step in tobacco production, directly impacting leaf quality and the optimization of curing processes. Traditional maturity assessment relies on manual visual evaluation or detection using a single color sensor. In recent years, researchers have introduced multi-source optical acquisition methods such as hyperspectral imaging, color industrial cameras, and laser triangulation sensors, combined with machine learning models, to grade the maturity of fresh tobacco leaves, thus improving the objectivity and consistency of the assessment to some extent. However, the physiological aging rates of the three anatomical regions of fresh tobacco leaves—the tip, middle, and base—exhibit significant nonlinear differences, and the chlorophyll degradation rate and tissue morphology evolution trajectory are asynchronous in different regions during the maturation process. In existing technologies, due to the different imaging angles, resolutions, and physical coordinate systems of multi-source optical acquisition devices, there is a systematic misalignment in pixel space for color feature data, spectral reflectance feature data, and surface texture feature data acquired by different sensors. When fresh tobacco leaves undergo natural curling or local deformation, the pixel coordinate correspondence of the three regions—the tip, middle, and base—further deviates. Traditional rigid registration methods cannot adapt to the non-rigid physiological deformation of leaves, leading to cross-regional feature aliasing during multi-source feature fusion. In other words, existing technologies have a technical problem: the optical features of multiple regions on the entire surface of fresh tobacco leaves cannot be accurately aligned in the spatial dimension, which leads to the inability of maturity discrimination models to effectively integrate the heterogeneous physiological information of leaf tip, leaf middle, and leaf base. Summary of the Invention
[0003] In view of this, the present invention provides a method for determining the maturity of fresh tobacco leaves that considers the fusion of multi-layer data across the entire leaf surface. This method can solve the technical problem in the prior art where the optical features of multiple regions across the entire leaf surface of fresh tobacco leaves cannot be accurately aligned in the spatial dimension, resulting in the maturity discrimination model being unable to effectively integrate the heterogeneous physiological information of the leaf tip, leaf middle, and leaf base.
[0004] This invention is implemented as follows: This invention provides a method for determining the maturity of fresh tobacco leaves that considers multi-layer data fusion across the entire leaf surface, comprising the following steps:
[0005] Collect color feature data, spectral reflectance feature data and surface texture feature data of the entire surface of fresh tobacco leaves to construct a raw dataset of multi-source optical features of the entire leaf surface;
[0006] The original dataset of multi-source optical features of the entire leaf surface was anatomically partitioned and labeled, and the leaf tip region, leaf middle region and leaf base region were labeled. The corresponding color feature data, spectral reflectance feature data and surface texture feature data were extracted from the leaf tip region, leaf middle region and leaf base region respectively to form a hierarchical anatomical feature dataset.
[0007] The layered anatomical feature dataset is subjected to biomimetic flexible mesh alignment processing. The spatial correspondence of pixels in the leaf tip region, leaf middle region and leaf base region is dynamically corrected by spatial topological deformation field to obtain spatial alignment feature dataset.
[0008] The spatial alignment feature dataset is input into the frequency domain topology graph transmission maturity discrimination model, and the frequency domain topology graph transmission maturity discrimination model outputs chlorophyll degradation gradient feature tensor and tissue morphology evolution feature tensor;
[0009] The chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor are input into the streaming dynamic threshold collaborative calculation engine. The streaming dynamic threshold collaborative calculation engine performs real-time maturity discrimination calculation through a hardware accelerated pipeline and a state incremental rolling update mechanism, and outputs the fresh tobacco leaf maturity classification result.
[0010] Specifically, the acquisition of the original dataset of multi-source optical features of the entire leaf surface involves using a hyperspectral imaging device to obtain spectral reflectance data, using a color industrial camera to obtain the pixel values of the red, green, and blue channels, and using a laser triangulation sensor to obtain the depth value and normal vector of each pixel on the leaf surface.
[0011] Specifically, the biomimetic flexible mesh alignment process uses the center pixel of the leaf tip region as the first anchor point, the center pixel of the leaf middle region as the second anchor point, and the center pixel of the leaf base region as the third anchor point. A spatial topological deformation field is established using a thin plate spline interpolation function, and the pixel coordinates of the three regions are dynamically corrected according to the spatial deformation vector to output a spatial alignment feature dataset.
[0012] Specifically, the connection weights between grid nodes in the spatial topological deformation field are obtained by weighted summation of color feature similarity, spectral reflectance feature similarity, and surface texture feature similarity. The sum of the weight coefficients of the three is 1, and the similarity is calculated in the exponential form of negative squared distance.
[0013] Specifically, the acquisition of color feature scale parameters, spectral reflectance feature scale parameters, and surface texture feature scale parameters involves collecting multiple fresh tobacco leaf samples at different maturity levels, calculating the feature variance of pixels within the three regions, using the mean variance as the initial value, iteratively optimizing within a proportional range of the initial value using a grid search method, and selecting the parameter combination with the smallest pixel alignment error as the final scale parameter.
[0014] Specifically, the acquisition of the color feature weight coefficient, spectral reflectance feature weight coefficient, and surface texture feature weight coefficient involves manually labeling the maturity of multiple fresh tobacco leaf samples, calculating the absolute value of the Pearson correlation coefficient between the three types of feature data and the maturity labeling results, and then normalizing them to serve as the corresponding feature weight coefficients.
[0015] The frequency domain topology graph propagation maturity discrimination model includes, in sequence, a discrete cosine transform module, a spatial orthogonal decoupling module, a frequency domain feature attention layer, a topology graph sparse adjacency propagation layer, a continuous-time dynamic evolution network layer, a multi-scale feature dynamic gating fusion module, an anomaly activation smoothing migration layer, an error gradient prediction correction layer, and a fully connected classification layer.
[0016] Specifically, the topological graph sparse adjacency transmission layer filters adjacent nodes based on the spatial physiological correlation thresholds of the leaf tip region, leaf middle region, and leaf base region, constructs a sparse adjacency matrix, and transmits feature information between the three regions through graph convolution operations.
[0017] Specifically, the continuous-time dynamic evolution network layer models the feature evolution process as an ordinary differential equation, uses a Runge-Kutta numerical integrator to dynamically adjust the forward propagation step size, simulates the continuous deformation process of leaf tissue morphology as maturity progresses, and outputs tissue morphology evolution feature tensors.
[0018] Specifically, the multi-scale feature dynamic gating fusion module calculates the fusion weight adjustment factor based on the physiological aging difference index of the leaf anatomical region and the frequency domain energy distribution entropy value, and selects a shallow feature-dominated fusion strategy, a balanced fusion strategy, or a deep feature-dominated fusion strategy according to the range of the fusion weight adjustment factor.
[0019] The physiological aging difference index of the leaf anatomical region is specifically obtained by taking the square root of the sum of the squares of the differences between the average spectral reflectance of the leaf tip region, leaf middle region, and leaf base region; the frequency domain energy distribution entropy value is specifically obtained by the logarithmic weighted sum of the energy proportions of each frequency component.
[0020] Specifically, the adjustment coefficient is obtained by recording the physiological aging difference index of the leaf anatomical region, the frequency domain energy distribution entropy value, and the classification accuracy of each sample on the validation set. The relationship between the three is fitted using the logistic regression method, and the regression coefficient is the adjustment coefficient. Then, the grid search method is used to fine-tune the regression coefficient within the range of the regression coefficient ratio, and the parameter combination with the highest classification accuracy on the validation set is selected as the final adjustment coefficient.
[0021] Specifically, the streaming dynamic threshold collaborative calculation engine divides the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor into multiple data blocks, which are then processed in parallel by a feature preprocessing unit, a threshold calculation unit, and a classification decision unit in a pipeline manner. The threshold calculation unit dynamically updates the discrimination threshold based on the feature mean and standard deviation of the historical data blocks within the sliding window.
[0022] The frequency domain topology graph transmission maturity discrimination model has a functional relationship between memory allocation and the sampling pixel density of the leaf tip region, leaf middle region and leaf base region. When the available memory is fixed, the Lagrange multiplier method is used to solve for the optimal combination of sampling pixel density in order to maximize the maturity discrimination accuracy under memory constraints.
[0023] In the training of the frequency domain topological graph conduction maturity discrimination model, the wavelength range of the spectral reflectance data is 400 nm to 1000 nm, and the spectral resolution is 5 nm to 10 nm; the image resolution is 2048×2048 pixels to 4096×4096 pixels; the depth resolution is 10 μm to 50 μm; the proportion of non-zero elements in the sparse adjacency matrix is 15% to 30%; the sliding window length is 50 to 200 historical data blocks; the threshold adjustment coefficient ranges from 1.5 to 3.0; the base video memory ranges from 500 MB to 2000 MB; and the video memory linearity coefficient ranges from 0.01. Up to 0.05 The range of the video memory interaction term coefficient is 0.0001. Up to 0.0005 .
[0024] This invention employs a biomimetic flexible mesh alignment mechanism, using the center pixels of the leaf tip, middle, and base regions as anchor points. A spatial topological deformation field is established using a thin-plate spline interpolation function to dynamically correct the pixel coordinates of each region, enabling precise pixel-level alignment of multi-source optical features collected by different sensors in the spatial dimension. Based on this, the frequency domain topological graph transmission maturity discrimination model projects the aligned features to the frequency domain through discrete cosine transform. Graph convolution operations are used to effectively transmit chlorophyll degradation gradient and tissue morphology evolution information between the three anatomical regions, overcoming the feature aliasing problem caused by traditional rigid registration. This allows the model to capture the heterogeneous patterns of physiological aging in each region, thereby improving the discrimination accuracy and stability of maturity classification. In summary, this invention solves the technical problem mentioned in the background art where the optical features of multiple regions across the entire fresh tobacco leaf cannot be accurately aligned in the spatial dimension, leading to the inability of the maturity discrimination model to effectively integrate heterogeneous physiological information from the leaf tip, middle, and base. Attached Figure Description
[0025] Figure 1 This is a flowchart of the method of the present invention.
[0026] Figure 2 This is a schematic diagram of the multi-source optical data acquisition and feature fusion process.
[0027] Figure 3 A comparison chart showing the pixel coordinate deviations at different maturity levels before and after alignment of the biomimetic flexible mesh.
[0028] Figure 4 Distribution of fusion weight adjustment factors for 350 samples.
[0029] Figure 5 A distribution chart showing the accuracy rate of each maturity level.
[0030] Figure 6 This is a graph showing the relationship between sampling density in the leaf region and overall discrimination accuracy. Detailed Implementation
[0031] To make the objectives, technical solutions, and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below.
[0032] like Figure 1 The diagram shown is a flowchart of a method for determining the maturity of fresh tobacco leaves that considers multi-layer data fusion across the entire leaf surface, provided by this invention. This method includes the following steps:
[0033] S01. Collect color feature data, spectral reflectance feature data and surface texture feature data of the entire surface of fresh tobacco leaves to construct a raw dataset of multi-source optical features of the entire leaf surface;
[0034] S02. The original dataset of multi-source optical features of the whole leaf surface is anatomically partitioned and labeled, and the leaf tip region, leaf middle region and leaf base region are labeled. The corresponding color feature data, spectral reflectance feature data and surface texture feature data are extracted from the leaf tip region, the leaf middle region and the leaf base region respectively to form a layered anatomical feature dataset.
[0035] S03. Perform biomimetic flexible mesh alignment processing on the layered anatomical feature dataset, and dynamically correct the pixel spatial correspondence of the leaf tip region, the leaf middle region and the leaf base region through a spatial topological deformation field to obtain a spatial alignment feature dataset.
[0036] S04. Input the spatial alignment feature dataset into the frequency domain topology graph transmission maturity discrimination model, and the frequency domain topology graph transmission maturity discrimination model outputs the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor.
[0037] S05. Input the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor into the streaming dynamic threshold collaborative calculation engine. The streaming dynamic threshold collaborative calculation engine performs real-time maturity discrimination calculation through hardware accelerated pipeline and state incremental rolling update mechanism, and outputs the fresh tobacco leaf maturity classification result.
[0038] The acquisition process of the original dataset of multi-source optical features across the entire leaf surface specifically includes: placing fresh tobacco leaves under uniform illumination; scanning the entire leaf surface using a hyperspectral imaging device to obtain spectral reflectance data in the wavelength range of 400nm to 1000nm, with a spectral resolution of 5nm to 10nm; photographing the fresh tobacco leaves using a color industrial camera to obtain RGB three-channel color feature data, with an image resolution of 2048×2048 pixels to 4096×4096 pixels; and scanning the surface of the fresh tobacco leaves using a laser triangulation sensor to obtain surface texture depth data, with a depth resolution of 10μm to 50μm. The color feature data includes the red, green, and blue channel pixel values of the leaf surface. The spectral reflectance feature data includes reflectance values at different wavelengths. The surface texture feature data includes the depth value and normal vector of each pixel on the leaf surface.
[0039] The specific steps of performing biomimetic flexible mesh alignment processing on the layered anatomical feature dataset include: using the pixels of the leaf tip region, the leaf middle region, and the leaf base region as mesh nodes; calculating the connection weights between mesh nodes based on the color feature similarity, spectral reflectance feature similarity, and surface texture feature similarity among the leaf tip region, the leaf middle region, and the leaf base region; constructing a biomimetic flexible mesh topology structure, wherein the biomimetic flexible mesh topology structure uses the center pixel of the leaf tip region as the first anchor point, the center pixel of the leaf middle region as the second anchor point, and the center pixel of the leaf base region as the third anchor point; establishing a spatial topological deformation field, wherein the spatial topological deformation field calculates the spatial deformation vectors of the first anchor point, the second anchor point, and the third anchor point using a thin-plate spline interpolation function; dynamically correcting the pixel coordinates of the leaf tip region, the leaf middle region, and the leaf base region based on the spatial deformation vectors, so that the pixels of the leaf tip region, the leaf middle region, and the leaf base region are accurately aligned in the spatial dimension, and outputting the spatial alignment feature dataset.
[0040] The formula for calculating the color feature similarity is as follows: The formula for calculating the similarity of the spectral reflectance features is as follows: The formula for calculating the surface texture feature similarity is as follows: The connection weights between the grid nodes are ;in and They represent the first The pixel and the The color feature vector of each pixel and They represent the first The pixel and the spectral reflectance feature vector of each pixel and They represent the first The pixel and the Surface texture feature vector of each pixel For color feature scale parameters, For the characteristic scale parameter of spectral reflectance, For surface texture feature scale parameters, For color feature weighting coefficients, These are the spectral reflectance characteristic weighting coefficients. is the surface texture feature weight coefficient, and .
[0041] The biomimetic flexible mesh topology simulates the non-rigid deformation characteristics of biological tissues, allowing the leaf tip, middle, and base regions to undergo elastic deformation while maintaining local topological continuity. This adapts to the nonlinear differences in physiological aging rates at different anatomical sites of fresh tobacco leaves. The thin-plate spline interpolation function is a smooth interpolation method that minimizes bending energy, enabling the establishment of a continuous and differentiable spatial mapping relationship between the first, second, and third anchor points, ensuring a smooth transition of the spatial topological deformation field across the entire leaf surface.
[0042] The method for obtaining the color feature scale parameter, the spectral reflectance feature scale parameter, and the surface texture feature scale parameter is as follows: Collect 100 to 500 fresh tobacco leaf samples of different maturity levels, perform multi-source optical feature acquisition on the entire leaf surface of each sample, and calculate the color feature variance, spectral reflectance variance, and surface texture variance of pixels within the leaf tip region, the leaf middle region, and the leaf base region; use the average value of the color feature variance as the initial value of the color feature scale parameter, the average value of the spectral reflectance variance as the initial value of the spectral reflectance feature scale parameter, and the average value of the surface texture variance as the initial value of the surface texture feature scale parameter; iteratively optimize within a range of 0.5 to 2 times the initial values using a grid search method, and select the parameter combination that minimizes the pixel alignment error of the spatial alignment feature dataset as the final color feature scale parameter and the spectral reflectance feature scale parameter. The color feature weighting coefficient, the spectral reflectance feature weighting coefficient, and the surface texture feature weighting coefficient are obtained as follows: The maturity of 100 to 500 fresh tobacco leaf samples is manually labeled; the correlation between the color feature data, the spectral reflectance feature data, and the surface texture feature data and the maturity labeling results is analyzed; the Pearson correlation coefficients between the color feature data and the maturity labeling results, the spectral reflectance feature data and the maturity labeling results, and the surface texture feature data and the maturity labeling results are calculated; the absolute values of the three Pearson correlation coefficients are normalized so that their sum is 1, and the normalized values are used as the color feature weighting coefficient, the spectral reflectance feature weighting coefficient, and the surface texture feature weighting coefficient, respectively.
[0043] The frequency domain topology graph transmission maturity discrimination model is built based on deep learning. The specific structure of the model is as follows: the front end is a discrete cosine transform module, which projects the spatially aligned feature dataset from the spatial domain to the frequency domain, extracts low-frequency core components from the frequency domain data, retains low-frequency coefficients with a cumulative energy percentage of 85% to 95%, and filters high-frequency noise components. The low-frequency core components then enter a spatial orthogonal decoupling module, which includes a graph theory network flow optimization submodule. This submodule uses the pixels in the leaf tip region as the source set and the pixels in the leaf base region as the sink set. The pixels in the leaf region are used as the set of intermediate nodes. The connection weights between these nodes are used as the capacity of the directed edges to construct a maximum flow minimum cut graph theory network. The Ford-Fulkerson algorithm is used to solve for the optimal pixel matching path, outputting a pixel alignment optimization tensor. This pixel alignment optimization tensor enters a frequency domain feature attention layer. This layer includes a query matrix generation sublayer, a key matrix generation sublayer, and a value matrix generation sublayer. These sublayers linearly transform the pixel alignment optimization tensor, respectively. A scaling dot product attention mechanism is used to calculate the weight distribution of frequency domain features, highlighting the key characteristics representing the chlorophyll degradation gradient. Frequency components; the output of the frequency domain feature attention layer enters the topological graph sparse adjacency transmission layer. This layer filters adjacent nodes based on the spatial physiological correlation thresholds of the leaf tip, leaf middle, and leaf base regions, constructing a sparse adjacency matrix. The proportion of non-zero elements in this matrix is 15% to 30%. Feature information is transmitted between the leaf tip, leaf middle, and leaf base regions through graph convolution operations. The output of the topological graph sparse adjacency transmission layer enters the continuous-time dynamic evolution network layer. This layer models the feature evolution process as an ordinary differential equation and uses a Runge-Kutta numerical integrator to dynamically adjust the forward propagation step size, simulating the leaf... The continuous deformation process of tissue morphology as maturity progresses outputs a tissue morphology evolution feature tensor. This tissue morphology evolution feature tensor, along with the output of the frequency domain feature attention layer, enters a multi-scale feature dynamic gating fusion module. This module includes gating units that adaptively adjust the fusion ratio of feature maps at different depths based on the fusion weight coefficients calculated by the dynamic feature fusion weight adjustment function, outputting a fused feature tensor. This fused feature tensor then enters an anomalous activation smoothing transition layer. This layer statistically analyzes the outlier peak values of channel activation values, scaling these outlier peak values to the representable range of the weight matrix, and achieving low-bit smoothing computation through 8-bit quantization.The quantized feature tensor enters the error gradient prediction correction layer, which nests an error prediction sub-network. This sub-network predicts the gradient shift of the current batch of samples based on the gradient distribution of the previous batch, compensating for propagation errors in advance. The output is then dynamically corrected by a plant physiological boundary condition constraint layer, which limits the physically reasonable range of the chlorophyll degradation gradient and the physiologically feasible range of tissue morphology evolution. The final output layer is a fully connected classification layer, mapping the corrected feature tensor to a maturity classification probability distribution, and outputting the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor.
[0044] The steps for establishing the training dataset for the frequency domain topology graph transmission maturity discrimination model specifically include: collecting 2,000 to 10,000 fresh tobacco leaf samples of different varieties and growth stages; performing multi-source optical feature acquisition on the entire leaf surface of each sample to form an original training sample set; inviting 5 to 10 experts with 8 to 15 years of experience in tobacco leaf grading to label the maturity of the original training sample set, dividing maturity into 5 levels: immature, early maturity, moderate maturity, fully mature, and over-ripe; after independently labeling each sample, a majority voting mechanism is used to determine the final labeling result; and further labeling the original training sample set. The training sample set is anatomically partitioned and labeled, marking the leaf tip region, the leaf middle region, and the leaf base region. For each region, the color feature data, the spectral reflectance feature data, and the surface texture feature data are extracted. The original training sample set is subjected to data augmentation processing, including random rotation, random flipping, random cropping, and random illumination transformation, expanding the number of samples to 3 to 5 times the original number of samples. The augmented training sample set is divided into a training set, a validation set, and a test set in a 7:2:1 ratio to form the training dataset of the frequency domain topology graph transmission maturity discrimination model.
[0045] The specific steps for training the frequency domain topology graph transmission maturity discrimination model include: initializing the weight parameters of the frequency domain topology graph transmission maturity discrimination model; initializing the convolutional layer weights using the He Kaiming initialization method and the fully connected layer weights using the Xavier initialization method; setting training hyperparameters, with an initial learning rate of 0.0001 to 0.001, a batch size of 16 to 64, and 100 to 500 training epochs; using the cross-entropy loss function as the classification loss, while introducing frequency domain feature consistency loss and topology graph sparsity regularization loss. The frequency domain feature consistency loss constrains the consistency of the frequency domain feature distribution of samples at the same maturity level, and the topology graph sparsity regularization loss constrains the proportion of non-zero elements in the sparse adjacency matrix; the total loss function is... ,in For cross-entropy loss, For frequency domain feature consistency loss, For topological graph sparsity regularization loss, and To minimize the loss weight coefficients, the AdamW optimizer was used for parameter updates, with the momentum parameter set to 0.9 and the weight decay coefficient set to 0.0001 to 0.001. A cosine annealing learning rate scheduling strategy was adopted, with the learning rate gradually decaying to 0.01 to 0.1 times the initial value according to the cosine function curve during training. The model performance was evaluated on the validation set every 5 to 10 epochs during training, and the classification accuracy on the validation set was recorded. Training was stopped when the validation set accuracy did not improve for 20 to 50 consecutive epochs. The model weights with the highest validation set accuracy were selected as the final frequency domain topology graph propagation maturity discrimination model.
[0046] The frequency-domain topology graph-based maturity discrimination model projects the optical features of the entire leaf surface from the spatial domain to the frequency domain through a discrete cosine transform module, calculating only the low-frequency core components, thus reducing computational overhead at the source. Simultaneously, the frequency-domain feature attention layer highlights key frequency components representing the chlorophyll degradation gradient, enhancing the model's ability to perceive key maturity indicators. The topology graph sparse adjacency transmission layer transforms the dense fully connected matrix into a sparse adjacency matrix filtered based on a spatial physiological relevance threshold, transmitting feature information only between physiologically relevant nodes, avoiding feature interference from irrelevant regions, improving discrimination accuracy while significantly reducing the number of model parameters and inference time. The continuous-time dynamic evolution network layer models the feature evolution process as an ordinary differential equation, dynamically adjusting the forward propagation step size through a Runge-Kutta numerical integrator to accurately fit the continuous deformation process of leaf tissue morphology as maturity progresses, solving the problem that traditional static neural networks struggle to capture the dynamic evolution trajectory of microscopic mechanisms, and enhancing the model's generalization ability. An error gradient prediction correction layer with nested error prediction subnetworks compensates for propagation errors in advance, while a plant physiological boundary condition constraint layer limits the physical rationality of the output, ensuring the accuracy and reliability of maturity classification standards.
[0047] The dynamic feature fusion weight adjustment function is used to adjust the fusion weight coefficients in the multi-scale feature dynamic gating fusion module. The dynamic feature fusion weight adjustment function calculates the fusion weight adjustment factor based on the physiological aging difference index of the leaf anatomical region and the frequency domain energy distribution entropy value; the formula for calculating the physiological aging difference index of the leaf anatomical region is as follows: ,in The average spectral reflectance of the leaf tip region is given. The average spectral reflectance of the region within the leaf. The average spectral reflectance of the leaf base region is given by the formula for calculating the frequency domain energy distribution entropy. ,in For the first The energy percentage of each frequency component The total number of frequency components; the formula for calculating the fusion weight adjustment factor is: ,in and This is the adjustment coefficient; when When the multi-scale feature dynamic gating fusion module adopts a shallow feature-dominated fusion strategy, the shallow feature fusion weight coefficient is set to 0.6 to 0.8, and the deep feature fusion weight coefficient is set to 0.2 to 0.4; when When the multi-scale feature dynamic gating fusion module adopts a balanced fusion strategy, the weight coefficients for both shallow and deep feature fusion are set to 0.4 to 0.6; when At that time, the multi-scale feature dynamic gating fusion module adopts a deep feature-dominated fusion strategy, with the shallow feature fusion weight coefficient set to 0.2 to 0.4 and the deep feature fusion weight coefficient set to 0.6 to 0.8.
[0048] The physiological aging difference index of the leaf anatomical region characterizes the degree of nonlinear difference in physiological aging rates among the leaf tip, leaf middle, and leaf base regions. When the physiological aging difference index is small, it indicates that the physiological state of all regions of the leaf is relatively uniform, and the shallow features already contain sufficient discriminative information. When the physiological aging difference index is large, it indicates that the physiological aging of different regions exhibits significant heterogeneity, and deeper features are needed to extract more abstract discriminative patterns. The frequency domain energy distribution entropy value characterizes the dispersion of frequency domain features. When the frequency domain energy distribution entropy value is small, it indicates that the energy is concentrated on a few key frequency components, and the features are relatively simple. When the frequency domain energy distribution entropy value is large, it indicates that the energy distribution is dispersed, and the features are more distributed, requiring deeper networks for feature integration. The dynamic feature fusion weight adjustment function dynamically adjusts the fusion ratio of shallow and deep features according to different ranges of the fusion weight adjustment factor, optimizing the allocation of computational resources and improving the model's adaptability while ensuring discrimination accuracy.
[0049] Wherein, the adjustment coefficient and The acquisition method is as follows: Inference is performed on the frequency domain topology map propagation maturity discrimination model on the validation set of the training dataset, recording the physiological aging difference index of the leaf anatomical region, the frequency domain energy distribution entropy value, and the classification accuracy for each sample; the validation set samples are divided into a high-accuracy group and a low-accuracy group according to classification accuracy, and the distribution differences of the physiological aging difference index of the leaf anatomical region and the frequency domain energy distribution entropy value between the high-accuracy group and the low-accuracy group are analyzed; the relationship between the physiological aging difference index of the leaf anatomical region and the frequency domain energy distribution entropy value and the classification accuracy is fitted using a logistic regression method, and the regression coefficient of the logistic regression model is the adjustment coefficient. and Fine-tuning was performed using a grid search method within a range of 0.5 to 1.5 times the regression coefficients, and the parameter combination that maximized the classification accuracy of the validation set was selected as the final adjustment coefficient. and .
[0050] The working principle of the streaming dynamic threshold collaborative computing engine is as follows: A hardware-accelerated pipeline architecture is adopted to divide the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor into multiple data blocks, each with a size ranging from 128×128 pixels to 256×256 pixels. The hardware-accelerated pipeline architecture includes a feature preprocessing unit, a threshold calculation unit, and a classification decision unit. The feature preprocessing unit performs normalization and dimension alignment on the input data blocks. The threshold calculation unit dynamically updates the maturity classification threshold based on the feature distribution of historical data blocks. The classification decision unit outputs the maturity classification result for the corresponding region of the data block based on the maturity classification threshold. A state increment rolling update mechanism is adopted, which maintains the global feature statistics state. When a new data block is input, only the affected local state increment is updated, avoiding global recalculation and achieving microsecond-level data stream processing latency. The feature preprocessing unit, the threshold calculation unit, and the classification decision unit in the hardware-accelerated pipeline architecture work in parallel in a pipeline manner. When the feature preprocessing unit processes the first... When processing the first data block, the threshold calculation unit processes the second data block. The classification decision unit processes the first data block. This enables high-concurrency processing capabilities by using multiple data blocks.
[0051] The streaming dynamic threshold collaborative computing engine decomposes the maturity assessment calculation task into multiple parallel subtasks through a hardware-accelerated pipeline architecture, avoiding processing bottlenecks caused by serial computation and significantly improving real-time processing capabilities. The incremental rolling update mechanism only incrementally updates the local state affected by new data blocks, avoiding the time overhead of global recalculation and achieving microsecond-level data stream processing latency, meeting the high concurrency and low latency processing requirements of real-time streaming data streams. The dynamically updated maturity classification threshold is adaptively adjusted based on the feature distribution of historical data blocks, improving the adaptability of the discrimination algorithm to different batches of fresh tobacco leaf samples and enhancing the stability and accuracy of the discrimination results.
[0052] The dynamic update method for the maturity classification threshold is as follows: the threshold calculation unit maintains a sliding window, the length of which is 50 to 200 historical data blocks; the mean and standard deviation of the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor are calculated for the data blocks within the sliding window; the discrimination threshold for maturity level is calculated based on the mean and the standard deviation, and the formula for calculating the discrimination threshold is as follows: ,in For the first The threshold for determining each maturity level For the first in the sliding window The mean of the characteristic corresponding to each maturity level. For the first in the sliding window The standard deviation of the characteristic corresponding to each maturity level The threshold adjustment coefficient; when a new data block enters the sliding window, the oldest data block is removed, the mean and standard deviation are recalculated, and the discrimination threshold is updated; the threshold adjustment coefficient The value ranges from 1.5 to 3.0, and the optimal value is determined by cross-validation experiments on the validation set of the training dataset.
[0053] The frequency domain topology graph propagation maturity discrimination model establishes a functional relationship between memory allocation and the sampling pixel density of the leaf tip region, the leaf middle region, and the leaf base region. The sampling pixel density is defined as the number of pixels sampled per unit area, and the sampling pixel density of the leaf tip region is denoted as... The sampling pixel density of the leaf region is denoted as The sampling pixel density of the leaf base region is denoted as The memory requirement calculation formula for the frequency domain topology graph conduction maturity discrimination model is as follows: ,in The amount of video memory required for model inference. The base GPU memory used for model weight parameters. The memory coefficient is linearly related to the sampling pixel density. The memory coefficients are related to the interaction term of the sampled pixel density. When the available memory is fixed, the maturity discrimination accuracy is maximized under the premise of satisfying the memory constraint by adjusting the combination of sampled pixel densities in the leaf tip region, the leaf middle region, and the leaf base region. The optimal combination of sampled pixel densities is solved using the Lagrange multiplier method to construct the optimization objective function. ,in For maturity discrimination precision function, This is the maximum amount of available video memory. It is a Lagrange multiplier.
[0054] The model weight parameters occupy the basic video memory. The value range is from 500MB to 2000MB, and the video memory coefficient is... The value ranges from 0.01MB / pixel to 0.05MB / pixel, and the memory coefficient is... The numerical range is 0.0001 MB / pixel. Up to 0.0005MB / pixel The basic video memory The memory coefficients and the memory coefficient The acquisition method is as follows: Inference tests are conducted on the frequency domain topology map propagation maturity discrimination model under different combinations of sampling pixel densities, and the video memory usage for each inference is recorded; a multiple linear regression method is used to fit the relationship between sampling pixel density and video memory usage, and the intercept term of the regression model is the basic video memory. The coefficient of the first term is the memory coefficient. The interaction term coefficient is the memory coefficient. Regression fitting was performed using experimental data from at least 30 sets of different combinations of sampled pixel densities to ensure the goodness of fit of the regression model. Greater than 0.9.
[0055] Alternatively, the present invention also provides a computer-based system for determining the maturity of fresh tobacco leaves. The computer is connected to a hyperspectral imaging device, a color industrial camera, and a laser triangulation sensor. The computer has a readable storage medium storing program instructions. When the program instructions are run on the computer, they execute the aforementioned method for determining the maturity of fresh tobacco leaves that considers multi-layer data fusion across the entire leaf surface.
[0056] The specific implementation of step S01 involves laying fresh tobacco leaves flat in a uniformly diffused lighting environment, with the light unevenness controlled within 5%. A hyperspectral imaging device, a color industrial camera, and a laser triangulation sensor are then sequentially activated to simultaneously scan the entire surface of the tobacco leaf. The hyperspectral imaging device uses a push-broom method to acquire data line by line, obtaining a spectral reflectance matrix with a wavelength range of 400 nm to 1000 nm and a spectral resolution of 5 nm to 10 nm. Each pixel corresponds to a complete spectral reflectance curve, constituting spectral reflectance feature data. The color industrial camera captures RGB images of the entire leaf surface at a resolution of 2048×2048 pixels to 4096×4096 pixels, extracting the red, green, and blue channel pixel values to form color feature data. The laser triangulation sensor measures the leaf surface point by point along a preset scanning path, obtaining a depth value matrix with a depth resolution of 10 μm to 50 μm, and simultaneously calculating the normal vector of each pixel to form surface texture feature data. These three types of data are registered in a unified coordinate system and then merged to form the original dataset of multi-source optical features of the entire leaf surface.
[0057] The specific implementation of step S02 involves dividing the entire leaf surface into three continuous anatomical regions—the leaf tip region, the leaf middle region, and the leaf base region—based on the vein direction and the long axis of the leaf, using pixel-level polygonal masks to represent the boundaries. The leaf tip region is defined as the area from the leaf tip to one-third of the total leaf length, the leaf base region is defined as the area from the petiole to one-third of the total leaf length, and the leaf middle region is the middle part between the two. The color feature data, spectral reflectance feature data, and surface texture feature data of the corresponding pixels in the original dataset are indexed for each of the three regions, organized and stored according to region numbering to form a hierarchical anatomical feature dataset. The original pixel coordinate information of each region is retained for subsequent alignment.
[0058] The specific implementation of step S03 involves performing biomimetic flexible mesh alignment processing on the three regions of each leaf in the hierarchical anatomical feature dataset. First, the color feature similarity between each pair of pixels within the three regions is... Spectral reflectance similarity Similarity to surface texture features The connection weights are obtained by calculating them separately in the form of negative squared distance exponentiation and then summing them by weight. Weighting coefficient , , The Pearson correlation coefficient was normalized to determine the anchor point. A biomimetic flexible mesh topology was constructed using the center pixel of the leaf tip region as the first anchor point, the center pixel of the leaf middle region as the second anchor point, and the center pixel of the leaf base region as the third anchor point. A thin-plate spline interpolation function, with minimizing bending energy as the optimization objective, calculated the spatial deformation vector at the three anchor points, establishing a continuous and differentiable spatial topological deformation field across the entire leaf surface. Based on the deformation field, the coordinates of all pixels in the three regions were resampled and interpolated to ensure precise spatial alignment of the leaf tip, leaf middle, and leaf base, outputting a spatially aligned feature dataset. Scale parameters... , , The initial value is taken as the mean of the variance of pixel features within each region. Then, the final value is determined by iterative optimization within the range of 0.5 to 2 times the initial value, with the minimum alignment error as the criterion.
[0059] The specific implementation of step S04 involves feeding the spatially aligned feature dataset into the frequency domain topological graph propagation maturity discrimination model for stepwise feature extraction. The Discrete Cosine Transform (DCT) module performs a two-dimensional DCT on the input feature map, retaining only low-frequency coefficients with a cumulative energy percentage of 85% to 95%, setting high-frequency noise components to zero, and then feeding the processed frequency domain features into the spatial orthogonal decoupling module. The graph theory network flow optimization submodule within the spatial orthogonal decoupling module uses pixels in the leaf tip region as the source set, pixels in the leaf base region as the sink set, and pixels in the leaf middle region as the intermediate node set. Using connection weights as the directed edge capacity, it solves for maximum flow and minimum cut using the Ford-Fulkerson algorithm to obtain the optimal pixel matching path and outputs a pixel alignment optimization tensor. The frequency domain feature attention layer calculates the contribution weight of each frequency component to the chlorophyll degradation gradient through linear transformations of the query matrix, key matrix, and value matrix, and a scaled dot product attention mechanism, highlighting key components. The topological graph sparse adjacency propagation layer filters adjacent nodes based on the spatial physiological correlation threshold between the three regions, constructs a sparse adjacency matrix with non-zero elements accounting for 15% to 30%, and performs graph convolution operations to directionally propagate physiological feature information between the three regions. The continuous-time dynamic evolution network layer models the feature propagation process as an ordinary differential equation, uses a Runge-Kutta numerical integrator to dynamically adjust the integration step size, and outputs a tissue morphology evolution feature tensor. The multi-scale feature dynamic gating fusion module is based on the physiological aging difference index of leaf anatomical regions. and frequency domain energy distribution entropy value Calculate the fusion weight adjustment factor ,when When a shallow feature-dominated fusion strategy is adopted, When a balanced fusion strategy is adopted, A deep feature-driven fusion strategy is employed, outputting a fused feature tensor. An anomaly activation smoothing migration layer scales outlier peaks of channel activations to a representable range before performing 8-bit quantization. An error gradient prediction correction layer predicts and compensates for the gradient shift of the current batch based on the gradient distribution of the previous batch. A plant physiological boundary condition constraint layer imposes physical constraints on the chlorophyll degradation gradient and tissue morphology evolution range. Finally, a fully connected classification layer maps these constraints to maturity classification probabilities, outputting a chlorophyll degradation gradient feature tensor and a tissue morphology evolution feature tensor.
[0060] The specific implementation of step S05 involves dividing the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor into square data blocks with side lengths ranging from 128 to 256 pixels, and sequentially feeding them into the hardware-accelerated pipeline of the streaming dynamic threshold collaborative computing engine. The feature preprocessing unit performs normalization and dimension alignment on the current data block, while the threshold calculation unit maintains a sliding window with a length of 50 to 200 historical data blocks, calculating the mean value of each maturity level feature within the window in real time. and standard deviation According to the formula Update the discrimination threshold and threshold adjustment coefficient. The reference value range is 1.5 to 3.0, and the optimal value is determined on the validation set through cross-validation. The classification decision unit outputs the maturity classification result for each data block based on the current threshold. The three units work in parallel in a pipeline manner. When the feature preprocessing unit processes the first... When processing the first data block, the threshold calculation unit simultaneously processes the second data block. The first data block is processed synchronously by the classification decision unit. The system uses a state incremental rolling update mechanism to update only the affected local statistics when a new data block enters the window, avoiding global recalculation and achieving microsecond-level streaming processing latency. Finally, it summarizes the classification results of each data block and outputs a complete classification result for the maturity of fresh tobacco leaves.
[0061] It should be noted that the key technologies of this invention include: a biomimetic flexible mesh alignment mechanism with thin-plate spline interpolation function as the core, allowing elastic deformation of each anatomical region of the leaf while maintaining topological continuity, fundamentally overcoming the shortcomings of traditional rigid registration in adapting to non-uniform physiological deformation of the leaf, enabling precise spatial alignment of multi-source optical features at the pixel level, and providing a high-quality data foundation for subsequent feature fusion; a frequency domain topological graph transmission mechanism that projects spatially aligned features to the frequency domain through discrete cosine transform, compressing computation and improving feature signal-to-noise ratio with low-frequency components, and then combining graph convolution to directionally transmit physiological information between the three anatomical regions, overcoming the problem of noise interference from irrelevant regions introduced by fully connected dense transmission, significantly enhancing the model's ability to perceive the heterogeneity of physiological aging in different regions; and a continuous-time dynamic evolution network layer that models feature evolution trajectories with ordinary differential equations, breaking through the limitation of traditional discrete layered neural networks in capturing continuous physiological changes, enabling the model to accurately describe the dynamic evolution of leaf tissue morphology as maturity progresses. The three key technologies work together to form a complete technical chain from data alignment, frequency domain compression, graph propagation to continuous dynamics modeling, which systematically improves the accuracy and real-time performance of maturity assessment, and the design logic of each module supports each other and is not redundant.
[0062] It should be noted that in the mass production of fresh tobacco leaves, when performing continuous flow cytometry maturity assessment for tobacco leaves of different varieties and growing environments, the distribution of chlorophyll degradation characteristics between sample batches drifts with variety characteristics, soil conditions, and climate change. If the maturity classification threshold remains fixed, it will lead to a systematic shift in the assessment results, which is particularly prominent during variety switching or seasonal transitions. The reason for this technical problem is that the fixed threshold is determined based on a sample set with a specific distribution during the training phase. When the feature distribution of the input samples drifts during the inference phase, the original threshold cannot reflect the actual statistical regularity of the new batch of samples. A systematic misalignment occurs between the classification boundary and the true category distribution, causing the classification error rate to continuously increase with the magnitude of the drift. The usual solution to this technical problem is to periodically re-collect new batches of samples and retrain the model to update the classification threshold. However, full retraining requires a large number of labeled samples and computational resources, and the model is in an ineffective state during the retraining period, which cannot meet the real-time requirements of continuous operation of the production line. This invention effectively solves this technical problem. The streaming dynamic threshold collaborative computing engine maintains a fixed-length sliding window and continuously tracks the mean and standard deviation of each maturity level feature in the most recent batch of historical data blocks. It updates the discrimination threshold in real time in an incremental manner, ensuring that the threshold always adapts to the feature distribution of the current batch of samples. The state incremental rolling update mechanism ensures that the threshold update only involves local statistics affected by new data blocks rather than global recalculation, compressing the update latency to the microsecond level. This allows for continuous correction of threshold drift without interrupting the inference process, ensuring that the maturity discrimination results maintain stable classification accuracy under conditions such as variety switching and seasonal changes.
[0063] Specifically, the principle of this invention is as follows: This invention solves the aforementioned technical problems because its biomimetic flexible mesh alignment mechanism overcomes the limitations of traditional rigid registration. Traditional rigid registration methods assume that coordinate deviations between images from different sensors can be uniformly described by global translation or rotation parameters. However, fresh tobacco leaves exhibit local curling and non-uniform deformation in their natural state, with inconsistent geometric deformation in the leaf tip, middle, and base regions. Global rigid transformation cannot simultaneously eliminate pixel misalignment in these three regions. This invention uses the center pixel of each region as an anchor point and utilizes a thin-plate spline interpolation function to construct a continuous and differentiable spatial topological deformation field. This deformation field establishes a smooth mapping relationship between anchor points under the constraint of minimizing bending energy, allowing elastic deformation in each region of the leaf while maintaining local topological continuity. This pixel-by-pixel correction addresses coordinate deviations caused by both device viewing angle differences and leaf deformation, achieving precise spatial alignment of multi-source optical features. After feature alignment, the discrete cosine transform module of the frequency domain topological graph propagation maturity discrimination model projects the spatially aligned features into the frequency domain, retaining the low-frequency core components characterizing the chlorophyll degradation gradient, filtering high-frequency noise, reducing subsequent computation, and improving the feature signal-to-noise ratio. The topological graph sparse adjacency propagation layer constructs a sparse adjacency matrix based on the spatial physiological correlation between the leaf tip, middle, and base, and propagates physiological features directionally between the three regions through graph convolution operations, avoiding noise interference from irrelevant regions. The continuous-time dynamic evolution network layer models the feature evolution process using ordinary differential equations, dynamically adjusting the forward propagation step size using a Runge-Kutta numerical integrator to accurately fit the continuous change trajectory of leaf tissue morphology as maturity progresses. The multi-scale feature dynamic gating fusion module adaptively adjusts the fusion ratio of shallow and deep features based on the physiological aging difference index of leaf anatomical regions and the frequency domain energy distribution entropy value, ensuring that the optimal fusion strategy is selected whether the physiological state of each region of the leaf is uniform or highly heterogeneous. The error gradient prediction correction layer and the plant physiological boundary condition constraint layer jointly ensure the physical rationality of the output feature tensor. The streaming dynamic threshold collaborative computing engine achieves real-time maturity determination through a hardware-accelerated pipeline and a state incremental rolling update mechanism. The dynamically updated maturity classification threshold adapts to the feature distribution changes of different batches of samples. Logically, the above modules form a complete closed loop from data acquisition, spatial alignment, frequency domain feature extraction, graph propagation, dynamic modeling to real-time classification. The design of each step directly addresses the fundamental technical bottleneck of inaccurate spatial alignment of multi-source features. Therefore, the technical solution of this invention is logically inevitable and self-consistent.
[0064] The following provides a specific embodiment 1 of the present invention, and the specific implementation of each step in this embodiment 1 is described in detail below.
[0065] The specific implementation of step S01 is as follows: Fresh tobacco leaves are placed under uniform illumination. A hyperspectral imaging device is used to scan the entire surface of the fresh tobacco leaves to obtain spectral reflectance data with a wavelength range of 400nm to 1000nm and a spectral resolution of 5nm to 10nm. A color industrial camera is used to photograph the fresh tobacco leaves to obtain RGB three-channel color feature data with an image resolution of 2048×2048 pixels to 4096×4096 pixels. A laser triangulation sensor is used to scan the surface of the fresh tobacco leaves to obtain surface texture depth data with a depth resolution of 10μm to 50μm. The color feature data includes the red channel pixel values, green channel pixel values, and blue channel pixel values of the leaf surface. The spectral reflectance feature data includes reflectance values at different wavelengths. The surface texture feature data includes the depth value and normal vector of each pixel on the leaf surface. The three types of data together construct the original dataset of multi-source optical features of the entire leaf surface.
[0066] The specific implementation of step S02 is as follows: the original dataset of multi-source optical features of the whole leaf surface is anatomically partitioned and labeled. The leaf is divided into three anatomical regions along the main vein: the leaf tip region, the leaf middle region, and the leaf base region. The corresponding color feature data, spectral reflectance feature data, and surface texture feature data are extracted from the three regions respectively to form a layered anatomical feature dataset.
[0067] The specific implementation of step S03 is as follows: The layered anatomical feature dataset undergoes biomimetic flexible mesh alignment processing. First, pixels in the leaf tip, middle, and base regions are used as mesh nodes. Connection weights between mesh nodes are calculated based on color feature similarity, spectral reflectance feature similarity, and surface texture feature similarity among the three regions. Color feature similarity... Spectral reflectance similarity Similarity to surface texture features The calculation formulas are as follows:
[0068] ;
[0069] ;
[0070] ;
[0071] All three similarity formulas above use a Gaussian kernel function. The numerator of the exponent is the squared Euclidean distance between the feature vectors corresponding to two pixels, and the scale parameter in the denominator controls the rate at which the similarity decays with distance. The similarity value range is... The smaller the distance, the closer the similarity is to 1. Connection weights between grid nodes. The formula for calculating the weighted linear combination of the three similarities is:
[0072] ;
[0073] In the formula, and The first The and the first The color feature vector of each pixel and The first The and the first spectral reflectance feature vector of each pixel and The first The and the first Surface texture feature vector of each pixel For color feature scale parameters, For the characteristic scale parameter of spectral reflectance, For surface texture feature scale parameters, For color feature weighting coefficients, These are the spectral reflectance characteristic weighting coefficients. is the surface texture feature weight coefficient, and , and , , All are dimensionless quantities. , , By collecting 100 to 500 samples of fresh tobacco leaves at different maturity levels, the corresponding feature variance of pixels within each region is calculated. The mean of each variance is used as the initial value, and then the grid search method is used to iteratively optimize within a range of 0.5 to 2 times the initial value. The parameter combination that minimizes the pixel alignment error is selected as the final value. , , By manually labeling the maturity of 100 to 500 samples, the Pearson correlation coefficients between the three types of feature data and the maturity labeling results were calculated. The absolute values of the three Pearson correlation coefficients were normalized so that their sum was 1, and the normalized values were used as the three weight coefficients.
[0074] Secondly, a biomimetic flexible mesh topology is constructed, using the center pixel of the leaf tip region as the first anchor point, the center pixel of the leaf middle region as the second anchor point, and the center pixel of the leaf base region as the third anchor point. This biomimetic flexible mesh topology simulates the non-rigid deformation characteristics of biological tissues, allowing each region to undergo elastic deformation while maintaining local topological continuity, thereby adapting to the non-linear differences in physiological aging rates at different anatomical locations.
[0075] Secondly, a spatial topological deformation field is established, and the spatial deformation vectors of the first, second, and third anchor points are calculated using a thin-plate spline interpolation function. The thin-plate spline interpolation function is a smooth interpolation method that minimizes bending energy, enabling the establishment of a continuous and differentiable spatial mapping relationship between the three anchor points, ensuring a smooth transition of the spatial topological deformation field across the entire leaf surface. Based on the spatial deformation vectors, the pixel coordinates of the three regions are dynamically corrected, achieving precise spatial alignment of the pixels in the three regions, and outputting a spatial alignment feature dataset.
[0076] The specific implementation of step S04 is as follows: The spatial alignment feature dataset is input into the frequency domain topology graph propagation maturity discrimination model. The discrete cosine transform module at the front end of the model projects the spatial alignment feature dataset from the spatial domain to the frequency domain, extracts low-frequency core components from the frequency domain data, retains low-frequency coefficients with a cumulative energy proportion of 85% to 95%, and filters high-frequency noise components. The low-frequency core components enter the spatial orthogonal decoupling module, where the graph theory network flow optimization submodule uses the pixels in the leaf tip region as the source node set, the pixels in the leaf base region as the sink node set, and the pixels in the leaf middle region as the intermediate node set to connect the weights. As the capacity of directed edges, a maximum flow minimum cut graph theory network is constructed, and the optimal pixel matching path is solved by the Ford-Fulkerson algorithm, outputting a pixel alignment optimization tensor.
[0077] The frequency domain feature attention layer performs a linear transformation on the pixel alignment optimization tensor using the query matrix, key matrix, and value matrix. It employs a scaled dot product attention mechanism to calculate the weight distribution of frequency domain features, highlighting key frequency components characterizing the chlorophyll degradation gradient. The topological graph sparse adjacency transmission layer filters adjacent nodes based on a spatial physiological relevance threshold, constructing a sparse adjacency matrix with non-zero elements accounting for 15% to 30%. Feature information is transmitted between the three regions through graph convolution operations. The continuous-time dynamic evolution network layer models the feature evolution process as an ordinary differential equation, using a Runge-Kutta numerical integrator to dynamically adjust the forward propagation step size, simulating the continuous deformation process of leaf tissue morphology as maturity progresses, and outputting a tissue morphology evolution feature tensor.
[0078] Fusion weight adjustment factor of multi-scale feature dynamic gating fusion module The calculation involves the physiological aging difference index of leaf anatomical regions. and frequency domain energy distribution entropy value The calculation formulas are as follows:
[0079] ;
[0080] ;
[0081] ;
[0082] In the formula, The average spectral reflectance of the leaf tip region. The average spectral reflectance of the region within the leaf. The mean spectral reflectance is the average spectral reflectance of the leaf base region. All three values are dimensionless reflectance. This is an index of physiological aging differences in leaf anatomical regions; its dimension is the same as that of average spectral reflectance, making it a dimensionless quantity. The entropy value of the energy distribution in the frequency domain. For the first The energy percentage of each frequency component The total number of frequency components. It is a dimensionless quantity. for The corresponding adjustment coefficient, for The corresponding adjustment coefficients, both of which are dimensionless quantities, make Maintain dimensionless, The fusion weight adjustment factor is a dimensionless quantity. and By performing inference on the validation set, the samples are divided into high-accuracy and low-accuracy groups based on classification accuracy, and logistic regression is used to fit the model. , The relationship between the regression coefficient and the classification accuracy is given by the regression coefficient. and The initial value is then fine-tuned within a range of 0.5 to 1.5 times the initial value using a grid search, selecting the parameter combination that maximizes the classification accuracy on the validation set as the final value. A shallow feature-dominated fusion strategy is adopted, with shallow feature fusion weight coefficients ranging from 0.6 to 0.8 and deep feature fusion weight coefficients ranging from 0.2 to 0.4; when A balanced fusion strategy is adopted, with both values ranging from 0.4 to 0.6; when A deep feature-dominated fusion strategy is adopted, with shallow feature fusion weight coefficients ranging from 0.2 to 0.4 and deep feature fusion weight coefficients ranging from 0.6 to 0.8. The fused feature tensors are subjected to outlier scaling and 8-bit quantization through an anomaly activation smoothing migration layer, then pass through an error gradient prediction correction layer to pre-compensate propagation errors through an error prediction sub-network, and finally undergo dynamic correction through a plant physiological boundary condition constraint layer. The fully connected classification layer outputs chlorophyll degradation gradient feature tensors and tissue morphology evolution feature tensors.
[0083] The functional relationship between the memory requirements of the frequency domain topology map propagation maturity discrimination model and the sampling pixel density of each region is as follows:
[0084] ;
[0085] In the formula, The amount of video memory required for model inference, in units of , The base video memory used by the model weight parameters, in units of Experience value: 500 By 2000 , The memory coefficient is linearly related to the sampled pixel density, and its unit is... The empirical value is 0.01. Up to 0.05 , The memory coefficients associated with the sampled pixel density interaction term, in units of The empirical value is 0.0001. Up to 0.0005 , , , These represent the sampling pixel densities of the leaf tip, leaf middle, and leaf base regions, respectively, in pixels. The units on both sides of the equation are [missing information]. . , , The goodness-of-fit was obtained by performing inference tests under different combinations of sampled pixel densities and recording memory usage, and then fitting the data using a multiple linear regression method. At least 30 sets of experimental data are required. It must be greater than 0.9. When available video memory is fixed, the optimal combination of sampled pixel densities is solved using the Lagrange multiplier method, and the optimization objective function is:
[0086] ;
[0087] In the formula, This is the maturity discrimination accuracy function, whose output value is the dimensionless classification accuracy. This represents the maximum available video memory, in units of... , It is a Lagrange multiplier with dimensions of ,make Maintain dimensionless, The objective value is optimized for dimensionless values.
[0088] The total loss function during model training is:
[0089] ;
[0090] In the formula, For cross-entropy loss, For frequency domain feature consistency loss, The loss term is for topological graph sparsity regularization; all three loss terms are dimensionless. and The dimensionless loss weighting coefficient. This is the dimensionless total loss value.
[0091] The specific implementation of step S05 is as follows: The chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor are input into a streaming dynamic threshold collaborative computing engine. This engine employs a hardware-accelerated pipeline architecture, dividing the input data into data blocks ranging in size from 128×128 pixels to 256×256 pixels. The feature preprocessing unit, threshold calculation unit, and classification decision unit work in parallel in a pipelined manner. When the feature preprocessing unit processes the first... When processing the first data block, the threshold calculation unit processes the first... The classification decision unit processes the first data block. Multiple data blocks are used to achieve high-concurrency processing. The threshold calculation unit maintains a sliding window with a length of 50 to 200 historical data blocks, dynamically updating the maturity classification threshold. The calculation formula is as follows:
[0092] ;
[0093] In the formula, For the first The threshold for determining each maturity level For the first in the sliding window The mean of the characteristic corresponding to each maturity level. For the first in the sliding window The standard deviation of the characteristic corresponding to each maturity level The threshold adjustment coefficient has an empirical value of 1.5 to 3.0. The optimal value is determined by conducting cross-validation experiments on the validation set. , , All three measures have the same dimensions, identical to the corresponding feature values. The state increment rolling update mechanism maintains the global feature statistical state. When a new data block is input, only the affected local state increments are updated, achieving microsecond-level data stream processing latency, and finally outputting the fresh tobacco leaf maturity classification results.
[0094] To better understand and implement this invention, the following is a specific application scenario of this invention, Example 2:
[0095] This embodiment takes the quality testing of fresh tobacco leaves in a tobacco production area during a harvest season as the background, and uses the method described in this invention to determine the maturity of the collected fresh tobacco leaf samples.
[0096] This embodiment collected 350 fresh tobacco leaf samples at different maturity levels, covering five grades: immature, early-ripening, moderately ripe, fully ripe, and overripe. The sample numbers for each grade were 62, 71, 84, 76, and 57 leaves, respectively. The hyperspectral imaging equipment was set to a scanning wavelength range of 400 nm to 1000 nm, with a spectral resolution of 7 nm, acquiring spectral reflectance data for 87 bands. The color industrial camera image resolution was set to 3072×3072 pixels, and the laser triangulation sensor depth resolution was set to 25 μm. The three types of data were collected simultaneously and registered in a unified coordinate system to form a raw dataset of multi-source optical features across the entire leaf surface, such as... Figure 2 The diagram shows a multi-source data acquisition and fusion process.
[0097] After pixel-level anatomical regional labeling of 350 samples (leaf tip, leaf middle, and leaf base regions), a hierarchical anatomical feature dataset was extracted. When calculating the grid node connection weights, the color feature scale parameter was obtained by statistically analyzing the feature variance of 100 labeled samples. The initial value is 12.4, which is the characteristic scale parameter of spectral reflectance. The initial value is 0.083, which is the surface texture feature scale parameter. The initial value was 18.7 μm. After grid search optimization, the final value was determined. , , μm. Pearson correlation coefficient calculations show that the absolute values of the correlation coefficients between color features, spectral reflectance features, and surface texture features and maturity labeling results are 0.73, 0.86, and 0.51, respectively. After normalization, the weight coefficients of the three factors... , , The weight allocation is shown in Table 1.
[0098] Table 1. Correlation coefficients and normalized weights of the three characteristics and maturity level
[0099]
[0100] Based on the aforementioned scale parameters and weighting coefficients, biomimetic flexible mesh alignment was performed on 350 samples. A thin-plate spline interpolation function was used to establish a spatial topological deformation field constrained by the deformation vectors of three anchor points, and the pixel coordinates of each region were resampled and interpolated. Before alignment, the average pixel coordinate deviation between the leaf tip and leaf base regions was 23.6 pixels; after alignment, the average pixel coordinate deviation decreased to 2.1 pixels, demonstrating that the biomimetic flexible mesh alignment effectively eliminated the coordinate misalignment caused by leaf curling and differences in sensor viewing angle. The trend of alignment error with sample maturity level is as follows: Figure 3As shown, as the maturity progresses from immature to overripe, the degree of leaf curling gradually intensifies, and the deviation before alignment shows an upward trend. However, after the biomimetic flexible mesh alignment process, the deviations at all levels are effectively suppressed within the error threshold. This result confirms that the thin plate spline interpolation function can adapt to different degrees of non-rigid deformation of the leaves.
[0101] The spatial alignment feature dataset is input into the frequency domain topological graph propagation maturity discrimination model. The network structure of the frequency domain topological graph propagation maturity discrimination model is as follows. The model input layer receives spatial alignment feature tensors for the leaf tip region, leaf middle region, and leaf base region. The data dimension is the multi-channel feature map after concatenating the three regions. The discrete cosine transform module performs a two-dimensional discrete cosine transform on the input feature map, retaining the low-frequency coefficients with a cumulative energy ratio of 91%, and compressing the redundant information of 87 spectral bands into a low-frequency feature matrix in the frequency domain, achieving lossless compression from the spatial domain to the frequency domain. The graph theory network flow optimization submodule in the spatial orthogonal decoupling module uses leaf tip pixels as the source, leaf base pixels as the sink, and leaf middle pixels as intermediate nodes, with connection weights as the edge capacity. It solves the maximum flow using the Ford-Fulkerson algorithm and outputs a pixel alignment optimization tensor with an alignment weight matrix of the same size as the input feature map. The frequency domain feature attention layer comprises query matrix generation sublayers, key matrix generation sublayers, and value matrix generation sublayers. Each sublayer is a fully connected linear transformation. Attention weights are calculated using scaled dot product attention, outputting an attention feature tensor that enhances key components of the chlorophyll degradation gradient. The tensor is optimized for dimension and pixel alignment. The topological graph sparse adjacency propagation layer filters adjacent nodes with a spatial physiological relevance threshold of 0.35. The non-zero element ratio of the sparse adjacency matrix is 22%. It performs two-layer graph convolution operations, using linear rectified units as the activation function, and outputs physiological feature tensors after propagation between the three regions. The continuous-time dynamic evolution network layer inputs the above tensors into the ordinary differential equation solver. The Runge-Kutta integration step size is initially set to 0.1 and adaptively adjusted according to the feature gradient. The integration termination time corresponds to the end of the normalized time axis of leaf maturity progression, outputting a tissue morphology evolution feature tensor with a 128-dimensional hidden state vector. The multi-scale feature dynamic gating fusion module calculates the physiological aging difference index of leaf anatomical regions. and frequency domain energy distribution entropy value , fusion weight adjustment factor In 350 samples The distribution is as follows Figure 4 As shown, where The sample size was 18%. The sample size was 59%. The sample size accounts for 23%, corresponding to three fusion strategies: shallow-dominated, balanced, and deep-dominated. The abnormal activation smoothing migration layer scales the activation outlier peaks and performs 8-bit quantization. The error gradient prediction correction layer predicts the offset based on the gradient distribution of the previous batch and compensates in advance. The plant physiological boundary condition constraint layer limits the physical reasonable range of the chlorophyll degradation gradient. The fully connected classification layer maps the 128-dimensional fusion features into 5 types of maturity probability distributions, outputting the chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor.
[0102] As an equivalent alternative to the frequency domain topological graph-based maturity discrimination model, the following structures can be adopted: Alternative structure one is a residual convolutional attention network. The input layer receives a spatially aligned feature map concatenated from three regions. Local spatial features are extracted step-by-step through multiple residual convolutional blocks. Each residual block embeds a channel attention module to highlight chlorophyll degradation-related channels. Finally, after global average pooling, a fully connected classification layer is connected. The loss function uses the same combination of cross-entropy loss and frequency domain feature consistency loss as the main scheme. Alternative structure two is a bidirectional gated recurrent unit network. The feature sequences of the three anatomical regions are arranged from leaf base to leaf tip. The bidirectional gated recurrent units are input to progressively extract the sequence dependencies between regions. After concatenating the forward and backward hidden states, the maturity probability is output through an attention aggregation layer and a fully connected classification layer. Its essential feature extraction dimension is equivalent to the graph convolutional region propagation of the main scheme. The inputs of the above alternative structures are all spatially aligned feature datasets, and the outputs are all 5-class maturity probability distributions. Those skilled in the art can implement the above equivalent replacements without creative effort.
[0103] The discrimination results of 350 samples were compared with the majority vote results manually annotated by 7 experts. Figure 5 The table shows the accuracy distribution for the five maturity levels. The accuracy for each level is above 87%, and the overall accuracy reaches 91.4%. The accuracy for each maturity level is shown in Table 2.
[0104] Table 2. Accuracy of Maturity Level Judgment
[0105]
[0106] During the processing of the streaming dynamic threshold collaborative computing engine, the sliding window length is set to 120 historical data blocks, and the threshold adjustment coefficient is... The optimal level was determined through cross-validation on the validation set. The value ranges from 1.8 to 2.4. As the batch progresses, the threshold calculation unit continuously updates the discrimination threshold. The threshold tends to stabilize between the 15th and 20th data blocks. Thereafter, the classification decision latency for each batch stabilizes at the microsecond level, demonstrating the efficiency advantage of the incremental state update mechanism in avoiding global recalculation.
[0107] The video memory usage experiment tested 40 different combinations of sampled pixel densities, and the basic video memory usage was obtained through multiple linear regression fitting. MB, video memory linearity coefficient Memory interaction coefficient goodness of fit of regression ,satisfy The requirements are as follows. With 8 GB of available video memory, the optimal combination of sampled pixel densities is solved using the Lagrange multiplier method. The optimal solution is... pixels / , pixels / , pixels / Under memory constraints, the overall discrimination accuracy was improved to 91.4%, which is better than the 89.2% under the equal density allocation strategy. As the sampling density in the leaf region increased from 160 to 210 pixels / ... The overall accuracy shows a monotonically increasing trend, with a slope of 210 pixels / The slope of the sample is relatively flat, indicating that the central region of the leaf carries the richest physiological information in maturity determination. Further increasing the sampling density results in diminishing marginal returns, which is consistent with the physiological mechanism that the central region of the leaf is located at the middle node of the graph topology in the chlorophyll degradation gradient conduction. This verifies in principle the rationality of setting the central region of the leaf as the middle node set in the sparse adjacency conduction layer of the topological graph.
[0108] It should be noted that the variables involved in this invention are explained in detail in Tables 3 and 4.
[0109] Table 3. Variable Explanation Table (Part 1)
[0110]
[0111] Table 4. Variable Explanation Table (Part Two)
[0112]
[0113] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any changes or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention.
Claims
1. A method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface, characterized in that, Includes the following steps: Collect color feature data, spectral reflectance feature data and surface texture feature data of the entire surface of fresh tobacco leaves to construct a raw dataset of multi-source optical features of the entire leaf surface; The original dataset of multi-source optical features of the entire leaf surface was anatomically partitioned and labeled, and the leaf tip region, leaf middle region and leaf base region were labeled. The corresponding color feature data, spectral reflectance feature data and surface texture feature data were extracted from the leaf tip region, leaf middle region and leaf base region respectively to form a hierarchical anatomical feature dataset. The layered anatomical feature dataset is subjected to biomimetic flexible mesh alignment processing. The spatial correspondence of pixels in the leaf tip region, leaf middle region and leaf base region is dynamically corrected by spatial topological deformation field to obtain spatial alignment feature dataset. The spatial alignment feature dataset is input into the frequency domain topology graph transmission maturity discrimination model, and the frequency domain topology graph transmission maturity discrimination model outputs chlorophyll degradation gradient feature tensor and tissue morphology evolution feature tensor; The chlorophyll degradation gradient feature tensor and the tissue morphology evolution feature tensor are input into the streaming dynamic threshold collaborative calculation engine. The streaming dynamic threshold collaborative calculation engine performs real-time maturity discrimination calculation through a hardware accelerated pipeline and a state incremental rolling update mechanism, and outputs the fresh tobacco leaf maturity classification result.
2. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 1, characterized in that, The acquisition of the original dataset of multi-source optical features of the entire leaf surface specifically involves using a hyperspectral imaging device to acquire spectral reflectance data, using a color industrial camera to acquire red channel pixel values, green channel pixel values, and blue channel pixel values, and using a laser triangulation sensor to acquire the depth value and normal vector of each pixel on the leaf surface.
3. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 2, characterized in that, The biomimetic flexible mesh alignment process specifically uses the center pixel of the leaf tip region as the first anchor point, the center pixel of the leaf middle region as the second anchor point, and the center pixel of the leaf base region as the third anchor point. A spatial topological deformation field is established using a thin plate spline interpolation function, and the pixel coordinates of the three regions are dynamically corrected according to the spatial deformation vector to output a spatial alignment feature dataset.
4. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 3, characterized in that, The connection weights between grid nodes in the spatial topological deformation field are specifically obtained by weighted summation of color feature similarity, spectral reflectance feature similarity, and surface texture feature similarity. The sum of the weight coefficients of the three is 1, and the similarity is calculated in the exponential form of negative squared distance.
5. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 4, characterized in that, The acquisition of color feature scale parameters, spectral reflectance feature scale parameters, and surface texture feature scale parameters involves collecting multiple fresh tobacco leaf samples at different maturity levels, calculating the feature variance of pixels within the three regions, using the mean variance as the initial value, and iteratively optimizing within a proportional range of the initial value using a grid search method to select the parameter combination with the smallest pixel alignment error as the final scale parameter.
6. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 5, characterized in that, The acquisition of color feature weight coefficient, spectral reflectance feature weight coefficient, and surface texture feature weight coefficient involves manually labeling the maturity of multiple fresh tobacco leaf samples, calculating the absolute value of the Pearson correlation coefficient between the three types of feature data and the maturity labeling results, and then normalizing them to serve as the corresponding feature weight coefficients.
7. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 6, characterized in that, The frequency domain topology graph propagation maturity discrimination model includes, in sequence, a discrete cosine transform module, a spatial orthogonal decoupling module, a frequency domain feature attention layer, a topology graph sparse adjacency propagation layer, a continuous-time dynamic evolution network layer, a multi-scale feature dynamic gating fusion module, an anomaly activation smooth migration layer, an error gradient prediction correction layer, and a fully connected classification layer.
8. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 7, characterized in that, The sparse adjacency transmission layer of the topological graph specifically filters adjacent nodes based on the spatial physiological correlation thresholds of the leaf tip region, leaf middle region, and leaf base region, constructs a sparse adjacency matrix, and transmits feature information between the three regions through graph convolution operations.
9. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 8, characterized in that, The continuous-time dynamic evolution network layer specifically models the feature evolution process as an ordinary differential equation, uses a Runge-Kutta numerical integrator to dynamically adjust the forward propagation step size, simulates the continuous deformation process of leaf tissue morphology as maturity progresses, and outputs tissue morphology evolution feature tensors.
10. The method for determining the maturity of fresh tobacco leaves considering multi-layer data fusion across the entire leaf surface as described in claim 9, characterized in that, The multi-scale feature dynamic gating fusion module specifically calculates the fusion weight adjustment factor based on the physiological aging difference index of the leaf anatomical region and the frequency domain energy distribution entropy value, and selects a shallow feature-dominated fusion strategy, a balanced fusion strategy, or a deep feature-dominated fusion strategy according to the range of the fusion weight adjustment factor.
