Tea disease detection

During the growth of tea trees, tea tree diseases have an important impact on the yield and quality of tea. The shape and scale of tea diseases vary, and the disease targets are usually small. The intelligent detection process of tea diseases is also easily disturbed by the complex background of the growing area. In addition, some tea diseases are concentrated in the whole tea region and need to be inferred from global information. Common object detection models are difficult to solve these problems.

Therefore, we propose an improved tea disease detection model. We use a tea disease dataset collected at a Maoshan tea factory in China. The self-attention mechanism is used to enhance the ability of the model to obtain global tea disease information. Using BiFPN feature fusion network and adaptive spatial feature fusion (ASFF) technology, the multi-scale feature fusion of tea disease was improved, and the ability of the model to resist complex background interference was enhanced. We integrated the Shuffle Attention mechanism to solve the problem that small target tea disease is difficult to identify. Furthermore, we use data augmentation methods and transfer learning to extend the dataset and reorient parameters learned from other plant disease datasets to enhance tea disease detection. Finally, using SIoU further improves the regression accuracy. The experimental results show that the model can well solve a series of problems encountered in the intelligent identification of tea diseases. The detection accuracy is ahead of the mainstream target detection model, and the detection speed reaches the real-time level.

China is the country with the largest tea tree planting area in the world, and it is also the largest tea producer in the world. According to statistics from the International Tea Council, the global tea production in 2020 will be 6.269 million tons, of which China's tea production will reach 2.986 million tons, accounting for 47.6% of the global total tea production. In the process of tea planting and growth, tea diseases (including plant diseases and insect pests) are important factors affecting yield and quality, and serious tea diseases will cause huge economic losses. For example, Anxi County is the largest oolong tea producing area in China, with a total area of ​​600,000 mu of tea gardens, and the annual economic loss due to tea disease is as high as 60 million yuan. Common tea diseases mainly include tea fusarium wilt, purple back disease and tea algae spot disease. The above-mentioned tea disease is also the most common disease to the harm of tea trees, which can repeatedly infect tea trees more than once a year. They mostly occur in warm and humid seasons. After the tea tree is infected with the disease, it is often accompanied by early tea fall and bud withering, which leads to the decline of the whole tea tree, and even the overall disease of the tea garden, showing a decline phenomenon, which brings huge losses to the majority of tea farmers. When the tea tree is infected with the disease, it is necessary to remove the diseased branches or spray insecticides in the early stage of the disease. Conventional wisdom on identifying tea diseases relies heavily on human expertise and inspection (eg field observation and diagnosis). However, there are many kinds of tea diseases, which occur in a wide area, and manual detection methods are highly subjective, poor in consistency, and high in error rate.

With the rapid development of machine learning, image processing and machine learning have been widely used in crop disease identification. Some studies have used adaptive neuro-fuzzy inference system and color wavelet features for tea disease identification. Using artificial neural network to improve the identification accuracy of tea disease. Improvements were made to the random forest classifier. Classification of Peanut Diseases by Combining Attribute Evaluation Methods and Instance Filters. A rice leaf disease image processing system was designed using Haar and AdaBoost classifiers for recognition, and the recognition accuracy was 83.33%. In addition, they also used K-nearest neighbors and support vector machines (SVM) to classify rice leaf diseases with 91% and 93% accuracy, respectively. Some researchers used SVM classifier to detect grape leaf diseases. After k-means clustering, they used SVM for feature extraction and classification and achieved 85% accuracy. There is a combination of SVM and linear iterative clustering to extract tea disease maps from complex backgrounds, which is helpful for further identification of tea diseases. Grape leaf diseases were segmented and identified. During feature extraction, local contrast haze reduction and enhancement techniques are employed to improve image quality. In the process of feature fusion, redundant features are removed by neighborhood component analysis method. Based on experiments, the segmentation and classification accuracy of grape leaf diseases are 90% and 92%, respectively. However, traditional machine learning methods require a large number of images for disease feature extraction, and feature extraction relies on manual design rather than automatic learning.

Our research is dedicated to solving the problem that general object detection models are difficult to effectively identify tea disease targets. In order to solve a series of problems encountered in the process of intelligent identification of tea diseases, an improved intelligent identification model of tea diseases was designed. The proposed model improves the fusion of tea disease features at different scales, pays more attention to tea disease areas, has better detection results for small target tea diseases, and can better use global information to infer tea diseases. In the detection process, the effect of resisting complex background interference is also higher. We have used a series of technologies to improve the accuracy of tea disease intelligent detection, and the detection speed has reached the real-time level. The large-scale deployment of the model can timely and accurately detect tea tree diseases, replace traditional inefficient manual detection, and take targeted measures to control and improve the production efficiency and quality of tea.

A brief introduction to the framework

  • data augmentation

Mixed use of data augmentation methods can not only expand the dataset, but also avoid overfitting and improve the robustness of the model, including both online and offline augmentation methods. On the left is the input image, on the right is the random erasure

The number of training samples is the same as the number of images in the training set during online augmentation. In addition to basic image enhancement operations, a mosaic data enhancement method is used to process data samples during training; that is, multiple images are randomly cut and stitched into one image to be used as a training sample. In the process of random splicing, the same picture may have different kinds of tea disease. Richer image backgrounds can lead to higher model training efficiency. An example of mosaic data augmentation is shown in the figure below. 

  • new detection framework

The figure below shows the network structure of our improved model. According to the above method, we made a series of improvements to the original YOLOv5 algorithm. First, insert the Transformer module into the backbone of YOLOv5. Transformer's self-attention mechanism can enhance the global receptive field of the model, obtain more contextual information, and bring complementary advantages to the original convolutional layer, which is more conducive to capturing the global characteristics of tea disease.

​​​​​​​

  • Improved loss function

We analyzed the shortcomings of the original loss function of YOLOv5 and adopted an optimized loss function. For the unimproved YOLOv5, the CIoU loss is used as the loss function of the bounding box, and the Logits loss function and binary cross-entropy are used to calculate the loss of the target score and category probability, respectively.

​​​​​​​

The CIoU scheme is shown in the figure above. CIoU Loss comprehensively considers the coverage area, aspect ratio and center distance, can measure its relative position well, and solves the problem of optimizing the horizontal and vertical directions of the prediction frame, but this method does not consider the distance between the target frame and the prediction frame. Direction matching leads to slow convergence. Therefore, we adopt the SIoU loss. As shown in the figure below, SIoU introduces the vector angle between the target box and the prediction box for optimization. 

  • transfer learning

Training requires a large number of samples to ensure training performance. Due to the limited number of data samples, it is difficult to obtain good detection results by training directly from scratch. Migration learning is a technology that applies the knowledge of the known domain to the target domain. It can transfer the trained network model from a large data set to a new data set, and realize the network model parameters and weights on the new data set. reuse.

Due to the lack of large-scale tea disease image samples and the characteristics of tea disease are similar to those of other plant diseases, a transfer learning method is introduced to improve the performance of the model. Plant Village is a very large dataset of plant leaf diseases, consisting of 54,306 plant leaf images, including 14 species of plants, divided into 38 categories according to species and diseases. We use the Plant Village dataset and other plant disease datasets collected from the Internet for pre-training. whaosoft  aiot  http://143ai.com 

experiment

Tested with different algorithms, and the effect in practical application is as follows. ​​​​​​​​

The effect of yolov5 

​​​​​​​

The effect of the new model

The effect of yolov5 

The effect of the new model

Screenshot of the actual application:

Guess you like

Origin blog.csdn.net/qq_29788741/article/details/132266703