Method and device for establishing a deep neural network for zero position identification of tobacco stems before re-damping
By establishing a deep neural network method, the zero position of the moisture meter before the tobacco stems rehydrate is identified in real time, which solves the problem of lagging zero position adjustment in the existing technology, realizes online detection of the zero position of the moisture meter, and ensures product quality and production efficiency.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- GANSU TOBACCO IND
- Filing Date
- 2023-07-12
- Publication Date
- 2026-04-21
AI Technical Summary
In the existing technology, the zero-point identification process of the moisture meter before the tobacco stems rehydrate takes more than six hours, which leads to a lag in zero-point adjustment and affects the display of moisture content of the tobacco stems and product quality.
A deep neural network approach is used to establish a database of commonly used zero positions by collecting images of tobacco stems at different zero positions during the production process. Then, using color histograms and machine learning, a deep neural network is constructed to perform real-time zero position recognition, eliminating the lag in zero position adjustment.
This technology enables real-time online detection of the moisture meter's zero point, ensuring product quality, reducing zero-point adjustment lag time, and improving production efficiency.
Smart Images

Figure CN116863302B_ABST
Abstract
Description
Technical Field
[0001] This document relates to the field of zero-point calibration technology in the field of moisture measurement, and in particular to a method and device for establishing a deep neural network for zero-point identification of a moisture meter before tobacco stems rehydrate. Background Technology
[0002] Currently, the zero-point identification of the moisture meter before tobacco stem rehydration is achieved during the production process. Inspectors take online samples, measure the moisture content of the tobacco stems using an oven drying method, and then compare the measured moisture content with the moisture meter reading to determine the zero-point value. From sampling to calculation, the entire process takes more than six hours. This means that when the incoming tobacco stems change, the zero-point adjustment is delayed for a significant period. During this delay, production continues, but the moisture meter zero point is not adjusted, affecting the moisture display at the tobacco stem rehydration inlet, which in turn affects the adjustment of the tobacco stem rehydration moisture content, leading to product quality issues. Summary of the Invention
[0003] The purpose of this invention is to provide a method and apparatus for establishing a deep neural network for identifying the zero point of a moisture meter before tobacco stems rehydrate, thereby solving the aforementioned problems in the prior art.
[0004] This invention provides a deep neural network method for identifying the zero point of a moisture meter before tobacco stems rehydrate, comprising:
[0005] Collect images of tobacco stems at different zero positions during the production process;
[0006] A database of commonly used zero positions is established based on the tobacco stem images at different zero positions.
[0007] A deep neural network was established for zero-point identification of moisture meter before tobacco stem rehydration;
[0008] The data in the commonly used zero-position database is divided into a training set and a test set according to a predetermined ratio by random sampling.
[0009] The deep neural network was trained using a training set, and the accuracy of the deep neural network in identifying the zero point of the moisture meter before the tobacco stems were rehydrated was verified using a test set.
[0010] This invention provides a deep neural network establishment device for zero-point identification of a moisture meter before tobacco stem rehydration, comprising:
[0011] The acquisition module is used to acquire images of tobacco stems at different zero positions during the production process;
[0012] The database module is used to establish a database of commonly used zero positions based on the tobacco stem images at different zero positions;
[0013] A module was built to create a deep neural network for identifying the zero point of a moisture meter before tobacco stems rehydrate.
[0014] The data preparation module is used to divide the data in the commonly used zero-position database into training set and test set according to a predetermined ratio by random sampling.
[0015] The training module is used to train the deep neural network using a training set and to verify the accuracy of the deep neural network in identifying the zero point of the moisture meter before the tobacco stems rehydrate using a test set.
[0016] By incorporating color histograms and deep neural networks from machine learning into the embodiments of this invention, the zero-point adjustment of the moisture meter is transformed from manual sampling and testing to real-time online detection, eliminating the lag in zero-point adjustment and ensuring product quality. Attached Figure Description
[0017] To more clearly illustrate the technical solutions in one or more embodiments of this specification or in the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0018] Figure 1 This is a flowchart of a deep neural network establishment method for zero-point identification of a moisture meter before tobacco stem rehydration, according to an embodiment of the present invention.
[0019] Figure 2 This is a schematic diagram of a neuron in a neural network according to an embodiment of the present invention;
[0020] Figure 3 This is a multilayer neural network diagram according to an embodiment of the present invention;
[0021] Figure 4 This is a detailed flowchart of the deep neural network establishment method for identifying the zero point of a moisture meter before tobacco stem rehydration, according to an embodiment of the present invention.
[0022] Figure 5 This is a schematic diagram of a deep neural network establishment device for identifying the zero point of a moisture meter before tobacco stems rehydrate, according to an embodiment of the present invention. Detailed Implementation
[0023] To enable those skilled in the art to better understand the technical solutions in one or more embodiments of this specification, the technical solutions in one or more embodiments of this specification will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of the embodiments. Based on one or more embodiments of this specification, all other embodiments obtained by those skilled in the art without creative effort should fall within the protection scope of this document.
[0024] Method Implementation Examples
[0025] According to embodiments of the present invention, a method for establishing a deep neural network for identifying the zero point of a moisture meter before tobacco stems rehydrate is provided. Figure 1 This is a schematic diagram of a deep neural network establishment method for zero-point identification of a moisture meter before tobacco stem rehydration, according to an embodiment of the present invention. Figure 1 As shown, the deep neural network establishment method for zero-point identification of a moisture meter before tobacco stem rehydration according to an embodiment of the present invention specifically includes:
[0026] Step S101: Acquire images of tobacco stems at different zero positions during the production process; specifically including:
[0027] Before the tobacco stems rehydrate, video footage of the tobacco stems passing through an electronic scale or images taken with a high-speed camera are captured. The video is then broken down into individual images, and the images taken with the high-speed camera are used directly to obtain images of the tobacco stems at different zero positions.
[0028] Step S102, establishing a database of commonly used zero positions based on the tobacco stem images at different zero positions; specifically including:
[0029] The color format of tobacco stem images at different zero positions was converted from RGB to HSV format, which better highlights color features;
[0030] Convert an HSV format image to a color histogram;
[0031] Convert the three-channel data of the color histogram from 3D with 256 data points in each dimension to 1D with 768 data points and save it.
[0032] By mapping the three zero-value pairs to a single one-dimensional data point, a multi-row labeled data column is created. Save the data as a table and create a database of commonly used zeros.
[0033] Step S103: Establish a deep neural network for zero-point identification of the moisture meter before tobacco stem rehydration; specifically including:
[0034] A deep neural network is established for zero-point identification of tobacco stems before moisture rehydration. The leftmost layer of the deep neural network is the input layer, the rightmost layer is the output layer, and there are multiple hidden layers in the middle. The input layer is one-dimensional data of color histograms in the commonly used zero-point database. The hidden layers are passed and fitted through activation functions and backpropagated according to the gradient descent method. Finally, the data is passed to the output layer for the final output. The output of the output layer is the zero-point value corresponding to the marked image.
[0035] Weights θ are added to the intermediate neurons to build a multi-layer neural network. Starting from the input layer, the calculation proceeds from left to right, layer by layer until the output layer produces the result. If the result value differs from the target value, the calculation proceeds from right to left, layer by layer, calculating the error of each node and adjusting all weights of each node. After returning to the input layer, the calculation is repeated, iterating until all weight parameters converge to a reasonable value. First, parameters are randomly selected, and then the parameters are continuously adjusted to reduce the error until the correct value is approached.
[0036] Step S104 involves dividing the data in the commonly used zero-position database into a training set and a test set according to a predetermined ratio using a random sampling method; specifically including:
[0037] Read the one-dimensional data and table label data from the commonly used zero-position database and merge them into a one-to-one corresponding matrix data. Using a random sampling method, divide the zero-position data of the three commonly used moisture meters in the commonly used zero-position database into two parts in a 3:1 ratio: a training set and a test set. The training set is used for supervised learning of the model, and the test set is used to evaluate the accuracy of the model.
[0038] Step S105: The deep neural network is trained using a training set, and the accuracy of the deep neural network in identifying the zero point of the moisture meter before the tobacco stems rehydrate is verified using a test set.
[0039] After performing the above processing, the method further includes: identifying the zero position of the moisture meter before the tobacco stems rehydrate using the trained deep neural network.
[0040] The technical solutions of the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.
[0041] like Figure 2-4 As shown, this invention provides a method for identifying the zero point of a moisture meter before tobacco stem rehydration based on a deep neural network, comprising the following steps:
[0042] Step 1: During the production process, collect images of tobacco stems at three commonly used zero positions (-7.0, -7.2, -7.3). Before the tobacco stems rehydrate, we take a video of the cross-section of the tobacco stems at a position about 10mm above the electronic scale. Then, we decompose the video into individual images, with more than 2,500 images of each type.
[0043] Step 2: Establish a database of commonly used zero points; the moisture meter mainly detects the moisture value of tobacco stems by analyzing the light reflected from their own light source; different colors absorb different light, so color is a key factor in the detection.
[0044] 2.1 Convert the image color format from RGB to HSV, which better highlights color characteristics;
[0045] 2.2 We only need the color features of the image, so we will convert the HSV format image to a color histogram.
[0046] 2.3. To facilitate calculation, the color histogram is... Figure 3 The data from each channel was converted from 256 data points in each of the three dimensions to 768 data points in one dimension and then saved.
[0047] 2.4. Match the three zero-values and the single one-dimensional data one by one, create a column of multi-row labeled data, and save it as tabular data. The complete database is now established.
[0048] Step 3: Establish a deep neural network for zero-point identification of the moisture meter before tobacco stems rehydrate. The neural network consists of three layers: an input layer, a hidden layer, and an output layer. The input layer is the one-dimensional data of the color histogram in our database. The hidden layer uses activation functions to pass and fit the data, and performs backpropagation using methods such as gradient descent to reduce errors and achieve a better fit. Finally, the data is passed to the output layer for the final output, which is the zero-point value corresponding to the marked image.
[0049] Based on the data type, format, data volume, and the fact that we need to perform three classifications, we select the following parameters:
[0050] The activation function "relu" has one-sided inhibition properties, is simple to calculate, has a fixed gradient, and can suppress gradient vanishing and gradient diffusion to a certain extent: f(z)=max(0,z);
[0051] The weight optimizer "adam" works well for data sets larger than several thousand, so we chose it to optimize the weight values.
[0052] In step three, such as Figure 2 As shown, a neuron in a neural network is represented as follows:
[0053]
[0054] Because the input layer has many parameters, a single-layer network cannot meet the requirements. Therefore, a weight θ is added to each intermediate neuron to create a multi-layer neural network. The leftmost layer is the input layer, the rightmost layer is the output layer, and there are multiple hidden layers in between. Starting from the input layer, calculations are performed from left to right, layer by layer, until the output layer produces a result. If the result value differs from the target value, the calculation is repeated from right to left, layer by layer, calculating the error of each node and adjusting all weights at each node. This process is repeated until all weights converge to a reasonable value. Since computer programs solve equations using different methods than mathematical methods, parameters are typically selected randomly first, and then continuously adjusted to reduce errors until the correct value is approximated. Figure 3 As shown, a multilayer neural network is represented as follows:
[0055]
[0056]
[0057] Step 4: Read the one-dimensional data and tabular label data, and merge them into matrix data. Using random sampling, the data from the zero-point databases of three commonly used moisture meters are divided into two parts: a training set and a test set. The training set is used for supervised learning of the model, and the test set is used to evaluate the accuracy of the model. The training set accounts for three-quarters of the total, and the test set accounts for one-quarter.
[0058] Step 5: Train the deep neural network we have built. Use the training set obtained in Step 4 to input into the deep neural network built in Step 3 to train the model.
[0059] Step Six: Input the test set data obtained in Step Four into the deep neural network obtained in Step Five, and obtain a model accuracy of over 60%. Create and run the moisture meter zero-point recognition system, take images of the tobacco stems entering the rehydrated inlet, and input them into the model for zero-point recognition.
[0060] The specific embodiments described above further illustrate the purpose, technical solution, and beneficial effects of the present invention. It should be understood that the above description is only a specific embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the protection scope of the present invention.
[0061] Device Examples
[0062] According to embodiments of the present invention, a deep neural network establishment device is provided for zero-point identification of a moisture meter before tobacco stem rehydration. Figure 5 This is a schematic diagram of a deep neural network establishment device for zero-point identification of a moisture meter before tobacco stem rehydration, according to an embodiment of the present invention. Figure 5As shown, the deep neural network establishment device for zero-point identification of a moisture meter before tobacco stem rehydration according to an embodiment of the present invention specifically includes:
[0063] The acquisition module 50 is used to acquire images of tobacco stems at different zero positions during the production process; specifically, it is used for:
[0064] Before the tobacco stems rehydrate, video footage of the tobacco stems passing through an electronic scale or images taken with a high-speed camera are captured. The video is then broken down into individual images, and the images taken with the high-speed camera are used directly to obtain images of the tobacco stems at different zero positions.
[0065] Database module 52 is used to establish a database of commonly used zero positions based on the tobacco stem images at different zero positions; specifically, it is used for:
[0066] The color format of tobacco stem images at different zero positions was converted from RGB to HSV format, which better highlights color features;
[0067] Convert an HSV format image to a color histogram;
[0068] Convert the three-channel data of the color histogram from 3D with 256 data points in each dimension to 1D with 768 data points and save it.
[0069] By mapping the three zero-value pairs to a single one-dimensional data point, a multi-row labeled data column is created. Save the data as a table and create a database of commonly used zeros.
[0070] Module 54 is established to create a deep neural network for zero-point identification of the moisture meter before tobacco stem rehydration; specifically, it is used for:
[0071] A deep neural network is established for zero-point identification of tobacco stems before moisture rehydration. The leftmost layer of the deep neural network is the input layer, the rightmost layer is the output layer, and there are multiple hidden layers in the middle. The input layer is one-dimensional data of color histograms in the commonly used zero-point database. The hidden layers are passed and fitted through activation functions and backpropagated according to the gradient descent method. Finally, the data is passed to the output layer for the final output. The output of the output layer is the zero-point value corresponding to the marked image.
[0072] Add weights θ to the intermediate neurons to build a multi-layer neural network. Start from the input layer and calculate from left to right, layer by layer until the output layer produces the result. If the result value is different from the target value, calculate from right to left, layer by layer, and calculate the error of each node. Adjust all weights of each node. After returning to the input layer, calculate forward again. Repeat the above steps until all weight parameters converge to a reasonable value. First, randomly select parameters and then continuously adjust the parameters to reduce the error until it approaches the correct value.
[0073] Data preparation module 56 is used to divide the data in the commonly used zero-position database into a training set and a test set according to a predetermined ratio using a random sampling method; specifically, it is used for:
[0074] Read the one-dimensional data and table label data from the commonly used zero-position database and merge them into a one-to-one corresponding matrix data. Using a random sampling method, divide the zero-position data of the three commonly used moisture meters in the commonly used zero-position database into two parts in a 3:1 ratio: a training set and a test set. The training set is used for supervised learning of the model, and the test set is used to evaluate the accuracy of the model.
[0075] Training module 58 is used to train the deep neural network using a training set and to verify the accuracy of the deep neural network in identifying the zero point of the moisture meter before the tobacco stems rehydrate using a test set.
[0076] The device further includes:
[0077] The identification module is used to identify the zero position of the moisture meter before the tobacco stems rehydrate using the trained deep neural network.
[0078] The embodiments of the present invention are device embodiments corresponding to the above method embodiments. The specific operation of each module can be understood with reference to the description of the method embodiments, and will not be repeated here.
[0079] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some or all of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for establishing a deep neural network for zero-point identification of a moisture meter before tobacco stem rehydration, characterized in that, include: Collect images of tobacco stems at different zero positions during the production process; A database of commonly used zero positions is established based on the tobacco stem images at different zero positions. Specifically, it includes: The color format of tobacco stem images at different zero positions was converted from RGB to HSV format, which better highlights color features; Convert an HSV format image to a color histogram; Convert the three-channel data of the color histogram from 3D with 256 data points in each dimension to 1D with 768 data points and save it. ]; By mapping the three zero positions to a single one-to-one ...column labeled data, a column-multi-row labeled data is established. ], and save it as tabular data to create a database of commonly used zero positions; A deep neural network was established for zero-point identification of moisture meters before tobacco stem rehydration; specifically including: A deep neural network is established for zero-point identification of tobacco stems before moisture rehydration. The leftmost layer of the deep neural network is the input layer, the rightmost layer is the output layer, and there are multiple hidden layers in the middle. The input layer is one-dimensional data of color histograms in the commonly used zero-point database. The hidden layers are passed and fitted through activation functions and backpropagated according to the gradient descent method. Finally, the data is passed to the output layer for the final output. The output of the output layer is the zero-point value corresponding to the marked image. Add weights θ to the intermediate neurons to build a multi-layer neural network. Start from the input layer and calculate from left to right, layer by layer until the output layer produces the result. If the result value is different from the target value, calculate from right to left, layer by layer, and calculate the error of each node. Adjust all weights of each node. After returning to the input layer, calculate forward again. Repeat the above steps until all weight parameters converge to a reasonable value. First, randomly select parameters and then continuously adjust the parameters to reduce the error until it approaches the correct value. The data in the commonly used zero-position database is divided into a training set and a test set according to a predetermined ratio by random sampling. The deep neural network was trained using a training set, and the accuracy of the deep neural network in identifying the zero point of the moisture meter before the tobacco stems were rehydrated was verified using a test set.
2. The method according to claim 1, characterized in that, The method further includes: The trained deep neural network is used to identify the zero point of the moisture meter before the tobacco stems rehydrate.
3. The method according to claim 1, characterized in that, The acquisition of tobacco stem images at different zero positions during the production process specifically includes: Before the tobacco stems rehydrate, video footage of the tobacco stems passing through an electronic scale or images taken with a high-speed camera are captured. The video is then broken down into individual images, and the images taken with the high-speed camera are used directly to obtain images of the tobacco stems at different zero positions.
4. The method according to claim 1, characterized in that, The data in the commonly used zero-position database is divided into training and testing sets according to a predetermined ratio using a random sampling method. Specifically, this includes: Read the one-dimensional data and table label data from the commonly used zero-position database and merge them into a one-to-one corresponding matrix data. Using a random sampling method, divide the zero-position data of the three commonly used moisture meters in the commonly used zero-position database into two parts in a 3:1 ratio: a training set and a test set. The training set is used for supervised learning of the model, and the test set is used to evaluate the accuracy of the model.
5. A deep neural network establishment device for identifying the zero point of a moisture meter before tobacco stem rehydration, characterized in that, include: The acquisition module is used to acquire images of tobacco stems at different zero positions during the production process; The database module is used to establish a database of commonly used zero positions based on the tobacco stem images at different zero positions; the database module is specifically used for: The color format of tobacco stem images at different zero positions was converted from RGB to HSV format, which better highlights color features; Convert an HSV format image to a color histogram; Convert the three-channel data of the color histogram from 3D with 256 data points in each dimension to 1D with 768 data points and save it. ]; By mapping the three zero positions to a single one-to-one ...column labeled data, a column-multi-row labeled data is established. ], and save it as tabular data to create a database of commonly used zero positions; A module is established to create a deep neural network for identifying the zero point of a moisture meter before tobacco stems rehydrate; specifically, this module is used for: A deep neural network is established for zero-point identification of tobacco stems before moisture rehydration. The leftmost layer of the deep neural network is the input layer, the rightmost layer is the output layer, and there are multiple hidden layers in the middle. The input layer is one-dimensional data of color histograms in the commonly used zero-point database. The hidden layers are passed and fitted through activation functions and backpropagated according to the gradient descent method. Finally, the data is passed to the output layer for the final output. The output of the output layer is the zero-point value corresponding to the marked image. Add weights θ to the intermediate neurons to build a multi-layer neural network. Start from the input layer and calculate from left to right, layer by layer until the output layer produces the result. If the result value is different from the target value, calculate from right to left, layer by layer, and calculate the error of each node. Adjust all weights of each node. After returning to the input layer, calculate forward again. Repeat the above steps until all weight parameters converge to a reasonable value. First, randomly select parameters and then continuously adjust the parameters to reduce the error until it approaches the correct value. The data preparation module is used to divide the data in the commonly used zero-position database into training set and test set according to a predetermined ratio by random sampling. The training module is used to train the deep neural network using a training set and to verify the accuracy of the deep neural network in identifying the zero point of the moisture meter before the tobacco stems rehydrate using a test set.
6. The apparatus according to claim 5, characterized in that, The device further includes: The identification module is used to identify the zero position of the moisture meter before the tobacco stems rehydrate using the trained deep neural network.
7. The apparatus according to claim 5, characterized in that, The acquisition module is specifically used for: Before the tobacco stems rehydrate, video footage of the tobacco stems passing through an electronic scale or images taken with a high-speed camera are captured. The video is then broken down into individual images, and the images taken with the high-speed camera are used directly to obtain images of the tobacco stems at different zero positions.
8. The apparatus according to claim 5, characterized in that, The data preparation module is specifically used for: Read the one-dimensional data and table label data from the commonly used zero-position database and merge them into a one-to-one corresponding matrix data. Using a random sampling method, divide the zero-position data of the three commonly used moisture meters in the commonly used zero-position database into two parts in a 3:1 ratio: a training set and a test set. The training set is used for supervised learning of the model, and the test set is used to evaluate the accuracy of the model.
Citation Information
Patent Citations
Implementation method of intelligent cigarette authenticity identification system
CN116308410A
System and method for high speed control and rejection
US20040102864A1