Tobacco epidermal glandular hair measuring method based on neural network
Automatically identifying and counting tobacco epidermal gland hairs through neural network technology, solving the problems of low efficiency and poor accuracy in traditional methods, and achieving efficient and accurate gland hair detection to adapt to the needs of different types and morphologies.
Patent Information
- Application Number
- CN202411372847.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-09-29
- Publication Date
- 2025-01-10
AI Technical Summary
Traditional tobacco epidermal gland hair counting methods are inefficient, poorly accurate, and have many manual interventions, making it difficult to cope with the problems of complex backgrounds and diverse gland hair morphology.
Using neural network-based image processing technology, through training and testing neural network models, we automatically identify and count gland hairs, and realize the full process of automated operations from sample preparation to recognition.
It significantly improves the accuracy of gland hair recognition and counting, reduces artificial errors, simplifies the operation process, improves efficiency, and can adapt to the detection needs of different types and morphologies of gland hairs.
Smart Images

Figure CN119290874A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of image recognition technology, and in particular to a method for measuring tobacco epidermal glandular hairs based on a neural network. Background Art
[0002] Glandular hairs are an important tissue structure on the surface of tobacco leaves, which play a key role in the formation of tobacco leaves' aroma, disease and pest resistance, and anti-oxidation. Most of the substances secreted by glandular hairs are important precursors of flavor substances, which have a significant impact on the quality and quantity of tobacco aroma. In addition, glandular hairs also serve as the first barrier of tobacco's self-defense, and their secretions play an important role in disease resistance, insect resistance, and defense against the external environment. In addition, glandular hair secretions also have a wide range of application value in metabolic engineering, biomedicine, flavors and fragrances, pesticides and additives. Therefore, the study of tobacco epidermal glandular hairs is not only of great significance for tobacco breeding and quality improvement, but also has potential utilization value in many related industries.
[0003] In tobacco research, the number and density of glandular hairs are often directly related to the aroma quality and oil content of tobacco leaves. The density of glandular hairs on the tobacco epidermis varies significantly from variety to variety and from different parts. Studying these differences helps to reveal the intrinsic connection between the distribution of glandular hairs and aroma characteristics, thus providing important data support for tobacco breeding. However, traditional glandular hair counting methods usually rely on experimenters to observe and count manually through a microscope. This method is not only time-consuming, but also greatly affected by human factors, and it is difficult to ensure accuracy and consistency. Especially when dealing with a large number of samples, the manual counting method is inefficient and difficult to meet the needs of modern breeding and quality testing. Summary of the invention
[0004] In view of the shortcomings of the prior art, the present invention provides a method for measuring tobacco epidermal glandular hairs based on a neural network, which solves the problems of low efficiency, poor accuracy, frequent manual intervention, and difficulty in dealing with complex backgrounds and diverse glandular hair morphologies in traditional tobacco epidermal glandular hair counting methods.
[0005] To achieve the above objectives, the present invention is implemented by the following technical scheme: a method for measuring tobacco epidermal glandular hairs based on a neural network, comprising the following steps:
[0006] Tobacco leaf processing steps: Take tobacco leaves grown to 45-50 days and fully expand, and randomly sample them by cutting along the leaf veins;
[0007] Decolorization step: Place the tobacco sample in a potassium hydroxide solution and leave it for a period of time to remove chlorophyll;
[0008] Staining steps: Place the decolorized sample in rhodamine B dye solution and let it stand for a while to stain the glandular hairs;
[0009] Photographing steps: photograph the sample using a stereo microscope to obtain a glandular hair image with a standard field of view size;
[0010] Image processing steps: Use neural networks for image processing, train and test neural network models, and automatically identify and count glandular hairs.
[0011] Preferably, in the tobacco leaf processing step, the sample is a tobacco leaf with a length of 1.3-1.7 cm and a width of 0.9 to 1.1 cm.
[0012] Preferably, in the decolorization step, a 0.9-1.1 mol / L potassium hydroxide solution is used to immerse the tobacco sample for 22-26 hours for decolorization.
[0013] Preferably, in the staining step, a 0.45-0.55 g / L Rhodamine B dye solution is used, and the decolorized sample is placed therein and allowed to stand for 2.5-3.5 hours to allow the glandular hairs to be stained.
[0014] Preferably, in the photographing step, a 4x stereo microscope is used to photograph a standard field of view image with a length of 3.5-4.5 mm and a width of 2.5-3.5 mm.
[0015] Preferably, the image processing step specifically includes the following steps:
[0016] Image preprocessing: convert the captured glandular hair image into a grayscale image, use a filtering algorithm to remove noise in the image, and use a threshold segmentation or adaptive threshold algorithm to segment the image into a glandular hair area and a background area;
[0017] Feature extraction: The edge contour of the glandular hair is extracted through the edge detection algorithm, and the glandular hair area is further processed using image morphological operations to correct noise and fill defective areas;
[0018] Training set and test set division: From the preprocessed images, randomly select a part as the training set and the rest as the test set;
[0019] Neural network construction: Build a three-layer neural network. In each layer, use the ReLU activation function to improve the nonlinear expression ability of the model, and use the back propagation algorithm and gradient descent method to update and optimize the network parameters.
[0020] Model training: Input the training set images into the neural network, use the loss function to calculate the difference between the model output and the true value, adjust the weights and biases of the network through the back propagation algorithm, minimize the loss function, and train the model through multiple iterations until the loss function converges to the minimum value;
[0021] Model testing and evaluation: Use the test set images to verify the trained model and calculate the model's accuracy and recall rate in identifying glandular hairs.
[0022] Automatic identification and counting of glandular hairs: The actual glandular hair image is input into the trained neural network model. The neural network automatically identifies the glandular hairs based on the learned features and outputs the counting results.
[0023] Preferably, the three-layer structure is an input layer, a calculation layer and an output layer.
[0024] Preferably, the neural network is trained using the following formula:
[0025] z i =W i ·x i +b i
[0026] Among them, z i is the neuron output, W i is the weight, x i is the input signal, b i For bias.
[0027] Preferably, the loss function of the neural network is:
[0028]
[0029] Among them, y i is the actual output, is the predicted output, and n is the number of samples.
[0030] The present invention provides a method for measuring tobacco epidermal glandular hairs based on a neural network. It has the following beneficial effects:
[0031] 1. The present invention significantly improves the accuracy of glandular hair recognition and counting by introducing neural network technology. The neural network can automatically extract the key features of glandular hair by training a large amount of image data, thereby reducing the human errors in traditional methods.
[0032] 2. The present invention realizes the full process automation from tobacco leaf sample preparation to glandular hair identification. The image processing method using neural network no longer relies on manual observation and counting, which greatly simplifies the operation process and reduces the workload of experimenters. It automatically takes images through a stereo microscope, combines image processing and automatic counting, and has efficient automation capabilities.
[0033] 3. The present invention adopts the deep learning technology of neural network. The system can continuously optimize its recognition ability as the number and diversity of samples increase. By continuously expanding the training set, the neural network can improve the recognition ability of different types of glandular hairs, thereby further enhancing the generalization performance of the model and adapting to the detection needs of different types and shapes of glandular hairs. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 It is a flow chart of the present invention. DETAILED DESCRIPTION
[0035] The technical solution of the present invention will be described clearly and completely below in conjunction with the accompanying drawings of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0036] Please refer to the attached Figure 1 The embodiment of the present invention provides a method for measuring tobacco epidermal glandular hairs based on a neural network, comprising the following steps:
[0037] Tobacco leaf processing steps: Take tobacco leaves grown to 45-50 days and fully expand, and randomly sample them by cutting along the leaf veins;
[0038] Decolorization step: Place the tobacco sample in a potassium hydroxide solution and leave it for a period of time to remove chlorophyll;
[0039] Staining steps: Place the decolorized sample in rhodamine B dye solution and let it stand for a while to stain the glandular hairs;
[0040] Photographing steps: photograph the sample using a stereo microscope to obtain a glandular hair image with a standard field of view size;
[0041] Image processing steps: Use neural networks for image processing, train and test neural network models, and automatically identify and count glandular hairs.
[0042] In the tobacco leaf processing step, the samples were tobacco leaves 1.3-1.7 cm long and 0.9 to 1.1 cm wide.
[0043] In the decolorization step, the tobacco sample is immersed in a 0.9-1.1 mol / L potassium hydroxide solution for 22-26 hours for decolorization.
[0044] In the staining step, 0.45-0.55 g / L of Rhodamine B dye solution is used, and the decolorized sample is placed therein and allowed to stand for 2.5-3.5 hours to allow the glandular hairs to be stained.
[0045] In the photographing step, a 4x stereo microscope was used to photograph a standard field of view image of 3.5-4.5 mm in length and 2.5-3.5 mm in width.
[0046] The image processing step specifically includes the following steps:
[0047] Image preprocessing: convert the captured glandular hair image into a grayscale image, use a filtering algorithm to remove noise in the image, and use a threshold segmentation or adaptive threshold algorithm to segment the image into a glandular hair area and a background area;
[0048] Feature extraction: The edge contour of the glandular hair is extracted through the edge detection algorithm, and the glandular hair area is further processed using image morphological operations to correct noise and fill defective areas;
[0049] Training set and test set division: From the preprocessed images, randomly select a part as the training set and the rest as the test set;
[0050] Neural network construction: Build a three-layer neural network. In each layer, use the ReLU activation function to improve the nonlinear expression ability of the model, and use the back propagation algorithm and gradient descent method to update and optimize the network parameters.
[0051] Model training: Input the training set images into the neural network, use the loss function to calculate the difference between the model output and the true value, adjust the weights and biases of the network through the back propagation algorithm, minimize the loss function, and train the model through multiple iterations until the loss function converges to the minimum value;
[0052] Model testing and evaluation: Use the test set images to verify the trained model and calculate the model's accuracy and recall rate in identifying glandular hairs.
[0053] Automatic identification and counting of glandular hairs: The actual glandular hair image is input into the trained neural network model. The neural network automatically identifies the glandular hairs based on the learned features and outputs the counting results.
[0054] The three-layer structure is input layer, calculation layer and output layer.
[0055] The neural network is trained using the following formula:
[0056] z i =W i ·x i +b i
[0057] Among them, z i is the neuron output, W i is the weight, x i is the input signal, b i For bias.
[0058] The loss function of the neural network is:
[0059]
[0060] Among them, y i is the actual output, is the predicted output, and n is the number of samples.
[0061] Specifically, the image preprocessing step of the present invention is to perform basic processing on the captured glandular hair image to reduce noise, enhance image features, and facilitate subsequent feature extraction and neural network input. The main steps include:
[0062] Grayscale processing: grayscale the collected color glandular hair images and convert them into grayscale images. The purpose of grayscale processing is to reduce the image dimension and computational complexity while maintaining the main structural features of the glandular hairs. Grayscale images can reduce redundant information and facilitate subsequent feature extraction.
[0063] Filtering denoising: Use filtering algorithms to remove noise from grayscale images. Common filtering algorithms include Gaussian filtering and median filtering. Gaussian filtering smoothes images through convolution operations to reduce noise, but may blur edges; median filtering removes sharp noise by selecting the middle value of local pixels, which can effectively denoise while retaining edge information. This step ensures that the image input to the neural network is clear and has less noise.
[0064] Image segmentation: Use threshold segmentation or adaptive threshold algorithm to separate the glandular hair area and the background area. The threshold segmentation algorithm sets a fixed gray value threshold and defines the part with pixel value higher than the threshold as the glandular hair area, and the part with pixel value lower than the threshold as the background. The adaptive threshold algorithm dynamically adjusts the threshold according to the local brightness information of the image, which is suitable for images with uneven lighting. This step makes the glandular hair features more prominent in the image.
[0065] Feature extraction: After image preprocessing is completed, feature extraction is further performed on the glandular hair image. The purpose of feature extraction is to extract the edge and morphological features of the glandular hair from the image so that the neural network can better learn these features and use them for recognition. The main steps include:
[0066] Edge detection: Use edge detection algorithm (Canny edge detection) to extract the edge contour of glandular hairs. The edge detection algorithm identifies the edge in the image by calculating the gradient change of image pixels. The Canny algorithm is a commonly used edge detection method that can effectively detect the contour in the image while reducing the influence of noise. This step ensures that the boundaries of glandular hairs are clear, which is convenient for subsequent morphological processing and feature learning.
[0067] Morphological processing: Use image morphological operations (erosion and dilation) to further process the glandular hair area. The morphological erosion operation can eliminate noise and small area interference, while the dilation operation can enhance the edge of the glandular hair area and fill the defects in the glandular hair area. These operations make the glandular hair area more complete, which is helpful for the subsequent feature extraction of the neural network.
[0068] Training set and test set division: In order to enable the neural network model to accurately identify glandular hairs, the present invention divides the image data set after preprocessing and feature extraction into a training set and a test set.
[0069] Training set: used to train the neural network model, usually accounting for 80% of the dataset.
[0070] Test set: used to evaluate the recognition performance of the model, usually accounting for 20% of the dataset.
[0071] This division ensures that the neural network can fully learn the various characteristics of glandular hairs during training, while verifying the generalization ability of the model on the test set to avoid model overfitting.
[0072] Neural network construction: The present invention constructs a three-layer neural network model, including an input layer, a hidden layer, and an output layer. The design details of each layer are as follows:
[0073] Input layer: The input layer receives the preprocessed image data and converts it into a form that the neural network can process. The number of neurons in the input layer is related to the number of pixels in the image. The image is usually flattened into a one-dimensional vector and input into the neural network.
[0074] Hidden layer (computation layer): The hidden layer connects the input layer and the output layer through neurons. In each layer, the ReLU activation function is used, and the form of the ReLU function is:
[0075] f(x)=max(0,x)
[0076] The role of the ReLU activation function is to introduce nonlinearity, thereby enhancing the model's ability to learn complex features. Each neuron in the hidden layer receives signals from the input layer or the previous hidden layer and obtains the output through weighted summation.
[0077] Output layer: The output layer is used to output the recognition results. For the glandular hair recognition task, the output layer is usually designed as a binary classification (glandular hair area and non-glandular hair area), and the output activation function is usually a Softmax function, which is used to convert the network output value into a probability distribution.
[0078] Neural network training: In the present invention, the training process of the neural network uses the back propagation algorithm and the gradient descent method. The specific steps are as follows:
[0079] Forward propagation: The input image is passed through the neural network layer by layer, and the prediction result is finally output. The output calculation formula of each neuron is:
[0080] z i =W i ·x i +b i
[0081] Among them, z i is the neuron output, W i is the weight, x i is the input signal, b i For bias.
[0082] Loss function calculation: This paper uses the mean square error loss function to calculate the difference between the model output and the true value. The formula of the loss function is as follows:
[0083]
[0084] Among them, y i is the actual output, is the predicted output, and n is the number of samples.
[0085] Back propagation and weight update: The gradient of the loss function relative to each weight is calculated through the back propagation algorithm, and the weights and biases in the network are updated using the gradient descent method. The weight update formula is as follows:
[0086]
[0087] Where η is the learning rate, is the partial derivative of the loss function with respect to the weight.
[0088] Model iterative training: After multiple iterative trainings, as the loss function gradually converges, the model's prediction accuracy gradually improves, and eventually the model can accurately identify glandular hairs.
[0089] Model testing and evaluation: After the model training is completed, the test set is used to verify the neural network. By inputting the test set images, the model's recognition accuracy, recall rate, precision and other indicators are calculated to evaluate the performance of the model on unseen data sets. The purpose of the evaluation is to ensure the generalization ability of the neural network, that is, the recognition effect on new data can remain stable.
[0090] Automatic identification and counting of glandular hairs: The ultimate goal of the present invention is to realize automatic identification and counting of glandular hairs. The trained neural network model can automatically identify the input new image, automatically identify the glandular hair area according to the learned glandular hair features, and output the glandular hair counting results. Through automatic identification and counting, manual intervention is reduced and the efficiency and accuracy of measurement are improved.
[0091] Embodiment 1:
[0092] Tobacco leaf processing steps:
[0093] Random samples were taken from tobacco plants that were fully expanded at 42 days of growth, and the samples were cut along the veins to obtain samples with a length of 1.4 cm and a width of 0.9 cm.
[0094] Decolorization steps:
[0095] The samples were decolorized by soaking in 0.9 mol / L potassium hydroxide solution for 22 hours.
[0096] Staining steps:
[0097] The decolorized sample was placed in 0.45 g / L Rhodamine B dye solution and allowed to stand for 2.5 hours.
[0098] Shooting steps:
[0099] The images were taken using a stereo microscope with a 4x magnification to obtain a standard field of view size of 3.5 mm long and 2.5 mm wide.
[0100] Image processing steps:
[0101] Image preprocessing: Convert the captured image into a grayscale image, use a filtering algorithm to remove noise, and use a threshold segmentation algorithm to perform image segmentation.
[0102] Feature extraction: The edges of glandular hairs are extracted through edge detection algorithms, and defects are repaired using image morphological operations.
[0103] Neural network training: Construct a three-layer neural network, use the ReLU activation function, and adopt the mean square error loss function.
[0104] Model training and testing: Train the model using training set images and evaluate the model performance on the test set.
[0105] Automatic identification and counting: Use the trained neural network model to automatically identify and count glandular hairs.
[0106] Summarize:
[0107] This embodiment provides a basic glandular hair measurement process, using the most basic neural network and simple image processing algorithm to identify and count glandular hairs.
[0108] Embodiment 2:
[0109] Tobacco leaf processing steps:
[0110] Random samples were taken from tobacco plants that were fully expanded at 43 days of growth, and the samples were cut along the veins to obtain 1.5 cm long and 1 cm wide samples.
[0111] Decolorization steps:
[0112] The samples were decolorized by soaking in 0.95 mol / L potassium hydroxide solution for 23 hours.
[0113] Staining steps:
[0114] The decolorized sample was placed in 0.48 g / L Rhodamine B dye solution and allowed to stand for 2.8 hours.
[0115] Shooting steps:
[0116] The images were taken using a stereo microscope with a 4x magnification to obtain a standard field of view size of 3.8 mm long and 2.8 mm wide.
[0117] Image processing steps:
[0118] The image preprocessing steps were improved, Gaussian filtering was used to remove noise, and an adaptive threshold segmentation algorithm was adopted to improve the accurate segmentation of the glandular hair area.
[0119] Neural network training: Use the Adam optimization algorithm to replace the traditional gradient descent method to improve training efficiency and reduce model training time.
[0120] Summarize:
[0121] This embodiment enhances the training efficiency by introducing the Adam optimization algorithm, improves the image processing algorithm, and increases the recognition accuracy.
[0122] Embodiment three:
[0123] Tobacco leaf processing steps:
[0124] Random samples were taken from tobacco plants that were fully expanded at 44 days of growth, and the samples were cut along the veins to obtain samples with a length of 1.6 cm and a width of 1 cm.
[0125] Decolorization steps:
[0126] The samples were decolorized by soaking in 1 mol / L potassium hydroxide solution for 24 hours.
[0127] Staining steps:
[0128] The decolorized sample was placed in 0.5 g / L Rhodamine B dye solution and allowed to stand for 3 hours.
[0129] Shooting steps:
[0130] The images were taken using a 4x magnification stereomicroscope to obtain a standard field of view size of 4 mm long and 3 mm wide.
[0131] Image processing steps:
[0132] The Canny edge detection algorithm was used to extract the edges of the glandular hairs, and the contours of the glandular hair areas were further enhanced through morphological processing techniques.
[0133] Neural network structure: Introduce convolutional neural network (CNN), add a convolution layer and a pooling layer to improve feature extraction capabilities.
[0134] Summarize:
[0135] This embodiment further improves the accuracy of image processing and feature extraction by introducing a convolutional neural network.
[0136] Embodiment 4:
[0137] Tobacco leaf processing steps:
[0138] Random samples were taken from tobacco plants that were fully expanded at 45 days of growth, and the samples were cut along the veins to obtain samples with a length of 1.7 cm and a width of 1.1 cm.
[0139] Decolorization steps:
[0140] The samples were decolorized by soaking in 1 mol / L potassium hydroxide solution for 24 hours.
[0141] Staining steps:
[0142] The decolorized sample was placed in 0.52 g / L Rhodamine B dye solution and allowed to stand for 3 hours.
[0143] Shooting steps:
[0144] The images were taken using a stereo microscope with a 4x magnification to obtain a standard field of view size of 4.2 mm long and 3.2 mm wide.
[0145] Image processing steps:
[0146] Multi-scale filtering technology is introduced to improve the recognition ability of glandular hairs of different scales.
[0147] Neural network structure: A five-layer convolutional neural network is constructed, and residual blocks are introduced between convolutional layers to enhance the ability of deep feature extraction.
[0148] Summarize:
[0149] By introducing a deeper convolutional neural network and residual network structure, Example 4 shows better results in processing complex glandular hair features.
[0150] Embodiment five:
[0151] Tobacco leaf processing steps:
[0152] Random samples were taken from tobacco plants that were fully expanded at 45 days of growth, and the samples were cut along the veins to obtain samples with a length of 1.5 cm and a width of 1 cm.
[0153] Decolorization steps:
[0154] The samples were decolorized by soaking in 1 mol / L potassium hydroxide solution for 24 hours.
[0155] Staining steps:
[0156] The decolorized sample was placed in 0.5 g / L Rhodamine B dye solution and allowed to stand for 3 hours.
[0157] Shooting steps:
[0158] The images were taken using a 4x magnification stereomicroscope to obtain a standard field of view size of 4 mm long and 3 mm wide.
[0159] Image processing steps:
[0160] A contrast enhancement algorithm was used to further improve the observability of the glandular hairs and the background.
[0161] Neural network structure: A six-layer convolutional neural network is introduced, combined with the attention mechanism, to enhance the model's attention to the key feature areas of glandular hairs.
[0162] Summarize:
[0163] This embodiment achieves the best effect of glandular hair recognition and counting by adopting the optimal value in the document and combining a convolutional neural network with an attention mechanism.
[0164] The five embodiments gradually improve on the basic glandular hair recognition method, especially in the image processing technology, neural network architecture and optimization method. By introducing convolutional neural network, residual network and attention mechanism, each embodiment gradually improves the complexity and accuracy of recognition, and finally achieves the best effect in embodiment 5.
[0165] Comparative experimental design:
[0166] 1. Purpose of the experiment
[0167] The purpose of this experiment is to verify the performance of the tobacco epidermal glandular hair measurement method based on neural network in glandular hair recognition and counting through comparative experiments, focusing on recognition accuracy, counting efficiency, error rate and degree of automation, and compare with existing technical means (such as manual counting, semi-automatic software such as ImageJ, and traditional CNN models).
[0168] 2. Experimental Design
[0169] The experiment was divided into four groups:
[0170] Traditional manual counting group: Experimenters manually observed and counted the glandular hairs through a stereo microscope.
[0171] ImageJ semi-automatic counting group: using the common image analysis software ImageJ, some glandular hair areas need to be manually marked for counting.
[0172] Traditional CNN model group: uses shallow convolutional neural networks for glandular hair recognition, which is a basic image processing technology commonly used in existing research.
[0173] Embodiment group of the present invention: Through five embodiments of the present invention, the performance of neural network models with different depths in glandular hair recognition is verified respectively.
[0174] Each group will process 100 tobacco samples and evaluate performance in the following areas:
[0175] Identification accuracy: the precision of glandular hair identification.
[0176] Counting efficiency: The counting time per sample.
[0177] Error rate: Deviation from the actual number of glandular hairs.
[0178] Degree of automation: Human intervention required.
[0179] 3. Experimental steps
[0180] Sample preparation:
[0181] Take tobacco leaves grown to 45 days old and cut them into 100 samples according to the standard of 1.5 cm long and 1 cm wide.
[0182] All samples were uniformly decolorized (1 mol / L potassium hydroxide solution, 24 hours) and stained (0.5 g / L rhodamine B stain, 3 hours).
[0183] Experimental groups:
[0184] Group 1: Traditional manual counting method: The experimenter used a stereo microscope to manually observe and count the glandular hairs.
[0185] Group 2: ImageJ semi-automatic counting method: The experimenter used ImageJ to perform some manual labeling and counting.
[0186] Group 3: Traditional CNN model: Use a shallow convolutional neural network model to process and recognize glandular hair images.
[0187] Group 4: Embodiments of the present invention:
[0188] Example 1: Three-layer neural network.
[0189] Example 2: Neural network using Adam optimizer.
[0190] Example 3: Convolutional neural network model.
[0191] Example 4: Residual Network.
[0192] Example 5: Six-layer convolutional neural network and attention mechanism.
[0193] Counting process:
[0194] Each group counted the glandular hairs of 100 samples, and recorded the recognition accuracy, counting time and error rate of each group.
[0195] The neural network training and reasoning time of different implementations were recorded to evaluate the generalization ability of the network.
[0196] 4. Experimental results table
[0197]
[0198] 5. Detailed explanation of experimental steps
[0199] Group 1: Traditional manual counting method:
[0200] The experimenters manually counted the glandular hairs using a microscope. Although this method has a certain degree of accuracy, it takes a long time to count, requires a lot of manual intervention, and has a high error rate.
[0201] Group 2: ImageJ semi-automatic counting method:
[0202] ImageJ was used to manually mark and automatically count some glandular hair areas. This method has made some progress in reducing time costs and manual participation, but it still requires manual intervention and has a high error rate.
[0203] Group 3: Traditional convolutional neural network model:
[0204] Although the degree of automation has been improved by using basic shallow convolutional neural networks for glandular hair recognition, the complexity and generalization ability of the network are limited, and the error rate is relatively high.
[0205] Group 4: Embodiments of the present invention:
[0206] Example 1: Using a three-layer neural network, the recognition accuracy is higher than the traditional CNN model, but the counting time is longer.
[0207] Example 2: By using the Adam optimization algorithm, network training is faster, accuracy is improved, and error rate is reduced.
[0208] Example 3: The introduction of convolutional neural network further improves the feature extraction capability of the model and significantly improves the recognition accuracy.
[0209] Example 4: The use of residual network improves the deep feature learning ability of the model, further reduces the error rate, and the recognition accuracy is close to 97%.
[0210] Example 5: Through a six-layer convolutional neural network and attention mechanism, the accuracy and automation of glandular hair recognition are significantly improved, with almost no human intervention required, and the recognition accuracy rate is as high as 98%.
[0211] 6. Experimental Summary
[0212] Recognition accuracy:
[0213] Compared with the prior art, the various embodiments of the present invention have significantly improved recognition accuracy. In particular, the fifth embodiment improves the recognition accuracy to 98% through deep learning and attention mechanism of neural network, while the accuracy of the traditional CNN model is only 90%.
[0214] Counting efficiency:
[0215] The counting time of the traditional manual counting method is 300 seconds per sample, the semi-automatic method of ImageJ is 150 seconds per sample, and the traditional CNN model is 120 seconds per sample. In contrast, the counting time of the fifth embodiment of the present invention is only 60 seconds per sample, which greatly improves the counting efficiency.
[0216] Error rate:
[0217] The error rate of the traditional manual counting method is high, at 20%, the error rate of the ImageJ semi-automatic method is 15%, and the error rate of the traditional CNN model is 10%. However, the embodiments of the present invention gradually reduce the error rate, and the error rate of embodiment 5 is only 2%, showing extremely high accuracy.
[0218] Degree of automation:
[0219] Traditional technology relies on a lot of manual intervention, while the present invention achieves almost complete automation by gradually optimizing the neural network, especially embodiment 5, which significantly reduces manual intervention and improves processing efficiency.
[0220] Experimental conclusion: Through this comparative experiment, it can be clearly seen that the tobacco epidermal glandular hair measurement method based on neural network of the present invention has significant advantages over traditional manual counting, ImageJ semi-automatic method and traditional convolutional neural network N model in terms of recognition accuracy, counting efficiency, error rate and automation degree. In particular, Example 5 achieves the best recognition accuracy and efficiency through the introduction of deep convolutional neural network and attention mechanism.
[0221] Although embodiments of the present invention have been shown and described, it will be appreciated by those skilled in the art that various changes, modifications, substitutions and variations may be made to the embodiments without departing from the principles and spirit of the present invention, and that the scope of the present invention is defined by the appended claims and their equivalents.
Claims
1. A method for measuring tobacco epidermal glandular hairs based on a neural network, characterized in that: The following steps are involved: Tobacco leaf processing steps: Take tobacco leaves grown to 45-50 days and fully expand, and randomly sample them by cutting along the leaf veins; Decolorization step: Place the tobacco sample in a potassium hydroxide solution and leave it for a period of time to remove chlorophyll; Staining steps: Place the decolorized sample in rhodamine B dye solution and let it stand for a while to stain the glandular hairs; Photographing steps: photograph the sample using a stereo microscope to obtain a glandular hair image with a standard field of view size; Image processing steps: Use neural networks for image processing, train and test neural network models, and automatically identify and count glandular hairs.
2. The method for measuring tobacco epidermal glandular hairs based on a neural network according to claim 1, characterized in that: In the tobacco leaf processing step, the sample is a tobacco leaf with a length of 1.3-1.7 cm and a width of 0.9 to 1.1 cm.
3. The method for measuring tobacco epidermal glandular hairs based on a neural network according to claim 1, characterized in that: In the decolorization step, a 0.9-1.1 mol / L potassium hydroxide solution is used to immerse the tobacco sample for 22-26 hours for decolorization.
4. The method for measuring tobacco epidermal glandular hairs based on a neural network according to claim 1, characterized in that: In the staining step, 0.45-0.55 g / L of Rhodamine B dye solution is used, and the decolorized sample is placed therein and allowed to stand for 2.5-3.5 hours to allow the glandular hairs to be stained.
5. The method for measuring tobacco epidermal glandular hairs based on neural network according to claim 1, characterized in that: In the photographing step, a stereo microscope with a 4x lens is used to photograph a standard field of view image with a length of 3.5-4.5 mm and a width of 2.5-3.5 mm.
6. The method for measuring tobacco epidermal glandular hairs based on neural network according to claim 1, characterized in that: The image processing step specifically includes the following steps: Image preprocessing: convert the captured glandular hair image into a grayscale image, use a filtering algorithm to remove noise in the image, and use a threshold segmentation or adaptive threshold algorithm to segment the image into a glandular hair area and a background area; Feature extraction: The edge contour of the glandular hair is extracted through the edge detection algorithm, and the glandular hair area is further processed using image morphological operations to correct noise and fill defective areas; Training set and test set division: From the preprocessed images, randomly select a part as the training set and the rest as the test set; Neural network construction: Build a three-layer neural network. In each layer, use the ReLU activation function to improve the nonlinear expression ability of the model, and use the back propagation algorithm and gradient descent method to update and optimize the network parameters. Model training: Input the training set images into the neural network, use the loss function to calculate the difference between the model output and the true value, adjust the weights and biases of the network through the back propagation algorithm, minimize the loss function, and train the model through multiple iterations until the loss function converges to the minimum value; Model testing and evaluation: Use the test set images to verify the trained model and calculate the model's accuracy and recall rate in identifying glandular hairs. Automatic identification and counting of glandular hairs: The actual glandular hair image is input into the trained neural network model. The neural network automatically identifies the glandular hairs based on the learned features and outputs the counting results.
7. The method for measuring tobacco epidermal glandular hairs based on neural network according to claim 6, characterized in that: The three-layer structure is an input layer, a calculation layer and an output layer.
8. The method for measuring tobacco epidermal glandular hairs based on neural network according to claim 6, characterized in that: The neural network is trained using the following formula: z i =W i ·x i +b i Among them, z i is the neuron output, W i is the weight, x i is the input signal, b i For bias.
9. The method for measuring tobacco epidermal glandular hairs based on neural network according to claim 6, characterized in that: The loss function of the neural network is: Among them, y i is the actual output, is the predicted output, and n is the number of samples.