Intelligent tea identifying and grading method and system based on neural network

By adopting neural network and image preprocessing technology in the tea intelligent recognition system, the problem of uneven lighting and messy background affecting the image quality of tea is solved, and high-precision and consistent tea grading is achieved.

CN119723565APending Publication Date: 2025-03-28JIANGXI XIANGTANSHAN TEA IND CO LTD

Patent Information

Application Number
CN202411815890.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-11
Publication Date
2025-03-28

AI Technical Summary

Technical Problem

The existing tea intelligent recognition system has unstable image quality in the case of uneven lighting and messy background, which affects the recognition effect of neural network models.

Method used

A tea intelligent recognition and grading system based on neural network is adopted, including image acquisition, image preprocessing, feature extraction, neural network classification, result feedback and self-optimization modules. Light correction, noise removal, background removal and image sharpening are performed through adaptive filtering and image enhancement algorithms to improve image quality.

Benefits of technology

It improves the degree of automation and accuracy of tea grading, reduces interference from human bias and subjective factors, and ensures the consistency and reliability of grading results.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119723565A_ABST
    Figure CN119723565A_ABST
Patent Text Reader

Abstract

The invention discloses an intelligent tea identification and grading method and system based on a neural network, and relates to the technical field of intelligent tea identification and grading, in-depth learning and feature extraction are performed on tea images through a neural network classification module and a convolutional neural network, and fine features such as color, shape and size of tea can be identified. And high-precision grading is carried out. Compared with traditional artificial grading, the neural network system eliminates interference of artificial deviation and subjective factors, and ensures consistency and reliability of grading results. Through adaptive filtering and image enhancement algorithms in the image preprocessing module, the system can automatically carry out illumination correction, noise removal, background removal, image sharpening and other processing in the image acquisition stage, and the definition and quality of the image are greatly improved. According to the system, through automatic image acquisition, processing, feature extraction and grading processes, manual intervention and operation can be greatly reduced, and the tea grading efficiency and speed are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of tea intelligent identification and grading, and in particular to a method and system for tea intelligent identification and grading based on a neural network. Background Art

[0002] Tea intelligent identification and grading technology is the application of computer vision in the agriculture and food industry, and belongs to the field of intelligent and precise agriculture. As a beverage widely consumed worldwide, the grading and quality control of tea in its production process are crucial to the consumer experience. However, the grading process of tea often relies on manual experience, which has certain limitations in terms of efficiency, accuracy and consistency. By introducing neural network technology, combined with high-precision image recognition and automatic grading systems, the degree of automation of tea grading can be greatly improved, solving the shortcomings of traditional manual methods.

[0003] In the current tea intelligent recognition system, although many systems have adopted deep learning and neural network models, there are still many challenges in practical applications. In particular, the quality of tea images is easily affected by factors such as lighting conditions, background clutter, and surface defects of tea leaves. These factors lead to unstable quality of image data, which in turn affects the recognition effect of neural network models. Especially in the case of uneven lighting, the image of some areas may be too dark or too bright, resulting in the network being unable to accurately extract key information about the tea.

[0004] The above problems are mainly caused by technical limitations and instability of environmental factors in the image acquisition stage. For example, when taking tea images, the instability of the lighting environment and the resolution limitation of the equipment may cause large fluctuations in image quality, especially the color and shape details of the tea leaves may be severely distorted under uneven lighting conditions. In addition, the surface of the tea leaves often has different defects or irregular shapes, and the cluttered elements in the background will further increase the difficulty of image processing. Summary of the invention

[0005] In view of the deficiencies in the prior art, the present invention provides a method and system for intelligent identification and grading of tea leaves based on a neural network, which solves the problems mentioned in the background technology.

[0006] To achieve the above objectives, the present invention is implemented through the following technical solutions: a tea intelligent identification and grading system based on neural network, including an image acquisition module, an image preprocessing module, a feature extraction module, a neural network classification module, a result feedback and self-optimization module and a data storage and report generation module; The image acquisition module is responsible for acquiring the image of tea leaves and obtaining tea leaf image data I (x, y); The image preprocessing module processes the tea image data I through adaptive filtering and image enhancement algorithms, including illumination correction, noise removal, background removal and image sharpening, to obtain tea image processing data IC (x, y); The feature extraction module extracts features from the tea image processing data through a convolutional neural network, including visual features of the color, shape and size of the tea, to form a feature set F; The neural network classification module learns and classifies the extracted feature set F to obtain a training data set, and classifies tea leaves using the training data set through a neural network to obtain a tea leaf classification result; The result feedback and self-optimization module automatically adjusts the parameters of the neural network and the performance of the model according to the difference between the tea grading results and the manually labeled data; The data storage and report generation module stores the tea grading results, tea image processing data IC (x, y) and processing logs in a database, and generates a grading report for users to view.

[0007] Preferably, the image acquisition module includes an image acquisition unit; The image acquisition unit collects the appearance information of the tea leaves through a high-resolution camera and a multi-camera system to obtain tea leaf image data I (x, y). The tea leaf image data I (x, y) includes the color, shape and texture of the tea leaves; wherein (x, y) represents a pixel point of the image.

[0008] Preferably, the image preprocessing module includes an illumination and noise optimization unit and a background and detail enhancement unit; The illumination and noise optimization unit processes the image by illumination correction and noise removal to obtain an image Ic (x, y) after illumination correction and noise removal, wherein illumination correction includes analyzing the illumination distribution of the image, correcting the brightness difference of the local area, and generating an image with uniform illumination, and noise removal includes using Gaussian filtering to remove random noise in the image; The image Ic (x, y) after illumination correction and noise removal is obtained by the following formula: ; Where Ico(x, y) represents the tea image data after illumination correction. Represents the average brightness of the local area around the pixel (x, y), represents the brightness standard deviation of the local area around the pixel (x, y), and C represents the contrast adjustment coefficient; Use Gaussian filtering to remove noise from the tea image data Ico (x, y) after illumination correction, and obtain the image Ic (x, y) after illumination correction and noise removal; The background and detail enhancement unit processes the image Ic (x, y) after illumination correction and noise removal by background removal and image sharpening to obtain tea image processing data IC (x, y), wherein the background removal includes separating the tea area and the background area by a clustering algorithm, and the image sharpening includes highlighting the edge and detail features of the tea by a Laplace operator; The color segmentation is performed by clustering algorithm, and the image Ic (x, y) after illumination correction and noise removal is processed to separate the tea area from the background area, and the image Icb (x, y) after background removal is obtained; The tea image processing data IC (x, y) is obtained by the following formula: ; In the formula, represents the sharpening factor, Represents the Laplacian operator of the image. Represents the second-order derivative of the image, highlighting the edge of the image.

[0009] Preferably, the feature extraction module includes a convolution layer and a pooling layer unit and a fully connected layer and a feature fusion unit; The convolution layer in the convolution layer and pooling layer unit extracts local features in the tea image processing data IC (x, y) through convolution operation, including edges, textures and colors; the convolution layer extracts different types of features by scanning the input tea image processing data IC (x, y) using multiple filters; The pooling layer reduces the dimension of the edge, texture, and color features extracted by the convolutional layer through the maximum pooling and average pooling methods to reduce the spatial size of the features; The convolutional layer operation formula is: ; In the formula, FMap(x, y) represents the feature map value obtained after the convolution operation, k represents the radius of the convolution kernel, and W(x, y) represents the weight value of the convolution kernel at the (i, j) position; this formula represents the convolution operation, which extracts local features including edges, textures, and colors at different positions in the input image I(x, y) by performing weighted summation with the convolution kernel W(i, j).

[0010] The pooling layer operation formula is: ; Where P(x, y) represents the feature map value after pooling. Represents the pixel value at the corresponding position in the feature map output by the convolutional layer, i and j represent the index of the pooling window size, Represents maximum pooling; through the pooling operation, a maximum value is selected from the feature map obtained by convolution as the output, which can reduce the amount of calculation and retain important features to avoid overfitting.

[0011] The fully connected layer and feature fusion unit includes multiple fully connected layers, which are responsible for converting the feature maps extracted by the convolution layer and the pooling layer into the final feature set F, including the color, shape and size visual features of the tea leaves; Color vision features are obtained by analyzing the distribution of pixel values ​​in each channel of the image; Shape visual features are obtained through edge detection mechanism in convolutional network; The size visual feature is calculated and obtained by analyzing the proportion of tea leaves in the image and the size of their outlines; The calculation formula of the fully connected layer is: ; Where F represents the feature set, ReLU represents the activation function, W represents the weight matrix of the fully connected layer, X represents the flattened feature vector, the output from the convolutional layer and the pooling layer, and b represents the bias term.

[0012] Preferably, the neural network classification module includes a neural network feedforward layer unit and a loss calculation and back propagation unit; The neural network feedforward layer unit is responsible for inputting the extracted feature set F into the neural network for forward propagation, calculating the output of each layer through weighted connections between neurons, and passing it to the output layer layer by layer, and finally obtaining the grading results of tea, including special grade, first grade and second grade; The feedforward propagation formula of the neural network is: ; ; In the formula, represents the weighted sum of the lth layer, specifically the weighted output signal, represents the weight matrix of the lth layer, Represents the output of the l-1th layer, which is passed to the current layer as input. represents the bias term of the lth layer, Tanh represents the activation function, Represents the output of the lth layer; after being processed by the activation function, it serves as the input of the next layer.

[0013] The calculation formula of the output layer is: ; In the formula, It represents the probability that the tea belongs to category u, zu represents the score of the u-th category, which comes from the calculation result of the output layer, U represents the total number of categories, e represents a constant, specifically U=3, corresponding to special grade, first grade and second grade.

[0014] Preferably, the loss calculation and back propagation unit is responsible for calculating the loss value L of the neural network, and adjusting the weight values ​​and bias terms in the network through the back propagation algorithm, and gradually adjusting the classification of the neural network, including loss function calculation and back propagation; The loss function calculates the loss value based on the difference between the output of the neural network and the actual label; Back propagation updates the weights and biases in the network through the gradient information of the loss function; The loss function calculation formula is: ; Where L represents the loss value, which indicates the gap between the prediction and the true label, Yu represents the value of category u in the true label, and U represents the total number of categories; The update formula of the back propagation is: ; In the formula, represents the learning rate, Represents the gradient of the loss function with respect to the weights of the lth layer.

[0015] Preferably, the result feedback and self-optimization module includes an error analysis and feedback unit and a model adjustment and parameter updating unit; The error analysis and feedback unit compares the tea grading result output by the neural network with the actual data, calculates the model error E, and compares it with the preset error threshold TE, obtains the model state comparison result, and transmits it to the model adjustment and parameter update unit to generate the direction of model adjustment; The error E of the model is obtained by the loss value L calculated by the loss function; The error E of the model is obtained by the following formula: ; In the formula, e represents a constant; The model state is obtained by matching: When the model error E < error threshold TE, it means that the model prediction meets the standard; When the model error E ≥ error threshold TE, it means that the model prediction does not meet the standard and the model parameters are adjusted.

[0016] Preferably, the model adjustment and parameter updating unit automatically adjusts the bias term b of the neural network according to the obtained model error E, obtains the adjusted bias term bx, and brings it into the neural network to perform parameter adjustment; The adjusted bias term bx is obtained by the following formula: ; In the formula, represents the learning rate, Represents the gradient of the model's error E with respect to the bias term b.

[0017] Preferably, the data storage and report generation module includes a data storage unit and a report generation unit; The data storage unit is responsible for saving the tea grading results, tea image processing data IC (x, y) and processing logs into a database. The processing logs include data recorded during each tea grading process, including algorithm parameters, processing steps, execution time and error information; The report generating unit generates a report according to the tea grading results stored in the database, and the specific tasks include report template design, report generation and report display; The report template design includes designing and maintaining the template of the hierarchical report; the report generation includes converting the filled data into a report format that can be read by the user, PDF, Excel and HTML formats; the report display includes exporting the generated report as a file for the user to download.

[0018] A method for intelligent identification and grading of tea leaves based on a neural network comprises the following steps: Step 1: The image acquisition module is responsible for acquiring the image of tea leaves and obtaining tea leaf image data I (x, y); Step 2: The image preprocessing module processes the tea image data I through adaptive filtering and image enhancement algorithms, including illumination correction, noise removal, background removal and image sharpening, to obtain tea image processing data IC (x, y); Step 3: The feature extraction module extracts features from the tea image processing data through a convolutional neural network, including visual features of the color, shape and size of the tea leaves, to form a feature set F; Step 4: The neural network classification module learns and classifies the extracted feature set F to obtain a training data set, and classifies tea leaves using the training data set through a neural network to obtain a tea leaf classification result; Step 5: The result feedback and self-optimization module automatically adjusts the parameters of the neural network and the performance of the model according to the difference between the tea grading results and the manually labeled data; Step 6: The data storage and report generation module stores the tea grading results, tea image processing data IC (x, y) and processing logs in a database, and generates a grading report for the user to view.

[0019] The present invention provides a method and system for intelligent identification and grading of tea leaves based on a neural network, which has the following beneficial effects: (1) When the system is running, the neural network classification module and convolutional neural network can perform in-depth learning and feature extraction on tea images, identify subtle features such as color, shape, and size of tea leaves, and perform high-precision grading. Compared with traditional manual grading, the neural network system eliminates the interference of human bias and subjective factors, ensuring the consistency and reliability of grading results. Through the adaptive filtering and image enhancement algorithms in the image preprocessing module, the system can automatically perform illumination correction, noise removal, background removal, and image sharpening during the image acquisition stage, greatly improving the clarity and quality of the image.

[0020] This system can significantly reduce manual intervention and operation through automated image acquisition, processing, feature extraction and grading processes, thus improving the efficiency and speed of tea grading. In the large-scale tea production process, the system can efficiently perform batch processing, improving the adaptability and scalability of automated grading.

[0021] (2) In the image preprocessing stage, the illumination and noise optimization unit effectively solves the common illumination unevenness and noise problems in tea images through illumination correction and Gaussian filtering noise removal. Illumination correction can adjust the brightness difference of local areas by analyzing the illumination distribution of the image, ensuring that the tea image still maintains a uniform brightness distribution under illumination changes, thereby reducing misidentification caused by unfavorable illumination conditions. Noise removal removes random noise in the image through Gaussian filtering, making the image clearer and the details more prominent, reducing the interference of image noise on subsequent feature extraction and classification models. In the background and detail enhancement unit, background removal is performed through clustering algorithm to effectively separate the tea area from the background area, thereby avoiding the influence of background clutter on the grading results. Through the color segmentation clustering algorithm, the system can accurately locate the tea area, so that subsequent feature extraction and grading can focus more on the tea itself.

[0022] (3) The loss calculation and back propagation unit adjusts the weights and biases in the network through the back propagation algorithm according to the difference between the network output and the actual label to optimize the classification performance of the model. The loss function is calculated based on the difference between the neural network output and the actual label, and the back propagation gradually adjusts the network parameters through the gradient information of the loss function. This process helps the model to continuously optimize during the training process, avoid overfitting, and improve the generalization ability of the model, so that it can adapt to the grading of different varieties of tea.

[0023] Through the back-propagation mechanism, the system can continuously adjust the parameters in the neural network and optimize its performance according to the error between each grading result and the actual label. This dynamic optimization process not only ensures the accuracy of the system in the early stage, but also in actual application, with the continuous accumulation and feedback of data, the system can continuously adjust and optimize itself, gradually improve the grading accuracy, and adapt to different tea varieties, shooting conditions and grading standards.

[0024] (4) Through the error analysis and feedback unit, the output results of the neural network are compared with the actual data in real time, the error E of the model is calculated, and it is compared with the preset error threshold TE. Through this feedback mechanism, the system can immediately determine whether the prediction results meet the standards after each classification. If the error E is greater than the threshold TE, the system will trigger further model adjustment. Through the error E calculated by the error analysis and feedback unit, the system can determine whether the prediction of the neural network meets the standards. When the error E is greater than the preset threshold TE, the system will start the model adjustment and parameter update unit, and automatically adjust the bias term b of the neural network according to the feedback information, thereby optimizing the performance of the model. This adaptive optimization mechanism ensures that the model can continuously adapt to new data, avoid overfitting or inefficient training, and improve the stability and accuracy of the system in long-term operation. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] Figure 1 This is a flowchart diagram of a tea intelligent identification and grading system based on a neural network according to the present invention; Figure 2 The present invention is a schematic diagram of the steps of a method for intelligent identification and grading of tea leaves based on a neural network. DETAILED DESCRIPTION

[0026] The technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, rather than all the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.

[0027] Example 1 The present invention provides a tea intelligent identification and grading system based on neural network. Figure 1 , including image acquisition module, image preprocessing module, feature extraction module, neural network classification module, result feedback and self-optimization module and data storage and report generation module; The image acquisition module is responsible for acquiring the image of tea leaves and obtaining tea leaf image data I (x, y); The image preprocessing module processes the tea image data I through adaptive filtering and image enhancement algorithms, including illumination correction, noise removal, background removal and image sharpening, to obtain tea image processing data IC (x, y); The feature extraction module extracts features from the tea image processing data through a convolutional neural network, including visual features of the color, shape and size of the tea, to form a feature set F; The neural network classification module learns and classifies the extracted feature set F to obtain a training data set, and classifies tea leaves using the training data set through a neural network to obtain a tea leaf classification result; The result feedback and self-optimization module automatically adjusts the parameters of the neural network and the performance of the model according to the difference between the tea grading results and the manually labeled data; The data storage and report generation module stores the tea grading results, tea image processing data IC (x, y) and processing logs in a database, and generates a grading report for users to view.

[0028] In this embodiment, the system uses a neural network classification module and a convolutional neural network to conduct in-depth learning and feature extraction of tea images, and can identify subtle features such as color, shape, and size of tea leaves for high-precision grading. Compared with traditional manual grading, the neural network system eliminates the interference of human bias and subjective factors, ensuring the consistency and reliability of grading results. Through the adaptive filtering and image enhancement algorithms in the image preprocessing module, the system can automatically perform processing such as illumination correction, noise removal, background removal, and image sharpening during the image acquisition stage, greatly improving the clarity and quality of the image.

[0029] Through automated image acquisition, processing, feature extraction and grading processes, this system can significantly reduce manual intervention and operation, and improve the efficiency and speed of tea grading. In the large-scale tea production process, the system can efficiently perform batch processing, improving the adaptability and scalability of automated grading. Through the result feedback and self-optimization module, the system can automatically adjust the parameters of the neural network according to the difference between the tea grading results and the manually labeled data, and continuously optimize the performance of the model. This adaptive learning capability enables the system to dynamically adjust according to the actual use environment and data changes, gradually improve the grading accuracy, and adapt to the identification needs of tea of ​​different varieties and qualities.

[0030] Through automatic illumination correction and background removal, the system reduces sensitivity to changes in illumination, environment and background, and can provide stable grading results in changing environments. This solves the environmental dependency problem that may exist in traditional manual grading methods and some automatic grading methods based on traditional algorithms, and improves the system's adaptability in different production environments.

[0031] Example 2 This embodiment is explained in Example 1, please refer to Figure 1 ,Specifically: the image acquisition module includes an image acquisition unit; The image acquisition unit collects the appearance information of the tea leaves through a high-resolution camera and a multi-camera system to obtain tea leaf image data I (x, y). The tea leaf image data I (x, y) includes the color, shape and texture of the tea leaves; wherein (x, y) represents a pixel point of the image.

[0032] The image preprocessing module includes an illumination and noise optimization unit and a background and detail enhancement unit; The illumination and noise optimization unit processes the image by illumination correction and noise removal to obtain an image Ic (x, y) after illumination correction and noise removal, wherein illumination correction includes analyzing the illumination distribution of the image, correcting the brightness difference of the local area, and generating an image with uniform illumination, and noise removal includes using Gaussian filtering to remove random noise in the image; The image Ic (x, y) after illumination correction and noise removal is obtained by the following formula: ; Where Ico(x, y) represents the tea image data after illumination correction. Represents the average brightness of the local area around the pixel (x, y), represents the brightness standard deviation of the local area around the pixel (x, y), and C represents the contrast adjustment coefficient; Use Gaussian filtering to remove noise from the tea image data Ico (x, y) after illumination correction, and obtain the image Ic (x, y) after illumination correction and noise removal; The background and detail enhancement unit processes the image Ic (x, y) after illumination correction and noise removal by background removal and image sharpening to obtain tea image processing data IC (x, y), wherein the background removal includes separating the tea area and the background area by a clustering algorithm, and the image sharpening includes highlighting the edge and detail features of the tea by a Laplace operator; The color segmentation is performed by clustering algorithm, and the image Ic (x, y) after illumination correction and noise removal is processed to separate the tea area from the background area, and the image Icb (x, y) after background removal is obtained; The tea image processing data IC (x, y) is obtained by the following formula: ; In the formula, represents the sharpening factor, Represents the Laplacian of an image.

[0033] In this embodiment, by using a high-resolution camera and a multi-camera system, the system can obtain more detailed and clear tea image data. The image acquisition unit not only includes the color, shape and texture of the tea, but also can capture the detailed information of the tea, thereby providing high-quality input for subsequent image processing and feature extraction. This ensures that the subsequent neural network classification module can obtain more dimensional accurate data when grading tea, thereby improving the accuracy of grading.

[0034] In the image preprocessing stage, the illumination and noise optimization unit effectively solves the common illumination unevenness and noise problems in tea images through illumination correction and Gaussian filtering noise removal. Illumination correction can adjust the brightness difference of local areas by analyzing the illumination distribution of the image, ensuring that the tea image still maintains a uniform brightness distribution under illumination changes, thereby reducing misidentification caused by unsatisfactory illumination conditions. Noise removal removes random noise in the image through Gaussian filtering, making the image clearer and the details more prominent, reducing the interference of image noise on subsequent feature extraction and classification models. In the background and detail enhancement unit, background removal is performed through clustering algorithm, effectively separating the tea area from the background area, thereby avoiding the influence of background clutter on the grading results. Through the clustering algorithm of color segmentation, the system can accurately locate the tea area, so that subsequent feature extraction and grading are more focused on the tea itself. Image sharpening uses the Laplace operator to enhance the edges and details of the image, highlighting the shape and edge features of the tea, further improving the clarity and grading accuracy of the image.

[0035] Through precise background removal and detail enhancement, the system can better identify the detailed features of tea leaves, such as leaf shape and surface texture, etc. This improvement enables the system to not only grade the basic appearance of tea leaves, but also capture more subtle differences, further improving the accuracy of tea grading.

[0036] Example 3 This embodiment is explained in Example 2. Please refer to Figure 1 ,Specifically: the feature extraction module includes a convolution layer and a pooling layer unit and a fully connected layer and a feature fusion unit; The convolution layer in the convolution layer and pooling layer unit extracts local features in the tea image processing data IC (x, y) through convolution operation, including edges, textures and colors; the convolution layer extracts different types of features by scanning the input tea image processing data IC (x, y) using multiple filters; The pooling layer reduces the dimension of the edge, texture and color features extracted by the convolutional layer through the maximum pooling and average pooling methods; The convolutional layer operation formula is: ; Where FMap(x, y) represents the feature map value obtained after the convolution operation, k represents the radius of the convolution kernel, and W(x, y) represents the weight value of the convolution kernel at the (i, j) position; The pooling layer operation formula is: ; Where P(x, y) represents the feature map value after pooling. Represents the pixel value at the corresponding position in the feature map output by the convolutional layer, i and j represent the index of the pooling window size, represents maximum pooling; The fully connected layer and feature fusion unit includes multiple fully connected layers, which are responsible for converting the feature maps extracted by the convolution layer and the pooling layer into the final feature set F, including the color, shape and size visual features of the tea leaves; Color vision features are obtained by analyzing the distribution of pixel values ​​in each channel of the image; Shape visual features are obtained through edge detection mechanism in convolutional network; The size visual feature is calculated and obtained by analyzing the proportion of tea leaves in the image and the size of their outlines; The calculation formula of the fully connected layer is: ; In the formula, F represents the feature set, ReLU represents the activation function, W represents the weight matrix of the fully connected layer, X represents the flattened feature vector, and b represents the bias term.

[0037] The neural network classification module includes a neural network feedforward layer unit and a loss calculation and back propagation unit; The neural network feedforward layer unit is responsible for inputting the extracted feature set F into the neural network for forward propagation, calculating the output of each layer through weighted connections between neurons, and passing it to the output layer layer by layer, and finally obtaining the grading results of tea, including special grade, first grade and second grade; The feedforward propagation formula of the neural network is: ; ; In the formula, represents the weighted sum of the lth layer, represents the weight matrix of the lth layer, represents the output of the l-1th layer, represents the bias term of the lth layer, Tanh represents the activation function, represents the output of the lth layer; The calculation formula of the output layer is: ; In the formula, represents the probability that tea belongs to category u, zu represents the score of the u-th category, U represents the total number of categories, and e represents a constant.

[0038] The loss calculation and back propagation unit is responsible for calculating the loss value L of the neural network, and adjusting the weight value and bias term in the network through the back propagation algorithm, and gradually adjusting the classification of the neural network, including loss function calculation and back propagation; The loss function calculates the loss value based on the difference between the output of the neural network and the actual label; Back propagation updates the weights and biases in the network through the gradient information of the loss function; The loss function calculation formula is: ; Where L represents the loss value, Yu represents the value of category u in the true label, and U represents the total number of categories; The update formula of the back propagation is: ; In the formula, represents the learning rate, Represents the gradient of the loss function with respect to the weights of the lth layer.

[0039] In this embodiment, local features of the tea image, including edges, textures, and colors, are extracted through convolutional layer and pooling layer units, and the key visual features in the image are efficiently identified using convolution operations. These features are crucial for the quality grading of tea and can help the system distinguish different types of tea. The convolutional layer can extract a variety of different types of features by scanning multiple filters, while the pooling layer reduces the dimensionality of these features through maximum pooling and average pooling methods, reducing the amount of calculation while retaining important feature information. This effectively improves the system's ability to recognize the visual features of tea.

[0040] The role of the neural network feedforward layer unit in this embodiment is to input the extracted feature set F into the neural network, perform forward propagation to calculate the output of each layer, pass it to the output layer layer by layer, and finally obtain the grading result of tea. Through layer-by-layer weighted connection, the neural network can accurately map the input features to the grading categories of tea, including special grade, first grade and second grade. The process of feedforward propagation improves the depth and learning ability of the model through the collaboration of multiple layers of neurons, thereby improving the accuracy and stability of grading.

[0041] Example 4 This embodiment is explained in Example 3, please refer to Figure 1 ,Specifically: the result feedback and self-optimization module includes an error analysis and feedback unit and a model adjustment and parameter updating unit; The error analysis and feedback unit compares the tea grading result output by the neural network with the actual data, calculates the model error E, and compares it with the preset error threshold TE, obtains the model state comparison result, and passes it to the model adjustment and parameter update unit to generate the direction of model adjustment; The error E of the model is obtained by the loss value L calculated by the loss function; The error E of the model is obtained by the following formula: ; In the formula, e represents a constant; The model state is obtained by matching: When the model error E < error threshold TE, it means that the model prediction meets the standard; When the model error E ≥ error threshold TE, it means that the model prediction does not meet the standard and the model parameters are adjusted.

[0042] The model adjustment and parameter updating unit automatically adjusts the bias term b of the neural network according to the obtained model error E, obtains the adjusted bias term bx, and brings it into the neural network to perform parameter adjustment; The adjusted bias term bx is obtained by the following formula: ; In the formula, represents the learning rate, Represents the gradient of the model's error E with respect to the bias term b.

[0043] The data storage and report generation module includes a data storage unit and a report generation unit; The data storage unit is responsible for saving the tea grading results, tea image processing data IC (x, y) and processing logs into a database. The processing logs include data recorded during each tea grading process, including algorithm parameters, processing steps, execution time and error information; The report generating unit generates a report according to the tea grading results stored in the database, and the specific tasks include report template design, report generation and report display; The report template design includes designing and maintaining the template of the hierarchical report; the report generation includes converting the filled data into a report format that can be read by the user, PDF, Excel and HTML formats; the report display includes exporting the generated report as a file for the user to download.

[0044] In this embodiment, the output result of the neural network is compared with the actual data in real time through the error analysis and feedback unit, the error E of the model is calculated, and it is compared with the preset error threshold TE. Through this feedback mechanism, the system can immediately determine whether the prediction result meets the standard after each classification. If the error E is greater than the threshold TE, the system will trigger further model adjustment. Through the error E calculated by the error analysis and feedback unit, the system can determine whether the prediction of the neural network meets the standard. When the error E is greater than the preset threshold TE, the system will start the model adjustment and parameter update unit, and automatically adjust the bias term b of the neural network according to the feedback information, thereby optimizing the performance of the model. This adaptive optimization mechanism ensures that the model can continuously adapt to new data, avoid overfitting or inefficient training, and improve the stability and accuracy of the system in long-term operation.

[0045] The self-optimization function of the model enables the system to autonomously identify and adjust the deficiencies of the model without human intervention, gradually improving the grading accuracy. During the tea grading process, the system continuously calculates errors and automatically optimizes to ensure the accuracy of each grading. Especially when facing new varieties or environmental changes, the dynamic adaptability of the model can effectively cope with challenges and ensure long-term stable operation.

[0046] The data storage and report generation module in this embodiment saves the tea grading results, tea image processing data and processing logs in the database, and generates detailed grading reports through the report generation unit. These reports include key data in each grading process, such as algorithm parameters, processing steps, execution time and error messages, to help users understand the process and results of each grading in detail. The report can be exported in PDF, Excel and HTML formats for users to view and download. The logging function provided by the system enables users to track the performance of the model and diagnose potential problems, ensuring the transparency and controllability of the system.

[0047] Example 5 A method for intelligent identification and grading of tea leaves based on neural network, please refer to Figure 2 , specifically: including the following steps: Step 1: The image acquisition module is responsible for acquiring the image of tea leaves and obtaining tea leaf image data I (x, y); Step 2: The image preprocessing module processes the tea image data I through adaptive filtering and image enhancement algorithms, including illumination correction, noise removal, background removal and image sharpening, to obtain tea image processing data IC (x, y); Step 3: The feature extraction module extracts features from the tea image processing data through a convolutional neural network, including visual features of the color, shape and size of the tea leaves, to form a feature set F; Step 4: The neural network classification module learns and classifies the extracted feature set F to obtain a training data set, and classifies tea leaves using the training data set through a neural network to obtain a tea leaf classification result; Step 5: The result feedback and self-optimization module automatically adjusts the parameters of the neural network and the performance of the model according to the difference between the tea grading results and the manually labeled data; Step 6: The data storage and report generation module stores the tea grading results, tea image processing data IC (x, y) and processing logs in a database, and generates a grading report for the user to view.

[0048] In this embodiment, through the image acquisition module, the system uses a high-resolution camera and a multi-camera system to perform comprehensive image acquisition of tea leaves to obtain appearance information such as the color, shape and texture of the tea leaves. The high-quality data acquisition in this link provides a stable foundation for subsequent image processing and feature extraction, and effectively avoids misclassification caused by poor image quality. The image preprocessing module processes the image through adaptive filtering and image enhancement algorithms, including illumination correction, noise removal, background removal and image sharpening. Especially in the problems of uneven illumination, noise interference and background clutter that are common in tea images, the optimization algorithm can improve image quality and reduce unnecessary interference. The effective operation of this module reduces the probability of misclassification and provides clearer and more reliable data for subsequent feature extraction.

[0049] Through the convolutional neural network in the feature extraction module, the system can extract visual features such as the color, shape and size of tea leaves from the processed image data. Convolutional neural networks perform well in extracting local features of images, which provides rich and accurate input features for subsequent classification and grading of the neural network. The design of this module improves grading accuracy and can capture the different quality characteristics of tea leaves in detail.

[0050] The neural network classification module divides tea into special grade, first grade, second grade and other different grades by learning and classifying the feature set F. Based on the advantages of deep learning, the classification ability of neural networks can effectively identify and distinguish different grades of tea, give full play to the advantages of data-driven, and improve the intelligence level of the tea grading system. This module not only has powerful grading capabilities, but also can continuously optimize the grading effect by adapting to various situations such as tea varieties and environmental changes through continuous learning and optimization. By combining automated grading and optimization mechanisms, this method greatly improves the working efficiency of the tea grading system.

[0051] 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 tea intelligent identification and grading system based on neural network, characterized by: It includes image acquisition module, image preprocessing module, feature extraction module, neural network classification module, result feedback and self-optimization module and data storage and report generation module; The image acquisition module is responsible for acquiring the image of tea leaves and obtaining tea leaf image data I (x, y); The image preprocessing module processes the tea image data I through adaptive filtering and image enhancement algorithms, including illumination correction, noise removal, background removal and image sharpening, to obtain tea image processing data IC (x, y); The feature extraction module extracts features from the tea image processing data through a convolutional neural network, including visual features of the color, shape and size of the tea, to form a feature set F; The neural network classification module learns and classifies the extracted feature set F to obtain a training data set, and classifies tea leaves using the training data set through a neural network to obtain a tea leaf classification result; The result feedback and self-optimization module automatically adjusts the parameters of the neural network and the performance of the model according to the difference between the tea grading results and the manually labeled data; The data storage and report generation module stores the tea grading results, tea image processing data IC (x, y) and processing logs in a database, and generates a grading report for users to view.

2. The tea intelligent identification and grading system based on neural network according to claim 1, characterized in that: The image acquisition module includes an image acquisition unit; The image acquisition unit collects the appearance information of the tea leaves through a high-resolution camera and a multi-camera system to obtain tea leaf image data I (x, y). The tea leaf image data I (x, y) includes the color, shape and texture of the tea leaves; wherein (x, y) represents a pixel point of the image.

3. The tea intelligent identification and grading system based on neural network according to claim 1, characterized in that: The image preprocessing module includes an illumination and noise optimization unit and a background and detail enhancement unit; The illumination and noise optimization unit processes the image by illumination correction and noise removal to obtain an image Ic (x, y) after illumination correction and noise removal, wherein illumination correction includes analyzing the illumination distribution of the image, correcting the brightness difference of the local area, and generating an image with uniform illumination, and noise removal includes using Gaussian filtering to remove random noise in the image; The image Ic (x, y) after illumination correction and noise removal is obtained by the following formula: ; Where Ico(x, y) represents the tea image data after illumination correction. Represents the average brightness of the local area around the pixel (x, y), represents the brightness standard deviation of the local area around the pixel (x, y), and C represents the contrast adjustment coefficient; Use Gaussian filtering to remove noise from the tea image data Ico (x, y) after illumination correction, and obtain the image Ic (x, y) after illumination correction and noise removal; The background and detail enhancement unit processes the image Ic (x, y) after illumination correction and noise removal by background removal and image sharpening to obtain tea image processing data IC (x, y), wherein the background removal includes separating the tea area and the background area by a clustering algorithm, and the image sharpening includes highlighting the edge and detail features of the tea by a Laplace operator; The color segmentation is performed by clustering algorithm, and the image Ic (x, y) after illumination correction and noise removal is processed to separate the tea area from the background area, and the image Icb (x, y) after background removal is obtained; The tea image processing data IC (x, y) is obtained by the following formula: ; In the formula, represents the sharpening factor, Represents the Laplacian of an image.

4. The tea intelligent identification and grading system based on neural network according to claim 1, characterized in that: The feature extraction module includes a convolution layer and a pooling layer unit and a fully connected layer and a feature fusion unit; The convolution layer in the convolution layer and pooling layer unit extracts local features in the tea image processing data IC (x, y) through convolution operation, including edges, textures and colors; the convolution layer extracts different types of features by scanning the input tea image processing data IC (x, y) using multiple filters; The pooling layer reduces the dimension of the edge, texture and color features extracted by the convolutional layer through the maximum pooling and average pooling methods; The convolutional layer operation formula is: ; Where FMap(x, y) represents the feature map value obtained after the convolution operation, k represents the radius of the convolution kernel, and W(x, y) represents the weight value of the convolution kernel at the (i, j) position; The pooling layer operation formula is: ; Where P(x, y) represents the feature map value after pooling. Represents the pixel value at the corresponding position in the feature map output by the convolutional layer, i and j represent the index of the pooling window size, represents maximum pooling; The fully connected layer and feature fusion unit includes multiple fully connected layers, which are responsible for converting the feature maps extracted by the convolution layer and the pooling layer into the final feature set F, including the color, shape and size visual features of the tea leaves; Color vision features are obtained by analyzing the distribution of pixel values ​​in each channel of the image; Shape visual features are obtained through edge detection mechanism in convolutional network; The size visual feature is calculated and obtained by analyzing the proportion of tea leaves in the image and the size of their outlines; The calculation formula of the fully connected layer is: ; In the formula, F represents the feature set, ReLU represents the activation function, W represents the weight matrix of the fully connected layer, X represents the flattened feature vector, and b represents the bias term.

5. The tea intelligent identification and grading system based on neural network according to claim 4 is characterized by: The neural network classification module includes a neural network feedforward layer unit and a loss calculation and back propagation unit; The neural network feedforward layer unit is responsible for inputting the extracted feature set F into the neural network for forward propagation, calculating the output of each layer through weighted connections between neurons, and passing it to the output layer layer by layer, and finally obtaining the grading results of tea, including special grade, first grade and second grade; The feedforward propagation formula of the neural network is: ; ; In the formula, represents the weighted sum of the lth layer, represents the weight matrix of the lth layer, represents the output of the l-1th layer, represents the bias term of the lth layer, Tanh represents the activation function, represents the output of the lth layer; The calculation formula of the output layer is: ; In the formula, represents the probability that tea belongs to category u, zu represents the score of the u-th category, U represents the total number of categories, and e represents a constant.

6. The tea intelligent identification and grading system based on neural network according to claim 5 is characterized by: The loss calculation and back propagation unit is responsible for calculating the loss value L of the neural network, and adjusting the weight value and bias term in the network through the back propagation algorithm, and gradually adjusting the classification of the neural network, including loss function calculation and back propagation; The loss function calculates the loss value based on the difference between the output of the neural network and the actual label; Back propagation updates the weights and biases in the network through the gradient information of the loss function; The loss function calculation formula is: ; Where L represents the loss value, Yu represents the value of category u in the true label, and U represents the total number of categories; The update formula of the back propagation is: ; In the formula, represents the learning rate, Represents the gradient of the loss function with respect to the weights of the lth layer.

7. The tea intelligent identification and grading system based on neural network according to claim 6 is characterized by: The result feedback and self-optimization module includes an error analysis and feedback unit and a model adjustment and parameter updating unit; The error analysis and feedback unit compares the tea grading result output by the neural network with the actual data, calculates the model error E, and compares it with the preset error threshold TE, obtains the model state comparison result, and passes it to the model adjustment and parameter update unit to generate the direction of model adjustment; The error E of the model is obtained by the loss value L calculated by the loss function; The error E of the model is obtained by the following formula: ; In the formula, e represents a constant; The model state is obtained by matching: When the model error E < error threshold TE, it means that the model prediction meets the standard; When the model error E ≥ error threshold TE, it means that the model prediction does not meet the standard and the model parameters are adjusted.

8. The tea intelligent identification and grading system based on neural network according to claim 7, characterized in that: The model adjustment and parameter updating unit automatically adjusts the bias term b of the neural network according to the obtained model error E, obtains the adjusted bias term bx, and brings it into the neural network to perform parameter adjustment; The adjusted bias term bx is obtained by the following formula: ; In the formula, represents the learning rate, Represents the gradient of the model's error E with respect to the bias term b.

9. The tea intelligent identification and grading system based on neural network according to claim 1, characterized in that: The data storage and report generation module includes a data storage unit and a report generation unit; The data storage unit is responsible for saving the tea grading results, tea image processing data IC (x, y) and processing logs into a database. The processing logs include data recorded during each tea grading process, including algorithm parameters, processing steps, execution time and error information; The report generating unit generates a report according to the tea grading results stored in the database, and the specific tasks include report template design, report generation and report display; The report template design includes designing and maintaining the template of the hierarchical report; the report generation includes converting the filled data into a report format that can be read by the user, PDF, Excel and HTML formats; the report display includes exporting the generated report as a file for the user to download.

10. A method for intelligent identification and grading of tea leaves based on a neural network, applied to a system for intelligent identification and grading of tea leaves based on a neural network as claimed in any one of claims 1 to 9, characterized in that: The following steps are involved: Step 1: The image acquisition module is responsible for acquiring the image of tea leaves and obtaining tea leaf image data I (x, y); Step 2: The image preprocessing module processes the tea image data I through adaptive filtering and image enhancement algorithms, including illumination correction, noise removal, background removal and image sharpening, to obtain tea image processing data IC (x, y); Step 3: The feature extraction module extracts features from the tea image processing data through a convolutional neural network, including visual features of the color, shape and size of the tea leaves, to form a feature set F; Step 4: The neural network classification module learns and classifies the extracted feature set F to obtain a training data set, and classifies tea leaves using the training data set through a neural network to obtain a tea leaf classification result; Step 5: The result feedback and self-optimization module automatically adjusts the parameters of the neural network and the performance of the model according to the difference between the tea grading results and the manually labeled data; Step 6: The data storage and report generation module stores the tea grading results, tea image processing data IC (x, y) and processing logs in a database, and generates a grading report for the user to view.

Citation Information

Patent Citations

  • Fresh tea recognition and classification method and system based on convolutional neural network

    CN110555487A

  • Tea tender sprout grade identification and classification method based on computer vision

    CN112633212A

  • Tea lesser leafhopper bitten fresh leaf grade classification method and device based on neural network and image recognition

    CN116630810A

  • Tea grade comprehensive evaluation method based on deep learning coupling sensory quality multi-modal fusion sensor

    CN118797413A

Cited By

  • Intelligent crop seed vigor detection method and system

    CN119969003A

  • An intelligent crop seed vitality detection method and system

    CN119969003B

  • Tea quality data safety management monitoring method and system

    CN120181876A

  • Tea quality grading system and method based on image detection

    CN120510460A

  • Tea variety identification method and system based on machine vision

    CN120635597A