A Transformer-Based Detection Network for Precision Cistanche Pest and Disease Management in Smart Agriculture
Abstract
1. Introduction
2. Related Work
2.1. Single-Stage Object Detection Networks
2.2. Two-Stage Object Detection Networks
2.3. DETR: Transformer-Based Object Detection Network
3. Materials and Method
3.1. Dataset Collection
3.2. Data Augmentation
3.2.1. Basic Augmentation Methods
3.2.2. Mixup, Cutout, Random Erase
3.3. Proposed Method
3.3.1. Overview
3.3.2. Transformer-Based Object Detection Network
3.3.3. Bridging Attention Mechanism
- The input feature map is first processed through the self-attention mechanism to generate weighted representations for each position.
- Low-level features and high-level features are then fused with weights and combined with the output of the self-attention mechanism to produce the final bridging features .
- Finally, the bridging features are processed through a feedforward neural network to generate the final object classification and regression results.
- Enhancing detail information: Low-level features help the model focus on subtle changes in disease spots, which is critical for detecting cistanche diseases.
- Improving global semantic representation: High-level semantic features provide global background information, aiding the model in understanding the relationship between targets and the background.
- Increasing the accuracy of small and occluded target detection: By fusing low-level and high-level information, the model is better equipped to handle challenges arising from occluded targets and varying target sizes.
3.3.4. Bridging Loss Function
- (1)
- is the classification loss, which is defined using the cross-entropy loss function:
- (2)
- is the regression loss, which is defined using the smooth L1 loss function:The smooth L1 loss is defined as
- (3)
- is the bridging term, which is used to dynamically balance classification and regression losses while enhancing the weight of difficult examples:Here, is the low IoU value between the current predicted box and the ground truth box, which is used to identify targets that are difficult to localize; is a scaling parameter to amplify the impact of difficult examples.
4. Results and Discussion
4.1. Experimental Setup
4.1.1. Hardware and Software Platform
4.1.2. Dataset Split and Hyperparameters
4.1.3. Evaluation Metrics
4.2. Baseline
4.3. Pest and Disease Detection Results
4.4. Results Analysis
4.5. Confusion Matrix Analysis
4.6. Ablation Study on Different Attention Mechanisms
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Jiang, L.; Zhou, B.; Wang, X.; Bi, Y.; Guo, W.; Wang, J.; Yao, R.; Li, M. The quality monitoring of Cistanches Herba (Cistanche deserticola Ma): A value chain perspective. Front. Pharmacol. 2021, 12, 782962. [Google Scholar] [CrossRef] [PubMed]
- Jiang, L.; Zhou, B.; Wang, X.; Bi, Y.; Guo, W.; Wang, J.; Yao, R.; Li, M. From Value Chain Perspective To Monitoring The Cistanche Herba. Chin. Med. 2024, 6, 5218. [Google Scholar]
- Zhang, Y.; Wa, S.; Liu, Y.; Zhou, X.; Sun, P.; Ma, Q. High-accuracy detection of maize leaf diseases CNN based on multi-pathway activation function module. Remote Sens. 2021, 13, 4218. [Google Scholar] [CrossRef]
- Wu, L.; Xiang, T.; Chen, C.; Isah, M.B.; Zhang, X. Studies on Cistanches herba: A bibliometric analysis. Plants 2023, 12, 1098. [Google Scholar] [CrossRef]
- Wang, Y.; Tian, Z.P.; Xie, J.J.; Luo, Y.; Yao, J.; Shen, J. Rapid Determination of Polysaccharides in Cistanche Tubulosa Using Near-Infrared Spectroscopy Combined with Machine Learning. J. AOAC Int. 2023, 106, 1118–1125. [Google Scholar] [CrossRef]
- Zhang, Y.; Wa, S.; Zhang, L.; Lv, C. Automatic plant disease detection based on tranvolution detection network with GAN modules using leaf images. Front. Plant Sci. 2022, 13, 875693. [Google Scholar] [CrossRef]
- Zhang, S.; Ma, Y.; Chen, J.; Yu, M.; Zhao, Q.; Jing, B.; Yang, N.; Ma, X.; Wang, Y. Chemical composition, pharmacological effects, and parasitic mechanisms of Cistanche deserticola: An update. Phytomedicine 2024, 132, 155808. [Google Scholar] [CrossRef]
- Zhang, Y.; Yang, X.; Liu, Y.; Zhou, J.; Huang, Y.; Li, J.; Zhang, L.; Ma, Q. A time-series neural network for pig feeding behavior recognition and dangerous detection from videos. Comput. Electron. Agric. 2024, 218, 108710. [Google Scholar] [CrossRef]
- Kibriya, H.; Abdullah, I.; Nasrullah, A. Plant disease identification and classification using convolutional neural network and SVM. In Proceedings of the 2021 International Conference on Frontiers of Information Technology (FIT), Islamabad, Pakistan, 13–14 December 2021; pp. 264–268. [Google Scholar]
- Shoaib, M.; Shah, B.; Ei-Sappagh, S.; Ali, A.; Ullah, A.; Alenezi, F.; Gechev, T.; Hussain, T.; Ali, F. An advanced deep learning models-based plant disease detection: A review of recent research. Front. Plant Sci. 2023, 14, 1158933. [Google Scholar]
- Ahmad, A.; Saraswat, D.; El Gamal, A. A survey on using deep learning techniques for plant disease diagnosis and recommendations for development of appropriate tools. Smart Agric. Technol. 2023, 3, 100083. [Google Scholar] [CrossRef]
- Zhang, Y.; Lv, C. TinySegformer: A lightweight visual segmentation model for real-time agricultural pest detection. Comput. Electron. Agric. 2024, 218, 108740. [Google Scholar] [CrossRef]
- Khalid, M.M.; Karan, O. Deep learning for plant disease detection. Int. J. Math. Stat. Comput. Sci. 2024, 2, 75–84. [Google Scholar] [CrossRef]
- Chen, Z.; Wang, G.; Lv, T.; Zhang, X. Using a Hybrid Convolutional Neural Network with a Transformer Model for Tomato Leaf Disease Detection. Agronomy 2024, 14, 673. [Google Scholar] [CrossRef]
- Kumar, V.S.; Jaganathan, M.; Viswanathan, A.; Umamaheswari, M.; Vignesh, J. Rice leaf disease detection based on bidirectional feature attention pyramid network with YOLO v5 model. Environ. Res. Commun. 2023, 5, 065014. [Google Scholar] [CrossRef]
- Chitraningrum, N.; Banowati, L.; Herdiana, D.; Mulyati, B.; Sakti, I.; Fudholi, A.; Saputra, H.; Farishi, S.; Muchtar, K.; Andria, A.; et al. Comparison Study of Corn Leaf Disease Detection based on Deep Learning YOLO-v5 and YOLO-v8. J. Eng. Technol. Sci. 2024, 56, 61–70. [Google Scholar] [CrossRef]
- Sethy, P.K.; Barpanda, N.K.; Rath, A.K.; Behera, S.K. Rice false smut detection based on faster R-CNN. Indones. J. Electr. Eng. Comput. Sci. 2020, 19, 1590–1595. [Google Scholar] [CrossRef]
- Yu, Z. Research on Crop Pest and Disease Diagnosis Method Based on Improved Faster R-CNN. In Proceedings of the 2023 5th International Conference on Artificial Intelligence and Computer Applications (ICAICA), Dalian, China, 28–30 November 2023; pp. 46–50. [Google Scholar]
- Zhao, S.; Liu, J.; Wu, S. Multiple disease detection method for greenhouse-cultivated strawberry based on multiscale feature fusion Faster R_CNN. Comput. Electron. Agric. 2022, 199, 107176. [Google Scholar] [CrossRef]
- Mathew, M.P.; Mahesh, T.Y. Leaf-based disease detection in bell pepper plant using YOLO v5. In Signal, Image and Video Processing; Springer: Berlin/Heidelberg, Germany, 2022; pp. 841–847. [Google Scholar]
- Li, Q.; Ren, J.; Zhang, Y.; Song, C.; Liao, Y.; Zhang, Y. Privacy-Preserving DNN Training with Prefetched Meta-Keys on Heterogeneous Neural Network Accelerators. In Proceedings of the 2023 60th ACM/IEEE Design Automation Conference (DAC), San Francisco, CA, USA, 9–13 July 2023; pp. 1–6. [Google Scholar]
- Morbekar, A.; Parihar, A.; Jadhav, R. Crop disease detection using YOLO. In Proceedings of the 2020 international conference for emerging technology (INCET), Belgaum, India, 5–7 June 2020; pp. 1–5. [Google Scholar]
- Liu, J.; Wang, X. Tomato diseases and pests detection based on improved Yolo V3 convolutional neural network. Front. Plant Sci. 2020, 11, 898. [Google Scholar] [CrossRef]
- Li, D.; Ahmed, F.; Wu, N.; Sethi, A.I. Yolo-JD: A Deep Learning Network for jute diseases and pests detection from images. Plants 2022, 11, 937. [Google Scholar] [CrossRef]
- Xu, Y.; Chen, Q.; Kong, S.; Xing, L.; Wang, Q.; Cong, X.; Zhou, Y. Real-time object detection method of melon leaf diseases under complex background in greenhouse. J. Real-Time Image Process. 2022, 19, 985–995. [Google Scholar] [CrossRef]
- Reddy, M.P.; Deeksha, A. Mulberry leaf disease detection using yolo. Int. J. Adv. Res. Ideas Innov. Technol. 2021, 7. Available online: https://www.researchgate.net/publication/353143046_Mulberry_leaf_disease_detection_using_YOLO (accessed on 2 February 2025).
- Nasution, S.W.; Kartika, K. Eggplant disease detection using yolo algorithm telegram notified. Int. J. Eng. Sci. Inf. Technol. 2022, 2, 127–132. [Google Scholar] [CrossRef]
- Rajamohanan, R.; Latha, B.C. An Optimized YOLO v5 Model for Tomato Leaf Disease Classification with Field Dataset. Eng. Technol. Appl. Sci. Res. 2023, 13, 12033–12038. [Google Scholar] [CrossRef]
- Bari, B.S.; Islam, M.N.; Rashid, M.; Hasan, M.J.; Razman, M.A.M.; Musa, R.M.; Ab Nasir, A.F.; Majeed, A.P.A. A real-time approach of diagnosing rice leaf disease using deep learning-based faster R-CNN framework. PeerJ Comput. Sci. 2021, 7, e432. [Google Scholar] [CrossRef]
- Gong, X.; Zhang, S. A high-precision detection method of apple leaf diseases using improved faster R-CNN. Agriculture 2023, 13, 240. [Google Scholar] [CrossRef]
- Li, Q.; Zhang, Y.; Ren, J.; Li, Q.; Zhang, Y. You Can Use But Cannot Recognize: Preserving Visual Privacy in Deep Neural Networks. arXiv 2024, arXiv:2404.04098. [Google Scholar]
- Zhang, K.; Wu, Q.; Chen, Y. Detecting soybean leaf disease from synthetic image using multi-feature fusion faster R-CNN. Comput. Electron. Agric. 2021, 183, 106064. [Google Scholar] [CrossRef]
- Li, J.H.; Lin, L.J.; Tian, K.; Alaa, A.A. Detection of leaf diseases of balsam pear in the field based on improved Faster R-CNN. Trans. Chin. Soc. Agric. Eng. 2020, 36, 179–185. [Google Scholar]
- Li, Q.; Zhang, Y. Confidential Federated Learning for Heterogeneous Platforms against Client-Side Privacy Leakages. In Proceedings of the ACM Turing Award Celebration Conference 2024, Changsha China, 5–7 July 2024; pp. 239–241. [Google Scholar]
- Priya, D. Cotton leaf disease detection using Faster R-CNN with Region Proposal Network. Int. J. Biol. Biomed. 2021, 6. Available online: https://www.iaras.org/iaras/filedownloads/ijbb/2021/021-0004(2021).pdf (accessed on 3 February 2025).
- Pan, J.; Xia, L.; Wu, Q.; Guo, Y.; Chen, Y.; Tian, X. Automatic strawberry leaf scorch severity estimation via faster R-CNN and few-shot learning. Ecol. Informat. 2022, 70, 101706. [Google Scholar] [CrossRef]
- Gao, F.; Fu, L.; Zhang, X.; Majeed, Y.; Li, R.; Karkee, M.; Zhang, Q. Multi-class fruit-on-plant detection for apple in SNAP system using Faster R-CNN. Comput. Electron. Agric. 2020, 176, 105634. [Google Scholar] [CrossRef]
- Bansal, A.; Sharma, R.; Sharma, V.; Jain, A.K.; Kukreja, V. A deep learning approach to detect and classify wheat leaf spot using faster R-CNN and support vector machine. In Proceedings of the 2023 IEEE 8th International Conference for Convergence in Technology (I2CT), Lonavla, India, 7–9 April 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 1–6. [Google Scholar]
- Liu, Z.; Yuan, X.; Weng, J.; Liao, Y.; Xie, L. Application of bitter gourd leaf disease detection based on faster r-cnn. In Proceedings of the Advancements in Mechatronics and Intelligent Robotics: Proceedings of ICMIR 2020, Yunnan, China, 22–24 May 2020; Springer: Singapore, 2021; pp. 191–198. [Google Scholar]
- Wu, J.; Wen, C.; Chen, H.; Ma, Z.; Zhang, T.; Su, H.; Yang, C. DS-DETR: A model for tomato leaf disease segmentation and damage evaluation. Agronomy 2022, 12, 2023. [Google Scholar] [CrossRef]
- Wang, H.; Nguyen, T.H.; Nguyen, T.N.; Dang, M. PD-TR: End-to-end plant diseases detection using a transformer. Comput. Electron. Agric. 2024, 224, 109123. [Google Scholar] [CrossRef]
- Zhao, Z.; Chen, S.; Ge, Y.; Yang, P.; Wang, Y.; Song, Y. Rt-detr-tomato: Tomato target detection algorithm based on improved rt-detr for agricultural safety production. Appl. Sci. 2024, 14, 6287. [Google Scholar] [CrossRef]
- Li, X.; Cai, M.; Tan, X.; Yin, C.; Chen, W.; Liu, Z.; Wen, J.; Han, Y. An efficient transformer network for detecting multi-scale chicken in complex free-range farming environments via improved RT-DETR. Comput. Electron. Agric. 2024, 224, 109160. [Google Scholar] [CrossRef]
- Liu, B.; Jia, Y.; Liu, L.; Dang, Y.; Song, S. Skip DETR: End-to-end Skip connection model for small object detection in forestry pest dataset. Front. Plant Sci. 2023, 14, 1219474. [Google Scholar] [CrossRef]
- Yang, Z.; Yang, W.; Yi, J.; Liu, R. WH-DETR: An Efficient Network Architecture for Wheat Spike Detection in Complex Backgrounds. Agriculture 2024, 14, 961. [Google Scholar] [CrossRef]
- Li, H.; Shi, F. A DETR-like detector-based semi-supervised object detection method for Brassica Chinensis growth monitoring. Comput. Electron. Agric. 2024, 219, 108788. [Google Scholar] [CrossRef]
- Qadri, S.A.A.; Huang, N.F.; Wani, T.M.; Bhat, S.A. Plant Disease Detection and Segmentation using End-to-End YOLOv8: A Comprehensive Approach. In Proceedings of the 2023 IEEE 13th International Conference on Control System, Computing and Engineering (ICCSCE), Penang, Malaysia, 25–26 August 2023; IEEE: Piscataway, NJ, USA, 2023; pp. 155–160. [Google Scholar]
- He, R.; Li, P.; Zhu, J.; Zhang, F.; Wang, Y.; Zhang, T.; Yang, D.; Zhou, B. YOLOv9-LSBN: An improved YOLOv9 model for cotton pest and disease identification method. arXiv 2024, arXiv:4727616/v1. [Google Scholar]
- Carion, N.; Massa, F.; Synnaeve, G.; Usunier, N.; Kirillov, A.; Zagoruyko, S. End-to-end object detection with transformers. In Proceedings of the European Conference on Computer Vision, Glasgow, UK, 23–28 August 2020; pp. 213–229. [Google Scholar]
- Ren, S.; He, K.; Girshick, R.; Sun, J. Faster R-CNN: Towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 2016, 39, 1137–1149. [Google Scholar] [CrossRef]
Disease | Raw Data Number | Enhancement Number |
---|---|---|
Powdery Mildew | 1092 | 9828 |
Stem Rot | 1781 | 16,029 |
Root Rot | 1267 | 11,403 |
Aphids | 1514 | 13,626 |
Stem-Borer Damage | 1339 | 12,051 |
Model | Precision | Recall | Accuracy | mAP@50 | mAP@75 | FPS |
---|---|---|---|---|---|---|
Faster-RCNN | 0.84 | 0.80 | 0.82 | 0.82 | 0.81 | 21 |
DETR | 0.87 | 0.83 | 0.85 | 0.84 | 0.83 | 18 |
YOLO v8 | 0.90 | 0.86 | 0.88 | 0.87 | 0.85 | 45 |
YOLO v9 | 0.92 | 0.89 | 0.90 | 0.90 | 0.89 | 50 |
Proposed Method | 0.95 | 0.92 | 0.93 | 0.92 | 0.90 | 47 |
Disease | Precision | Recall | Accuracy | mAP@50 | mAP@75 |
---|---|---|---|---|---|
Stem Rot | 0.97 | 0.94 | 0.96 | 0.95 | 0.94 |
Root Rot | 0.96 | 0.93 | 0.94 | 0.94 | 0.93 |
Powdery Mildew | 0.95 | 0.92 | 0.93 | 0.93 | 0.92 |
Aphids | 0.93 | 0.90 | 0.92 | 0.92 | 0.91 |
Stem Borers | 0.92 | 0.89 | 0.90 | 0.91 | 0.90 |
Attention Mechanism | Precision | Recall | Accuracy | mAP@50 | mAP@75 |
---|---|---|---|---|---|
Standard Self-Attention | 0.77 | 0.71 | 0.74 | 0.74 | 0.72 |
CBAM | 0.85 | 0.81 | 0.83 | 0.84 | 0.83 |
Bridging Attention | 0.95 | 0.92 | 0.93 | 0.92 | 0.90 |
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. |
© 2025 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
Zhang, H.; Gong, Z.; Hu, C.; Chen, C.; Wang, Z.; Yu, B.; Suo, J.; Jiang, C.; Lv, C. A Transformer-Based Detection Network for Precision Cistanche Pest and Disease Management in Smart Agriculture. Plants 2025, 14, 499. https://doi.org/10.3390/plants14040499
Zhang H, Gong Z, Hu C, Chen C, Wang Z, Yu B, Suo J, Jiang C, Lv C. A Transformer-Based Detection Network for Precision Cistanche Pest and Disease Management in Smart Agriculture. Plants. 2025; 14(4):499. https://doi.org/10.3390/plants14040499
Chicago/Turabian StyleZhang, Hang, Zimo Gong, Chen Hu, Canyang Chen, Zihang Wang, Boda Yu, Jingchao Suo, Chenlu Jiang, and Chunli Lv. 2025. "A Transformer-Based Detection Network for Precision Cistanche Pest and Disease Management in Smart Agriculture" Plants 14, no. 4: 499. https://doi.org/10.3390/plants14040499
APA StyleZhang, H., Gong, Z., Hu, C., Chen, C., Wang, Z., Yu, B., Suo, J., Jiang, C., & Lv, C. (2025). A Transformer-Based Detection Network for Precision Cistanche Pest and Disease Management in Smart Agriculture. Plants, 14(4), 499. https://doi.org/10.3390/plants14040499