A method, medium and system for determining key points of temperature and humidity in tobacco baking
The multi-scale enhancement layer deep network architecture is used to extract tobacco leaf image features, which solves the problem of low accuracy in identifying temperature and humidity key points during the tobacco leaf baking process, achieves fast and accurate temperature and humidity control in the tobacco leaf baking process, and improves the baking quality.
Patent Information
- Application Number
- CN202410075612.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-01-18
- Publication Date
- 2024-10-11
- Estimated Expiration
- 2044-01-18
AI Technical Summary
During the tobacco leaf curing process, the internal environment of the curing room is complex, resulting in subjectivity and low accuracy in the control of key points of temperature and humidity, which affects the baking quality.
Using a multi-scale enhancement layer deep network architecture, the multi-scale features of the tobacco leaf image are extracted through the feature mapping module, the underlying detail enhancement layer and the advanced semantic enhancement layer, and context feature extraction and feature fusion are performed in the feature fusion module to generate a method for judging tobacco leaves. Multi-scale characteristics of key points of baking temperature and humidity.
It achieves rapid and accurate identification of key points of tobacco leaf baking temperature and humidity, eliminates data scale limitations, improves identification speed and accuracy, and ensures baking quality.
Smart Images

Figure CN117893773B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of tobacco leaf baking, and in particular, relates to a method, a medium and a system for distinguishing key points of temperature and humidity in tobacco leaf baking. Background Art
[0002] The tobacco production process generally needs to go through tobacco leaf planting, tobacco leaf harvesting, tobacco leaf baking and post-baking tobacco leaf processing. Among them, tobacco leaf baking is the key link to ensure the quality of flue-cured tobacco. The quality and yield of post-baked tobacco leaves have a direct impact on the development of the cigarette industry and the improvement of economic benefits. In the process of tobacco leaf baking, it is necessary to adjust the corresponding temperature and humidity key points in time according to the baking status of the tobacco leaves in order to obtain high-quality baked tobacco leaves. Due to the complex internal environment of the baking room, the current method of regulating the key points of tobacco leaf baking temperature and humidity mainly relies on manual judgment based on the naked eye observation of the color changes of tobacco leaves. This method has a strong subjectivity and the quality of identification is uneven, and there is a certain lag, which makes the quality of tobacco leaf baking cannot be guaranteed. Therefore, it is an important problem that needs to be solved urgently in the intelligent baking of tobacco leaves to realize the rapid and accurate intelligent identification of the key points of tobacco leaf baking temperature and humidity, and timely match the corresponding baking process.
[0003] In recent years, neural network technology and deep learning technology have been continuously developed and widely used in many fields. Among them, randomized neural networks such as generalized learning systems have good generalization performance, convergence speed and fast learning efficiency under conditions of small and medium-sized data or simple recognition environments. However, in complex tasks and complex environmental conditions such as tobacco leaf baking, due to the simple structure, the feature expression of the model is often subject to certain limitations, which seriously affects the speed and accuracy of recognition in the baking stage. Summary of the invention
[0004] In view of this, the present invention provides a method, medium and system for distinguishing the key points of temperature and humidity in tobacco leaf baking, which can solve the problems of complex internal environment of the baking room, large amount of baking image data and low accuracy of model judgment, and realize fast and accurate distinction of the key points of temperature and humidity in tobacco leaf baking.
[0005] The present invention is achieved in that:
[0006] A first aspect of the present invention provides a method for determining key points of temperature and humidity in tobacco leaf baking, comprising the following steps:
[0007] S10, obtaining a cured tobacco leaf image;
[0008] S20, using three basic residual modules in the feature mapping module to filter the flue-cured tobacco leaf image to extract initial mapping features;
[0009] S30, using the bottom detail enhancement layer in the enhancement mapping feature module to extract detail features from the flue-cured tobacco leaf image, including color and texture details;
[0010] S40, extracting high-level semantic features from the flue-cured tobacco leaf image using a high-level semantic enhancement layer in an enhancement mapping feature module;
[0011] S50, inputting the initial mapping feature, the detail feature and the semantic feature into a feature fusion module;
[0012] S60, extracting contextual features of high-level semantic features through pooling and convolution;
[0013] S70, performing upsampling, convolution and other operations on the context feature, the detail feature and the enhanced mapping feature to generate a multi-scale feature, and performing feature accumulation and filtering operations on the multi-scale feature to generate a fusion feature;
[0014] S80, inputting the fusion feature into a classifier, and judging the key temperature points of temperature and humidity for tobacco leaf baking according to the output tobacco leaf baking stage.
[0015] On the basis of the above technical solution, a method for distinguishing key points of temperature and humidity for tobacco baking of the present invention can also be improved as follows:
[0016] The specific steps of S10 include:
[0017] Setting an image acquisition device so that it is aimed at the tobacco leaves in the curing room;
[0018] Determine the time interval for image acquisition according to the baking cycle;
[0019] At a predetermined time point, the image acquisition device automatically photographs the tobacco leaves in the curing room to obtain images of the cured tobacco leaves;
[0020] Store the captured images in a storage device for later use.
[0021] The beneficial effect of adopting the above-mentioned improvement scheme is that the image data of tobacco leaves during the baking process is obtained as input for subsequent processing.
[0022] Furthermore, the specific steps of S20 include:
[0023] Inputting the acquired tobacco leaf image data into the first basic residual module of the feature mapping module;
[0024] The first residual module filters the image and outputs the first transition feature;
[0025] The first transition feature is input into the second residual module, filtered, and then output as the second transition feature.
[0026] Finally, the second transition feature is input into the third residual module, and the mapping feature is output after filtering. The beneficial effect of adopting the above improved scheme is: the flue-cured tobacco leaf image is processed using the feature mapping module to extract the initial mapping feature.
[0027] Furthermore, the specific steps of S30 include:
[0028] The bottom detail enhancement layer contains several groups of enhancement blocks, each of which contains several residual modules;
[0029] The mapping feature obtained by S20 is input into the first enhancement block, and after filtering operation of the residual module, the first detail enhancement feature is output;
[0030] The first detail enhancement feature is input into the second enhancement block, and the second detail enhancement feature is output after filtering again;
[0031] Finally, it is input into the third enhancement block and outputs the third detail enhancement feature after filtering.
[0032] The beneficial effect of adopting the above-mentioned improvement scheme is: using the bottom detail enhancement layer to enhance the features of the tobacco leaf image and extract detail features such as color, texture and other information.
[0033] Furthermore, the specific steps of S40 include:
[0034] The high-level semantic enhancement layer contains several groups of enhancement blocks, each of which consists of several residual modules;
[0035] The mapping feature obtained by S20 is input into the first enhancement block, downsampled before the enhancement block, and then filtered by the residual module to output the first semantic feature;
[0036] The first semantic feature is input into the second enhancement block for downsampling and filtering, and the second semantic feature is output;
[0037] The last enhancement block directly filters the second semantic feature and outputs the final semantic feature.
[0038] The beneficial effect of adopting the above-mentioned improved scheme is: using the high-level semantic enhancement layer to enhance the features of the tobacco leaf image and extracting higher-level semantic features.
[0039] Furthermore, the specific steps of S60 include:
[0040] In the feature fusion module, the high-level semantic feature S2 obtained by S40 is selected as input;
[0041] Perform global average pooling on S2;
[0042] Perform convolution operation on the pooled features and output filtered context features;
[0043] The resolution of the context features is then restored to the same size as S2 by upsampling.
[0044] The beneficial effect of adopting the above-mentioned improved scheme is: the initial mapping features, underlying detail features and high-level semantic features extracted in steps S20-S40 are input into the feature fusion module.
[0045] Furthermore, the specific steps of S70 include:
[0046] In the feature fusion module, the context feature obtained in S60, the detail feature D1 in S30, and the semantic feature S2 in S40 are fused;
[0047] The fused features are upsampled and convolved to generate new features. This process is repeated twice to obtain multi-scale features.
[0048] Multi-scale features are accumulated and filtered to obtain fused features.
[0049] The beneficial effect of adopting the above-mentioned improved scheme is: different features are integrated to generate new multi-scale features.
[0050] A second aspect of the present invention provides a computer-readable storage medium, wherein the computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the above-mentioned method for determining key points of temperature and humidity in tobacco leaf baking.
[0051] A third aspect of the present invention provides a tobacco leaf baking temperature and humidity key point identification system, which includes the above-mentioned computer-readable storage medium.
[0052] Compared with the prior art, the method, medium and system for distinguishing key points of temperature and humidity in tobacco baking provided by the present invention have the following beneficial effects:
[0053] 1. Establish a trainable multi-scale enhancement layer deep network architecture. This trainable network focuses on the representation of multi-scale information in different enhancement layers, and enhances the accuracy of the model in identifying key points of temperature and humidity in tobacco baking;
[0054] 2. The multi-scale enhancement layer deep network architecture is set with adjustable weights. We are able to eliminate the limitations brought by the data scale and effectively process large-scale data, thereby achieving high accuracy and inference speed in the discrimination of key points of temperature and humidity in tobacco baking. BRIEF DESCRIPTION OF THE DRAWINGS
[0055] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings required for use in the description of the embodiments of the present invention will be briefly introduced below. Obviously, the accompanying drawings in the following description are only some embodiments of the present invention. For ordinary technicians in this field, other accompanying drawings can be obtained based on these accompanying drawings without paying creative labor.
[0056] Figure 1 A flow chart of a method for determining key points of temperature and humidity in tobacco baking;
[0057] Figure 2 It is a characteristic module algorithm flow chart of a method for distinguishing key points of temperature and humidity in tobacco baking;
[0058] Figure 3 It is a flowchart of an enhanced mapping feature algorithm for a method for distinguishing key points of temperature and humidity in tobacco baking;
[0059] Figure 4 It is a feature fusion module algorithm flow chart of a method for distinguishing key points of temperature and humidity in tobacco baking;
[0060] Figure 5 The present invention is a flow chart of an algorithm module for a method for distinguishing key points of temperature and humidity in tobacco baking. DETAILED DESCRIPTION
[0061] In order to make the purpose, technical solution and advantages of the embodiments of the present invention more clear, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present invention.
[0062] Embodiment 1
[0063] like Figure 1 As shown, the first embodiment of a method for distinguishing key points of temperature and humidity for tobacco leaf baking is provided in the first aspect of the present invention. In this embodiment, the following steps are included:
[0064] S10, obtaining a cured tobacco leaf image;
[0065] S20, using three basic residual modules in the feature mapping module to filter the cured tobacco leaf image and extract initial mapping features;
[0066] S30, using the bottom detail enhancement layer in the enhancement mapping feature module to extract detail features from the flue-cured tobacco leaf image, including color and texture details;
[0067] S40, extracting high-level semantic features from the flue-cured tobacco leaf image using the high-level semantic enhancement layer in the enhancement mapping feature module;
[0068] S50, inputting the initial mapping features, detail features and semantic features into a feature fusion module;
[0069] S60, extracting contextual features of high-level semantic features through pooling and convolution;
[0070] S70, performing upsampling, convolution and other operations on the context features, detail features and enhanced mapping features to generate multi-scale features, and performing feature accumulation and filtering operations on the multi-scale features to generate fusion features;
[0071] S80, inputting the fused features into a classifier, and judging the key temperature points of temperature and humidity for tobacco leaf baking according to the output tobacco leaf baking stage.
[0072] S10 obtains the image of flue-cured tobacco leaves:
[0073] The purpose of this step is to obtain image data of tobacco leaves during the baking process as input for subsequent processing. The specific implementation method is: set an image acquisition device to aim at the tobacco leaves in the baking room; determine the time interval for image acquisition according to the baking cycle, such as acquiring an image every 5 minutes; at a predetermined time point, the image acquisition device automatically shoots the tobacco leaves in the baking room to obtain images of the baked tobacco leaves; store the captured images in a storage device for subsequent use. The collected tobacco leaf images should clearly reflect the color, shape and other characteristics of the tobacco leaves to ensure the accuracy of the subsequent processing results. The image acquisition hardware used in this step can be an ordinary digital camera or an industrial camera, or a computer or embedded device equipped with a camera. In general, the image acquisition method of this step should ensure that image data that can reflect the baking status of the tobacco leaves is obtained.
[0074] S20 uses the feature mapping module to extract initial mapping features:
[0075] The purpose of this step is to use the feature mapping module to process the cured tobacco leaf image and extract the initial mapping features. The specific implementation method is: the feature mapping module includes 3 basic residual modules, and the acquired tobacco leaf image data is input into the first residual module; the first residual module filters the image and outputs the first transition feature; the first transition feature continues to be input into the second residual module, and then filtered to output the second transition feature; finally, the second transition feature is input into the third residual module, and the mapping feature is output after filtering. Each residual module uses a downsampling operation with a step size of 2 to eliminate redundant information and obtain the main local mapping features. The filtering calculation in the residual module is performed according to the residual block structure in the residual network, and the model fitting ability is improved through residual learning. The cascade connection of the three residual modules constitutes a feature mapping module, which can extract the initial mapping features of the tobacco leaf image and provide a basis for subsequent feature enhancement. The residual network structure used in this step can draw on the design ideas of classic network models such as VGGNet and GoogleNet.
[0076] S30 uses the underlying detail enhancement layer to extract detail features:
[0077] The purpose of this step is to use the underlying detail enhancement layer to perform feature enhancement on the tobacco leaf image and extract detail features such as color, texture and other information. The specific implementation method is: the underlying detail enhancement layer contains 3 groups of enhancement blocks, each enhancement block contains several residual modules; the mapping feature obtained in S20 is input into the first enhancement block, and after filtering operation of the residual module, the first detail enhancement feature is output; the first detail enhancement feature is input into the second enhancement block, and the second detail enhancement feature is output after filtering again; finally, it is input into the third enhancement block, and the third detail enhancement feature is output after filtering. Because the resolution of each enhancement block is 1 / 8, a high-resolution feature map can be provided. Repeated use of residual modules for feature enhancement can extract tobacco leaf detail information. The enhancement block structure proposed in this step is similar to the ResNet block structure in ResNet, which can enhance the expressiveness of features.
[0078] S40 uses high-level semantic enhancement layers to extract semantic features:
[0079] The purpose of this step is to use the high-level semantic enhancement layer to enhance the features of the tobacco leaf image and extract higher-level semantic features. The specific implementation method is: the high-level semantic enhancement layer contains 3 groups of enhancement blocks, each of which is also composed of several residual modules; the mapping feature obtained by S20 is input into the first enhancement block, and downsampled before the enhancement block, and then filtered by the residual module to output the first semantic feature; the first semantic feature is further input into the second enhancement block, downsampled and filtered, and the second semantic feature is output; the last enhancement block directly filters the second semantic feature and outputs the final semantic feature. Relative to the original image, the output semantic feature has a resolution of 1 / 32 and contains high-level abstract features. In this step, the downsampling operation can expand the receptive field, improve the ability to extract semantic features, and the residual structure enhances feature expression.
[0080] S50 inputs each feature into the feature fusion module:
[0081] The purpose of this step is to input the initial mapping features, underlying detail features and high-level semantic features extracted by S20-S40Steps into the feature fusion module. The specific implementation method is: the above three types of features are input into the feature fusion module in their respective time order; the feature fusion module needs to have input terminals that match the three types of features, and pass each feature to the corresponding input terminal according to the connection method. This step mainly realizes the integration of features and lays the foundation for subsequent feature fusion processing.
[0082] S60 extracts contextual information of semantic features
[0083] The purpose of this step is to extract context information from semantic features. The specific implementation method is: in the feature fusion module, select the high-level semantic feature S2 obtained by S40 as input; perform global average pooling on S2 to integrate global information, then perform convolution operation, and output filtered context features; then restore the resolution of the context features to the same size as S2 by upsampling. Global pooling can obtain global context information, convolution extracts effective features, and upsampling makes the feature size meet the requirements. This step draws on the design idea of the self-attention mechanism and can learn context dependencies.
[0084] S70 feature fusion generates multi-scale features:
[0085] The purpose of this step is to fuse different features to generate new multi-scale features. The specific implementation method is: in the feature fusion module, the context feature obtained in S60, the detail feature D1 in S30, and the semantic feature S2 in S40 are used as input; D1 is convolved with a step size of 4 to obtain the same spatial size; S2 is dilated to expand the receptive field; the context feature, processed D1 and S2 are fused; the fused feature is upsampled and convolved to generate new features, and the process is repeated twice. In this step, the fusion of multi-scale features adopts a skip connection structure, and features at different levels are fused to generate new feature expressions, which is equivalent to a feature reconstruction technology.
[0086] S80 determines key points based on multi-scale features:
[0087] The purpose of this step is to determine the key points of temperature and humidity in the tobacco leaf baking process based on the multi-scale fusion features generated by S70. The specific implementation method is: input the features obtained in S70 into the softmax classifier to train the classification model; when used online, the collected tobacco leaf images are sequentially input into steps S10-S70 for processing to extract multi-scale features; the features are input into the classification model, and the category to which they belong is output, that is, the current key points of temperature and humidity are determined. The classification model can be constructed using algorithms such as support vector machines and random forests. The entire process realizes the multi-scale feature extraction and representation of tobacco leaf baking images, and realizes intelligent control of the baking process by distinguishing key points based on the features.
[0088] Embodiment 2
[0089] like Figure 1 FIG. 2 is a second embodiment of a method for distinguishing key points of temperature and humidity for tobacco leaf baking provided by the present invention. In this embodiment, the following steps are included:
[0090] S10, obtaining a cured tobacco leaf image;
[0091] The purpose of this step is to obtain image data of tobacco leaves during the baking process as input for subsequent processing. Set up the image acquisition device, whose parameters include:
[0092] P c : Image acquisition device, which can be a common digital camera, an industrial camera or a computing device with a camera;
[0093] Loc: The position coordinates of the image acquisition device, i.e. the position of the tobacco leaves in the flue-curing room;
[0094] t a : The image acquisition time interval is determined according to the baking cycle;
[0095] t j : scheduled image acquisition time point;
[0096] At each t j At the moment, according to the position Loc, use the image acquisition device P c Automatically photograph tobacco leaves in the curing room to obtain the image of the cured tobacco leaves I j . Will I j The data are stored in the storage device in sequence for subsequent use.
[0097] I j =P c (Loc, t j ), j = 1, 2, ..., k;
[0098] Collected tobacco leaf images I j The color, shape and other characteristics of the tobacco leaves should be clearly reflected to ensure the accuracy of the subsequent processing results. The image acquisition hardware used in this step includes but is not limited to ordinary digital cameras, industrial cameras, computers, embedded devices, etc. In general, the image acquisition method of this step should ensure that image data that can reflect the baking status of the tobacco leaves is obtained.
[0099] S20, using three basic residual modules in the feature mapping module to filter the cured tobacco leaf image and extract initial mapping features;
[0100] The purpose of this step is to use the feature mapping module to process the flue-cured tobacco leaf image and extract the initial mapping features. The feature mapping module contains m basic residual modules, where m is usually 3. The input tobacco leaf image data is I j .
[0101] In the first basic residual module, the feature map is extracted through convolution operation
[0102]
[0103] in, and are the first convolution kernel and the first bias parameter respectively, and σ is the activation function, such as ReLU.
[0104] The second basic residual module is As input, feature extraction is performed again:
[0105]
[0106] and They are the second convolution kernel and the second bias parameter respectively;
[0107] Similarly, in the third basic residual module, we can get:
[0108]
[0109] and They are the third convolution kernel and the third bias parameter respectively;
[0110] Will As the final mapping feature output. Each residual module uses a downsampling operation with a step size of 2 to eliminate redundant information and obtain the main local mapping features. The filtering calculation in the residual module is performed according to the residual block structure in the residual network, and the model fitting ability is improved through residual learning. The cascade connection of the three residual modules constitutes a feature mapping module, which can extract the initial mapping features of the tobacco leaf image and provide a basis for subsequent feature enhancement. The residual network structure used in this step can draw on the design ideas of classic network models such as VGGNet and GoogleNet.
[0111] S30, using the bottom detail enhancement layer in the enhancement mapping feature module to extract detail features from the flue-cured tobacco leaf image, including color and texture details;
[0112] The purpose of this step is to use the underlying detail enhancement layer to enhance the features of the tobacco leaf image and extract detail features such as color, texture, etc. The underlying detail enhancement layer contains n groups of enhancement blocks, each of which contains l residual modules. The input is the mapping feature obtained by S20
[0113] In the first enhancement block, the first set of detail features are extracted through the series of residual module layers
[0114]
[0115] in, is the convolution kernel and bias in the i-th residual module, σ i is the activation function, i=1,2,…,l.
[0116] Similarly, in the second enhancement block we can get:
[0117]
[0118] Repeat the process until the last enhancement block outputs detail features Since the resolution of each enhancement block is 1 / 8, it can provide a high-resolution feature map. Repeated use of the residual module for feature enhancement can extract tobacco leaf detail information. The enhancement block structure proposed in this step is similar to the ResNet block structure in ResNet, which can enhance the expressiveness of features.
[0119] S40, extracting high-level semantic features from the flue-cured tobacco leaf image using the high-level semantic enhancement layer in the enhancement mapping feature module;
[0120] The purpose of this step is to use the advanced semantic enhancement layer to enhance the features of the tobacco leaf image and extract higher-level semantic features. The advanced semantic enhancement layer contains n groups of enhancement blocks, each of which is also composed of l residual modules. The input is the mapping feature obtained by S20
[0121] In the first enhancement block, downsampling is performed and the first set of semantic features are extracted through the residual module.
[0122]
[0123] Among them, downsample represents the downsampling operation, and They represent the convolution kernel and bias parameters of the first residual module in the semantic enhancement layer, and They respectively mark the convolution kernel and bias parameters of the second residual module in the semantic enhancement layer.
[0124] In the second enhancement block, For input, continue downsampling and feature extraction:
[0125]
[0126] Repeat this process until the semantic features are finally output Compared with the original image, the output features have a resolution of 1 / 32 and contain high-level abstract features. In this step, the downsampling operation can expand the receptive field, improve the ability to extract semantic features, and the residual structure enhances feature expression.
[0127] S50, inputting the initial mapping features, detail features and semantic features into a feature fusion module;
[0128] The purpose of this step is to extract the initial mapping features from S20-S40 Bottom-level detail features and high-level semantic features Input into the feature fusion module.
[0129] The feature fusion module needs to have input terminals that match the above three types of features, and input each feature in the following way:
[0130]
[0131] Among them, H in represents the detailed features of the output of step S20, D in is the detail feature output from step S30, S in It is the detail feature outputted in step S40.
[0132] This step mainly realizes the integration of features and lays the foundation for subsequent feature fusion processing.
[0133] S60, extracting contextual features of high-level semantic features through pooling and convolution;
[0134] The purpose of this step is to extract context information from the semantic features. In the feature fusion module, the semantic feature S obtained in S40 is selected. in As input; for S in Perform global average pooling to obtain the summary feature S pool :
[0135]
[0136] Among them, h and w are the height and width of the feature map.
[0137] Then to S pool Perform convolution operation and output the filtered context feature S ctx :
[0138] S ctx =σ(S pool *W ctx +b ctx );
[0139] Among them, W ctx and b ctx They are the convolution kernel and bias when obtaining context features respectively.
[0140] Then, S is upsampled ctx The resolution is restored to S inThe same size. Global pooling can obtain global context information, convolution can extract effective features, and upsampling can make the feature size meet the requirements. This step draws on the design idea of the self-attention mechanism and can learn context dependencies.
[0141] S70, performing upsampling, convolution and other operations on the context features, detail features and enhanced mapping features to generate multi-scale features;
[0142] The purpose of this step is to fuse different features to generate new multi-scale features. In the feature fusion module, the context feature S obtained in S60 is ctx , Detail feature D in S30 in , the semantic feature S in S40 in As input; for D in Perform a convolution with a stride of 4 to obtain the same spatial size:
[0143] D fusion =σ(D in *W D );
[0144] D fusion represents the processed detail features, W D represents the convolution kernel;
[0145] For S in Perform dilated convolution to expand the receptive field:
[0146] S fusion =σ(dilated_conv(S in ));
[0147] S fusion Represents the processed semantic features, and dilated_Conv represents the dilated convolution to adjust the semantic features;
[0148] S ctx , D fusion and S fusion To perform the fusion:
[0149] F = concat(S ctx , D fusion , S fusion );
[0150] F represents the feature obtained by fusing different features, and concat represents the fusion feature operation;
[0151] Upsample and convolve F to generate new features F′:
[0152] F′=σ(upsample(F)*W F +b F );
[0153] Among them, upsample represents the downsampling operation.
[0154] Repeat the above process twice to finally obtain multi-scale features. In this step, the fusion of multi-scale features adopts a skip connection structure, and features at different levels are fused to generate new feature expressions, which is equivalent to a feature reconstruction technology.
[0155] S80. Determine the key temperature and humidity points of tobacco leaf baking in real time based on multi-scale features.
[0156] The purpose of this step is to determine the key points of temperature and humidity in the tobacco baking process based on the multi-scale fusion features generated by S70. The features obtained by S70 are input into the softmax classifier to train the classification model:
[0157] y=softmax(W c F′+b c );
[0158] y represents the category output by the classification model.
[0159] Among them, F′ is the multi-scale feature output by S70.
[0160] When used online, the collected tobacco leaf images are sequentially input into steps S10-S70 for processing to extract multi-scale features; the features are input into the classification model, and the category y to which they belong is output, that is, the current temperature and humidity key points are determined. The classification model can be constructed using algorithms such as support vector machines and random forests. The entire process realizes the multi-scale feature extraction and representation of tobacco leaf baking images, and realizes intelligent control of the baking process by distinguishing key points based on the features.
[0161] Embodiment 3
[0162] like Figure 1As shown, it is the third embodiment of a method for distinguishing key points of temperature and humidity for tobacco leaf baking provided by the present invention. In this embodiment, the distinguishing key points of temperature and humidity for tobacco leaf baking includes three processes: the feature mapping module algorithm calculates mapping features; the enhanced mapping feature module algorithm calculates detail and semantic enhancement features; the feature fusion module algorithm fuses mapping features and enhanced features to generate new feature information. First, the image of the baked tobacco leaves is input into the feature mapping module to extract the initial mapping features, and then the mapping features are input into the enhanced feature module to enhance the features from the aspects of detail information and semantic information. The enhancement of detail and semantic features is reflected in the increase of feature diversity and the enhancement of feature representation capability. Finally, the mapping features, detail enhancement features and semantic enhancement features are input into the feature fusion module to fuse multi-scale features to generate new and more representative features to describe the state of the baked tobacco leaves. The key points of the temperature and humidity for tobacco leaf baking are finally judged according to the state of the tobacco leaves baking and corresponding adjustments are made. The flow chart is shown as follows Figure 5 shown.
[0163] The main process of a method for determining key points of temperature and humidity in tobacco baking is as follows:
[0164] 1. Feature mapping module algorithm:
[0165] The feature mapping module is directly connected to the flue-cured tobacco leaf image to extract the initial mapping features. The module consists of three basic residual modules, such as Figure 2 shown.
[0166] For the extraction of mapping features, the first residual module is first used to filter the flue-cured tobacco leaf image to form the first transition feature, and then the remaining two residual modules are used to further enhance the nonlinear relationship to form the second transition feature and mapping feature. In order to remove redundant information and obtain the main local key mapping features, each basic residual module has a downsampling operation with a step size of 2. The mapping feature extraction process of the feature mapping module is defined as follows:
[0167]
[0168] n is set to 3 because the feature mapping module includes three basic residual module operations, and The flue-cured tobacco leaf image data is defined as input.
[0169] 2. Enhanced mapping feature module algorithm:
[0170] After the mapping feature module, the enhanced mapping feature module is used to enhance the mapping features. In order to obtain richer feature information, a multi-level feature enhancement layer is used, including the underlying detail enhancement layer and the high-level semantic enhancement layer, such as Figure 3 shown.
[0171] The bottom-level detail enhancement layer is used to extract the bottom-level detail feature information including color, texture, etc. It consists of three groups of enhancement blocks. The first two enhancement blocks contain two basic residual modules respectively, while the last group contains only one residual module. Since the resolution of these enhancement blocks is 1 / 8, they can provide feature maps with high spatial resolution. The detail feature information can be obtained by the following calculation:
[0172]
[0173] We set k to 5 because the underlying detail enhancement layer includes 5 basic residual module operations, and is defined as the mapping features of the input.
[0174] The high-level semantic enhancement layer is used to extract high-level semantic feature information. It also consists of three groups of enhancement blocks. The first two groups of enhancement blocks contain two basic residual modules respectively. In the front of each enhancement block, the feature map is downsampled by 1 / 2. The last group of enhancement blocks contains only one basic residual module. Compared with the original image, the feature map at this time has a resolution of 1 / 32 and provides more advanced feature information. The semantic feature information can be obtained by the following calculation:
[0175]
[0176] We set l to 5 because the high-level semantic enhancement layer contains 5 groups of basic residual module operations and Defined as the mapping features of the input.
[0177] The mapping features are filtered by the enhanced mapping feature module to generate enhanced detail information and enhanced semantic information. In addition, in order to enhance the reusability of features, the enhanced detail information of the underlying detail enhancement layer contains three feature groups from three groups of detail enhancement blocks, named D1, D2 and D3, which represent different levels of detail feature enhancement; the high-level semantic enhancement layer emphasizes high-level abstract feature information and uses two downsampling operations, so its enhanced semantic information contains two feature groups from two resolutions, named S1 and S2, which represent different levels of semantic feature enhancement.
[0178] 3. Feature fusion module algorithm:
[0179] The feature fusion module is used to fuse multi-level feature information such as mapping features, underlying detail enhancement features, and high-level semantic enhancement features to generate new feature representations, such as Figure 4 shown.
[0180] The feature fusion module mainly consists of four steps. First, in order to extract contextual features, the high-level semantic enhancement feature S2 is filtered by global average pooling and convolution operations. Then, the resolution of the extracted contextual features is restored to the size of S2. Second, the output of the first step, a set of low-level detail enhancement features, and a set of high-level semantic enhancement features are fused. In order to obtain the same spatial resolution, D1 is processed by a convolution operation with a step size of 4. In addition, S2 is processed by a convolution operation, and the convolution expansion rate is set to 4 to expand the receptive field. Then, the fused features are upsampled twice and filtered by a convolution operation. The operations of the last two steps are similar to the second step. For a given multi-scale feature information Fusion DS =[R|D1, D2, D3|S1, S2], the output of the feature fusion module can be expressed as follows:
[0181] Out MF =F ua (Fusion DS );
[0182] The second aspect of the present invention provides a first embodiment of a computer-readable storage medium. In this embodiment, program instructions are stored in the computer-readable storage medium. When the program instructions are executed, they are used to execute the above-mentioned method for determining the key points of temperature and humidity in tobacco leaf baking.
[0183] The third aspect of the present invention provides a first embodiment of a tobacco leaf baking temperature and humidity key point discrimination system. In this embodiment, the computer-readable storage medium mentioned above is included.
[0184] Specifically, the principle of the present invention is: obtaining a cured tobacco leaf image; using three basic residual modules in a feature mapping module to filter the cured tobacco leaf image and extract initial mapping features; using the underlying detail enhancement layer in an enhanced mapping feature module to extract detail features of the cured tobacco leaf image, including color and texture details; using the high-level semantic enhancement layer in an enhanced mapping feature module to extract high-level semantic features of the cured tobacco leaf image; inputting the initial mapping features, the detail features and the semantic features into a feature fusion module; extracting context features of high-level semantic features through pooling and convolution; performing upsampling, convolution and other operations on the context features, the detail features and the enhanced mapping features to generate multi-scale features; and judging the temperature and humidity key points of tobacco leaf baking in real time based on the multi-scale features.
Claims
1. A method for determining key points of temperature and humidity in tobacco leaf baking, characterized in that: The following steps are involved: S10, obtaining a cured tobacco leaf image; S20, using three basic residual modules in the feature mapping module to filter the flue-cured tobacco leaf image to extract initial mapping features; S30, extracting detail features of the flue-cured tobacco leaf image using the bottom detail enhancement layer in the enhancement mapping feature module, including color and texture; S40, extracting high-level semantic features from the flue-cured tobacco leaf image using a high-level semantic enhancement layer in an enhancement mapping feature module; S50, inputting the initial mapping feature, the detail feature and the high-level semantic feature into a feature fusion module; S60, extracting contextual features of high-level semantic features through pooling and convolution; S70, fusing the context feature, the detail feature and the high-level semantic feature, performing upsampling and convolution operations on the fused features to generate new features, repeating this process twice to obtain multi-scale features; performing accumulation and filtering operations on the multi-scale features to obtain fused features; S80, inputting the fusion feature into a classifier, and judging the key temperature points of temperature and humidity for tobacco leaf baking according to the output tobacco leaf baking stage; The specific steps of S20 include: Inputting the acquired tobacco leaf image data into the first basic residual module of the feature mapping module; The first residual module filters the image and outputs the first transition feature; The first transition feature is input into the second residual module, filtered, and then output as the second transition feature. Finally, the second transition feature is input into the third residual module, and the mapping feature is output after filtering as the primary mapping feature; The specific steps of S30 include: The bottom detail enhancement layer contains several groups of enhancement blocks, each of which contains several residual modules; The mapping feature obtained by S20 is input into the first enhancement block, and after filtering operation of the residual module, the first detail enhancement feature is output; The first detail enhancement feature is input into the second enhancement block, and the second detail enhancement feature is output after filtering again; Finally, it is input to the third enhancement block, and after filtering, the third detail enhancement feature is output as the detail feature; The specific steps of S40 include: The high-level semantic enhancement layer contains several groups of enhancement blocks, each of which consists of several residual modules; The mapping feature obtained by S20 is input into the first enhancement block, downsampled before the enhancement block, and then filtered by the residual module to output the first semantic feature; The first semantic feature is input into the second enhancement block for downsampling and filtering, and the second semantic feature is output; The last enhancement block directly filters the second semantic feature and outputs the final semantic feature as a high-level semantic feature.
2. A method for distinguishing key points of tobacco leaf baking temperature and humidity according to claim 1, characterized in that: The specific steps of S10 include: Setting an image acquisition device so that it is aimed at the tobacco leaves in the curing room; Determine the time interval for image acquisition according to the baking cycle; At a predetermined time point, the image acquisition device automatically photographs the tobacco leaves in the curing room to obtain images of the cured tobacco leaves; Store the captured images in a storage device for later use.
3. A method for distinguishing key points of tobacco leaf baking temperature and humidity according to claim 2, characterized in that: The specific steps of S60 include: In the feature fusion module, the high-level semantic feature S2 obtained by S40 is selected as input; Perform global average pooling on S2; Perform convolution operation on the pooled features and output filtered context features; The resolution of the context features is then restored to the same size as S2 by upsampling.
4. A method for distinguishing key points of tobacco leaf baking temperature and humidity according to claim 3, characterized in that: The specific steps of S70 include: In the feature fusion module, the context feature obtained in S60, the detail feature D1 in S30, and the high-level semantic feature S2 in S40 are fused; The fused features are upsampled and convolved to generate new features. This process is repeated twice to obtain multi-scale features. Multi-scale features are accumulated and filtered to obtain fused features.
5. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores program instructions, and when the program instructions are executed, they are used to execute the method for distinguishing key points of temperature and humidity for baking tobacco leaves as described in any one of claims 1 to 4.
6. A tobacco leaf baking temperature and humidity key point identification system, characterized in that: Contains the computer-readable storage medium of claim 5.
