Tea variety and quality classification method based on deep learning Teformer

By applying deep learning Teaformer model and visible-near-infrared spectral data in tea quality detection, combined with PCA dimensionality reduction and multi-head attention mechanism, the subjectivity and inefficiency of traditional tea detection methods are solved, and the rapid and accurate evaluation of tea varieties and quality is achieved.

CN119691515APending Publication Date: 2025-03-25XIAMEN UNIV

Patent Information

Application Number
CN202411830868.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-12
Publication Date
2025-03-25

AI Technical Summary

Technical Problem

Traditional tea quality detection methods have subjectivity, inefficiency and complexity, making it difficult to achieve rapid and accurate tea variety and quality assessment.

Method used

The Teaformer model based on deep learning is adopted, combined with visible-near-infrared spectral data and PCA dimensionality reduction technology, and the classification evaluation of tea varieties and quality is performed through multi-head attention mechanism and feedforward neural network.

Benefits of technology

It achieves high accuracy and efficiency in tea varieties and quality classification, with an accuracy rate of 98.30% or above, solving the subjectivity and inefficiency problems in traditional methods.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119691515A_ABST
    Figure CN119691515A_ABST
Patent Text Reader

Abstract

The invention discloses a tea variety and quality classification method based on deep learning Teformer, and relates to the field of spectral analysis and the field of artificial intelligence algorithms. The construction of the classification method is based on a PCA dimension reduction method and a Transform neural network model, and quality evaluation is carried out on the tea leaves through a lossless, rapid and efficient means. By collecting visible-near infrared spectrum data of the tea leaves and performing feature extraction and classification through Teaformer, accurate classification and quality evaluation of the tea leaves are realized. Comprising the following steps: collecting visible-near infrared spectrum data of a certain number of tea samples, and preprocessing the data, including de-noising and standardizing; training the spectral data by using a Teammer model, and learning internal characteristics of the spectral data; unknown samples are predicted and classified through the model, and the quality of the tea leaves is evaluated; and in combination with actual application requirements, model parameters are optimized, so that the accuracy and stability of detection are improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the fields of spectral analysis and artificial intelligence algorithms, and specifically to a tea variety and quality classification method based on deep learning Teaformer, which utilizes visible-near infrared spectral data and a Teaformer deep learning model to quickly and accurately evaluate the variety and quality of tea. Background Art

[0002] Tea is one of the most popular beverages in the world, and its variety and quality directly affect consumers' purchasing decisions. Traditional tea testing methods, such as manual tasting, chemical analysis, and sensory evaluation, have certain limitations. These methods usually rely on manual judgment, are highly subjective, and are complex and time-consuming to operate, making them unsuitable for large-scale testing.

[0003] At present, spectral analysis technology, especially visible-near infrared spectroscopy, has been widely used in tea variety and quality classification. Visible-near infrared spectroscopy can non-destructively obtain sample composition information, but traditional spectral analysis methods often rely on experience and simple statistical analysis, resulting in limited classification accuracy for complex samples. In addition, the high-dimensional characteristics and nonlinear relationships of spectral data also make traditional methods difficult to handle.

[0004] In recent years, with the development of deep learning technology, combining deep learning with spectral data analysis can provide a path to improve classification accuracy and detection efficiency. Models such as deep neural networks (DNN) and convolutional neural networks (CNN) have achieved remarkable results in the field of image and signal processing. However, these methods often require a large amount of training data when processing spectral data and face the problem of high consumption of computing resources.

[0005] The Teaformer model is a deep learning architecture based on PCA and Transformer, which combines the spectral dimension reduction of PCA with the architecture driven by the Transformer self-attention mechanism. Compared with the traditional Transformer model, it can better capture the global dependencies and features in the spectral information while reducing network training parameters, time and improving prediction accuracy. Summary of the invention

[0006] The purpose of the present invention is to provide a tea variety and quality classification method based on deep learning Teaformer to address the problems of subjectivity, inefficiency, complexity and other problems in traditional tea quality detection methods, which can effectively improve the accuracy and efficiency of tea variety and quality classification evaluation and solve the problems of subjectivity, inefficiency and other problems in traditional methods.

[0007] To achieve the above objectives, the present invention provides the following technical solutions.

[0008] The tea variety and quality classification method based on deep learning Teaformer is characterized by comprising the following steps:

[0009] S1. Collect visible-near infrared spectral data of tea samples, where each data sample spectrum contains 701 feature dimensions, which can reflect the chemical composition and physical properties of tea;

[0010] S2, preprocessing the collected spectral data, including denoising, standardization and other steps, to ensure the accuracy of subsequent processing;

[0011] S3. The spectral data is first reduced in dimension through the PCA (principal component analysis) step in the Teaformer model so that it contains only 10 features, the main features of the spectrum are extracted, the network input dimension is reduced, and then the feature extraction is performed through the encoder part. The encoder of the Teaformer model includes multiple stacked encoder layers, each of which includes:

[0012] Ⅰ. Multi-head attention mechanism: by calculating the relationship between the dimensions of the input data, the global attention weight of the tea spectrum data features is calculated;

[0013] II. Feedforward neural network: nonlinear transformation of the output of the attention mechanism to improve the expressiveness of the model;

[0014] S4. Classify or evaluate the quality of tea samples according to the output results of the Teaformer model encoder; the classification results may include the type and grade of tea, etc., and be adjusted according to actual needs.

[0015] The present invention performs tea quality and quality classification detection through the Teaformer model based on visible-near infrared spectroscopy, utilizes PCA dimension reduction processing in Teaformer to process spectral data, and then inputs it into Transformer, so as to accurately distinguish different types of tea or tea of ​​different qualities.

[0016] Optionally, the spectral data can be collected from a spectrometer with different wavelength ranges, such as the visible-near infrared spectrum of tea leaves ranges from 400 to 1100 nm, and the specific wavelength range can be adjusted according to the type of tea leaves or the detection target.

[0017] Optionally, spectral data preprocessing, including denoising, normalization, smoothing and other steps.

[0018] Preferably, in Teaformer, PCA and other techniques are used to reduce the dimension of spectral data to improve the effect of model training.

[0019] Furthermore, before the PCA dimensionality reduction process, in order to further improve the availability of the data, it is possible to consider normalizing the spectral data to eliminate the deviations under different acquisition devices or environmental conditions and enhance the generalization ability of the model.

[0020] Preferably, the number of stacked layers of the Teaformer encoder can be adjusted according to the complexity and scale of the data set, and 2 to 6 layers of encoders are usually stacked; the number of heads of each encoder can be optimized according to the data dimension and computing resources, and is usually between 4 and 8 heads.

[0021] Furthermore, in step S3, the data after PCA dimensionality reduction is input into the encoder. In order to further improve the model's expressive power and ability to process complex spectral data, position encoding technology can be used to supplement the time series or position features in the spectral data so that the model can better understand the sequential information in the data.

[0022] Furthermore, in step S3, the feedforward neural network (FFN) performs nonlinear transformation on the output of the attention mechanism, and each layer in the feedforward network uses the ReLU activation function. The ReLU activation function can output negative values ​​as zero and keep positive values ​​unchanged, thereby introducing nonlinearity and accelerating gradient propagation, improving the training effect of the model.

[0023] The Teaformer model includes PCA dimensionality reduction processing and Transformer model; wherein, the data set of the model is visible-near infrared spectrum, each spectrum contains 701 points, and after PCA dimensionality reduction processing, only 10-dimensional data can be obtained and input into Transformer, thereby greatly reducing network training parameters; the specific structure of Transformer includes:

[0024] Ⅰ. Input layer: receives an input feature vector of size 10, representing the data of each sample;

[0025] II. Encoder layer: Multiple encoders are stacked, each of which includes a multi-head attention mechanism and a neural network that uses the ReLU activation function to perform nonlinear transformation on the output of the self-attention mechanism;

[0026] III. Output layer: Classify or evaluate the quality of tea according to the output of the encoder.

[0027] Optionally, the tea quality classification may adopt multi-class classification, regression analysis or anomaly detection method, and the specific selection may be determined according to the characteristics of the tea sample and the evaluation criteria.

[0028] The present invention first collects visible-near infrared spectral data of a certain number of tea samples and preprocesses the data, including denoising, standardization and other steps; uses the Teaformer model to train the spectral data and learn its internal characteristics; then, predicts and classifies unknown samples through the model to evaluate the quality of tea; finally, optimizes the model parameters in combination with actual application needs to improve the accuracy and stability of detection.

[0029] The classification method of the present invention is constructed based on the PCA (principal component analysis) dimensionality reduction method and the Transformer neural network model, aiming to classify the varieties and qualities of different teas, and solve the problems of low efficiency, high cost, and strong subjectivity of traditional detection methods. The method evaluates the quality of tea by non-destructive, fast and efficient means. By collecting visible-near infrared spectral data of tea, and extracting and classifying features through Teaformer, accurate classification and quality evaluation of tea can be achieved. Experiments show that when the present invention uses the Teaformer model to classify tea varieties, the accuracy rate is as high as 98.30%, showing the excellent performance of the model in complex classification tasks. In the quality classification task, the model even reaches 100% accuracy, proving its powerful ability in identifying subtle differences. The spectral data is reduced in dimension by principal component analysis (PCA), which effectively reduces data redundancy and improves training efficiency. The multi-head attention mechanism and feedforward neural network in the Teaformer model can efficiently process large-scale spectral data and achieve rapid classification. The model adopts strategies such as cross-validation during training to ensure its stability and generalization ability on unknown data. The classification method based on spectral analysis and deep learning model has a faster response speed and can provide accurate classification results in a short time. Combining advanced spectral analysis technology and deep learning algorithm, it realizes the intelligent and automated classification of tea, reducing the cost and error of manual intervention. It performs well in the classification of tea varieties and qualities, with the advantages of high precision, high efficiency, stability and robustness, providing strong guarantee for the intelligent and precise development of the tea industry. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] Figure 1 It is a schematic diagram of the steps of an embodiment of the present invention.

[0031] Figure 2 : is a spectrum diagram of the tea spectrum taken in the embodiment of the present invention. Figure 2 In the figure, a is the spectrum of different varieties of tea, and figure b is the spectrum of tea of ​​different qualities.

[0032] Figure 3 This is the result of the Teaformer model training used in the present invention. Figure 3In the figure, a is the classification accuracy of tea varieties under different numbers of principal components, b is the mean square error of Teaformer under tea variety classification training, c is the classification accuracy of tea quality under different numbers of principal components, and d is the mean square error of Teaformer under tea quality classification training.

[0033] Figure 4 It is a comparison chart of the classification results of Wuyishan tea varieties: Buddha's Hand, Bantian Yao, Cinnamon, Narcissus, and Iron Arhat using the Teaformer model adopted in the present invention and the KNN, SVM, and DT models. DETAILED DESCRIPTION

[0034] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The specific embodiments described herein are only used to explain the relevant invention, rather than to limit the invention. In the absence of conflict, the embodiments of the present invention and the features in the embodiments can be combined with each other.

[0035] In this embodiment, the visible-near infrared spectra of five types of tea leaves and three different qualities of cinnamon tea leaves from Wuyi Mountain are detected, and the Teaformer model is used to classify the varieties and qualities. The five types of tea leaves detected in Wuyi Mountain include: Buddha's Hand, Bantian Yao, Cinnamon, Narcissus, and Tie Luohan, and the three different types of cinnamon include: cinnamon from the roadside, cinnamon from Shuiliandong, and cinnamon from Niulankeng.

[0036] Figure 1 The diagram is a step diagram of an embodiment of the present invention. The visible-near infrared spectra of tea leaves of different types or qualities are detected outdoors, and the Teaformer model is constructed by training the visible-near infrared spectra of 1000 tea leaves. The model is used to distinguish tea leaves of different types or qualities. The method comprises the following steps:

[0037] S1. Collect visible-near infrared spectral data of tea samples, where each data point contains 701 feature dimensions, which can reflect the chemical composition and physical properties of tea. Specifically, a high-precision ground spectrometer is used, which can cover the visible-near infrared spectral region in the range of 400 to 1100nm to ensure that the collected spectral data has sufficient resolution and accuracy. 1,000 tea leaves were collected from Wuyi Mountain as research samples. These samples cover five different tea varieties and three different quality grades. The collected spectral data is divided into training set and validation set in a ratio of 4:1 to ensure that there is enough data for learning and verification during the model training process.

[0038] S2. Preprocess the collected spectral data, including denoising, standardization and other steps, to ensure the accuracy of subsequent processing. Specifically:

[0039] Denoising: Use filtering technology to remove noise from spectral data and improve the signal-to-noise ratio of the data.

[0040] Standardization: Standardize the spectral data to ensure that each wavelength feature has zero mean and unit variance to reduce the dimensional differences between different features.

[0041] Smoothing filter: further smooth the spectral data to reduce data fluctuations caused by instrument errors or environmental factors.

[0042] Normalization: Normalize the spectral data to the same scale for subsequent model processing.

[0043] The spectral data may also include optical parameters such as reflectivity, transmittance or scattering rate of the tea leaves to improve the accuracy and robustness of the classification.

[0044] S3, building the Teaformer model, using the collected tea spectra as a data set to train the Teaformer model;

[0045] 3.1) Building the Teaformer model includes:

[0046] PCA Dimensionality Reduction: Principal Component Analysis (PCA) is used to reduce the dimensionality of spectral data. By calculating the covariance matrix, eigenvalues, and eigenvectors, the first 10 principal components are selected as the input of the Transformer model to reduce the data dimension and improve the efficiency of model training.

[0047] Transformer architecture: The Transformer architecture is used as the core part of the model. The architecture is composed of multiple encoders stacked together, each of which contains components such as multi-head attention mechanism, feedforward neural network, layer normalization and residual connection.

[0048] Multi-head attention mechanism: By calculating the correlation between input features, dynamic weights are assigned to each feature. This mechanism can capture the complex relationship between different wavelengths and extract richer feature information. In this embodiment, the ReLU activation function is used to enhance the nonlinear mapping capability, and the number of heads of each encoder is set to 3.

[0049] Feedforward neural network: Performs nonlinear transformation on the features extracted by the self-attention mechanism. The network consists of two fully connected layers, with the ReLU activation function used in the middle to increase nonlinear capabilities.

[0050] Layer Normalization: Ensure the stability of the model and accelerate the convergence speed during training. By normalizing the input features, each feature has the same scale during training.

[0051] Residual connection: Residual connection is used to optimize the training process and prevent the gradient vanishing problem. By adding the input features directly to the output of each module, the flow of information is maintained and the training effect of deep networks is enhanced.

[0052] 3.2) Model training:

[0053] The Teaformer model is trained using the training set data. During the training process, the performance of the model is optimized by adjusting the model parameters (such as learning rate, batch size, etc.).

[0054] Cross-validation and other strategies are used to evaluate the generalization ability of the model and ensure that the model performs stably and reliably on unknown data.

[0055] S4. Based on the trained Teaformer model, classify the varieties and qualities of different teas and evaluate the results.

[0056] Figure 2 The spectrum of tea leaves obtained by collecting spectrum of tea leaves in the embodiment of the present invention is a spectrum diagram of tea leaves. In this embodiment, a ground object spectrometer is used to collect spectrum of various tea leaves. Figure 2 (a) is the spectrum of different varieties of tea. Figure 2 (b) is a spectrum of tea leaves of different qualities. The spectrum data taken is a visible-near infrared spectrum of 400-1100 nm. The obtained spectrum will be pre-processed, and in this embodiment, it is smoothed and filtered, and then normalized.

[0057] The Teaformer model adopted by the present invention includes PCA dimensionality reduction and Transformer architecture. The specific steps of PCA dimensionality reduction are as follows: since different wavelengths of spectral data have different scales and magnitudes, all spectral data must be standardized to ensure that each wavelength feature has zero mean and unit variance; calculate the covariance matrix to describe the relationship between different wavelength features; calculate the eigenvalues ​​and eigenvectors of the covariance matrix, the eigenvalues ​​represent the variance of each principal component, and the eigenvectors represent the direction of each principal component; select the principal components with the largest eigenvalues ​​of the first N to achieve data dimensionality reduction. In this embodiment, 10 principal components are selected as the input data of the Transformer model. The core of the Teaformer model is a stacked structure composed of multiple encoders, and a stacked structure of 3 encoders is used in this embodiment. Each encoder layer includes 4 main components: multi-head attention mechanism, feedforward neural network, layer normalization, and residual connection.

[0058] Multi-head attention mechanism: The function of this mechanism is to enable the model to dynamically weight and sum each feature in the input data according to the relationship between the remaining features. For tea spectral data, each input feature (such as PC1, PC2, ...) represents different wavelength information, and the multi-head attention mechanism can help the model learn the complex relationship between different wavelengths, thereby extracting richer feature information. In this embodiment, the ReLU activation function is used, which can enhance the nonlinear mapping, so that the network has stronger expression ability when processing spectral data, and the number of heads of each encoder is 3. The attention mechanism contained therein is to assign a dynamic weight to each feature by calculating the correlation between each input feature vector (for example, the transmittance value of each spectral point) and other features, thereby capturing the correlation between different features in the input data. The output expression of the attention mechanism module is:

[0059]

[0060] Among them, Q, K, and V are three learnable matrices obtained by linear transformation of the input sequence, d k Represents a scaling factor. The attention calculation process can be implemented through the following steps: Ⅰ. Calculate Q, K and v values; Ⅱ. Calculate attention weights; Ⅲ. Weighted summation.

[0061] Feedforward Neural Network: The feedforward neural network consists of two fully connected layers, which are used to perform nonlinear transformations on the features extracted by the self-attention mechanism. Between each fully connected layer, the ReLU activation function is used to increase the nonlinear ability of the network. The input of the feedforward neural network is the output of the self-attention module. After being mapped by two layers of fully connected networks, the final output features are fed into the next layer of encoder. In the feedforward neural network, the first fully connected layer maps the input features from a low-dimensional space to a high-dimensional space, increasing the representation capacity of the model. After applying the ReLU activation function, it is input to the second fully connected layer, which maps the features back to the original dimension.

[0062] Layer normalization: The role of layer normalization is to ensure the stability of the model during training and accelerate the convergence speed. Its calculation formula is as follows:

[0063]

[0064] in, is the input feature vector, is the mean of the feature, is the standard deviation of the feature. Through this normalization operation, the input features of the model are scaled and offset so that each feature has the same scale during training, thereby improving training stability.

[0065] Residual connection: In order to further optimize the training process and prevent the gradient vanishing problem, the Teaformer model uses residual connection. The core idea of ​​residual connection is to add the input features directly to the output of each module, so that information can flow directly through multiple layers of the network. This connection method allows the model to maintain the flow of information during training and enhance the training effect of deep networks. Its formula is: , that is, the input of each module is directly added to the output of the module. In this way, the model not only relies on the output of each layer, but also retains the information of the original input, avoiding information loss in the deep network.

[0066] The training of the Teaformer model divides the dataset into a training set and a validation set with a ratio of 4:1. The classification task uses accuracy and mean square error as evaluation indicators.

[0067] Figure 3 This is the result of the tea variety and quality classification by the Teaformer used in the present invention. As the number of principal component features increases, the classification effect shows an upward trend. Figure 3 (a) shows the classification accuracy of the five tea varieties as the principal components increase, with the highest accuracy being 98.30%. Figure 3 (b) is the corresponding mean square error, which is 0.0544 after convergence. Figure 3 (c) in the middle shows the classification accuracy of the three types of tea quality as the principal components increase, with the highest accuracy being 100%. Figure 3 (c) is the corresponding mean square error. After convergence, the mean square error is 4.19×10 -4 .

[0068] Figure 4 This is a comparison chart of the classification results of Wuyishan tea varieties: Buddha's Hand, Bantian Yao, Cinnamon, Narcissus, and Iron Arhat using the Teaformer model used in the present invention and the KNN, SVM, and DT models. Figure 4 It can be seen that in the classification of all tea varieties, compared with other common machine learning models, the histogram of the Teaformer model used in the present invention is significantly higher than that of other models, indicating that it has a higher accuracy rate in the classification task. The Teaformer model of the present invention can more accurately capture the characteristic information in the tea spectral data through the effective combination of PCA dimensionality reduction and Transformer architecture, thereby achieving more accurate classification.

[0069] Experiments show that the model of the present invention can accurately distinguish different varieties of tea and has accurate quality classification capabilities, and has high stability and accuracy in classification tasks.

[0070] This example successfully classifies tea varieties and qualities by testing visible-near infrared spectral data of tea leaves on site and using the Teaformer model. This research result provides an effective method for tea quality detection and variety identification, and has important application value. In the future, we can further explore the application of other spectral analysis technologies and machine learning algorithms in tea classification to promote the intelligent and precise development of the tea industry.

[0071] Although the contents of the present invention are specifically shown and described in conjunction with the preferred embodiments, those skilled in the art should understand that various changes made to the present invention in form and detail without departing from the spirit and scope of the present invention as defined in the appended claims and without making any creative effort are within the scope of protection of the present invention.

Claims

1. A tea variety and quality classification method based on deep learning Teaformer, characterized by The following steps are involved: S1. Collect visible-near infrared spectral data of tea samples to obtain original spectral data of tea leaves; each data sample contains 701 feature dimensions, which are used to reflect the chemical composition and physical properties of tea leaves; S2, preprocessing the collected raw spectral data of tea leaves, including denoising, standardization and / or smoothing, to improve the signal-to-noise ratio and consistency of the data and ensure the accuracy of subsequent processing; S3, using the Teaformer model to process the preprocessed spectral data, reducing the dimension of the spectral data preprocessed by S2 through the PCA step, that is, reducing the spectral data in which each wavelength represents a feature to 10 features, and extracting features through the encoder part, wherein the encoder of the Teaformer model includes multiple stacked encoder layers, each encoder layer includes: Ⅰ. Multi-head attention mechanism, which is used to calculate the relationship between the dimensions of the input data and generate the global attention weights of the tea spectral data features; II. Feedforward neural network, which performs nonlinear transformation on the output of the attention mechanism to improve the expressiveness of the model; The spectral data processed by PCA and labeled with tea varieties and qualities were used as the training set to train the Teaformer model. By adjusting the model parameters and minimizing the loss function with the optimizer, the model was able to accurately distinguish tea varieties and qualities. S4. Input the spectral data of the tea leaves to be classified into the trained Teaformer model as a test set, and classify or evaluate the quality of the tea samples according to the output results of the Teaformer model encoder. The classification results include but are not limited to the types and grades of tea.

2. The tea variety and quality classification method based on deep learning Teaformer according to claim 1, characterized in that In step S1, the visible-near infrared spectrum data of the tea sample is collected in a wavelength range of 400 to 1100 nm.

3. The tea variety and quality classification method based on deep learning Teaformer according to claim 1, characterized in that In step S3, before the PCA dimensionality reduction process, the spectral data is normalized, that is, the possible errors in spectral intensity are reduced to improve the availability of data and the generalization ability of the model.

4. The tea variety and quality classification method based on deep learning Teaformer according to claim 1, characterized in that In step S3, before the data after PCA dimensionality reduction is input into the encoder, position encoding technology is also used to supplement the time series or position features in the spectral data to enhance the model's understanding of the sequential information of the spectral data.

5. The tea variety and quality classification method based on deep learning Teaformer according to claim 1, characterized in that In step S3, the number of encoder stacking layers of the Teaformer model is adjusted according to the complexity and scale of the data set, and the number of stacking layers is 2 to 6 layers. The number of heads of each encoder is optimized according to the data dimension and computing resources, and the number of heads of each encoder is 4 to 8 heads.

6. The tea variety and quality classification method based on deep learning Teaformer according to claim 1, characterized in that In step S3, each layer of the feedforward neural network uses the ReLU activation function for nonlinear transformation. The ReLU activation function outputs negative values ​​as zero and keeps positive values ​​unchanged, thereby introducing nonlinearity and accelerating gradient propagation to improve the training effect of the model.

7. The tea variety and quality classification method based on deep learning Teaformer according to claim 1, characterized in that: In step S3, the Teaformer model includes PCA dimensionality reduction processing and a Transformer model; wherein the data set of the model is a visible-near infrared spectrum, each spectrum contains 701 points, and after PCA dimensionality reduction processing, only 10-dimensional data can be obtained and input into the Transformer, thereby greatly reducing the network training parameters; the specific structure of the Transformer includes: Ⅰ. Input layer: receives an input feature vector of size 10, representing the data of each sample; II. Encoder layer: Multiple encoders are stacked, each of which includes a multi-head attention mechanism and a neural network that uses the ReLU activation function to perform nonlinear transformation on the output of the self-attention mechanism; III. Output layer: Classify or evaluate the quality of tea according to the output of the encoder.

8. The method for classifying tea varieties and qualities based on deep learning Teaformer according to any one of claims 1 to 7, characterized in that The tea quality classification adopts at least one of multi-class classification, regression analysis or anomaly detection method, and the specific selection is determined according to the characteristics of the tea sample and the evaluation criteria.

9. The method for classifying tea varieties and qualities based on deep learning Teaformer according to any one of claims 1 to 7, characterized in that The tea varieties and qualities include Wuyishan Buddha's Hand, Wuyishan Half-Sky Demon, Wuyishan Cinnamon, Wuyishan Narcissus, Wuyishan Iron Arhat tea types and Wuyishan Cinnamon quality grades.

Citation Information

Patent Citations

  • Method for identifying tea species and determining contents of 21 characteristic components

    CN104914190A

  • Method of using near infrared spectroscopy to rapidly determine fresh leaves of tea in different quality grades

    CN106568738A

  • Method for rapid judging of varieties of fresh tea leaves by near infrared spectroscopy

    CN106568740A

  • Method for identifying tea fresh leaf varieties by using near infrared spectrums

    CN108872132A

  • Attention and Transform hyperspectral image classification method and system

    CN116091833A

Cited By

  • Intelligent grading and quantitative nondestructive testing method for cornu cervi pantotrichum decoction pieces

    CN121280681A

  • Method for identifying Tieguanyin variety by combining high-resolution mass spectrum with linear discriminant analysis

    CN121476448A

  • Crop identification method and system based on OpenPCS and deep learning

    CN121600414A

  • Crop recognition method and system based on open pcs and deep learning

    CN121600414B