Interpretation and reproduction of English paper (sci) [NO.13] Real-time detection of apple leaf diseases in natural scenes based on YOLOv5

I published the target detection algorithm improvement column before, but for what scenario it is applied to, what improvement method is needed to be effective for its own application scenario, and how many improvements can be published at what level of articles, in order to solve everyone's confusion, this series of articles aims to I will explain to you the SCI papers published in high-level academic journals , and introduce the corresponding SCI journals to help you answer your doubts and facilitate the submission of scientific research papers. For the series of articles interpreted, I will reproduce the innovative point code , and friends in need can pay attention to private messages and get them.

1. Summary

Aiming at the problem of accurate localization and identification of multi-scale and heterogeneous apple leaf diseases in complex backgrounds in natural scenes, an apple leaf disease detection method based on the improved YOLOv5s model was proposed. First, the model utilizes Bidirectional Feature Pyramid Network (BiFPN) to efficiently realize multi-scale feature fusion; then, the transformer and convolutional block attention module (CBAM) attention mechanism are added to reduce the interference of invalid background information, improve the expression ability of disease features, and improve Model precision and recall. Experimental results show that the proposed BTC-YOLOv5s model (with a model size of 15.8M) can effectively detect 4 kinds of apple leaf diseases in natural scenes with an average precision (mAP) of 84.3%. Using an eight-core CPU, the model can process 8.7 leaf images per second on average. Compared with classic detection models such as SSD, Faster R-CNN, YOLOv4-tiny and YOLOx, the mAP value of this model has increased by 12.74%, 48.84%, 24.44% and 4.2%, respectively, with higher detection accuracy and faster Detection speed. In addition, the model is robust to strong noise conditions such as strong light, dim light, and blurry images, with a mAP value exceeding 80%. To sum up, the new BTC-YOLOv5s has the characteristics of light weight, high precision and high efficiency, and is suitable for application on mobile devices. This method can provide technical support for early intervention and control of apple leaf diseases.

2. Network model and core innovation points

1. Bidirectional Feature Pyramid Network

2. Transformer encoder block

3. Convolution block attention module

4. BTC-YOLOv5s detection model

3. Dataset

In this study, we used three datasets to train and evaluate the proposed model: Plant Pathology Challenge 2020 (FGVC7) dataset, Plant Pathology Challenge 2021 (FGVC8) dataset and PlantDoc dataset. FGVC7 and FGVC8 consist of apple leaf disease images used in the Kaggle-hosted Phytopathology Fine-Grained Visual Classification Competition. The photos were taken by Cornell AgriTech using a Canon Rebel T5i DSLR camera and a smartphone, and each photo has a resolution of 4000 × 2672 pixels. There are four types of apple leaf diseases, namely rust, frogeye leaf spot, powdery mildew and head blight. These diseases occur frequently, causing great losses to the quality and yield of apples. Example images of the dataset are shown in Figure 1.

PlantDoc [24] is a non-laboratory image dataset constructed by Davinder Singh et al. in 2020 for visual plant disease detection. It contains 2598 pictures of plant diseases in natural scenes, involving 13 species of plants and as many as 17 diseases. Most images in PlantDoc have low resolution, high noise, and insufficient sample sizes, making detection more difficult. In this study, images of apple rust and scab were enhanced and verified the generality of the proposed model. Figure 2 shows examples of disease images.

  4. Experimental results (partial display)

(1) Ablation experiment

The effectiveness of different optimization modules is verified by ablation experiments. We sequentially added BiFPN module (BF), transformer module (TR) and CBAM attention module on the baseline model YOLOv5s, constructed several improved models, and compared them on the same test data. The experimental results are shown in Table 4.

In Table 4, the precision and [email protected] of the baseline model YOLOv5s are 78.4% and 82.7%, respectively. By adding three optimization modules, namely BiFPN module, transformer module and CBAM attention module, both the accuracy and [email protected] are improved compared to the baseline model. Specifically, the accuracy improves by 3.3%, 3.3% and 1.1%, respectively, and the [email protected] improves by 0.5%, 1% and 0.2%, respectively. In the end, the combination of the three optimization modules obtained the best results, among which the accuracy, [email protected] and [email protected]:0.95 all reached the highest values, which were 5.7%, 1.6% and 0.1% higher than the baseline model, respectively. By fusing cross-channel information and spatial information, the CBAM attention mechanism focuses on important features while suppressing irrelevant features. In addition, the Transformer module employs a self-attention mechanism to build long-range feature channels with disease characteristics. The BiFPN module fuses the above features across scales to improve the recognition ability of overlapping fuzzy targets. Due to the combination of three modules, the BTC-YOLOv5s model achieves the best performance.

(2) Analysis of attention mechanism

In order to evaluate the effectiveness of the CBAM attention mechanism module, we retain other structures of the BTC-YOLOv5s model as experimental parameter settings, and only replace the CBAM module with other mainstream attention mechanism modules, such as SE, CA, ECA modules, for comparison.
From Table 5, we can see that the attention mechanism can significantly improve the accuracy of the model.

 The [email protected] of the SE, CA, ECA and CBAM models are 83.4%, 83.6%, 83.6% and 84.3%, respectively, which are 0.4%, 0.6%, 0.6% and 1.3% higher than the YOLOv5s + BF + TR model. Each attention mechanism improves [email protected] to varying degrees, among which the CBAM model performs the best, reaching 84.3%, which is 0.9%, and among the four attention mechanisms, [email protected]: 0.95 is also the highest. The SE and ECA attention mechanisms only consider channel information in feature maps, and the CA attention mechanism utilizes position information to encode channel relationships. The CBAM attention mechanism combines spatial attention and channel attention, emphasizing the information of disease characteristics in the feature map, which is more conducive to the identification and location of diseases.

 5. Experimental conclusion

Aiming at the problems of different shapes of disease spots on apple leaves, multi-scale diseases, and dense distribution of diseases, this study proposed an improved detection model BTC-YOLOv5s based on YOLOv5s. In order to improve the overall detection performance of the original YOLOv5s model, this study introduces the BiFPN module, which increases the fusion of multi-scale features and provides more semantic information. In addition, Transformer and CBAM attention modules are added to improve the ability to extract disease features. The results show that the accuracy of the BTC-YOLOv5s model on the ALDD test set is 84.3%, the model size is 15.8 M, and the detection speed is 8.7 FPS on an eight-core CPU device. In addition, good performance and robustness are still maintained under extreme conditions. The improved model has high detection accuracy, fast detection speed, and low computational requirements, and is suitable for deployment on mobile devices for real-time monitoring and intelligent control of apple diseases.

Note: The original text of the paper comes from Real-Time Detection of Apple Leaf Diseases in Natural Scenes Based on YOLOv5. This paper is only for academic sharing. If there is any infringement, please contact the background to delete the text.

Interpretation of the series of articles, I have reproduced the innovative code, friends in need are welcome to pay attention to private message me to get .

Guess you like

Origin blog.csdn.net/m0_70388905/article/details/130905224