MSGV-YOLOv7: A Lightweight Pineapple Detection Method
Abstract
:1. Introduction
- To enhance adaptability to mobile devices, the MobileOne lightweight network was introduced as a replacement for the YOLOv7 backbone network with the objective of diminishing parameter count and expediting model training speed.
- The original network architecture was substituted with the lightweight GSConv and VoVGSCSP backbone designs, resulting in reduced computational complexity and network structure complexity while still maintaining satisfactory object detection precision.
- The SimSPPF module was incorporated to enhance and optimize the SPP structure. Its uniqueness lies in the gradual pooling approach as opposed to simultaneous pooling at three scales. This modification effectively improves the efficiency of object feature extraction and candidate box selection.
2. Materials and Methods
2.1. Data Acquisition
2.2. Data Augmentation
2.3. Experimental Platform and Parameter Configuration
2.4. Methodology
2.4.1. Standard YOLOv7 Model
2.4.2. MSGV-YOLOv7
2.4.3. MobileOne Network
2.4.4. SimSPPF
2.4.5. GSConv
2.4.6. VoVGSCSP
2.5. Evaluation Metrics
3. Experimental Results and Analysis
3.1. Comparison of Experimental Results from Different Backbone Networks
3.2. Ablation Experiment
3.3. Comparison of Different Object Detection Models
3.4. Analysis Experiment on Feature Attributes
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Huang, Z.; Liang, Q. Agricultural organizations and the role of farmer cooperatives in China since 1978: Past and future. China Agric. Econ. Rev. 2018, 10, 48–64. [Google Scholar] [CrossRef]
- Li, D.; Jing, M.; Dai, X.; Chen, Z.; Ma, C.; Chen, J. Current status of pineapple breeding, industrial development, and genetics in China. Euphytica 2022, 218, 85. [Google Scholar] [CrossRef]
- Brainy, J.R.V.J.; Suganthi, K.D.N.; Narayanamoorthy, S.; Ilakiya, U.; Innab, N.; Alshammari, A.; Ahmadian, A.; Jeon, J. A perspective study for the assessment of field robots in agriculture: An enhanced fuzzy MADM approach. Comput. Electron. Agric. 2023, 214, 108296. [Google Scholar] [CrossRef]
- Meng, F.; Li, J.; Zhang, Y.; Qi, S.; Tang, Y. Transforming unmanned pineapple picking with spatio-temporal convolutional neural networks. Comput. Electron. Agric. 2023, 214, 108298. [Google Scholar] [CrossRef]
- Guo, A.F.; Li, J.; Guo, L.Q.; Jiang, T.; Zhao, Y.P. Structural design and analysis of an automatic pineapple picking and collecting straddle machine. J. Phys. Conf. Series. 2021, 1777, 012029. [Google Scholar] [CrossRef]
- Wang, S.; Jiang, H.; Qiao, Y.; Jiang, S.; Lin, H.; Sun, Q. The Research Progress of Vision-Based Artificial Intelligence in Smart Pig Farming. Sensors 2022, 22, 6541. [Google Scholar] [CrossRef] [PubMed]
- Dhanya, V.G.; Subeesh, A.; Kushwaha, N.L.; Vishwakarma, D.K.; Kumar, T.N.; Ritika, G.; Singh, A.N. Deep learning based computer vision approaches for smart agricultural applications. Artif. Intell. Agric. 2022, 6, 211–229. [Google Scholar] [CrossRef]
- Miao, Z.; Yu, X.; Li, N.; Zhang, Z.; He, C.; Li, Z.; Deng, C.; Sun, T. Efficient tomato harvesting robot based on image processing and deep learning. Precis. Agric. 2023, 24, 254–287. [Google Scholar] [CrossRef]
- Yang, Y.; Han, Y.; Li, S.; Yang, Y.; Zhang, M.; Li, H. Vision based fruit recognition and positioning technology for harvesting robots. Comput. Electron. Agric. 2023, 213, 108258. [Google Scholar] [CrossRef]
- Liu, J.; Liu, Z. The Vision-Based Target Recognition, Localization, and Control for Harvesting Robots: A Review. Int. J. Precis. Eng. Manuf. 2023, 1–20. [Google Scholar] [CrossRef]
- Zhu, C.; Wu, C.; Li, Y.; Hu, S.; Gong, H. Spatial location of sugarcane node for binocular vision-based harvesting robots based on improved YOLOv4. Appl. Sci. 2022, 12, 3088. [Google Scholar] [CrossRef]
- Chen, S.; Xiong, J.; Jiao, J.; Xie, Z.; Huo, Z.; Hu, W. Citrus fruits maturity detection in natural environments based on convolutional neural networks and visual saliency map. Precis. Agric. 2022, 23, 1515–1531. [Google Scholar] [CrossRef]
- Luo, T.; Zhao, J.; Gu, Y.; Zhang, S.; Qiao, X.; Tian, W.; Han, Y. Classification of weed seeds based on visual images and deep learning. Inf. Process. Agric. 2023, 10, 40–51. [Google Scholar] [CrossRef]
- Taheri-Garavand, A.; Nasiri, A.; Fanourakis, D.; Fatahi, S.; Omid, M.; Nikoloudakis, N. Automated in situ seed variety identification via deep learning: A case study in chickpea. Plants 2021, 10, 1406. [Google Scholar] [CrossRef] [PubMed]
- Vignesh, K.; Askarunisa, A.; Abirami, A.M. Optimized Deep Learning Methods for Crop Yield Prediction. Comput. Syst. Sci. Eng. 2023, 44, 1051–1067. [Google Scholar] [CrossRef]
- Wang, L.; Shi, W.; Tang, Y.; Liu, Z.; He, X.; Xiao, H.; Yang, Y. Transfer Learning-Based Lightweight SSD Model for Detection of Pests in Citrus. Agronomy 2023, 13, 1710. [Google Scholar] [CrossRef]
- Ding, F.; Zhuang, Z.; Liu, Y.; Jiang, D.; Yan, X.; Wang, Z. Detecting defects on solid wood panels based on an improved SSD algorithm. Sensors 2020, 20, 5315. [Google Scholar] [CrossRef]
- Wang, Y.; Yang, L.; Chen, H.; Hussain, A.; Ma, C.; Al-gabri, M. Mushroom-YOLO: A deep learning algorithm for mushroom growth recognition based on improved YOLOv5 in agriculture 4.0. In Proceedings of the 2022 IEEE 20th International Conference on Industrial Informatics (INDIN), Perth, Australia, 25–28 July 2022; pp. 239–244. [Google Scholar]
- Lippi, M.; Bonucci, N.; Carpio, R.F.; Contarini, M.; Speranza, S.; Gasparri, A. A yolo-based pest detection system for precision agriculture. In Proceedings of the 2021 29th Mediterranean Conference on Control and Automation (MED), Bari, Italy, 22–25 June 2021; pp. 342–347. [Google Scholar]
- Niu, Y.; Lu, M.; Liang, X.; Wu, Q.; Mu, J. YOLO-plum: A high precision and real-time improved algorithm for plum recognition. PLoS ONE 2023, 18, e0287778. [Google Scholar] [CrossRef]
- Junos, M.H.; Mohd Khairuddin, A.S.; Thannirmalai, S.; Dahari, M. Automatic detection of oil palm fruits from UAV images using an improved YOLO model. Vis. Comput. 2022, 38, 2341–2355. [Google Scholar] [CrossRef]
- Cardellicchio, A.; Solimani, F.; Dimauro, G.; Petrozza, A.; Summerer, S.; Cellini, F.; Renò, V. Detection of tomato plant phenotyping traits using YOLOv5-based single stage detectors. Comput. Electron. Agric. 2023, 207, 107757. [Google Scholar] [CrossRef]
- Sekharamantry, P.K.; Melgani, F.; Malacarne, J. Deep Learning-Based Apple Detection with Attention Module and Improved Loss Function in YOLO. Remote Sens. 2023, 15, 1516. [Google Scholar] [CrossRef]
- Gai, R.; Chen, N.; Yuan, H. A detection algorithm for cherry fruits based on the improved YOLO-v4 model. Neural Comput. Appl. 2023, 35, 13895–13906. [Google Scholar] [CrossRef]
- Tang, Y.; Zhou, H.; Wang, H.; Zhang, Y. Fruit detection and positioning technology for a Camellia oleifera C. Abel orchard based on improved YOLOv4-tiny model and binocular stereo vision. Expert Syst. Appl. 2023, 211, 118573. [Google Scholar] [CrossRef]
- Huang, M.L.; Wu, Y.S. GCS-YOLOV4-Tiny: A lightweight group convolution network for multi-stage fruit detection. Math. Biosci. Eng. 2023, 20, 241–268. [Google Scholar] [CrossRef] [PubMed]
- Zhong, S.; Xu, W.; Zhang, T.; Chen, H. Identification and depth localization of clustered pod pepper based on improved Faster R-CNN. IEEE Access 2022, 10, 93615–93625. [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]
- Chollet, F. Xception: Deep learning with depthwise separable convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Honolulu, HI, USA, 21–26 July 2017; pp. 1251–1258. [Google Scholar]
- Zhang, Z.G.; Zhang, Z.D.; Li, J.N.; Wang, H.; Li, Y.; Li, D. Potato detection in complex environment based on improved YOLOv4 model. Trans. Chin. Soc. Agric. Eng. (Trans. CSAE) 2021, 37, 170–178, (In Chinese with English Abstract). [Google Scholar]
- Zhang, X.; Gao, Q.; Pan, D.; Cao, P.C.; Huang, D.H. Research on spatial positioning system of fruits to be picked in field based on binocular vision and SSD model. J. Phys. Conf. Ser. 2021, 1748, 042011. [Google Scholar] [CrossRef]
- Liu, T.H.; Nie, X.N.; Wu, J.M.; Zhang, D.; Liu, W.; Cheng, Y.F.; Zheng, Y.; Qiu, J.; Qi, L. Pineapple (Ananas comosus) fruit detection and localization in natural environment based on binocular stereo vision and improved YOLOv3 model. Precis. Agric. 2023, 24, 139–160. [Google Scholar] [CrossRef]
- Su, L.; Sun, H.; Zhang, S.; Lu, X.; Wang, R.; Wang, L.; Wang, N. Cucumber Picking Recognition in Near-Color Background Based on Improved YOLOv5. Agronomy 2023, 13, 2062. [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]
- Chen, C.; Wang, F.; Cai, Y.; Yi, S.; Zhang, B. An Improved YOLOv5s-Based Agaricus bisporus Detection Algorithm. Agronomy 2023, 13, 1871. [Google Scholar] [CrossRef]
Data | Original | Data Enhancement | ||||
---|---|---|---|---|---|---|
Training | Validation | Testing | Training | Validation | Testing | |
Single pineapple | 314 | 55 | 69 | 554 | 55 | 69 |
Multiple pineapples | 305 | 62 | 73 | 538 | 62 | 73 |
Occlusion | 302 | 57 | 58 | 531 | 57 | 58 |
Exposure/Backlight | 296 | 64 | 65 | 524 | 64 | 65 |
Total | 1217 | 238 | 265 | 2147 | 238 | 265 |
Hardware Configuration or Software Environment | Model or Name | Reference or Version |
---|---|---|
CPU | Intel(R) Core(TM) i5-12400 | Clock Speed of 2.5 GHz |
GPU | NVIDIA GeForce RTX 3060 | VRAM 12GB |
Computing system | Windows | 11 |
Network framework | Pytorch | 1.8.2 |
Computing Architecture | CUDA | 11.1 |
Compiler | Pycharm | 2022.1.3 |
Compiled language | Python | 3.9 |
Networks | Mode Size (MB) | P (%) | R (%) | mAP (%) | Fps (f/s) |
---|---|---|---|---|---|
YOLOv7 | 37.65 | 93.68 | 91.48 | 93.62 | 42.11 |
YOLOv7+ShuffleNetV2 | 29.12 | 96.85 | 89.42 | 91.08 | 46.95 |
YOLOv7+GhostNet | 26.08 | 95.60 | 90.91 | 93.46 | 38.82 |
YOLOv7+MobileNetV3 | 28.44 | 94.92 | 91.17 | 92.71 | 32.57 |
YOLOv7+MobileOne | 24.71 | 94.86 | 91.11 | 94.61 | 46.70 |
MobileOne | GSConv | VoVGSCSP | SimSPPF | P (%) | R (%) | mAP (%) | FPS (f/s) |
---|---|---|---|---|---|---|---|
- | - | - | - | 93.68 | 91.48 | 93.62 | 42.11 |
√ | - | - | - | 94.86 | 91.11 | 94.61 | 46.70 |
√ | √ | - | - | 95.96 | 92.45 | 95.34 | 45.52 |
√ | √ | √ | - | 94.72 | 93.05 | 95.49 | 46.08 |
√ | √ | √ | √ | 95.66 | 92.83 | 96.65 | 59.63 |
Experiments | Mode Size (MB) | P (%) | R (%) | mAP (%) | Fps (f/s) |
---|---|---|---|---|---|
Faster R-CNN | 139.21 | 85.89 | 78.19 | 81.76 | 27.34 |
SSD | 28.39 | 91.62 | 86.34 | 90.28 | 30.02 |
YOLOv5n | 48.91 | 93.19 | 87.07 | 91.43 | 37.59 |
YOLOv8l | 42.74 | 94.61 | 90.86 | 93.96 | 48.25 |
YOLOv7 | 37.65 | 93.68 | 91.48 | 93.62 | 42.11 |
MSGV-YOLOv7 | 13.17 | 95.66 | 92.83 | 96.65 | 59.63 |
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
Zhang, R.; Huang, Z.; Zhang, Y.; Xue, Z.; Li, X. MSGV-YOLOv7: A Lightweight Pineapple Detection Method. Agriculture 2024, 14, 29. https://doi.org/10.3390/agriculture14010029
Zhang R, Huang Z, Zhang Y, Xue Z, Li X. MSGV-YOLOv7: A Lightweight Pineapple Detection Method. Agriculture. 2024; 14(1):29. https://doi.org/10.3390/agriculture14010029
Chicago/Turabian StyleZhang, Rihong, Zejun Huang, Yuling Zhang, Zhong Xue, and Xiaomin Li. 2024. "MSGV-YOLOv7: A Lightweight Pineapple Detection Method" Agriculture 14, no. 1: 29. https://doi.org/10.3390/agriculture14010029
APA StyleZhang, R., Huang, Z., Zhang, Y., Xue, Z., & Li, X. (2024). MSGV-YOLOv7: A Lightweight Pineapple Detection Method. Agriculture, 14(1), 29. https://doi.org/10.3390/agriculture14010029