Deep-Learning-Based Rice Disease and Insect Pest Detection on a Mobile Phone
Abstract
:1. Introduction
2. Materials and Methods
2.1. Image Acquisition and Enhancement
2.1.1. Image Acquisition
2.1.2. Image Enhancement
2.2. Construction of Rice Disease and Pest Detection Model
2.2.1. Construction of Improved YOLOv5s Rice Diseases and Pests Detection Model
2.2.2. Construction of Improved YOLOv7-Tiny Rice Diseases and Pests Detection Model
2.3. The Comparison Methods Used in This Study
2.4. Development Platform for Rice Diseases and Insect Pests Identification Application
2.5. Evaluation Indicators
3. Results
3.1. Analysis of Experimental Results of Different Models
3.1.1. Analysis of Training Processes of Different Model
3.1.2. Comparison of Detection Accuracy of Different Models
3.2. Analysis of Experimental Results of Improved Models
3.2.1. Comparison of Operational Efficiency before and after Model Improvement
3.2.2. Comparison of Different Type Rice Diseases and Insect Pests Detection Accuracy before and after Model Improvement
3.2.3. Comparison of Detection Results of Different Type Rice Diseases and Insect Pests Images before and after Model Improvement
3.3. Analysis of Experimental Results of Rice Diseases and Insect Pests Detection Application on Mobile Phone
3.3.1. Identification Results of Rice Diseases and Insect Pests Detection Mobile Phone Application
3.3.2. Runtime Performance of Rice Diseases and Insect Pests Detection Application on a Mobile Phone
4. Discussion
5. Conclusions
- We proposed two rice disease and insect pest detection models suitable for mobile phone terminals based on deep-learning detection and realized offline detection by intelligent mobile phone terminals, thus providing an efficient and reliable intelligent detection method for farmers and plant protection personnel. By introducing the Ghost module, Improved YOLOv5s significantly improved detection accuracy and operation efficiency compared to YOLOv5s. It had the highest F1-Score and the highest scores for mAP (0.5) and mAP (0.5:0.9) with values of 0.931, 0.961 and 0.648, respectively. Moreover, the parameter quantity, model size, and FLOPs of Improved YOLOv5s were reduced by 47.5, 45.7, and 48.7%, respectively, while the inference speed improved by 38.6% and model detection accuracy and operation efficiency also significantly improved. By introducing the CBAM attention module and SIoU loss, Improved YOLOv7-tiny outperformed YOLOv7-tiny in detection accuracy, and the model accuracy of F1-Score, mAP (0.5), and mAP (0.5:0.9) were second only to those of Improved YOLOv5s.
- For the detection of different categories of rice diseases and insect pests, the AP value of Improved YOLOv5s was higher than that of Improved YOLOv7-tiny for the identification of all rice diseases and insect pests. The probability heat maps showed that Improved YOLOv5s had better detection in areas of rice disease and insect pests where there were larger image target sizes, and Improved YOLOv7-tiny had better detection accuracy where there were smaller image target sizes.
- The two improved models were transplanted to an Android mobile phone. Under FP16, the precision and recall of Improved YOLOv5s was 0.925, and 0.939, and the inference speed was 374 ms/frame. Model accuracy, operational efficiency, and runtime performance were better than for Improved YOLOv7-tiny. The mobile phone application constructed by the improved models is compatible with most Android mobile phone hardware platforms for achieving accurate detection of rice diseases and insect pests.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Liu, T.; Zhong, X.C.; Sun, C.M.; Guo, W.S.; Chen, Y.Y.; Sun, J. Recognition of Rice Leaf Diseases Based on Computer Vision. Sci. Agric. Sin. 2014, 47, 664–674. (In Chinese) [Google Scholar]
- Wen, C.; Guyer, D.; Li, W. Local feature-based identification and classification for orchard insects. Biosyst. Eng. 2009, 104, 299–307. [Google Scholar] [CrossRef]
- Wen, C.; Guyer, D. Image-based orchard insect automated identification and classification method. Comput. Electron. Agric. 2012, 89, 110–115. [Google Scholar] [CrossRef]
- Liu, T.; Chen, W.; Wu, W.; Sun, C.; Guo, W.; Zhu, X. Detection of aphids in wheat fields using a computer vision technique. Biosyst. Eng. 2016, 141, 82–93. [Google Scholar] [CrossRef]
- Xie, C.; Zhang, J.; Li, R.; Li, J.; Hong, P.; Xia, J.; Chen, P. Automatic classification for field crop insects via multiple-task sparse representation and multiple-kernel learning. Comput. Electron. Agric. 2015, 119, 123–132. [Google Scholar] [CrossRef]
- Espinoza, K.; Valera, D.L.; Torres, J.A.; Lopez, A.; Molina-Aiz, F.D. Combination of image processing and artificial neural networks as a novel approach for the identification of Bemisia tabaci and Frankliniella occidentalis on sticky traps in greenhouse agriculture. Comput. Electron. Agric. 2016, 127, 495–505. [Google Scholar] [CrossRef]
- Wang, Z.; Chu, G.K.; Zhang, H.J.; Liu, S.; Huang, X.; Gao, F.; Zhang, C.; Wang, J. Identification of diseased empty rice panicles based on Haar-like feature of UAV optical image. Trans. Chin. Soc. Agric. Eng. 2018, 34, 73–82. (In Chinese) [Google Scholar]
- Wang, D.F.; Wang, J. Crop disease classification with transfer learning and residual networks. Trans. Chin. Soc. Agric. Eng. 2021, 37, 199–207. (In Chinese) [Google Scholar]
- Li, X.Z.; Ma, B.X.; Yu, G.W.; Chen, J.; Li, Y.; Li, C. Surface defect detection of Hami melon using deep learning and image processing. Trans. Chin. Soc. Agric. Eng. 2021, 37, 223–232. (In Chinese) [Google Scholar]
- Hou, J.L.; Fang, L.F.; Wu, Y.Q.; Li, Y.; Xi, R. Rapid recognition and orientation determination of ginger sprouts based on deep learning. Trans. Chin. Soc. Agric. Eng. 2021, 37, 213–222. (In Chinese) [Google Scholar]
- Agarwal, M.; Singh, A.; Arjaria, S.; Sinha, A.; Gupta, S. ToLeD: Tomato leaf disease detection using convolution neural network. Proc. Comput. Sci. 2020, 167, 293–301. [Google Scholar] [CrossRef]
- Zhong, Y.; Zhao, M. Research on deep learning in apple leaf disease recognition. Comput. Electron. Agric. 2020, 168, 105146. [Google Scholar] [CrossRef]
- Ramcharan, A.; Baranowski, K.; McCloskey, P.; Ahmed, B.; Legg, J.; Hughes, D.P. Deep Learning for Image-Based Cassava Disease Detection. Front. Plant Sci. 2017, 8, 1852. [Google Scholar] [CrossRef]
- Rahman, C.R.; Arko, P.S.; Ali, M.E.; Khan, M.A.I.; Apon, S.H.; Nowrin, F.; Wasif, A. Identification and recognition of rice diseases and pests using convolutional neural networks. Biosyst. Eng. 2020, 194, 112–120. [Google Scholar] [CrossRef]
- Joshi, P.; Das, D.; Udutalapally, V.; Pradhan, M.K.; Misra, S. RiceBioS: Identification of Biotic Stress in Rice Crops Using Edge-as-a-Service. IEEE Sens. J. 2022, 22, 4616–4624. [Google Scholar] [CrossRef]
- Deng, R.L.; Tao, M.; Xing, H.; Yang, X.L.; Liu, C.; Liao, K.; Qi, L. Automatic diagnosis of rice diseases using deep learning. Plant Sci. 2021, 12, 701038. [Google Scholar] [CrossRef]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster r-cnn: Towards real-time object detection with region proposal networks. Adv. Neural Inf. Process. Syst. 2015, 91–99. Available online: https://arxiv.org/abs/1506.01497 (accessed on 1 February 2023). [CrossRef]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You only look once: Unified, real-time object detection. In Proceedings of the 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Las Vegas, NV, USA, 27–30 June 2016; pp. 779–788. Available online: https://arxiv.org/abs/1506.02640 (accessed on 1 February 2023).
- YOLOv5. Available online: https://github.com/ultralytics/yolov5 (accessed on 1 February 2023).
- Lin, T.Y.; Dollar, P.; Girshick, R.; He, K.M.; Hariharan, B.; Belongie, S. Feature Pyramid Networks for Object Detection. In Proceedings of the 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, 21–26 July 2017; Available online: https://arxiv.org/abs/1612.03144v2 (accessed on 1 February 2023).
- Liu, S.; Qi, L.; Qin, H.F.; Shi, J.P.; Jia, J.Y. Path Aggregation Network for Instance Segmentation. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; Available online: https://arxiv.org/abs/1803.01534v4 (accessed on 1 February 2023).
- Howard, A.G.; Zhu, M.; Chen, B.; Kalenichenko, D.; Wang, W.; Weyand, T.; Andreetto, M.; Adam, H. MobileNets: Efficient convolutional neural networks for mobile vision applications. IEEE Access. 2017, 6, 1–14. [Google Scholar]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.-C. MobileNet V2: Inverted residuals and linear bottlenecks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. Available online: https://arxiv.org/1801.04381 (accessed on 1 February 2023).
- Howard, A.; Sandler, M.; Chu, G.; Chen, L.-C.; Chen, B.; Tan, M.; Wang, W.; Zhu, Y.; Pang, R.; Vasudevan, V.; et al. Searching for MobileNetV3. In Proceedings of the 2019 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; Available online: https://arxiv.org/abs/1905.02244 (accessed on 1 February 2023).
- Zhang, X.; Zhou, X.; Lin, M.; Sun, J. ShuffleNet: An Extremely Efficient Convolutional Neural Network for Mobile Devices. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Salt Lake City, UT, USA, 18–22 June 2018. [Google Scholar]
- Ma, N.N.; Zhang, X.; Zheng, H.T.; Sun, J. ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; Available online: https://arxiv.org/abs/1807.11164 (accessed on 1 February 2023).
- Han, K.; Wang, Y.; Tian, Q.; Guo, J.; Xu, C. GhostNet: More Features from Cheap Operations. In Proceedings of the 2020 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Seattle, WA, USA, 13–19 June 2019; Available online: https://arxiv.org/abs/1911.11907 (accessed on 1 February 2023).
- 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]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object detectors. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; Available online: https://arxiv.org/abs/2207.02696 (accessed on 1 February 2023).
- Woo, S.; Park, J.; Lee, J.-Y.; Kweon, I.S. CBAM: Convolutional Block Attention Module; Springer: Cham, Switzerland, 2018; pp. 3–19. [Google Scholar]
- Ding, X.H.; Zhang, X.Y.; Ma, N.N.; Han, J.; Ding, G.; Sun, J. RepVGG: Making VGG-style ConvNets Great Again. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022. Available online: https://arxiv.org/2101.03697 (accessed on 1 February 2023).
- Gevorgyan, Z. SIoU Loss: More Powerful Learning for Bounding Box Regression. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; Available online: https://arxiv.org/abs/2205.12740 (accessed on 1 February 2023).
- Girshick, R.; Donahue, J.; Darrell, T.; Malik, J. Rich Feature Hierarchies for Accurate Object Detection and Semantic Segmentation. In Proceedings of the 2014 IEEE Conference on Computer Vision and Pattern Recognition, Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar]
- Girshick, R. Fast R-CNN. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Boston, MA, USA, 7–12 June 2015; pp. 1440–1448. [Google Scholar]
- Simonyan, K.; Zisserman, A. Very Deep Convolutional Networks for Large-Scale Image Recognition. Comput. Sci. 2014. Available online: https://arxiv.org/abs/1409.1556 (accessed on 1 February 2023).
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.-Y.; Berg, A.C. SSD: Single shot multibox detector. arXiv 2016, arXiv:1512.02325. [Google Scholar]
- Jiang, F.; Lu, Y.; Chen, Y.; Cai, D.; Li, G.F. Image recognition of four rice leaf diseases based on deep learning and support vector machine. Comput. Electron. Agric. 2020, 179, 105824. [Google Scholar] [CrossRef]
- Lu, Y.; Yi, S.J.; Zeng, N.Y.; Liu, Y.R.; Zhang, Y. Identification of rice diseases using deep convolutional neural networks. Neurocomputing 2017, 267, 378–384. [Google Scholar] [CrossRef]
- Wang, Y.B.; Wang, H.F.; Peng, Z.H. Rice diseases detection and classification using attention based neural network and bayesian optimization. Expert Syst. Appl. 2021, 178, 114770. [Google Scholar] [CrossRef]
- Johnson, J.M.; Khoshgoftaar, T.M. Survey on deep learning with class imbalance. J. Big Data 2019, 6, 27. [Google Scholar] [CrossRef]
- Shorten, C.; Khoshgoftaar, T.M. A survey on Image Data Augmentation for Deep Learning. J. Big Data 2019, 6, 60. [Google Scholar] [CrossRef]
Disease Name | Acquisition Time | Data Source | Photograph | Data Enhancement | Total |
---|---|---|---|---|---|
Cnaphalocrocis medinalis | October 2020 | Zengcheng District Experimental Base and Gaoyao District Test Base | 487 | 63 | 550 |
Chilo suppressalis | October 2020 | Zengcheng District Experimental Base | 276 | 274 | 550 |
Rice smut | April 2021 | Zengcheng District Experimental Base | 209 | 341 | 550 |
Rice blast | March 2021 | Zengcheng District Experimental Base and Xinhui District Experiment Base | 236 | 314 | 550 |
Streak disease | March 2021 | Zengcheng District Experimental Base | 184 | 366 | 550 |
Sheath blight | March 2021 | Zengcheng District Experimental Base | 162 | 388 | 550 |
Platform | System | Configuration | Framework/Architecture |
---|---|---|---|
Server platform for model training | Ubuntu 16.04.6 | P100 16G × 2 | Cuda 10.2, Cudnn 7.6.5, Pytorch |
Application development platform | Android 9.0 | Memory 4G | Android |
Network | Precision | Rcall | F1-Score | mAP | |
---|---|---|---|---|---|
IOU = 0.5 | IOU = 0.5:0.95 | ||||
Faster-RCNN | 0.888 | 0.944 | 0.915 | 0.933 | 0.584 |
VGG16-SSD | 0.806 | 0.939 | 0.872 | 0.820 | 0.476 |
YOLOv5s | 0.908 | 0.923 | 0.915 | 0.952 | 0.625 |
YOLOv7-tiny | 0.895 | 0.924 | 0.909 | 0.951 | 0.620 |
Improved YOLOv5s | 0.937 | 0.926 | 0.931 | 0.961 | 0.648 |
Improved YOLOv7-tiny | 0.926 | 0.913 | 0.919 | 0.954 | 0.627 |
Network | Parameters/M | Model Size/MB | FLOPs/GFLOPs | Inference Speed/ms (b32) |
---|---|---|---|---|
YOLOv5s | 7.03 | 13.8 | 15.8 | 11.4 |
YOLOv7-tiny | 6.02 | 11.7 | 13.1 | 8.2 |
Improved YOLOv5s | 3.69 | 7.49 | 8.1 | 7 |
Improved YOLOv7-tiny | 6.05 | 11.9 | 13.5 | 8.6 |
Models | Average Precision | mAP (IOU = 0.5) | |||||
---|---|---|---|---|---|---|---|
Cnaphalocrocis Medinalis | Chilo Suppressalis | Rice Smut | Rice Blast | Streak Disease | Sheath Blight | ||
YOLOv5s | 0.995 | 0.953 | 0.970 | 0.981 | 0.977 | 0.836 | 0.952 |
YOLOv7-tiny | 0.996 | 0.971 | 0.959 | 0.958 | 0.969 | 0.852 | 0.951 |
Improved YOLOv5s | 0.995 | 0.971 | 0.976 | 0.977 | 0.982 | 0.866 | 0.961 |
Improved YOLOv7-tiny | 0.994 | 0.980 | 0.956 | 0.959 | 0.964 | 0.873 | 0.954 |
Network | Precision | Recall | Inference Speed/ms |
---|---|---|---|
Improved YOLOv5s | 0.925 | 0.939 | 374 |
Improved YOLOv7-tiny | 0.915 | 0.918 | 401 |
Network | Model Size/MB | CPU Usage/% | RAM Usage/MB |
---|---|---|---|
Improved YOLOv5s | 14.3 | 49 | 262.9 |
Improved YOLOv7-tiny | 23.1 | 52 | 318.2 |
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
Deng, J.; Yang, C.; Huang, K.; Lei, L.; Ye, J.; Zeng, W.; Zhang, J.; Lan, Y.; Zhang, Y. Deep-Learning-Based Rice Disease and Insect Pest Detection on a Mobile Phone. Agronomy 2023, 13, 2139. https://doi.org/10.3390/agronomy13082139
Deng J, Yang C, Huang K, Lei L, Ye J, Zeng W, Zhang J, Lan Y, Zhang Y. Deep-Learning-Based Rice Disease and Insect Pest Detection on a Mobile Phone. Agronomy. 2023; 13(8):2139. https://doi.org/10.3390/agronomy13082139
Chicago/Turabian StyleDeng, Jizhong, Chang Yang, Kanghua Huang, Luocheng Lei, Jiahang Ye, Wen Zeng, Jianling Zhang, Yubin Lan, and Yali Zhang. 2023. "Deep-Learning-Based Rice Disease and Insect Pest Detection on a Mobile Phone" Agronomy 13, no. 8: 2139. https://doi.org/10.3390/agronomy13082139
APA StyleDeng, J., Yang, C., Huang, K., Lei, L., Ye, J., Zeng, W., Zhang, J., Lan, Y., & Zhang, Y. (2023). Deep-Learning-Based Rice Disease and Insect Pest Detection on a Mobile Phone. Agronomy, 13(8), 2139. https://doi.org/10.3390/agronomy13082139