Apple Leaf Disease Identification in Complex Background Based on BAM-Net
Abstract
:1. Introduction
- (1)
- An MSRCR algorithm based on bilateral filtering is used to perform preprocessing operations on the images. This method replaces the center-surround function of the conventional MSRCR algorithm with a bilateral filtering function, which enhances color while preserving texture features in the image, resulting in clearer images that facilitate the neural network’s extraction of leaf features.
- (2)
- To achieve the efficient identification and classification of apple leaf diseases in complex backgrounds, this paper proposes a BAM-Net, which is designed as follows:
- a.
- A method called the aggregate coordinate attention mechanism (ACAM) is proposed to address the issue of interference from background information in the context of feature extraction while against complex backgrounds. This method assigns feature weights in both the horizontal and vertical directions, then uses pointwise convolution to correct the weights, improving the network’s focus on disease features and filtering out redundant interference information.
- b.
- A multi-scale feature refinement module (MFRM) is proposed to address the issue of misclassification caused by the inter-class similarity of leaf diseases. This module extracts feature information from multiple scales and refines deep features through cascaded channel information interactions, identifying disease feature information similarities and differences.
- (3)
- The proposed method in this paper achieved a recognition accuracy of 95.64% and an F1-score of 95.25% in a self-made dataset of apple leaf diseases in the context of complex backgrounds. Compared with other methods, BAM-Net has a higher recognition efficiency, which provides a reference value for modern producers to detect and identify apple leaf diseases in a timely fashion. Additionally, it provides significant help for the early maintenance and production of agriculture.
2. Materials and Methods
2.1. Data Acquisition
2.2. Data Expansion
2.3. BF-MSRCR
2.4. BAM-Net
- (1)
- The first part is the feature extraction network of BAM-Net, which mainly consists of ConvNext-Stage and ACAM. ConvNext-Stage was used for the basic feature extraction of apple leaf images after BF-MSRCR processing. ACAM was used after each stage to help the network focus on the important feature information and to filter out the interference information.
- (2)
- The second part is the feature refinement module, comprising several 1 × 1 convolutions and three 3 × 3 convolutions with varying expansion rates. MFRM divides the output of the feature from the first part into 4 branches. Then, feature extraction at different scales and channel information interaction operations are performed in the 4 branches to refine the leaf disease features.
- (3)
- The third part is the classification output module, which includes global average pooling, layer normalization, and linear layers. Firstly, the network’s extracted features are subjected to global pooling and normalization operations. Then, the fully connected layer and Softmax function transforms the output into a probability distribution, providing the classification results for apple leaf disease images.
2.4.1. ConvNext-T Backbone
2.4.2. ACAM
- (1)
- Bi-directional pooling
- (2)
- Aggregate feature correction
- (3)
- Feature fusion output
2.4.3. MFRM
3. Experimental Results Analysis
3.1. Experimental Environment and Parameter Setting
3.2. Evaluation Indicators
3.3. Comparison with Classical Networks
3.4. Modules Effectiveness Analysis
3.4.1. Effectiveness of Image Pre-Processing
3.4.2. Effectiveness of ACAM
3.4.3. Effectiveness of MRFM
3.5. Ablation Experiment
3.6. Comparison with the Latest Network Model
3.7. Generalizability Experiment
4. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Pardo, A.; Borges, P.A. Worldwide importance of insect pollination in apple orchards: A review. Agric. Ecosyst. Environ. 2020, 293, 106839. [Google Scholar] [CrossRef]
- Zhong, Y.; Zhao, M. Research on deep learning in apple leaf disease recognition. Comput. Electron. Agric. 2019, 168, 105146. [Google Scholar] [CrossRef]
- Khalil, A.J.; Barhoom, A.M.; Musleh, M.M.; Abu-Naser, S.S. Apple Trees Knowledge Based System. Int. J. Acad. Eng. Res. 2019, 3, 1–7. [Google Scholar]
- Dong, Y.; Fu, Z.; Stankovski, S.; Peng, Y.; Li, X. A Cotton Disease Diagnosis Method Using a Combined Algorithm of Case-Based Reasoning and Fuzzy Logic. Comput. J. 2020, 64, 155–168. [Google Scholar] [CrossRef]
- Tian, H.; Wang, T.; Liu, Y.; Qiao, X.; Li, Y. Computer vision technology in agricultural automation—A review. Inf. Process. Agric. 2019, 7, 1–19. [Google Scholar] [CrossRef]
- Chakraborty, S.; Paul, S.; Rahat-uz-Zaman, M. Prediction of apple leaf diseases using multiclass support vector machine. In Proceedings of the 2021 2nd International Conference on Robotics, Electrical and Signal Processing Techniques (ICREST), Dhaka, Bangladesh, 5–7 January 2021; pp. 147–151. [Google Scholar]
- Chuanlei, Z.; Shanwen, Z.; Jucheng, Y.; Yancui, S.; Jia, C. Apple leaf disease identification using genetic algorithm and correlation based feature selection method. Int. J. Agric. Biol. Eng. 2017, 10, 74–83. [Google Scholar]
- Zamani, A.S.; Anand, L.; Rane, K.P.; Prabhu, P.; Buttar, A.M.; Pallathadka, H.; Raghuvanshi, A.; Dugbakie, B.N. Performance of machine learning and image processing in plant leaf disease detection. J. Food Qual. 2022, 2022, 1598796. [Google Scholar] [CrossRef]
- Tan, A.; Zhou, G.; He, M. Surface defect identification of Citrus based on KF-2D-Renyi and ABC-SVM. Multimed. Tools Appl. 2020, 80, 9109–9913. [Google Scholar] [CrossRef]
- Jiang, H.; Li, X.; Shao, H.; Zhao, K. Intelligent fault diagnosis of rolling bearings using an improved deep recurrent neural network. Meas. Sci. Technol. 2018, 29, 065107. [Google Scholar] [CrossRef]
- Deng, L.; Yu, D. Deep learning: Methods and applications. Found. Trends® Signal Process. 2014, 7, 197–387. [Google Scholar] [CrossRef]
- Li, J.; Zhou, G.; Chen, A.; Lu, C.; Li, L. BCMNet: Cross-Layer Extraction Structure and Multiscale Downsampling Network With Bidirectional Transpose FPN for Fast Detection of Wildfire Smoke. IEEE Syst. J. 2022, 17, 1235–1246. [Google Scholar] [CrossRef]
- Hu, Y.; Zhan, J.; Zhou, G.; Chen, A.; Cai, W.; Guo, K.; Hu, Y.; Li, L. Fast forest fire smoke detection using MVMNet. Knowledg. Based Syst. 2022, 241, 108219. [Google Scholar] [CrossRef]
- Ali, R.; Chuah, J.H.; Abu Talip, M.S.; Mokhtar, N.; Shoaib, M.A. Structural crack detection using deep convolutional neural networks. Autom. Constr. 2022, 133, 103989. [Google Scholar] [CrossRef]
- Kheradmandi, N.; Mehranfar, V. A critical review and comparative study on image segmentation-based techniques for pavement crack detection. Constr. Build. Mater. 2022, 321, 126162. [Google Scholar] [CrossRef]
- Ibrahim, N.M.; Gabr, D.G.I.; Rahman, A.-U.; Dash, S.; Nayyar, A. A deep learning approach to intelligent fruit identification and family classification. Multimed. Tools Appl. 2022, 81, 27783–27798. [Google Scholar] [CrossRef]
- Chen, X.; Zhou, G.; Chen, A.; Pu, L.; Chen, W. The fruit classification algorithm based on the multi-optimization convolutional neural network. Multimed. Tools Appl. 2021, 80, 11313–11330. [Google Scholar] [CrossRef]
- Jiang, P.; Chen, Y.; Liu, B.; He, D.; Liang, C. Real-Time Detection of Apple Leaf Diseases Using Deep Learning Approach Based on Improved Convolutional Neural Networks. IEEE Access 2019, 7, 59069–59080. [Google Scholar] [CrossRef]
- Bansal, P.; Kumar, R.; Kumar, S. Disease Detection in Apple Leaves Using Deep Convolutional Neural Network. Agriculture 2021, 11, 617. [Google Scholar] [CrossRef]
- Suo, J.; Zhan, J.; Zhou, G.; Chen, A.; Hu, Y.; Huang, W.; Cai, W.; Hu, Y.; Li, L. CASM-AMFMNet: A Network Based on Coordinate Attention Shuffle Mechanism and Asymmetric Multi-Scale Fusion Module for Classification of Grape Leaf Diseases. Front. Plant Sci. 2022, 13, 846767. [Google Scholar] [CrossRef]
- Liao, T.; Yang, R.; Zhao, P.; Zhou, W.; He, M.; Li, L. MDAM-DRNet: Dual Channel Residual Network with Multi-Directional Attention Mechanism in Strawberry Leaf Diseases Detection. Front. Plant Sci. 2022, 13, 869524. [Google Scholar] [CrossRef]
- Sun, H.; Xu, H.; Liu, B.; He, D.; He, J.; Zhang, H.; Geng, N. MEAN-SSD: A novel real-time detector for apple leaf diseases using improved light-weight convolutional neural networks. Comput. Electron. Agric. 2021, 189, 106379. [Google Scholar] [CrossRef]
- Yang, Q.; Duan, S.; Wang, L. Efficient Identification of Apple Leaf Diseases in the Wild Using Convolutional Neural Networks. Agronomy 2022, 12, 2784. [Google Scholar] [CrossRef]
- Bi, C.; Xu, S.; Hu, N.; Zhang, S.; Zhu, Z.; Yu, H. Identification Method of Corn Leaf Disease Based on Improved Mobilenetv3 Model. Agronomy 2023, 13, 300. [Google Scholar] [CrossRef]
- Barbedo, J.G.A. Impact of dataset size and variety on the effectiveness of deep learning and transfer learning for plant disease classification. Comput. Electron. Agric. 2018, 153, 46–53. [Google Scholar] [CrossRef]
- Jobson, D.J.; Rahman, Z.-U.; Woodell, G.A. Retinex processing for automatic image enhancement. J. Electron. Imaging 2004, 13, 100–110. [Google Scholar] [CrossRef]
- Wang, J.; Lu, K.; Xue, J.; He, N.; Shao, L. Single Image Dehazing Based on the Physical Model and MSRCR Algorithm. IEEE Trans. Circuits Syst. Video Technol. 2017, 28, 2190–2199. [Google Scholar] [CrossRef]
- Yang, Y.n.; Jiang, Z.; Yang, C.; Xia, Z.; Liu, F. Improved retinex image enhancement algorithm based on bilateral filtering. In Proceedings of the 2015 4th International Conference on Mechatronics, Materials, Chemistry and Computer Engineering, Xi’an, China, 12–13 December 2015; pp. 1363–1369. [Google Scholar]
- Liu, Z.; Mao, H.; Wu, C.-Y.; Feichtenhofer, C.; Darrell, T.; Xie, S. A convnet for the 2020s. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 11976–11986. [Google Scholar]
- Zhao, Y.; Wang, G.; Tang, C.; Luo, C.; Zeng, W.; Zha, Z.J. A battle of network structures: An empirical study of cnn, transformer, and mlp. arXiv 2021, arXiv:2108.13002. [Google Scholar]
- Liu, Z.; Lin, Y.; Cao, Y.; Hu, H.; Wei, Y.; Zhang, Z.; Lin, S.; Guo, B. Swin transformer: Hierarchical vision transformer using shifted windows. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Montreal, BC, Canada, 11–17 October 2021; pp. 10012–10022. [Google Scholar]
- He, K.; Zhang, X.; Ren, S.; Sun, J. Deep residual learning for image recognition. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 770–778. [Google Scholar]
- Burt, P.J. Attention mechanisms for vision in a dynamic world. In Proceedings of the 9th International Conference on Pattern Recognition, Rome, Italy, 14 May–17 November 1988. [Google Scholar]
- Brauwers, G.; Frasincar, F. A general survey on attention mechanisms in deep learning. IEEE Trans. Knowl. Data Eng. 2021, 35, 3279–3298. [Google Scholar] [CrossRef]
- Hou, Q.; Zhou, D.; Feng, J. Coordinate attention for efficient mobile network design. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Nashville, TN, USA, 20–25 June 2021; pp. 13713–13722. [Google Scholar]
- Yu, F.; Koltun, V. Multi-scale context aggregation by dilated convolutions. arXiv 2015, arXiv:1511.07122. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very deep convolutional networks for large-scale image recognition. arXiv 2014, arXiv:1409.1556. [Google Scholar]
- Zhang, H.; Wu, C.; Zhang, Z.; Zhu, Y.; Lin, H.; Zhang, Z.; Sun, Y.; He, T.; Mueller, J.; Manmatha, R. Resnest: Split-attention networks. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 2736–2746. [Google Scholar]
- Huang, G.; Liu, Z.; Van Der Maaten, L.; Weinberger, K.Q. Densely connected convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 4700–4708. [Google Scholar]
- Hu, J.; Shen, L.; Sun, G. Squeeze-and-excitation networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 7132–7141. [Google Scholar]
- Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. Cbam: Convolutional block attention module. In Proceedings of the European CONFERENCE on Computer Vision (ECCV), Munich, Germany, 8–14 September 2018; pp. 3–19. [Google Scholar]
- Li, M.; Zhou, G.; Li, Z. Fast recognition system forTree images based on dual-task Gabor convolutional neural network. Multimed. Tools Appl. 2022, 81, 28607–28631. [Google Scholar] [CrossRef]
- Liu, Z.; Hu, H.; Lin, Y.; Yao, Z.; Xie, Z.; Wei, Y.; Ning, J.; Cao, Y.; Zhang, Z.; Dong, L. Swin transformer v2: Scaling up capacity and resolution. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022; pp. 12009–12019. [Google Scholar]
- Huang, X.; Chen, A.; Zhou, G.; Zhang, X.; Wang, J.; Peng, N.; Yan, N.; Jiang, C. Tomato leaf disease detection system based on FC-SNDPN. Multimed. Tools Appl. 2023, 82, 2121–2144. [Google Scholar] [CrossRef]
- Mohanty, S.P.; Hughes, D.P.; Salathé, M. Using Deep Learning for Image-Based Plant Disease Detection. Front. Plant Sci. 2016, 7, 1419. [Google Scholar] [CrossRef] [PubMed]
Category | Example | Characteristics | Number (Before/After) | Proportion (Before/After) |
---|---|---|---|---|
Healthy | The leaf color is green, the texture is obvious, no disease spots. | 530/2650 | 15.1%/14.9% | |
Brown spot | Brown, irregular spots on leaves progress to yellow and eventually become brown as the disease worsens. | 568/2840 | 16.2%/16.0% | |
Alternaria leaf spot | Dark brown spots are present on the leaves. As the disease progresses, the color of the spots will change to black. | 588/2934 | 16.8%/16.5% | |
Mosaic | Large mosaic-like spots appear on the leaves and yellowish irregular spots are present on the veins of the leaves. | 564/2826 | 16.1%/15.9% | |
Powdery mildew | Large amounts of white mycelium are present on the leaves. As the disease progresses, the leaves will become distorted. | 608/3025 | 17.3%/17.1% | |
Rust | Bright spots appear on the leaves. As the disease progresses, the spots will gradually enlarge and turn orange or red. | 632/3148 | 18.0%/17.8% |
Hardware Environment | CPU | Intel(R) Xeon(R) Platinum 8352M |
ARM | 80 GB | |
Video Memory | 50 GB | |
GPU | NVIDIA GeForce RTX 3090 | |
Software Environment | OS | Windows 11 |
PyTorch | 1.11.0 | |
Python | 3.8 | |
Cuda | 11.3 | |
MATLAB | R2019a |
Network | Healthy (%) | Brown Spot (%) | Alternaria Leaf Spot (%) | Mosaic (%) | Powdery Mildew (%) | Rust (%) | Training Time |
---|---|---|---|---|---|---|---|
VGG-16 | 89.1 | 86.85 | 89.72 | 86.91 | 86.54 | 84.27 | 2 h 48 min 6 s |
ResNet-50 | 92.67 | 84.19 | 93.46 | 85.91 | 89.05 | 86.34 | 2 h 45 min 28 s |
Densenet-121 | 91.76 | 86.23 | 90.97 | 91.99 | 89.80 | 88.57 | 2 h 36 min 35 s |
ResNest-50 | 89.01 | 90.83 | 91.93 | 88.75 | 90.71 | 85.83 | 3 h 4 min 55 s |
ConvNext-T | 91.03 | 89.57 | 95.87 | 90.18 | 92.67 | 88.04 | 3 h 7 min 13 s |
BAM-Net | 96.84 | 95.61 | 95.59 | 95.97 | 95.58 | 93.36 | 3 h 18 min 43 s |
Methods | Image | Average Gradient | Information Entropy | Standard Deviation |
---|---|---|---|---|
Original | 8.73 | 7.62 | 49.62 | |
MSR | 4.80 | 7.81 | 61.04 | |
MSRCR | 8.61 | 7.81 | 61.55 | |
BF-MSRCR | 10.85 | 7.90 | 68.84 |
Method | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) |
---|---|---|---|---|
Original | 91.24 | 91.19 | 91.17 | 91.17 |
MSRCR | 91.61 | 91.72 | 91.26 | 91.48 |
BF-MSRCR | 91.94 | 91.84 | 91.85 | 91.84 |
Original (Extended) | 91.82 | 91.05 | 91.56 | 91.30 |
MSRCR (Extended) | 92.03 | 92.24 | 92.47 | 92.35 |
BF-MSRCR (Extended) | 92.18 | 92.62 | 92.56 | 92.58 |
Method | Accuracy (%) | F1-Score (%) | Param |
---|---|---|---|
Without attention | 92.18 | 92.56 | 27.80 M |
+SE | 92.64 | 92.56 | 27.90 M |
+CBAM | 92.71 | 92.87 | 27.90 M |
+CA | 93.52 | 93.38 | 27.88 M |
+ACAM | 94.33 | 94.41 | 28.14 M |
Group | Method | Accuracy (%) | F1-Score (%) | Param | FPS |
---|---|---|---|---|---|
1 | Convnext-T | 91.24 | 91.17 | 27.80 M | 95.30 |
2 | Convnext-T+BF-MSRCR | 92.18 | 92.56 | 27.80 M | 95.30 |
3 | Convnex-Tt+MFRM | 93.59 | 93.17 | 28.84 M | 77.31 |
4 | Convnext-T+ACAM | 93.91 | 93.41 | 28.14 M | 91.64 |
5 | Convnext-T+ACAM+MFRM | 94.79 | 93.79 | 29.18 M | 74.97 |
6 | Convnext-T+BF-MSRCR+ACAM | 94.33 | 94.14 | 28.14 M | 91.64 |
7 | Convnext-T+BF-MSRCR+MFRM | 94.06 | 93.91 | 28.84 M | 77.31 |
8 | BAM-Net | 95.64 | 95.25 | 29.18 M | 74.97 |
Network | Accuracy (%) | Precision (%) | Recall (%) | F1-Score (%) | Training Time |
---|---|---|---|---|---|
Dual-Task Gabor CNN | 93.23 | 93.14 | 92.93 | 93.03 | 2 h 26 min 26 s |
Swin Transformer V2 | 94.77 | 93.84 | 94.63 | 93.72 | 3 h 46 min 48 s |
FC-SNDPN | 94.28 | 94.79 | 94.57 | 94.67 | 3 h 24 min 25 s |
BAM-Net | 95.64 | 95.62 | 95.89 | 95.25 | 3 h 18 min 43 s |
Plant | Categories | Precision (%) | Recall (%) | F1-Score (%) | Accuracy (%) |
---|---|---|---|---|---|
Apple leaf | All categories | 99.54 | 99.39 | 99.46 | 99.41 |
Healthy | 100 | 99.66 | |||
Scab | 99.17 | 99.17 | |||
Rust | 99.01 | 97.18 | |||
Black rot | 100 | 99.55 | |||
Corn leaf | All categories | 98.31 | 98.13 | 98.21 | 98.19 |
Healthy | 98.17 | 97.93 | |||
Rust | 98.54 | 98.25 | |||
Spot | 97.64 | 97.65 | |||
Leaf blight | 98.90 | 98.71 | |||
Grape leaf | All categories | 98.47 | 98.45 | 98.45 | 98.52 |
Healthy | 98.59 | 98.22 | |||
Black measles | 98.37 | 98.93 | |||
Leaf blight | 98.64 | 98.75 | |||
Black rot | 98.28 | 97.91 |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Gao, Y.; Cao, Z.; Cai, W.; Gong, G.; Zhou, G.; Li, L. Apple Leaf Disease Identification in Complex Background Based on BAM-Net. Agronomy 2023, 13, 1240. https://doi.org/10.3390/agronomy13051240
Gao Y, Cao Z, Cai W, Gong G, Zhou G, Li L. Apple Leaf Disease Identification in Complex Background Based on BAM-Net. Agronomy. 2023; 13(5):1240. https://doi.org/10.3390/agronomy13051240
Chicago/Turabian StyleGao, Yuxi, Zhongzhu Cao, Weiwei Cai, Gufeng Gong, Guoxiong Zhou, and Liujun Li. 2023. "Apple Leaf Disease Identification in Complex Background Based on BAM-Net" Agronomy 13, no. 5: 1240. https://doi.org/10.3390/agronomy13051240
APA StyleGao, Y., Cao, Z., Cai, W., Gong, G., Zhou, G., & Li, L. (2023). Apple Leaf Disease Identification in Complex Background Based on BAM-Net. Agronomy, 13(5), 1240. https://doi.org/10.3390/agronomy13051240