Intelligent measurement method and system for fresh tobacco leaf baking characteristic parameters

CN122821119APending Publication Date: 2026-09-25CHINA TOBACCO SHANDONG IND
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202610935167.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-06-26
Publication Date
2026-09-25

AI Technical Summary

Technical Problem

这种方法存在主观性强、效率低、易出错等问题,尤其在大规模生产中,无法实现实时监测和量化分析

Benefits of technology

本发明能够自动计算鲜烟叶烘烤过程中的关键区域面积,以实现精准的烟叶烘烤特性智能、自主评估。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122821119A_ABST
    Figure CN122821119A_ABST
Patent Text Reader

Abstract

The application discloses a kind of fresh tobacco leaf baking characteristic parameter intelligent measurement method and system, it is related to tobacco intelligent baking field, obtains the image of fresh tobacco leaf in the baking process, constructs fresh tobacco baking characteristic parameter dataset;Build tobacco segmentation model, in turn include encoder, bottleneck layer and decoder;Residual block is introduced in the encoder and decoder and embedded coordinate attention module;According to fresh tobacco baking characteristic parameter dataset, intelligent measurement model is trained, and the trained intelligent measurement model is obtained after training is completed;Real-time acquisition fresh tobacco leaf image is input into the trained intelligent measurement model, and region segmentation result is obtained, each region segmentation result is converted and calculated, and tobacco yellowing, brown baking characteristic parameter is obtained.Leaf.Utilize deep learning model, accurately and quickly extract fresh tobacco yellow, brown baking characteristic parameter, provide fresh tobacco quality basis for subsequent tobacco baking.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of intelligent tobacco curing, and in particular to an intelligent measurement method and system for the curing characteristic parameters of fresh tobacco leaves. Background Technology

[0002] The statements in this section are merely background information relating to this disclosure and do not necessarily constitute prior art.

[0003] In the dark chamber test of tobacco leaves, changes in the color of the leaves (such as changing from green to yellow or brown) mainly rely on manual observation and experience. This method has problems such as high subjectivity, low efficiency, and susceptibility to errors, especially in large-scale production, where real-time monitoring and quantitative analysis cannot be achieved.

[0004] With the increasing demand for intelligent tobacco curing processes, existing technologies mostly employ simple color thresholding segmentation or basic image processing algorithms. However, these methods are sensitive to factors such as changes in lighting and the diversity of tobacco leaf morphology, resulting in low segmentation accuracy and an inability to effectively distinguish between background, green, yellow, and brown areas. Furthermore, the lack of a dedicated model training mechanism makes it impossible to adapt to the curing characteristics of different tobacco varieties. Summary of the Invention

[0005] To overcome the shortcomings of the prior art, this invention provides an intelligent measurement method and system for the curing characteristic parameters of fresh tobacco leaves. By using a deep learning model, the yellow and brown curing characteristic parameters of fresh tobacco leaves are accurately and quickly extracted, providing a basis for the quality of fresh tobacco leaves for subsequent curing.

[0006] To achieve the above objectives, one or more embodiments of the present invention provide the following technical solutions: In a first aspect, the present invention provides an intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves, comprising: Images of fresh tobacco leaves during the curing process were acquired, and a dataset of fresh tobacco curing characteristic parameters was constructed. A tobacco leaf segmentation model is constructed, which includes an encoder, a bottleneck layer, and a decoder; residual blocks are introduced and coordinate attention modules are embedded in the encoder and decoder. The intelligent measurement model is trained based on the dataset of fresh tobacco curing characteristic parameters, and the trained intelligent measurement model is obtained after training. Real-time images of fresh tobacco leaves are acquired and input into a trained intelligent measurement model to obtain region segmentation results. The segmentation results of each region are then converted and calculated to obtain the yellowing and browning characteristics parameters of the tobacco leaves during the baking process.

[0007] In a further technical solution, the encoder replaces the standard convolutional layer with ResNet-34 as the backbone, based on the U-Net structure.

[0008] In a further technical solution, the residual block is a residual block that is related to the context, including point convolution and context association structure.

[0009] A further technical solution is that the residual block for the context specifically includes: Dimensionality-reducing point convolution is used to filter and reduce the dimensionality of the input features to obtain the dimensionality-reduced features. Multi-local, multi-fine-grained features are extracted from the dimensionality-reduced features through contextual association structures; Point convolution is used to fuse features from multiple local ranges and fine-grained features to obtain fused features, which are then added to the input features for output.

[0010] A further technical solution is that the context association structure includes multiple parallel group convolutions, batch normalization, and activations.

[0011] A further technical solution is that the coordinate attention module specifically includes: Parallel row convolution and column convolution are used to process the input features respectively to obtain horizontal and vertical feature information; The horizontal and vertical feature information are fused, and the fused features are represented probabilistically to obtain the horizontal feature weight coefficients and the vertical feature weight coefficients. The horizontal and vertical feature information are weighted based on the horizontal feature weight coefficient and the vertical feature weight coefficient respectively, and the fused feature is then output.

[0012] A further technical solution is that the intelligent measurement model employs a hybrid loss method during training, including weighted cross-entropy loss and Dice loss.

[0013] Secondly, the present invention provides an intelligent measurement system for the curing characteristic parameters of fresh tobacco leaves, comprising: The dataset construction module is configured to: acquire images of fresh tobacco leaves during the baking process and construct a dataset of fresh tobacco baking characteristic parameters; The model building module is configured to: build a tobacco leaf segmentation model, which includes an encoder, a bottleneck layer and a decoder in sequence; the encoder and decoder introduce residual blocks and embed coordinate attention modules. The model training module is configured to train the intelligent measurement model based on the fresh smoke baking characteristic parameter dataset, and obtain the trained intelligent measurement model after the training is completed. The model segmentation module is configured to: acquire images of fresh tobacco leaves in real time, input them into a trained intelligent measurement model, obtain region segmentation results, convert and calculate the segmentation results of each region, and obtain the yellowing and browning baking characteristic parameters of the tobacco leaves.

[0014] Thirdly, the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the steps of the intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in the first aspect.

[0015] Fourthly, the present invention provides a computer device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps in the intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in the first aspect.

[0016] The above one or more technical solutions have the following beneficial effects: This invention can automatically calculate the area of ​​key regions during the fresh tobacco leaf curing process, so as to achieve accurate intelligent and autonomous evaluation of tobacco leaf curing characteristics.

[0017] This invention employs an improved deep learning algorithm to establish an intelligent measurement model for the changes in the yellowing and browning curing characteristic parameters of fresh tobacco leaves, thereby increasing the stability of parameter calculation and adaptability to complex and unfamiliar environments.

[0018] The intelligent measurement model employs high-level semantics and attention modules, conforming to the pattern of changes in the state of tobacco curing characteristic parameters, thus achieving higher recognition accuracy and stronger generalization ability.

[0019] Advantages of additional aspects of the invention will be set forth in part in the description which follows, and in part will be obvious from the description, or may be learned by practice of the invention. Attached Figure Description

[0020] The accompanying drawings, which form part of this invention, are used to provide a further understanding of the invention. The illustrative embodiments of the invention and their descriptions are used to explain the invention and do not constitute an improper limitation of the invention.

[0021] Figure 1 This is a flowchart of an intelligent measurement method for the characteristic parameters of fresh tobacco leaf curing according to an embodiment of the present invention; Figure 2 This is a residual block structure diagram relating to the context of an embodiment of the present invention; Figure 3 This is a structural diagram of the coordinate attention module in an embodiment of the present invention. Detailed Implementation

[0022] It should be noted that the following detailed descriptions are exemplary and intended to provide further illustration of the invention. Unless otherwise specified, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention pertains.

[0023] It should be noted that the terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the scope of exemplary embodiments according to the invention. As used herein, the singular form is intended to include the plural form as well, unless the context clearly indicates otherwise. Furthermore, it should be understood that when the terms "comprising" and / or "including" are used in this specification, they indicate the presence of features, steps, operations, devices, components, and / or combinations thereof.

[0024] Where there is no conflict, the embodiments and features in the embodiments of the present invention can be combined with each other.

[0025] Example 1 This invention aims to solve the problems of manual labor, high subjectivity, and low accuracy in the measurement of tobacco curing characteristics in existing technologies. Specifically, the technical problem solved by this invention is: how to achieve accurate segmentation of four regions (background, green, yellow, and brown) in a fresh tobacco leaf image through image digitization and machine learning models, and to calculate the area of ​​the green, yellow, and brown regions, thereby intelligently measuring the yellow and brown curing characteristics of the tobacco leaf.

[0026] The intelligent measurement of changes in the yellowing and browning curing characteristic parameters of fresh tobacco leaves involves four processes: constructing a dataset of fresh tobacco curing characteristic parameters; constructing a proprietary model for segmenting four regions of the tobacco leaf; model training; and calculating the green, yellow, and brown curing characteristic parameters. First, images of tobacco leaves at different times during the fresh tobacco curing characteristic experiment are collected, and the background, green, yellow, and brown regions of each image are labeled as training datasets. Then, a proprietary segmentation model for the background, green, yellow, and brown regions of the tobacco leaf is designed. Next, the model is trained, and appropriate training parameters are selected to process the tobacco leaf images, distinguishing the background region, green region, yellow region, and brown region of the tobacco leaf. Finally, each region is transformed and calculated to obtain the yellowing and browning curing characteristic parameters of the tobacco leaf.

[0027] like Figure 1 As shown in the figure, this embodiment discloses an intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves. The method includes the following steps: S1: Obtain images of fresh tobacco leaves during the baking process and construct a dataset of fresh tobacco baking characteristic parameters; In this embodiment, image samples of fresh tobacco leaves during the curing process are collected to construct a dataset of fresh tobacco curing characteristic parameters. Specifically, RGB color images, i.e., images of fresh tobacco leaves, are acquired using a high-resolution camera or scanner.

[0028] The process of constructing the dataset of characteristic parameters of fresh smoke roasting includes image preprocessing and digital annotation. The image preprocessing specifically involves: Gaussian filtering to remove noise from the image samples, adaptive histogram equalization to enhance contrast, and normalization to 512x512 pixels.

[0029] The digital annotation process involves dividing each fresh tobacco leaf image into four regions: a background region, a green region (representing unbaked or early-stage tobacco leaves), a yellow region (representing the yellowing stage), and a brown region (representing the browning stage). These regions are then annotated manually or semi-automatically. The annotated images are then transformed into a matrix to obtain a two-dimensional matrix.

[0030] In some implementations, image pixels are categorized and labeled using image annotation tools (such as LabelMe or custom scripts), with the corresponding labels being background areas, green areas, yellow areas, and brown areas.

[0031] To achieve digitization, the labeled image is converted into a matrix form, i.e., a two-dimensional matrix, where each element corresponds to a pixel's category value. Specifically, the background area is assigned a value of 0, the green area is assigned a value of 1, the yellow area is assigned a value of 2, and the brown area is assigned a value of 3.

[0032] Suppose a portion of a small image (7×2 pixels) is cropped as follows: Original image area diagram (assuming a white background, green for leaf veins, yellow for leaf edges, and brown for the leaf center): First line: background, background, background, background, background, background, background; Second line: background, background, background, green, green, background, background.

[0033] The corresponding digitization matrix is:

[0034] If the image contains yellow and brown areas, for example, expand as follows: First row: background(0), background(0), yellow(2), yellow(2), brown(3), background(0), background(0); Second row: Green(1), Green(1), Yellow(2), Brown(3), Brown(3), Green(1), Background(0).

[0035] The corresponding digitization matrix is:

[0036] S2: Construct a tobacco leaf segmentation model, which includes an encoder, a bottleneck layer, and a decoder in sequence; residual blocks are introduced into the encoder and decoder and coordinate attention modules are embedded in them; In this embodiment, an improved U-Net architecture (ATT-ResU-Net) is used to construct a tobacco leaf segmentation model, enhancing feature extraction to address the issues of color gradation and edge blurring in tobacco leaves. The standard U-Net network includes an encoder (downsampling to extract features through convolutional pooling) and a decoder (upsampling to recover details through transposed convolution), but it is susceptible to noise. This invention improves upon this by integrating residual blocks and a coordinate attention mechanism, enhancing multi-scale feature fusion and spatial attention capture.

[0037] The tobacco leaf segmentation model includes an encoder, a bottleneck layer, and a decoder. The input data is a fresh tobacco leaf image (RGB image (H×W×3)), and the output data is a probability map of four types of regions (H×W×4), which is converted into a category matrix by argmax.

[0038] (1) Encoder Encoder (Downsampling Path): Based on the U-Net structure, ResNet-34 is used as the backbone to replace standard convolutions, improving deep feature extraction. Each stage includes residual blocks that connect context, coordinate attention modules, and downsampling.

[0039] like Figure 2 As shown, the residual block structure that connects the context mainly includes point convolution and a context association structure. First, dimensionality-reducing point convolution is used to filter and reduce the dimensionality of the input features, reducing the number of feature channels and thus reducing feature processing time. Then, the context association structure is connected. This structure contains four parallel group convolutions, batch normalization, and activation operations. The dilation rates of the parallel convolutions are set to 1, 3, 5, and 7, respectively. The convolution with a dilation rate of 1 is mainly used to extract detailed feature information within a small range. As the dilation rate increases, the range of extracted information gradually expands, and the extracted information gradually becomes coarser. The context association structure can obtain multi-local range and multi-fine-grained feature information from two dimensions: the range of extracted features and the degree of feature refinement. Next, point convolution is used to fuse the multi-local range and multi-fine-grained feature information to generate new fused features, generating the same number of channels as the input features. Finally, the new fused features are added to the input features, which can effectively alleviate the gradient vanishing problem caused by the deepening of the network structure, thus enabling the parameters to be learned better.

[0040] In some implementations, the parallel group convolutions in the context association structure are 3×3 group convolutions with a dilation rate of 1, 3×3 group convolutions with a dilation rate of 3, 3×3 group convolutions with a dilation rate of 5, and 3×3 group convolutions with a dilation rate of 7.

[0041] like Figure 3As shown, a coordinate attention module (CA) is inserted after the residual block that connects the context to capture long-range dependencies and location information. This module mainly consists of row and column convolutions and a sigmoid function. The coordinate attention module includes: processing the input features using parallel row and column convolutions to obtain horizontal and vertical feature information; fusing the horizontal and vertical feature information and representing the fused features probabilistically to obtain horizontal and vertical feature weight coefficients; and weighting the horizontal and vertical feature information based on these coefficients, and then outputting the fused feature.

[0042] Specifically, parallel row convolutions and column convolutions are first used to process the input features. Row convolutions are used to extract horizontal (X-direction) feature information, and column convolutions are used to extract vertical (Y-direction) feature information. Then, the horizontal and vertical feature information are fused, and the fused features are represented probabilistically using Sigmoid, denoted as M, as the horizontal feature weight coefficient, and 1-M as the vertical feature weight coefficient, respectively measuring the influence of horizontal and vertical features on the CA module. Finally, the extracted horizontal and vertical features are weighted using the weight coefficients to obtain the output result, which enhances the attention to color boundaries (such as yellow-brown transitions).

[0043] Downsampling: 2×2 max pooling halves the feature map size, meaning the width and height of the feature map are reduced by half, retaining only the most salient features. This expands the field of view, extracts high-level semantics, reduces computational cost, and makes segmentation more accurate and stable. For example: 512→256→128→64→32.

[0044] (2) Bottleneck layer The bottleneck layer consists of a 512-channel convolutional block and a coordinate attention module (CA module) to extract high-level semantic features and avoid information bottlenecks.

[0045] At the bottleneck layer of the U-Net encoder, this invention employs a 512-channel deep convolutional block combined with a coordinate attention (CA) module for feature modeling. The high-dimensional 512-channel convolutional block possesses ample feature representation capacity, enabling the full aggregation of multi-layer contextual information to mine and encode deep global semantic and abstract structural features of the image. The introduction of the coordinate attention module allows for the simultaneous collaborative modeling of channel dimensions and spatial horizontal and vertical positional dependencies, enhancing the effective target feature response while suppressing background redundancy noise. This combined structure effectively alleviates the information loss and representational limitations caused by excessive feature scale compression in the traditional U-Net bottleneck layer, breaking through inherent information bottleneck constraints. It allows the network to accurately capture target spatial positional relationships while preserving high-level semantic abstraction, providing highly discriminative and robust high-level semantic feature support for subsequent decoder upsampling restoration and refined segmentation.

[0046] (3) Decoder Decoder (upsampling path): Symmetric to the encoder, it uses transposed convolution upsampling to restore the resolution to the original image size: 32→64→128→256→512. The decoder progressively restores the spatial resolution of the feature map, mapping high-level semantic features back to the original image size, providing a spatial basis for pixel-level segmentation prediction.

[0047] Each stage: Skip connections: Concat features from the corresponding encoder layer, fusing low-level details (edges) and high-level semantics (categories). Directly concatenate and fuse shallow detail features from the same encoder layer with deep semantic features from the decoder to compensate for the loss of detail information during downsampling. This method combines low-level edge texture details with high-level global semantic information, balancing localization accuracy and semantic discrimination capability.

[0048] Residual Block + CA Module: Similar to an encoder, it enhances recovery accuracy. Residual structures are introduced at each decoding stage and embedded with CA coordinate attention modules, reusing the same enhancement units as the encoder. The residual block alleviates gradient degradation in deep networks and strengthens feature representation capabilities; the CA module models channel and horizontal / vertical spatial dependencies, focusing on the target region, suppressing background interference, and improving feature recovery accuracy and structural integrity.

[0049] Output layer: Employs 1×1 convolutional dimensionality reduction to map channels, combined with a Softmax activation function to output a multi-class probability distribution, i.e., four-class probabilities. This achieves channel-dimensional feature aggregation and class mapping, performing four-class pixel-level probability prediction for each pixel, ultimately completing multi-class semantic segmentation.

[0050] In summary, the decoder employs a strictly symmetrical upsampling architecture to the encoder, relying on transposed convolutions to achieve progressive upsampling, gradually restoring the feature map resolution from the bottleneck layer's 32×32 to the original input image's 512×512 size. At each decoding stage, skip connections are used to merge shallow detail features from the encoder's corresponding layers with deep semantic features from the decoder, effectively compensating for the loss of spatial detail information during downsampling and achieving complementary representation of low-level edge texture features and high-level semantic abstract features. Simultaneously, residual blocks are introduced at each decoder layer, embedding coordinate attention modules. The residual structure alleviates the gradient vanishing problem in deep networks and enhances the non-linear representation of features. Coordinate attention synchronously models channel dependencies and horizontal and vertical spatial position associations, adaptively strengthening effective target features and suppressing background redundancy interference, significantly improving feature reconstruction and detail recovery accuracy. At the network's end, 1×1 convolutions are used to complete channel dimension compression and feature mapping, combined with a Softmax activation function to output a pixel-by-pixel four-class probability distribution, achieving end-to-end multi-class accurate semantic segmentation.

[0051] S3: Train the intelligent measurement model based on the dataset of fresh smoke baking characteristic parameters, and obtain the trained intelligent measurement model after training is completed; In this embodiment, the intelligent measurement model is trained based on the dataset of fresh tobacco curing characteristic parameters, including forward propagation and back propagation. By continuously iterating and updating the network weight parameters, the trained intelligent measurement model is obtained after training.

[0052] Forward propagation is the complete reasoning process of the model from the input image to the output probability map, divided into three stages: encoding, bottleneck, and decoding. The input is a standardized RGB image tensor. ,in and This refers to the image height and width.

[0053] The encoding stage primarily implements multi-level feature extraction and downsampling compression. Features are extracted layer by layer, and downsampling is performed progressively using multi-level residual blocks and a CA module. First level: Initial convolutional layer with 3×3 kernels and 64 channels.

[0054] in, This represents the first-level feature. Indicates ReLU activation. This represents the convolution operation. Indicates batch normalization, This indicates the coordinate attention module.

[0055] Encoding subsequent levels: Each level includes residual blocks:

[0056] in, Indicates the first Level features, Indicates the first Level features.

[0057] Then connect the CA module:

[0058] in, Indicates the weighted number of... Level features, Indicates element-wise multiplication. This is the attention weight function.

[0059] Downsampling: Max Pooling The size is halved, and the number of channels is doubled. The overall formula is expressed as:

[0060] After 4-5 levels, low-resolution high-dimensional features (e.g., 32×32×512) are obtained.

[0061] Bottleneck stage: Perform dense convolutions and attention enhancements at the lowest resolution:

[0062] in, This represents the features after dense convolution and attention enhancement. This represents the 5th level feature. It captures global semantics.

[0063] Decoding stage: Layer-by-layer upsampling to restore resolution. Upsampling: transposed convolution. This halves the number of channels; skip connections and fusion: Then through the residual block and CA: Final output: Each pixel location represents one of four probability distributions. The entire forward propagation is implemented through matrix operations, ensuring efficient computation. The decoder's first Level features, Represents the encoder's first Level features, The decoder's first Level features, This indicates the decoder after processing by the CA module. Level features.

[0064] The error function is used to quantify the difference between the model's predictions and the true labels. A hybrid loss is employed, including weighted cross-entropy loss (CE) and Dice loss, to handle class imbalance (more background pixels than others) and sensitivity to segmentation boundaries.

[0065] Cross-entropy loss Calculation: Calculate the negative log-likelihood pixel by pixel and weight it to balance the categories:

[0066] in, Indicates the true label, Indicates the predicted probability. For category weights, This indicates a category index.

[0067] Dice loss Computation: Based on overlap, suitable for segmentation tasks, promoting region consistency.

[0068] in, For constant terms, avoid division by zero. .

[0069] Backpropagation calculates the gradient of the loss with respect to the model parameters (weights W, bias b) using the chain rule, and updates the parameters to minimize the loss until the model loss converges and the segmentation accuracy reaches its optimum. This ultimately trains a specialized model adapted for multi-region color segmentation of fresh tobacco leaves, providing a precise segmentation foundation for subsequent quantitative calculation of tobacco curing characteristic parameters. The AdamW optimizer is used, combining gradient descent and momentum.

[0070] S4: Real-time acquisition of fresh tobacco leaf images, input into the trained intelligent measurement model to obtain region segmentation results, conversion and calculation of the segmentation results of each region to obtain the yellowing and browning baking characteristic parameters of tobacco leaves.

[0071] In this embodiment, after model inference, the network outputs a category matrix (H×W). Different pixel labels in the matrix correspond to different regions of the image. Label 1, label 2, and label 3 correspond to the green, yellow, and brown regions of tobacco leaves, respectively. Background pixels are not statistically processed.

[0072] To quantify the yellowing and browning evolution of fresh tobacco leaves during the curing process, pixel-level quantitative calculations were performed based on the segmentation results.

[0073] First, the category matrix obtained by model inference is traversed and counted globally. The category to which the matrix coordinate point belongs is determined pixel by pixel. The number of pixels in the green area, yellow area and brown area of ​​tobacco leaves are counted respectively. Background irrelevant pixels are removed to eliminate the interference of background noise on the calculation of tobacco leaf feature areas.

[0074] Secondly, physical scale calibration is performed based on camera focal length and shooting distance, establishing the conversion relationship between pixel area and actual physical area, and determining the unit actual area coefficient per pixel. In this embodiment, the actual area corresponding to a single pixel is 1 pixel = 0.01 cm².

[0075] Based on pixel statistics and calibration coefficients, the actual area of ​​each type of region is calculated, where the green area A1 = N1 × unit, A2 = N2 × unit, and A3 = N3 × unit; the total effective area of ​​the tobacco leaves is the sum of the areas of the three types of regions, and the total area is: = A1 + A2 + A3.

[0076] To visually characterize the changes in the curing state of tobacco leaves, this invention selects the green percentage, yellowing degree, and browning degree as curing characteristic parameters. Specifically, the green percentage reflects the proportion of remaining fresh tissue in the tobacco leaves, the yellowing degree characterizes the degree of dehydration and yellowing evolution of the tobacco leaves, and the browning degree quantifies the degree of browning and deterioration of the tobacco leaves.

[0077] The formula for calculating baking characteristic parameters is: Degree of yellowing = (A2 / ) × 100%; Browning degree = (A3 / ) × 100%; Green area = (A1 / ) × 100%.

[0078] The above calculation method can accurately quantify the dynamic changes of green, yellow, and brown areas of tobacco leaves during the baking process, enabling intelligent and quantitative measurement of the yellowing and browning characteristics of tobacco leaves during baking, and providing objective data support for analyzing the deterioration patterns of fresh tobacco leaves during baking.

[0079] Example as follows: One hundred tobacco leaves were collected from the tobacco field for a darkroom experiment. The tobacco leaves were observed and photographed every 12 hours. The photographed images were labeled with background, green, yellow and brown areas. This was continued for 168 hours, and a total of 1400 images were obtained. The images were divided into three sets according to a ratio of 6:1:3: 840 darkroom images of 60 tobacco leaves were used as the training set, 140 darkroom images of 10 tobacco leaves were used as the validation set, and 380 darkroom images of 30 tobacco leaves were used as the test set.

[0080] Improvements based on the U-Net architecture, such as Figure 2 and Figure 3As shown, in the downsampling part, the standard convolution is replaced with a residual block structure that relates to the context, and a coordinate attention module is introduced. First, the improved network structure is trained, and the optimal training parameters are selected. The initial learning rate is set to 0.001, which decays exponentially. The training batch size is 8, and the training epochs are set to 200. The image is first input into the improved network for forward propagation, outputting four predicted segmented regions. Cross-entropy is used to calculate the error between the predicted and ground truth regions, and backpropagation is performed to update the parameters. This process is repeated for 200 epochs. When the number of training epochs exceeds 100, the mean intersection-over-union (MIoU) of the segmentation is calculated on the validation set every two epochs to measure model performance. The parameters with the highest MIoU on the validation set are selected as the optimal network parameters and saved. Finally, the saved parameters are used to validate the network performance on the test set.

[0081] Table 1 Performance Comparison

[0082] As shown in Table 1, ATT-ResU-Net achieves a segmentation accuracy of over 97.11% for all four types of regions, with an overall average segmentation accuracy of 97.98%, representing a significant improvement of 3.67% compared to the baseline network framework UNet.

[0083] Example 2 This embodiment discloses an intelligent measurement system for the curing characteristic parameters of fresh tobacco leaves, including: The dataset construction module is configured to: acquire images of fresh tobacco leaves during the baking process and construct a fresh tobacco leaf image dataset; The model building module is configured to: build a tobacco leaf segmentation model, which includes an encoder, a bottleneck layer and a decoder in sequence; the encoder and decoder introduce residual blocks and embed coordinate attention modules. The model training module is configured to train the fresh tobacco leaf segmentation model based on the fresh tobacco leaf image dataset, and obtain the trained fresh tobacco leaf segmentation model after training is completed. The model segmentation module is configured to: acquire fresh tobacco leaf images in real time, input them into a trained fresh leaf segmentation model, obtain region segmentation results, convert and calculate the segmentation results of each region, and obtain the yellowing and browning baking characteristic parameters of the tobacco leaves.

[0084] Example 3 The purpose of this embodiment is to provide a computing device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the program to implement the steps of the method of Embodiment 1.

[0085] Example 4 The purpose of this embodiment is to provide a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, performs the steps of the method of Embodiment 1.

[0086] The steps and methods involved in the apparatuses of Embodiments 3 and 4 above correspond to those in Embodiment 1. For specific implementation details, please refer to the relevant description section of Embodiment 1. The term "computer-readable storage medium" should be understood as a single medium or multiple media including one or more instruction sets; it should also be understood as including any medium capable of storing, encoding, or carrying an instruction set for execution by a processor and enabling the processor to perform any of the methods in this invention.

[0087] Those skilled in the art will understand that the modules or steps of the present invention described above can be implemented using general-purpose computer devices. Optionally, they can be implemented using computer-executable program code, thereby allowing them to be stored in a storage device for execution by a computer device, or they can be fabricated as separate integrated circuit modules, or multiple modules or steps can be fabricated as a single integrated circuit module. The present invention is not limited to any particular combination of hardware and software.

[0088] The above description is merely a preferred embodiment of the present invention and is not intended to limit the invention. Various modifications and variations can be made to the present invention by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.

[0089] While the specific embodiments of the present invention have been described above in conjunction with the accompanying drawings, this is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that various modifications or variations that can be made by those skilled in the art without creative effort based on the technical solutions of the present invention are still within the scope of protection of the present invention.

Claims

1. A method for intelligent measurement of curing characteristic parameters of fresh tobacco leaves, characterized in that, include: Images of fresh tobacco leaves during the curing process were acquired, and a dataset of fresh tobacco curing characteristic parameters was constructed. A tobacco leaf segmentation model is constructed, which includes an encoder, a bottleneck layer, and a decoder; residual blocks are introduced and coordinate attention modules are embedded in the encoder and decoder. The intelligent measurement model is trained based on the dataset of fresh tobacco curing characteristic parameters, and the trained intelligent measurement model is obtained after training. Real-time images of fresh tobacco leaves are acquired and input into a trained intelligent measurement model to obtain region segmentation results. The segmentation results of each region are then converted and calculated to obtain the yellowing and browning characteristics parameters of the tobacco leaves during the baking process.

2. The intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in claim 1, characterized in that, The encoder, based on the U-Net architecture, replaces the standard convolutions with ResNet-34 as the backbone.

3. The intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in claim 1, characterized in that, The residual block is a residual block that is associated with the context, including point convolution and context association structures.

4. The intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in claim 3, characterized in that, The residual block of the connection context specifically includes: Dimensionality-reducing point convolution is used to filter and reduce the dimensionality of the input features to obtain the dimensionality-reduced features. Multi-local, multi-fine-grained features are extracted from the dimensionality-reduced features through contextual association structures; Point convolution is used to fuse features from multiple local ranges and fine-grained features to obtain fused features, which are then added to the input features for output.

5. The intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in claim 4, characterized in that, The context-related structure includes multiple parallel group convolutions, batch normalization, and activations.

6. The intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in claim 1, characterized in that, The coordinate attention module specifically includes: Parallel row convolution and column convolution are used to process the input features respectively to obtain horizontal and vertical feature information; The horizontal and vertical feature information are fused, and the fused features are represented probabilistically to obtain the horizontal feature weight coefficients and the vertical feature weight coefficients. The horizontal and vertical feature information are weighted based on the horizontal feature weight coefficient and the vertical feature weight coefficient respectively, and the fused feature is then output.

7. The intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in claim 1, characterized in that, The intelligent measurement model is trained using a hybrid loss method, including weighted cross-entropy loss and Dice loss.

8. An intelligent measurement system for the curing characteristic parameters of fresh tobacco leaves, characterized in that, include: The dataset construction module is configured to: acquire images of fresh tobacco leaves during the baking process and construct a dataset of fresh tobacco baking characteristic parameters; The model building module is configured to: build a tobacco leaf segmentation model, which includes an encoder, a bottleneck layer and a decoder in sequence; the encoder and decoder introduce residual blocks and embed coordinate attention modules. The model training module is configured to train the intelligent measurement model based on the fresh smoke baking characteristic parameter dataset, and obtain the trained intelligent measurement model after the training is completed. The model segmentation module is configured to: acquire images of fresh tobacco leaves in real time, input them into a trained intelligent measurement model, obtain region segmentation results, convert and calculate the segmentation results of each region, and obtain the yellowing and browning baking characteristic parameters of the tobacco leaves.

9. A computer-readable storage medium having a computer program stored thereon, characterized in that, When the program is executed by the processor, it implements the steps in the intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in any one of claims 1-7.

10. A computer device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that, When the processor executes the program, it implements the steps in the intelligent measurement method for the curing characteristic parameters of fresh tobacco leaves as described in any one of claims 1-7.