Method for on-line detection and intelligent control of tea withering degree based on moisture ratio

CN123015457APending Publication Date: 2026-10-30KAIHUA COUNTY FAMOUS TEA DEV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202611194328.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-08-07
Publication Date
2026-10-30

AI Technical Summary

Technical Problem

[0009]为了解决现有技术中存在的上述技术问题,本发明的目的是克服现有机器视觉技术在茶叶萎凋程度检测中存在的易受堆叠背景干扰、图像数据集夹杂残缺图像以及单一网络特征提取维度受限等技术缺陷,其技术方案如下:

Benefits of technology

[0078]有益效果:(1)有效排除了残缺样本的干扰,提高了输入网络的数据纯净度,从而提升了整个预测模型的鲁棒性和抗干扰能力。(2)提高了预测精度且特征表征更全面,弥补了单一网络感受野局限的缺陷,既能捕捉局部细粒度纹理,又能提取全局宏观形态,消除了粗放均值标签带来的梯度问题,实现了对水分比的高精度、连续回归预测。(3)成功将依赖经验的静态加工模式升级为数据驱动的动态闭环控制,真正实现了基于物料真实状态的自适应加工,有效避免了过度萎凋或萎凋不足,大幅提高了红茶工业化生产的质量稳定性和产品一致性。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN123015457A_ABST
    Figure CN123015457A_ABST
Patent Text Reader

Abstract

The present application belongs to the technical field of intelligent control, and particularly relates to a kind of tea withering degree online detection and intelligent control method based on moisture ratio, comprising the following steps: 1. obtaining original image and moisture ratio label for pretreatment;Calculate global moisture ratio;2. extract single leaf bounding box, generate single leaf candidate mask through instance segmentation model, and perform intersection over union threshold filtering to obtain initial single leaf mask set;3. obtain single leaf image set;4. extract morphological and color features and normalize, calculate comprehensive freshness index, and assign dynamic single leaf moisture ratio label in combination with global moisture ratio;5. perform feature extraction and moisture regression to obtain predicted single leaf moisture ratio;6. use single leaf moisture ratio mean as feedback, adjust the heating temperature and fan speed of withering tank through ideal water loss trajectory deduced by drying kinetics model and fuzzy control, and perform closed-loop control. The method has good prediction accuracy and robustness.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application belongs to the field of intelligent control technology, specifically relating to an online detection and intelligent control method for the degree of tea wilting based on moisture ratio. Background Technology

[0002] In the initial processing of black tea, withering is a fundamental step in forming the unique color, aroma, and flavor of black tea. The core of withering lies in the continuous loss of moisture, which causes the leaves to shrink physically, soften in texture, and triggers the biochemical transformation of internal polyphenols. Achieving accurate prediction of the withering process of black tea has significant engineering value for stabilizing its quality.

[0003] Currently, the traditional method for judging the end point of withering in black tea mainly relies on the sensory experience of tea workers, making manual judgments by kneading the tea leaves or observing their color. With the development of non-destructive testing technology, machine vision-based methods extract color and texture features from local images of tea leaves through image thresholding or convolutional neural networks (CNNs), and then construct a mapping model between global image features and labels. For example, Chinese patent CN121366280A discloses a machine vision-based method for recognizing the degree of tea leaf kneading, which divides the tea leaf image into multiple tea leaf object regions through watershed segmentation and identifies the kneading grade of the tea leaves based on the morphological features of each tea leaf object region. Another study, Chinese patent CN120014465A, uses YOLOv8x-seg to segment image instances into sets of tea leaves and stems, obtains a tree structure through pruning, and inputs multi-dimensional input vectors into a bud recognition and classification model to obtain the recognition results of tea buds. However, in the complex stacking scenarios of actual industrial production, existing technologies still have the following technical problems:

[0004] (1) Image feature extraction is difficult. Tea leaves in the withering trough occlude each other. Shallow segmentation methods are difficult to separate the stacked tea leaves from the withering trough. If the segmented broken leaves are directly input into the subsequent network as valid samples, the model training effect will be reduced.

[0005] (2) A single convolutional neural network is limited by the local receptive field and has difficulty taking into account both local texture details and global morphological features.

[0006] (3) Instance segmentation is difficult in stacked scenarios, image datasets contain incomplete images and model prediction accuracy is poor.

[0007] (4) The underlying control mode of existing tea withering equipment is prone to insufficient or excessive withering of tea leaves, making it difficult to achieve closed-loop adaptive processing based on the actual state of the material.

[0008] Therefore, a new method is urgently needed to achieve high-precision prediction of the moisture ratio of withered tea leaves and adaptive control of withering by introducing instance segmentation, anomaly masking filtering and multi-source feature fusion mechanism. Summary of the Invention

[0009] To address the aforementioned technical problems in existing technologies, the present invention aims to overcome the shortcomings of current machine vision technologies in detecting the degree of tea withering, such as susceptibility to interference from stacked backgrounds, incomplete images within image datasets, and limited dimensionality of single-network feature extraction. The technical solution is as follows:

[0010] A method for online detection and intelligent control of tea leaf withering degree based on moisture ratio includes the following steps:

[0011] Step 1: Obtain the original image and moisture ratio label, perform dual-branch image preprocessing to obtain texture-enhanced image and color-corrected image; and calculate the global moisture ratio by using the initial state tea moisture content, the current tea moisture content, and the current environmental tea equilibrium moisture content.

[0012] Step 2: Extract single-leaf bounding boxes from the texture enhancement image based on the object detection model, generate single-leaf candidate masks through the instance segmentation model, and perform cross-intersection over union threshold filtering on the single-leaf candidate masks to obtain an initial set of single-leaf masks;

[0013] Step 3: Obtain the set of single-leaf images using the initial set of single-leaf masks;

[0014] Step 4: Extract the morphological and color features from the single-leaf image set and normalize them, calculate the comprehensive freshness index, and combine it with the global moisture ratio to assign a dynamic single-leaf moisture ratio label to each tea leaf.

[0015] Step 5: Input the set of single-leaf images into the three-branch moisture ratio model for feature extraction and moisture ratio regression to obtain the predicted single-leaf moisture ratio;

[0016] Step 6: Using the average moisture ratio of the single leaf as feedback, the heating temperature of the withering tank and the fan speed are dynamically adjusted through the ideal water loss trajectory derived from the drying kinetic model and fuzzy control, and closed-loop control is performed.

[0017] Furthermore, in step 1, the two branches are respectively:

[0018] (1) Texture enhancement image preprocessing branch for instance segmentation

[0019] The original image is luminance aligned and subjected to initial global white balance correction based on the gray world algorithm. Contrast-limited adaptive histogram equalization is applied to the L channel in the LAB color space, followed by a second global white balance correction, resulting in a texture-enhanced image.

[0020] (2) Color-corrected image preprocessing branch for feature regression

[0021] The original image is sequentially subjected to percentage histogram stretching, nonlinear gamma correction, and LAB color space texture enhancement. After obtaining an effective single-leaf mask, the mask area is cut out and stretched to output a color-corrected single-leaf image.

[0022] Furthermore, in step 1, the specific calculation process for the global moisture ratio is as follows:

[0023] ① The moisture content of tea leaves in their initial state was determined using the standard drying method;

[0024] ② Calculate the current moisture content of the tea leaves in real time by combining the weighing withering tank;

[0025] ③ Measure the equilibrium moisture content of tea leaves under the current environment;

[0026] ④ Calculate the global moisture ratio of the entire process according to the moisture ratio formula. The expression for calculating the global moisture ratio is as follows:

[0027]

[0028] in, This represents the overall moisture content of the current batch. This represents the dry basis moisture content of the tea leaves at the current moment. The equilibrium dry basis moisture content under current environmental conditions; This represents the dry basis moisture content of the tea leaves at the initial stage of withering.

[0029] Furthermore, in step 2, the target detection model is an target detection model optimized based on a semi-supervised self-training mechanism. The YOLOv10s network model is used as the target detection model. The optimal baseline network is trained with the initial manually labeled data as the teacher model. The model predicts the training set images and extracts high-confidence prediction boxes to generate pseudo-labels. The pseudo-labels are then fused with the original dataset to retrain the student model and output high-precision single-leaf bounding boxes.

[0030] The instance segmentation model adopts the SAM2.1 model, in which the image encoder extracts the features of the original image, the prompt encoder receives the single leaf bounding box as a prompt signal, and the mask decoder combines the image features to output the single leaf candidate mask.

[0031] The threshold for the cross-union ratio threshold filtering is set to 0.88.

[0032] Furthermore, the specific process of step 3 is as follows:

[0033] Step 3.1: Extract the maximum connected component contour point set of each candidate leaf mask in the initial leaf mask set. Calculate the pixel values ​​of the binary mask, and obtain the geometric centroid coordinates from the pixel values ​​of the binary mask. The expression is:

[0034]

[0035] in, These are the pixel values ​​of the binary mask.

[0036] Step 3.2: Using the coordinates of the geometric centroid as a reference, traverse the edge of the blade contour pixel by pixel, and calculate the Euclidean distance from the edge pixel to the geometric centroid. The calculation expression is as follows:

[0037]

[0038] in, Indicates the first One edge pixel, ( , ) represents the coordinates of the edge pixel. , () represents the coordinates of the geometric centroid;

[0039] Step 3.3: Calculate the relative displacement between adjacent contour points, accumulate the physical arc lengths between adjacent contour points to obtain the cumulative physical arc length corresponding to the i-th pixel, and map the two-dimensional leaf closed contour into a one-dimensional time-domain waveform signal with the cumulative physical arc length as the abscissa; the expression for calculating the cumulative physical arc length is as follows:

[0040]

[0041] in, To accumulate the physical arc length, the starting point ;

[0042] Step 3.4: Perform a Fast Fourier Transform on the one-dimensional waveform signal to extract the low-frequency energy spectrum;

[0043] Step 3.5: Concatenate the low-frequency energy spectrum with the time-domain feature vector, and reduce the dimensionality through principal component analysis;

[0044] Step 3.6: Input the multilayer perceptron to remove the incomplete mask and obtain a set of single-leaf images.

[0045] Furthermore, in step 4, the calculation expression for the comprehensive freshness index is:

[0046]

[0047] in, For the first The overall freshness index of a single leaf; , , and These are the normalized tea leaf width, brightness, redness / greenness, and roundness;

[0048] The formula for calculating the dynamic single-leaf moisture ratio label is:

[0049]

[0050] in, For the first The dynamic moisture ratio label of a single leaf. The measured water content of the current image. This is the individual compensation coefficient.

[0051] Furthermore, in step 5, the three-branch water ratio model is composed of a pure convolutional network branch, a global visual transformer branch, and a hierarchical visual transformer branch connected in parallel.

[0052] The specific process of step 5 is as follows:

[0053] Step 5.1: Extract the visual features of the single leaf image output in the three branches, and simultaneously extract the explicit physical features of the single leaf image;

[0054] Step 5.2: The visual features and explicit physical features are spliced ​​and fused in the channel dimension, and then input into the regression head with Sigmoid activation function constraints to calculate the predicted moisture ratio of the current single leaf.

[0055] Furthermore, the explicit physical features include the RGB channel mean, RGB channel standard deviation, foreground pixel ratio, highlight pixel ratio, and average saturation.

[0056] The regression head model training uses a weighted objective function combining mean absolute error and smoothed L1 loss, calculated as follows:

[0057]

[0058] in, For the first Predicted moisture ratio for each sample For the corresponding individual moisture ratio label; Smooth represents the mean absolute error. Indicates smoothness The loss is calculated by summing the weighting coefficients of the two factors to a value of 1.

[0059] The regression head introduces a Sigmoid constraint at its end and performs a linear mapping based on the training set label range, expressed as follows:

[0060]

[0061] in, and These are the minimum and maximum values ​​of the true moisture ratio in the training set, respectively; This is the output of the linear layer of the regression head.

[0062] Furthermore, in step 6, the drying kinetic model adopts the Aghbashlo drying kinetic model, whose expression is:

[0063]

[0064] in, and These are the characteristic constants of the Aghbashlo model, determined by operating conditions such as temperature and wind speed. This refers to the duration of withering.

[0065] Furthermore, the specific process of step 6 is as follows:

[0066] Step 6.1: Substitute the operating parameters read from the drying kinetic model into the built-in parameter spectrum to calculate the characteristic constants of the kinetic model of the current environment. The parameter spectrum is a multivariate nonlinear fitting formula for the process parameters.

[0067] Step 6.2: Based on the drying kinetics curve, plan the ideal moisture ratio decrease trajectory, compare it with the moisture ratio predicted by the three-branch moisture ratio model, and calculate the moisture ratio error at the current moment. The calculation expression is as follows:

[0068]

[0069] in, For the first The ideal moisture ratio at each sampling time This represents the global average moisture ratio measured in the visual system. This is due to the moisture ratio error;

[0070] Step 6.3: Compare two adjacent sampling periods and calculate the error change rate. The calculation expression is as follows:

[0071]

[0072] in, The rate of change of error, The time interval between adjacent sampling moments;

[0073] Step 6.4: The controller converts the specific digital quantity into a fuzzy set, and then converts the error... and error change rate Divided into five fuzzy levels;

[0074] Step 6.5: Adjust the heating temperature at the output terminal. With fan speed adjustment and for the heating temperature adjustment amount With fan speed adjustment Configure the corresponding five fuzzy subsets;

[0075] Step 6.6: Use the centroid method to resolve the fuzziness, transforming the interval distribution into a unique, precise physical quantity, expressed as:

[0076]

[0077] in, For the final precise control quantity ( or ); For the first in the fuzzy domain A discrete coordinate point; This represents the aggregation membership degree of that point; This represents the total number of discrete coordinate points.

[0078] Beneficial effects: (1) It effectively eliminates the interference of incomplete samples, improves the data purity of the input network, and thus enhances the robustness and anti-interference ability of the entire prediction model. (2) It improves the prediction accuracy and the feature representation is more comprehensive, making up for the defects of the limited receptive field of a single network. It can capture local fine-grained textures and extract global macroscopic morphology, eliminate the gradient problem caused by coarse mean labels, and realize high-precision, continuous regression prediction of moisture ratio. (3) It successfully upgrades the experience-dependent static processing mode to data-driven dynamic closed-loop control, truly realizing adaptive processing based on the real state of materials, effectively avoiding over-withering or under-withering, and greatly improving the quality stability and product consistency of black tea industrial production. Attached Figure Description

[0079] Figure 1 This is a flowchart of the online detection and intelligent control method for tea withering degree based on moisture ratio according to the present invention;

[0080] Figure 2 This is an image preprocessing effect diagram of the present invention;

[0081] Figure 3 This is a flowchart of the self-training process of the target detection model of the present invention;

[0082] Figure 4 This is a diagram of the instance segmentation model architecture of the present invention;

[0083] Figure 5 This is a waveform transformation feature diagram of the single-leaf mask of the present invention.

[0084] Figure 6This is a diagram of the three-branch moisture ratio network structure of the present invention. Detailed Implementation

[0085] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings. It should be understood that the specific embodiments described herein are for illustration and explanation only and are not intended to limit the present invention.

[0086] like Figure 1 As shown, the online detection and intelligent control method for tea wilting degree based on moisture ratio of the present invention includes: after acquiring the original image and moisture ratio label, the data stream enters in parallel into a dual-branch image preprocessing module, which outputs a texture enhancement image for segmentation and a color correction image for regression, respectively. The texture enhancement image is sequentially passed through a target detection model to extract the prompt box, and then fed into an instance segmentation model to generate an initial single-leaf mask. After passing through confidence filtering and W-waveform mask filtering, a high-purity single-leaf mask is output. This mask is fused with the color correction image of the other branch to generate a pure single-leaf image, which is then coupled with a dynamically calculated individual moisture ratio label. Finally, it is input into a three-branch moisture regression network to obtain the predicted moisture ratio. The prediction result is further connected to a drying kinetics model and a fuzzy controller, and an adjustment command is output to achieve closed-loop control. The specific steps are as follows:

[0087] S1: Acquire the original image and moisture ratio label, perform dual-branch image preprocessing to obtain texture-enhanced and color-corrected images; determine the initial moisture content of the tea leaves using the standard drying method; calculate the current moisture content of the tea leaves in real time using a weighing withering tank; measure the equilibrium moisture content of the tea leaves under the current environment; calculate the global moisture ratio for the entire process according to the moisture ratio formula, the expression for which is:

[0088]

[0089] in, This represents the overall moisture content of the current batch. This represents the dry basis moisture content of the tea leaves at the current moment. The equilibrium dry basis moisture content under current environmental conditions; This represents the dry basis moisture content of the tea leaves at the initial stage of withering.

[0090] Among them, such as Figure 2 As shown, the specific preprocessing of the bi-branch image is as follows:

[0091] (1) The texture enhancement image preprocessing branch for instance segmentation performs brightness alignment and initial global white balance correction based on gray world algorithm on the original image, implements contrast-limited adaptive histogram equalization on L channel in LAB color space, and performs secondary global white balance correction to output texture enhancement image.

[0092] (2) The color-corrected image preprocessing branch used for feature regression performs percentage histogram stretching, nonlinear gamma correction and LAB color space texture enhancement on the original image in sequence. After obtaining an effective single leaf mask, the mask area is cut out and stretched to output the color-corrected single leaf image.

[0093] S2: Extract single-leaf bounding boxes from the texture enhancement image based on the object detection model, generate single-leaf candidate masks through the instance segmentation model, and perform cross-intersection over union threshold filtering on the single-leaf candidate masks to obtain an initial set of single-leaf masks;

[0094] like Figure 3 As shown, since manual annotation is difficult to completely cover densely stacked leaves, the target detection model of this invention is an optimized target detection model based on a semi-supervised self-training mechanism. Preferably, the YOLOv10s network model is used as the target detection model. The optimal baseline network is trained with the initial manually annotated data as the teacher model, which predicts the training set images and extracts high-confidence prediction boxes to generate pseudo-labels. The pseudo-labels are then fused with the original dataset to retrain the student model, outputting high-precision single-leaf bounding boxes. That is, a single optimal architecture is trained using manually annotated ground truth boxes as the teacher model. This teacher model performs global high-confidence inference on the training set images (confidence Conf>0.35). By performing spatial difference calculation with the ground truth boxes (setting the intersection-union ratio IoU<0.35), it extracts the undetected targets that were not manually annotated, generates high-purity pseudo-labels, and after expanding and fusing the pseudo-labels with the original dataset, the student model is re-initialized and trained to obtain the target single-leaf bounding boxes.

[0095] The instance segmentation model of the present invention adopts the SAM2.1 model, in which the image encoder extracts the features of the original image, the prompt encoder receives the single leaf bounding box as a prompt signal, and the mask decoder combines the image features to output the single leaf candidate mask;

[0096] like Figure 4 The diagram shows the instance segmentation model architecture, which employs a cascaded coupling mechanism. The object detection network (YOLOv10s) has its parameters frozen and only outputs bounding boxes as a cue generator, which are then used as cue signals input to the cue encoder. The input image is fed into the ViT-H image encoder for full-image feature embedding. The mask decoder receives the image features and cue signals and outputs a mask. The system further filters the output mask confidence (threshold Predicted IoU > 0.88) to initially segment single-leaf candidate masks for the target region.

[0097] S3: Obtain a set of single-leaf images using the initial single-leaf mask set, such as... Figure 5 As shown, the specific process is as follows:

[0098] S3.1: Extract the maximum connected component contour point set of each candidate leaf mask in the initial leaf mask set. Calculate the pixel values ​​of the binary mask, and obtain the geometric centroid coordinates from the pixel values ​​of the binary mask. The expression is:

[0099]

[0100] in, These are the pixel values ​​of the binary mask.

[0101] S3.2: Using the geometric centroid coordinates as a reference, traverse the edge of the blade contour pixel by pixel, and calculate the Euclidean distance from the edge pixel to the geometric centroid. The calculation formula is as follows:

[0102]

[0103] in, Indicates the first One edge pixel, ( , ) represents the coordinates of the edge pixel. , () represents the coordinates of the geometric centroid;

[0104] S3.3: Calculate the relative displacement between adjacent contour points, sum the physical arc lengths between adjacent contour points, and obtain the first... The cumulative physical arc length corresponding to each pixel, assuming a starting point The formula for calculating its cumulative physical arc length is:

[0105]

[0106] in, To accumulate physical arc length;

[0107] Using the cumulative physical arc length as the abscissa, the closed profile of the two-dimensional blade is mapped to a one-dimensional time-domain waveform signal; such as Figure 5 As shown in (a) and (b), a normal leaf with a complete morphology exhibits a regular W-shaped waveform with symmetrical peaks and smooth valleys after unfolding (corresponding to the two main peaks at the leaf tip and petiole); while as... Figure 5 As shown in (c) and (d), when the blade has edge defects, overlapping adhesions, or severe folding, its waveform will be accompanied by peak height imbalance, phase span shift, or local high-frequency oscillation.

[0108] S3.4: The system performs a fast Fourier transform on a one-dimensional waveform signal to extract a low-frequency energy spectrum that reflects the contour characteristics;

[0109] S3.5: Concatenate the low-frequency energy spectrum with the time-domain eigenvectors and reduce the dimensionality through principal component analysis;

[0110] S3.6: Input a multilayer perceptron to learn the nonlinear classification boundary between normal and abnormal samples, and automatically intercept and remove them. Figure 5 From the incomplete masks of types (c) and (d), we obtain complete high-purity masks. Figure 5 The set of single-leaf images of classes (a) and (b) in the middle.

[0111] S4: After obtaining a clean single-leaf image, to eliminate individual differences in water loss caused by the tenderness and size of tea leaves within the same batch, this invention extracts and normalizes the morphological and color features from the single-leaf image set, calculates the comprehensive freshness index according to a weighting formula, and assigns a dynamic single-leaf moisture ratio label to each tea leaf in conjunction with the global moisture ratio; the formula for calculating the comprehensive freshness index is as follows:

[0112]

[0113] in, For the first The overall freshness index of a single leaf; , , and These are the normalized tea leaf width, brightness, redness / greenness, and roundness;

[0114] The formula for calculating the dynamic single-leaf moisture ratio label is:

[0115]

[0116] in, For the first The dynamic moisture ratio label of a single leaf. The measured water content of the current image. This is the individual compensation coefficient.

[0117] This operation, while keeping the batch label mean unchanged, transforms the macro-mean label into a moisture ratio label that better reflects the individual state of the tea leaves, thus eliminating the gradient problem in subsequent network regression.

[0118] S5: Input the set of single-leaf images into the three-branch moisture ratio model for feature extraction and moisture ratio regression to obtain the predicted single-leaf moisture ratio;

[0119] like Figure 6The diagram shows the three-branch moisture ratio network structure. This model employs three heterogeneous network architectures in parallel: the first branch uses a pure convolutional network (ConvNeXtLarge, feature dimension 1536) to extract fine-grained wrinkling textures on the leaf surface using local receptive fields; the second branch uses a global visual transformer (ViTLargePatch16, feature dimension 1024) to capture the overall macroscopic morphology of the leaf using a multi-head attention mechanism; and the third branch uses a hierarchical visual transformer (SwinTransformerLarge, feature dimension 1536) to fuse local and global information at different resolutions.

[0120] The system extracts visual features from the three branches of a single leaf image and simultaneously extracts 9-dimensional explicit physical features from the segmented single leaf image (including 3-dimensional RGB channel mean, 3-dimensional RGB standard deviation, 1-dimensional foreground proportion, 1-dimensional highlight proportion, and 1-dimensional average saturation). The visual feature tensors output by the three visual network branches are global average pooled and then concatenated with the 9-dimensional explicit physical features in the channel dimension at the feature fusion layer (total feature dimension 4105). The concatenated comprehensive high-dimensional features are input into the regression head to calculate the predicted water ratio of the current single leaf. The comprehensive high-dimensional features pass through the Linear layer, the GELU activation function, and the Dropout layer in sequence, and are finally mapped to the single-node output layer.

[0121] The regression head model training uses a weighted objective function combining mean absolute error and smoothed L1 loss, calculated as follows:

[0122]

[0123] in, For the first Predicted moisture ratio for each sample For the corresponding individual moisture ratio label; Smooth represents the mean absolute error. Indicates smoothness The loss is calculated by summing the weighting coefficients of the two factors to a value of 1.

[0124] A sigmoid constraint is introduced at the end of the regression head, and a linear mapping is performed based on the range of training set labels. The expression is as follows:

[0125]

[0126] in, and These are the minimum and maximum values ​​of the true moisture ratio in the training set, respectively; This is the output of the linear layer of the regression head.

[0127] The predicted moisture ratio is strictly constrained within the physically defined upper and lower limits to prevent the model from diverging when faced with extreme unknown samples.

[0128] S6: Using the average moisture ratio of the single leaf as feedback, the heating temperature and fan speed of the withering tank are dynamically adjusted through the ideal water loss trajectory derived from the drying kinetic model and fuzzy control, and closed-loop control is performed. The specific process is as follows:

[0129] S6.1: Substitute the operating parameters read from the drying kinetic model into the built-in parameter spectrum to calculate the characteristic constants of the kinetic model of the current environment. The parameter spectrum is a multivariate nonlinear fitting formula for the process parameters.

[0130] S6.2: The average of the moisture ratios of multiple effective leaves predicted by the vision system is taken as the global actual moisture ratio of the current withering trough. Based on the drying kinetic curve and the current temperature and wind speed process parameters, an ideal moisture ratio descent trajectory is planned. This trajectory is compared with the moisture ratio predicted by the three-branch moisture ratio model to calculate the moisture ratio error at the current moment. The calculation expression is as follows:

[0131]

[0132] in, For the first The ideal moisture ratio at each sampling time This represents the global average moisture ratio measured in the visual system. This is due to the moisture ratio error;

[0133] S6.3: Compare two adjacent sampling periods to calculate the rate of change of error. The calculation expression is as follows:

[0134]

[0135] in, The rate of change of error, The time interval between adjacent sampling moments;

[0136] S6.4: The controller converts specific digital quantities into fuzzy sets, and converts errors... and error change rate It is divided into five fuzzy levels: negative large (NB), negative small (NS), zero (ZE), positive small (PS), and positive large (PB).

[0137] S6.5: Output terminal corresponding to heating temperature adjustment amount With fan speed adjustment and for the heating temperature adjustment amount With fan speed adjustment Configure the corresponding five fuzzy subsets;

[0138] S6.6: The controller uses the centroid method to defuzzify the fuzzy interval distribution based on the built-in fuzzy rules, transforming it into precise heating temperature and fan speed adjustment values. The expressions are as follows:

[0139]

[0140] in, For the final precise control quantity ( or ); For the first in the fuzzy domain A discrete coordinate point; This represents the aggregation membership degree of that point; Total number of discrete coordinate points

[0141] This precise control quantity is sent to the underlying PLC device actuator, thereby upgrading static open-loop processing to dynamic closed-loop control based on feedback of the actual state of the material.

[0142] The drying kinetics model of this invention adopts the Aghbashlo drying kinetics model:

[0143]

[0144] in, and These are the characteristic constants of the Aghbashlo model, determined by operating conditions such as temperature and wind speed. This refers to the duration of withering.

[0145] In the actual test set, as shown in Table 1 below, the final performance of the Tri-MoistNet provided by the embodiment of the present invention is: MAE is 0.0190, RMSE is 0.0260, and R² is 0.8664.

[0146] Table 1. Prediction results of representative models

[0147]

[0148] This indicates that the prediction model of the present invention closely matches the actual moisture ratio in complex stacking scenarios, demonstrating good prediction accuracy and robustness.

[0149] It is understood that the present invention has been described through some embodiments, and those skilled in the art will recognize that various changes or equivalent substitutions can be made to these features and embodiments without departing from the spirit and scope of the invention. Furthermore, under the teachings of the present invention, these features and embodiments can be modified to adapt to specific situations and materials without departing from the spirit and scope of the invention. Therefore, the present invention is not limited to the specific embodiments disclosed herein, and all embodiments falling within the scope of the claims of this application are within the protection scope of the present invention.

Claims

1. A method for online detection and intelligent control of tea leaf withering degree based on moisture ratio, characterized in that, Includes the following steps: Step 1: Obtain the original image and moisture ratio label, perform dual-branch image preprocessing to obtain texture-enhanced image and color-corrected image; and calculate the global moisture ratio by using the initial state tea moisture content, the current tea moisture content, and the current environmental tea equilibrium moisture content. Step 2: Extract single-leaf bounding boxes from the texture enhancement image based on the object detection model, generate single-leaf candidate masks through the instance segmentation model, and perform cross-intersection over union threshold filtering on the single-leaf candidate masks to obtain an initial set of single-leaf masks; Step 3: Obtain the set of single-leaf images using the initial set of single-leaf masks; Step 4: Extract the morphological and color features from the single-leaf image set and normalize them, calculate the comprehensive freshness index, and combine it with the global moisture ratio to assign a dynamic single-leaf moisture ratio label to each tea leaf. Step 5: Input the set of single-leaf images into the three-branch moisture ratio model for feature extraction and moisture ratio regression to obtain the predicted single-leaf moisture ratio; Step 6: Using the average moisture ratio of the single leaf as feedback, the heating temperature of the withering tank and the fan speed are dynamically adjusted through the ideal water loss trajectory derived from the drying kinetic model and fuzzy control, and closed-loop control is performed.

2. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, In step 1, the two branches are as follows: (1) Texture enhancement image preprocessing branch for instance segmentation The original image is luminance aligned and subjected to initial global white balance correction based on the gray world algorithm. Contrast-limited adaptive histogram equalization is applied to the L channel in the LAB color space, followed by a second global white balance correction, resulting in a texture-enhanced image. (2) Color-corrected image preprocessing branch for feature regression The original image is sequentially subjected to percentage histogram stretching, nonlinear gamma correction, and LAB color space texture enhancement. After obtaining an effective single-leaf mask, the mask area is cut out and stretched to output a color-corrected single-leaf image.

3. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, In step 1, the specific calculation process for the global moisture ratio is as follows: ① The moisture content of tea leaves in their initial state was determined using the standard drying method; ② Calculate the current moisture content of the tea leaves in real time by combining the weighing withering tank; ③ Measure the equilibrium moisture content of tea leaves under the current environment; ④ Calculate the global moisture ratio of the entire process according to the moisture ratio formula. The expression for calculating the global moisture ratio is as follows: in, This represents the overall moisture content of the current batch. This represents the dry basis moisture content of the tea leaves at the current moment. The equilibrium dry basis moisture content under current environmental conditions; This represents the dry basis moisture content of the tea leaves at the initial stage of withering.

4. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, In step 2, the target detection model is an optimized target detection model based on a semi-supervised self-training mechanism. The YOLOv10s network model is used as the target detection model. The optimal baseline network is trained with the initial manually labeled data as the teacher model. The model predicts the training set images and extracts high-confidence prediction boxes to generate pseudo-labels. The pseudo-labels are then fused with the original dataset to retrain the student model and output high-precision single-leaf bounding boxes. The instance segmentation model adopts the SAM2.1 model, in which the image encoder extracts the features of the original image, the prompt encoder receives the single leaf bounding box as a prompt signal, and the mask decoder combines the image features to output the single leaf candidate mask. The threshold for the cross-union ratio threshold filtering is set to 0.

88.

5. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, The specific process of step 3 is as follows: Step 3.1: Extract the maximum connected component contour point set of each candidate leaf mask in the initial leaf mask set. Calculate the pixel values ​​of the binary mask, and obtain the geometric centroid coordinates from the pixel values ​​of the binary mask. The expression is: in, These are the pixel values ​​of the binary mask. Step 3.2: Using the coordinates of the geometric centroid as a reference, traverse the edge of the blade contour pixel by pixel, and calculate the Euclidean distance from the edge pixel to the geometric centroid. The calculation expression is as follows: in, Indicates the first One edge pixel, ( , ) represents the coordinates of the edge pixel. , () represents the coordinates of the geometric centroid; Step 3.3: Calculate the relative displacement between adjacent contour points, accumulate the physical arc lengths between adjacent contour points to obtain the cumulative physical arc length corresponding to the i-th pixel, and map the two-dimensional leaf closed contour into a one-dimensional time-domain waveform signal with the cumulative physical arc length as the abscissa; the expression for calculating the cumulative physical arc length is as follows: in, To accumulate the physical arc length, the starting point ; Step 3.4: Perform a Fast Fourier Transform on the one-dimensional waveform signal to extract the low-frequency energy spectrum; Step 3.5: Concatenate the low-frequency energy spectrum with the time-domain feature vector, and reduce the dimensionality through principal component analysis; Step 3.6: Input the multilayer perceptron to remove the incomplete mask and obtain a set of single-leaf images.

6. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, In step 4, the formula for calculating the comprehensive freshness index is: in, For the first The overall freshness index of a single leaf; , , and These are the normalized tea leaf width, brightness, redness / greenness, and roundness; The formula for calculating the dynamic single-leaf moisture ratio label is: in, For the first The dynamic moisture ratio label of a single leaf. The measured water content of the current image. This is the individual compensation coefficient.

7. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, In step 5, the three-branch water ratio model is composed of a pure convolutional network branch, a global visual transformer branch, and a hierarchical visual transformer branch connected in parallel. The specific process of step 5 is as follows: Step 5.1: Extract the visual features of the single leaf image output in the three branches, and simultaneously extract the explicit physical features of the single leaf image; Step 5.2: The visual features and explicit physical features are spliced ​​and fused in the channel dimension, and then input into the regression head with Sigmoid activation function constraints to calculate the predicted moisture ratio of the current single leaf.

8. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 7, characterized in that, The explicit physical features include RGB channel mean, RGB channel standard deviation, foreground pixel ratio, highlight pixel ratio, and average saturation. The regression head model training uses a weighted objective function combining mean absolute error and smoothed L1 loss, calculated as follows: in, For the first Predicted moisture ratio for each sample For the corresponding individual moisture ratio label; Smooth represents the mean absolute error. Indicates smoothness The loss is calculated by summing the weighting coefficients of the two factors to a value of 1. The regression head introduces a Sigmoid constraint at its end and performs a linear mapping based on the training set label range, expressed as follows: in, and These are the minimum and maximum values ​​of the true moisture ratio in the training set, respectively; This is the output of the linear layer of the regression head.

9. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, In step 6, the drying kinetic model adopted is the Aghbashlo drying kinetic model, whose expression is: in, and These are the characteristic constants of the Aghbashlo model, determined by operating conditions such as temperature and wind speed. This refers to the duration of withering.

10. The method for online detection and intelligent control of tea withering degree based on moisture ratio according to claim 1, characterized in that, The specific process of step 6 is as follows: Step 6.1: Substitute the operating parameters read from the drying kinetic model into the built-in parameter spectrum to calculate the characteristic constants of the kinetic model of the current environment. The parameter spectrum is a multivariate nonlinear fitting formula for the process parameters. Step 6.2: Based on the drying kinetics curve, plan the ideal moisture ratio decrease trajectory, compare it with the moisture ratio predicted by the three-branch moisture ratio model, and calculate the moisture ratio error at the current moment. The calculation expression is as follows: in, For the first The ideal moisture ratio at each sampling time This represents the global average moisture ratio measured in the vision system. This is due to the moisture ratio error; Step 6.3: Compare two adjacent sampling periods and calculate the error change rate. The calculation expression is as follows: in, The rate of change of error, The time interval between adjacent sampling times; Step 6.4: The controller converts the specific digital quantity into a fuzzy set, and then converts the error... and error change rate Divided into five fuzzy levels; Step 6.5: Adjust the heating temperature at the output terminal. With fan speed adjustment and for the heating temperature adjustment amount With fan speed adjustment Configure the corresponding five fuzzy subsets; Step 6.6: Use the centroid method to resolve the fuzziness, transforming the interval distribution into a unique, precise physical quantity, expressed as: in, For the final precise control quantity ( or ); For the first in the fuzzy domain A discrete coordinate point; This represents the aggregation membership degree of that point; This represents the total number of discrete coordinate points.

Citation Information

Patent Citations

  • Machine vision-based tender shoot identification method and system

    CN120014465A

  • Tea rolling degree identification method and system based on machine vision

    CN121366280A