Adaptive Active Positioning of Camellia oleifera Fruit Picking Points: Classical Image Processing and YOLOv7 Fusion Algorithm
Abstract
:1. Introduction
- (1)
- Deep learning based on visual perception is used to detect Camellia oleifera fruits in intricate environments, and the precision (P), recall (R), and mean average precision (mAP) of the detection of YOLOv7 and YOLOv5s algorithms are compared.
- (2)
- Through classical image processing, image preprocessing, segmentation, and morphological processing is carried out on the Camellia oleifera fruit image to find the centroid of the Camellia oleifera fruit; the position deviation between the centroid point of the Camellia oleifera fruit is obtained by image processing, and the center point in the YOLO recognition frame is analyzed.
2. Material and Data Collection
2.1. Test Equipment
2.2. Image and Data Collection
3. YOLOv7 Camellia oleifera Fruit Detection Algorithm
3.1. YOLOv7
3.2. Model Training
4. Image Processing
4.1. Image Preprocessing
4.2. Image Segmentation
4.3. Morphological Treatment
4.4. Centroid of Camellia oleifera Fruit
5. Test Results and Analysis
5.1. Algorithm Evaluation Indicators
5.2. Algorithm Training Results
5.3. Comparison Test Results and Analysis
5.4. Comparison of Detection Results
5.5. Positioning Deviation
6. Conclusions
- (1)
- The precision of YOLOv7 and YOLOv5s for model performance is basically similar, and the mean average precision of YOLOv7 is higher than that of YOLOv5s.
- (2)
- On the same dataset, YOLOv7 takes less time to detect images than YOLOv5s does. Compared with the YOLOv5s algorithm, the YOLOv7 algorithm can detect some occluded Camellia oleifera fruits, which significantly improves Camellia oleifera fruit detection.
- (3)
- The pixel value of the position deviation between the image extracted centroid point and the center of the YOLO recognition frame obtained by image processing is less than 10. Thus, the center of the YOLO recognition frame is approximately consistent with the image-extracted centroid point.
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Tang, N.; Tan, X.; Cai, Y.; He, M.Y.; Xiang, Z.Y.; Ye, H.; Ma, J.L. Characterizations and application potentials of the hemicel-luloses in waste oil-tea camellia fruit shells from Southern China. Ind. Crops Prod. 2022, 178, 114551. [Google Scholar] [CrossRef]
- Jiang, H.; Hu, Y.; Jiang, X.; Zhou, H. Maturity Stage Discrimination of Camellia oleifera Fruit Using Visible and Near-Infrared Hyperspectral Imaging. Molecules 2022, 27, 6318. [Google Scholar] [CrossRef] [PubMed]
- Yu, L.; Xiong, J.; Fang, X.; Yang, Z.; Chen, Y.; Lin, X.; Chen, S. A litchi fruit recognition method in a natural environment using RGB-D images. Biosyst. Eng. 2021, 204, 50–63. [Google Scholar] [CrossRef]
- Kang, H.W.; Zhou, H.Y.; Wang, X.; Chen, C. Real-Time Fruit Recognition and Grasping Estimation for Robotic Apple Har-vesting. Sensors 2020, 20, 5670. [Google Scholar] [CrossRef] [PubMed]
- Li, J.; Tang, Y.; Zou, X.; Lin, G.; Wang, H. Detection of Fruit-Bearing Branches and Localization of Litchi Clusters for Vision-Based Harvesting Robots. IEEE Access 2020, 8, 117746–117758. [Google Scholar] [CrossRef]
- Chen, M.; Tang, Y.; Zou, X.; Huang, K.; Huang, Z.; Zhou, H.; Wang, C.; Lian, G. Three-dimensional perception of orchard banana central stock enhanced by adaptive multi-vision technology. Comput. Electron. Agric. 2020, 174, 105508. [Google Scholar] [CrossRef]
- Wu, F.; Duan, J.; Chen, S.; Ye, Y.; Ai, P.; Yang, Z. Multi-Target Recognition of Bananas and Automatic Positioning for the Inflorescence Axis Cutting Point. Front. Plant Sci. 2021, 12, 705021. [Google Scholar] [CrossRef]
- Lin, G.C.; Tang, Y.C.; Zou, X.J.; Xiong, J.T.; Fang, Y.M. Color-, depth-, and shape-based 3D fruit detection. Precis. Agric. 2020, 21, 1–7. [Google Scholar] [CrossRef]
- Santos, T.T.; de Souza, L.L.; dos Santos, A.A.; Avila, S. Grape detection, segmentation, and tracking using deep neural net-works and three-dimensional association. Comput. Electron. Agric. 2020, 170, 105247. [Google Scholar] [CrossRef] [Green Version]
- Xu, D.; Chen, L.; Mou, X.; Wu, Q.; Sun, G. 3D Reconstruction of Camellia oleifera Fruit Recognition and Fruit Branch based on Kinect Camera. In Proceedings of the 2021 2nd International Conference on Artificial Intelligence and Information Systems, Chongqing, China, 28–30 May 2021. [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]
- Tang, Y.C.; Chen, M.Y.; Wang, C.L.; Luo, L.F.; Li, J.H.; Lian, G.P.; Zou, X.J. Recognition and Localization Methods for Vi-sion-Based Fruit Picking Robots: A Review. Front. Plant Sci. 2020, 11, 510. [Google Scholar] [CrossRef] [PubMed]
- Xiong, Y.; Peng, C.; Grimstad, L.; From, P.J.; Isler, V. Development and field evaluation of a strawberry harvesting robot with a cable-driven gripper. Comput. Electron. Agric. 2019, 157, 392–402. [Google Scholar] [CrossRef]
- Zhang, Y.; Zhang, W.; Yu, J.; He, L.; Chen, J.; He, Y. Complete and accurate holly fruits counting using YOLOX object detection. Comput. Electron. Agric. 2022, 198, 107062. [Google Scholar] [CrossRef]
- Ji, W.; Pan, Y.; Xu, B.; Wang, J.C. A Real-Time Apple Targets Detection Method for Picking Robot Based on Shuf-flenetV2-YOLOX. Agriculture 2022, 12, 856. [Google Scholar] [CrossRef]
- Wang, Y.; Yan, G.; Meng, Q.; Yao, T.; Han, J.; Zhang, B. DSE-YOLO: Detail semantics enhancement YOLO for multi-stage strawberry detection. Comput. Electron. Agric. 2022, 198, 107057. [Google Scholar] [CrossRef]
- Tian, Y.; Yang, G.; Wang, Z.; Wang, H.; Li, E.; Liang, Z. Apple detection during different growth stages in orchards using the improved YOLO-V3 model. Comput. Electron. Agric. 2019, 157, 417–426. [Google Scholar] [CrossRef]
- Koirala, A.; Walsh, K.B.; Wang, Z.; McCarthy, C. Deep learning for real-time fruit detection and orchard fruit load estimation: Benchmarking of ‘MangoYOLO’. Precis. Agric. 2019, 20, 1107–1135. [Google Scholar] [CrossRef]
- Gao, F.; Fang, W.; Sun, X.; Wu, Z.; Zhao, G.; Li, G.; Li, R.; Fu, L.; Zhang, Q. A novel apple fruit detection and counting methodology based on deep learning and trunk tracking in modern orchard. Comput. Electron. Agric. 2022, 197. [Google Scholar] [CrossRef]
- Parico, A.I.B.; Ahamed, T. Real Time Pear Fruit Detection and Counting Using YOLOv4 Models and Deep SORT. Sensors 2021, 21, 4803. [Google Scholar] [CrossRef]
- Mirhaji, H.; Soleymani, M.; Asakereh, A.; Abdanan, M. Fruit detection and load estimation of an orange orchard using the YOLO models through simple approaches in different imaging and illumination conditions. Comput. Electron. Agric. 2021, 191, 106533. [Google Scholar] [CrossRef]
- MacEachern, C.B.; Esau, T.J.; Schumann, A.W.; Hennessy, P.J.; Zaman, Q.U. Detection of fruit maturity stage and yield estimation in wild blueberry using deep learning convolutional neural networks. Smart Agric. Technol. 2023, 3, 100099. [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]
- Lv, J.; Xu, H.; Han, Y.; Lu, W.; Xu, L.; Rong, H.; Yang, B.; Zou, L.; Ma, Z. A visual identification method for the apple growth forms in the orchard. Comput. Electron. Agric. 2022, 197, 106954. [Google Scholar] [CrossRef]
- Wang, D.; He, D. Channel pruned YOLO V5s-based deep learning approach for rapid and accurate apple fruitlet detection before fruit thinning. Biosyst. Eng. 2021, 210, 271–281. [Google Scholar] [CrossRef]
- Yan, B.; Fan, P.; Lei, X.Y.; Liu, Z.J.; Yang, F.Z. A Real-Time Apple Targets Detection Method for Picking Robot Based on Im-proved YOLOv5. Remote Sens. 2021, 13, 1619. [Google Scholar] [CrossRef]
- Wu, F.; Duan, J.; Ai, P.; Chen, Z.; Yang, Z.; Zou, X. Rachis detection and three-dimensional localization of cut off point for vision-based banana robot. Comput. Electron. Agric. 2022, 198, 107079. [Google Scholar] [CrossRef]
- Wang, C.Y.; Bochkovskiy, A.; Liao, H. YOLOv7: Trainable bag-of-freebies sets new state-of-the-art for real-time object de-tectors. arXiv 2022, arXiv:2207.02696. [Google Scholar]
- Tang, Y.; Huang, Z.; Chen, Z.; Chen, M.; Zhou, H.; Zhang, H.; Sun, J. Novel visual crack width measurement based on backbone double-scale features for improved detection automation. Eng. Struct. 2023, 274, 115158. [Google Scholar] [CrossRef]
- Anam, C.; Naufal, A.; Sutanto, H.; Adi, K.; Dougherty, G. Impact of Iterative Bilateral Filtering on the Noise Power Spectrum of Computed Tomography Images. Algorithms 2022, 15, 374. [Google Scholar] [CrossRef]
- Ali, N.M.; Rashid, N.K.A.; Mustafah, Y.M. Performance Comparison between RGB and HSV Color Segmentations for Road Signs Detection. Appl. Mech. Mater. 2013, 393, 550–555. [Google Scholar] [CrossRef]
- Mahmoud, S.F.; Hamed, S. Defect Detection in Fruit and Vegetables by Using Machine Vision Systems and Image Processing. Food Eng. Rev. 2022, 14, 1–27. [Google Scholar]
- Fu, L.; Tola, E.; Al-Mallahi, A.; Li, R.; Cui, Y. A novel image processing algorithm to separate linearly clustered kiwifruits. Biosyst. Eng. 2019, 183, 184–195. [Google Scholar] [CrossRef]
- Jiang, S.; Zhou, R.-G.; Hu, W.; Li, Y. Improved Quantum Image Median Filtering in the Spatial Domain. Int. J. Theor. Phys. 2019, 58, 2115–2133. [Google Scholar] [CrossRef]
- Chen, Z.; Wu, R.; Lin, Y.; Li, C.; Chen, S.; Yuan, Z.; Chen, S.; Zou, X. Plant Disease Recognition Model Based on Improved YOLOv5. Agronomy 2022, 12, 365. [Google Scholar] [CrossRef]
Algorithm | P(%) | R(%) | mAP@0.5(%) | mAP[@0.5:0.95](%) |
---|---|---|---|---|
YOLOv7 | 92.9 | 88.3 | 94.7 | 83.1 |
YOLOv5s | 93.1 | 88 | 94 | 79 |
NO | The Center of the YOLO Recognition Frame | Centroid | Deviation (Pixel) |
---|---|---|---|
1 | (199,116) | (205,116) | 6 |
2 | (227,114) | (225,110) | 4.5 |
3 | (199,81) | (194,80) | 5.1 |
4 | (203,92) | (206,92) | 3 |
5 | (83,53) | (84,54) | 1.4 |
6 | (68,40) | (66,40) | 2 |
7 | (222,100) | (221,99) | 1.4 |
8 | (132,81) | (132,80) | 1 |
9 | (71,34) | (73,34) | 2 |
10 | (209,107) | (210,105) | 2.2 |
Average value (pixel) | 2.86 | ||
Maximum (pixel) | 6 |
Publisher’s Note: MDPI stays neutral with regard to jurisdictional claims in published maps and institutional affiliations. |
© 2022 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
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. https://doi.org/10.3390/app122412959
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. Applied Sciences. 2022; 12(24):12959. https://doi.org/10.3390/app122412959
Chicago/Turabian StyleZhou, Yunhe, Yunchao Tang, Xiangjun Zou, Mingliang Wu, Wei Tang, Fan Meng, Yunqi Zhang, and Hanwen Kang. 2022. "Adaptive Active Positioning of Camellia oleifera Fruit Picking Points: Classical Image Processing and YOLOv7 Fusion Algorithm" Applied Sciences 12, no. 24: 12959. https://doi.org/10.3390/app122412959
APA StyleZhou, Y., Tang, Y., Zou, X., Wu, M., Tang, W., Meng, F., Zhang, Y., & Kang, H. (2022). Adaptive Active Positioning of Camellia oleifera Fruit Picking Points: Classical Image Processing and YOLOv7 Fusion Algorithm. Applied Sciences, 12(24), 12959. https://doi.org/10.3390/app122412959