YOLOv7-Branch: A Jujube Leaf Branch Detection Model for Agricultural Robot
Abstract
:1. Introduction
- (1)
- The Polarized Self-Attention module is embedded into the convolutional layer, and the Gather-Excite (GE) follow-up is embedded into the concatenation layer, so as to enhance the network’s feature extraction for jujube leaves and to improve the detection accuracy.
- (2)
- The Efficient Decoupled Head based on YOLOR’s implicit knowledge is proposed, and we use it to replaces the detection head from the original YOLOv7-tiny model, so as to extract deep information from the network.
- (3)
- The focal and efficient intersection over union (Focal-EIoU) loss calculation replaces the complete intersection over union (CIoU) calculation, making the model increasingly accurate when the jujube leaf branches are detected.
2. Data Acquisition and Preprocessing
2.1. Data Acquisition
2.2. Data Comparative Analysis
2.3. Data Enhancement
3. Methods
3.1. YOLOv7 Algorithm
3.2. Improvement of the YOLOv7-Tiny Model
3.2.1. Attention Module
- Polarized Self-Attention
- 2.
- Gather-Excite
3.2.2. Efficient Decoupled Head
3.2.3. Loss Function
4. Experiments and Results
4.1. Evaluation Index and Platform
4.1.1. Evaluation Index
4.1.2. Experimental Platform
4.2. Comparison of Different Network
4.2.1. Ablation Experiments
4.2.2. Comparison of Different Networks
4.2.3. Experimental Comparison before and after Model Improvement
4.2.4. Application of Our Method
5. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Zhao, X.H.G.; Yi, L.N. Effect of Ziziphus jujube leaf extract on the central nervous system. Lishizhen Med. Mater. Med. 2009, 20, 463–464. [Google Scholar]
- Zhang, R.; Chen, J.; Shi, Q.; Li, Z.; Peng, Z.; Zheng, L.; Wang, X. Phytochemical analysis of Chinese commercial Ziziphus jujube leaf tea using high performance liquid chromatography–electrospray ionization-time of flight mass spectrometry. Food Res. Int. 2014, 56, 47–54. [Google Scholar] [CrossRef]
- Zhang, R.; Chen, J.; Shi, Q.; Li, Z.; Peng, Z.; Zheng, L.; Wang, X. Quality control method for commercially available wild Jujube leaf tea based on HPLC characteristic fingerprint analysis of flavonoid compounds. J. Sep. Sci. 2014, 37, 45–52. [Google Scholar] [CrossRef] [PubMed]
- Guo, S.; Duan, J.-A.; Tang, Y.; Qian, Y.; Zhao, J.; Qian, D.; Su, S.; Shang, E. Simultaneous qualitative and quantitative analysis of triterpenic acids, saponins and flavonoids in the leaves of two Ziziphus species by HPLC–PDA–MS/ELSD. J. Pharm. Biomed. Anal. 2011, 56, 264–270. [Google Scholar] [CrossRef] [PubMed]
- Yao, B. Determination of Rutin from Leaves of Ziziphus jujuba Gathered in Different Areas and Different Periods by HPLC-UV. Chin. J. Exp. Tradit. Med. Formulae 2011, 17, 94–96. [Google Scholar]
- Shafi, U.; Mumtaz, R.; Qureshi, M.D.M.; Mahmood, Z.; Tanveer, S.K.; Haq, I.U.; Zaidi, S.M.H. Embedded AI for Wheat Yellow Rust Infection Type Classification. IEEE Access 2023, 11, 23726–23738. [Google Scholar] [CrossRef]
- Mota-Delfin, C.; López-Canteñs, G.D.; López-Cruz, I.L.; Romantchik-Kriuchkova, E.; Olguín-Rojas, J.C. Detection and Counting of Corn Plants in the Presence of Weeds with Convolutional Neural Networks. Remote Sens. 2022, 14, 4892. [Google Scholar] [CrossRef]
- Barré, P.; Stöver, B.C.; Müller, K.F.; Steinhage, V. LeafNet: A computer vision system for automatic plant species identification. Ecol. Inform. 2017, 40, 50–56. [Google Scholar] [CrossRef]
- Chen, Y.; Xu, H.; Zhang, X.; Gao, P.; Xu, Z.; Huang, X. An object detection method for bayberry trees based on an improved YOLO algorithm. Int. J. Digit. Earth 2023, 16, 781–805. [Google Scholar] [CrossRef]
- Lai, J.W.; Ramli, H.R.; Ismail, L.I.; Hasan, W.Z.W. Real-Time Detection of Ripe Oil Palm Fresh Fruit Bunch Based on YOLOv4. IEEE Access 2022, 10, 95763–95770. [Google Scholar] [CrossRef]
- Shen, R.; Zhen, T.; Li, Z. YOLOv5-Based Model Integrating Separable Convolutions for Detection of Wheat Head Images. IEEE Access 2023, 11, 12059–12074. [Google Scholar] [CrossRef]
- Wang, B.; Yan, Y.; Lan, Y.; Wang, M.; Bian, Z. Accurate Detection and Precision Spraying of Corn and Weeds Using the Improved YOLOv5 Model. IEEE Access 2023, 11, 29868–29882. [Google Scholar] [CrossRef]
- Chen, S.; Zou, X.; Zhou, X.; Xiang, Y.; Wu, M. Study on fusion clustering and improved YOLOv5 algorithm based on multiple occlusion of Camellia oleifera fruit. Comput. Electron. Agric. 2023, 206, 107706. [Google Scholar] [CrossRef]
- Gao, G.; Wang, S.; Shuai, C.; Zhang, Z.; Zhang, S.; Feng, Y. Recognition and Detection of Greenhouse Tomatoes in Complex Environment. Trait. Du Signal 2022, 39, 291–298. [Google Scholar] [CrossRef]
- Liu, P.; Yin, H. YOLOv7-Peach: An Algorithm for Immature Small Yellow Peaches Detection in Complex Natural Environments. Sensors 2023, 23, 5096. [Google Scholar] [CrossRef]
- Yang, H.; Liu, Y.; Wang, S.; Qu, H.; Li, N.; Wu, J.; Yan, Y.; Zhang, H.; Wang, J.; Qiu, J. Improved Apple Fruit Target Recognition Method Based on YOLOv7 Model. Agriculture 2023, 13, 1278. [Google Scholar] [CrossRef]
- Zhou, Y.; Tang, Y.; Zou, X.; Wu, M.; Tang, W.; Meng, F.; Zhang, Y.; Kang, H. Adaptive Active Positioning of Camellia oleifera Fruit Picking Points: Classical Image Processing and YOLOv7 Fusion Algorithm. Appl. Sci. 2022, 12, 12959. [Google Scholar] [CrossRef]
- Ban, Z.; Fang, C.; Liu, L.; Wu, Z.; Chen, C.; Zhu, Y. Detection of Fundamental Quality Traits of Winter Jujube Based on Computer Vision and Deep Learning. Agronomy 2023, 13, 2095. [Google Scholar] [CrossRef]
- Zheng, Z.; Hu, Y.; Qiao, Y.; Hu, X.; Huang, Y. Real-Time Detection of Winter Jujubes Based on Improved YOLOX-Nano Network. Remote Sens. 2022, 14, 4833. [Google Scholar] [CrossRef]
- Feng, J.; Yu, C.; Shi, X.; Zheng, Z.; Yang, L.; Hu, Y. Research on Winter Jujube Object Detection Based on Optimized Yolov5s. Agronomy 2023, 13, 810. [Google Scholar] [CrossRef]
- Dong, Y.-Y.; Huang, Y.-S.; Xu, B.-L.; Li, B.-C.; Guo, B. Bruise Detection and Classification in Jujube Using Thermal Imaging and DenseNet. J. Food Process Eng. 2022, 45, e13981. [Google Scholar] [CrossRef]
- Zheng, Z.; Hu, Y.; Guo, T.; Qiao, Y.; He, Y.; Zhang, Y.; Huang, Y. AGHRNet: An Attention Ghost-HRNet for Confirmation of Catch-and-Shake Locations in Jujube Fruits Vibration Harvesting. Comput. Electron. Agric. 2023, 210, 107921. [Google Scholar] [CrossRef]
- Zheng, Z.; Liu, Y.; Dong, J.; Zhao, P.; Qiao, Y.; Sun, S.; Huang, Y. A Novel Jujube Tree Trunk and Branch Salient Object Detection Method for Catch-and-Shake Robotic Visual Perception. Expert Syst. Appl. 2024, 251, 124022. [Google Scholar] [CrossRef]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H.Y.M. YOLOv7: Trainable Bag-of-Freebies Sets New State-of-the-Art for Real-Time Object Detectors. In Proceedings of the 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 17–24 June 2023; pp. 7464–7475. [Google Scholar] [CrossRef]
- Liu, H.; Liu, F.; Fan, X.; Huang, D. Polarized self-attention: Towards high-quality pixel-wise mapping. Neurocomputing 2022, 506, 158–167. [Google Scholar] [CrossRef]
- Hu, J.; Shen, L.; Albanie, S.; Sun, G.; Vedaldi, A. Gather-Excite: Exploiting Feature Context in Convolutional Neural Networks. In Proceedings of the 32nd Conference on Neural Information Processing Systems (NIPS 2018), Montréal, QC, Canada, 3–8 December 2018. [Google Scholar]
- Wang, C.-Y.; Yeh, I.-H.; Liao, H. You Only Learn One Representation: Unified Network for Multiple Tasks. J. Inf. Sci. Eng. 2021, 39, 691–709. [Google Scholar]
- Ge, Z.; Liu, S.; Wang, F.; Li, Z.; Sun, J. YOLOX: Exceeding YOLO Series in 2021. arXiv 2021, arXiv:2107.08430. [Google Scholar]
- Li, C.; Li, L.; Jiang, H.; Weng, K.; Geng, Y.; Li, L.; Ke, Z.; Li, Q.; Cheng, M.; Nie, W.; et al. YOLOv6: A Single-Stage Object Detection Framework for Industrial Applications. arXiv 2022, arXiv:2209.02976. [Google Scholar]
- Zhang, Y.-F.; Ren, W.; Zhang, Z.; Jia, Z.; Wang, L.; Tan, T. Focal and Efficient IOU Loss for Accurate Bounding Box Regression. arXiv 2022, arXiv:2101.08158. [Google Scholar] [CrossRef]
Camera Pixel | Number of Images | |
---|---|---|
iQOO9 pro (Vivo, Dongguan, China) | 50-megapixel | 621 |
Huawei mate40 (Shenzhen, China) | 50-megapixel | 516 |
Huawei nova9 (Shenzhen, China) | 50-megapixel | 423 |
Redmi K60 Pro (Xiaomi, Beijing, China) | 54-megapixel | 440 |
Model | Yolov7 | PSA | GE | Efficient | Focal-IOU | P | R | [email protected] | [email protected]:95 |
---|---|---|---|---|---|---|---|---|---|
Model1 | ✓ | 81.5 | 76.4 | 82.5 | 38 | ||||
Model2 | ✓ | ✓ | 81.9 | 76.8 | 82.5 | 38.2 | |||
Model3 | ✓ | ✓ | ✓ | 80.8 | 77.3 | 82.7 | 38.2 | ||
Model4 | ✓ | ✓ | ✓ | ✓ | 84.4 | 74.4 | 83.3 | 38.9 | |
Model5 | ✓ | ✓ | ✓ | ✓ | ✓ | 85 | 76.7 | 83.7 | 39.2 |
Model | P | R | [email protected] | [email protected]:0.95 | FLOPs |
---|---|---|---|---|---|
YOLOv5 | 79.2 | 75.7 | 80.9 | 37.6 | 16.5 |
Fast-RCNN | 75.3 | 72.1 | 73.4 | 35.6 | 203.2 |
YOLOv8 | 81.3 | 73.5 | 80.6 | 39.4 | 8.6 |
YOLOv7 | 81.5 | 77 | 82.9 | 38.7 | 103.2 |
YOLOv7-tiny | 81.5 | 76.4 | 82.5 | 38 | 13 |
Ours | 85 | 76.7 | 83.7 | 39.2 | 31.6 |
P | R | [email protected] | |
---|---|---|---|
YOLOv7-tiny-original | 73.7 | 48.6 | 41.2 |
YOLOv7-tiny-enhanced | 81.5 | 76.4 | 82.5 |
Ours | 85 | 76.7 | 83.7 |
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. |
© 2024 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
Jing, R.; Xu, J.; Liu, J.; He, X.; Zhao, Z. YOLOv7-Branch: A Jujube Leaf Branch Detection Model for Agricultural Robot. Sensors 2024, 24, 4856. https://doi.org/10.3390/s24154856
Jing R, Xu J, Liu J, He X, Zhao Z. YOLOv7-Branch: A Jujube Leaf Branch Detection Model for Agricultural Robot. Sensors. 2024; 24(15):4856. https://doi.org/10.3390/s24154856
Chicago/Turabian StyleJing, Ruijun, Jijiang Xu, Jingkai Liu, Xiongwei He, and Zhiguo Zhao. 2024. "YOLOv7-Branch: A Jujube Leaf Branch Detection Model for Agricultural Robot" Sensors 24, no. 15: 4856. https://doi.org/10.3390/s24154856
APA StyleJing, R., Xu, J., Liu, J., He, X., & Zhao, Z. (2024). YOLOv7-Branch: A Jujube Leaf Branch Detection Model for Agricultural Robot. Sensors, 24(15), 4856. https://doi.org/10.3390/s24154856