Study on Target Detection Method of Walnuts during Oil Conversion Period
Abstract
:1. Introduction
2. Materials and Methods
2.1. Image Acquisition Preprocessing and Annotation
2.2. FasterNet
2.3. Lightweight Upsampling Operator CARAFE
2.4. LightMLP
2.5. Improved YOLOv7-Tiny Network Structure
2.6. Evaluation Index
2.7. Test Environment and Hyperparameter Setting
3. Results
3.1. Training and Testing Results of Three Separate Improved Methods
3.2. Ablation Test
3.2.1. Training Process of Model Improvement
3.2.2. Test Results
3.3. Android Deployment and Experimentation
4. Discussion
4.1. Comparative Testing of CARAFE Performance under Different Parameters
4.2. Performance Comparison of Different Algorithms
4.3. Potential Application and Future Study
5. Conclusions
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Deng, J.; Pan, Q.; Liu, A. Study on the characteristics of main nutrients of 16 domestic walnut varieties. Food Ferment. Sci. Technol. 2023, 3, 111–115. [Google Scholar]
- Jie, M.; Chen, B.; Wu, X.; Wang, X. Research status and suggestions for adjustment of fresh walnut preservation. Gansu Agric. Sci. Technol. 2020, 4, 68–71. [Google Scholar]
- Fan, X.; Xu, Y.; Zhou, J.; Liu, X.; Tang, J. Identification and localization of walnut based on improved Faster R-CNN. J. Yanshan Univ. 2021, 6, 544–551. [Google Scholar]
- 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 (CVPR), Columbus, OH, USA, 23–28 June 2014; pp. 580–587. [Google Scholar]
- Girshick, R. Fast r-cnn. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), Santiago, Chile, 7–13 December 2015; pp. 1440–1448. [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. 2017, 39, 1137–1149. [Google Scholar] [CrossRef]
- Liu, W.; Anguelov, D.; Erhan, D.; Szegedy, C.; Reed, S.; Fu, C.Y.; Berg, A.C. SSD: Single shot multibox detector. In Proceedings of the Computer Vision–ECCV 2016: 14th European Conference, Amsterdam, The Netherlands, 11–14 October 2016; Proceedings, Part I 14. Springer International Publishing: Berlin/Heidelberg, Germany, 2016; pp. 21–37. [Google Scholar]
- Redmon, J.; Farhadi, A. Yolov3: An incremental improvement. arXiv 2018, arXiv:1804.02767. [Google Scholar]
- Bochkovskiy, A.; Wang, C.Y.; Liao, H.Y.M. Yolov4: Optimal speed and accuracy of object detection. arXiv 2020, arXiv:2004.10934. [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]
- 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, 18–22 June 2023; pp. 7464–7475. [Google Scholar]
- Fan, X.; Xu, Y.; Zhou, J.; Liu, X.; Tang, J.; Wei, Y. Green Walnut Detection Method Based on Improved Convolutional Neural Network. Trans. Chin. Soc. Agric. Mach. 2021, 9, 149–155. [Google Scholar]
- Hao, J.; Bing, Z.; Yang, S.; Yang, J.; Sun, L. Detection of walnut by improved YOLOv3 algorithm. Trans. Chin. Soc. Agric. Eng. 2022, 14, 183–190. [Google Scholar]
- 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]
- Song, H.; Ma, B.; Shang, Y.; Wen, Y.; Zhang, S. Detection of young apple fruits based on YOLO v7-ECA model. Trans. Chin. Soc. Agric. Mach. 2023, 6, 233–242. [Google Scholar]
- Jiang, M. Research on Detection Method of Young Apple Fruit in Near Scenery by Integrating Convolutional Neural Network and Visual Attention Mechanism. M.S. Thesis, Northwest A&F University, Yangling, China, 2022. [Google Scholar]
- Chen, G. Research on Target Recognition and Picking Point Determination Technology of Green Pepper in Greenhouse Environment. M.S. Thesis, Jiangsu University, Suzhou, China, 2020. [Google Scholar]
- Bargoti, S.; Underwood, J. Deep fruit detection in orchards. In Proceedings of the 2017 IEEE International Conference on Robotics and Automation (ICRA), Singapore, 29 May–3 June 2017; pp. 3626–3633. [Google Scholar]
- Hu, G.; Zhou, J.; Chen, C.; Li, C.; Sun, L.; Chen, Y.; Zhang, S.; Chen, J. Detection method of apple in orchard environment by combining lightweight network and attention mechanism. Trans. Chin. Soc. Agric. Eng. 2022, 19, 131–142. [Google Scholar]
- Zhang, J.; Chen, W.; Wei, Q.; Guo, B. Based on Des-YOLO v4 under the complex environment of apple detection method. J. Agric. Mech. Res. 2023, 5, 20–25. [Google Scholar]
- Sun, J.; Qian, L.; Zhu, W.; Zhou, X.; Dai, C. Detection of apples in complex orchard environment based on improved RetinaNet. Trans. Chin. Soc. Agric. Eng. 2022, 15, 314–322. [Google Scholar]
- Zhu, Z.; Shan, J.; Yu, X.; Kong, D.; Wang, Q.; Xie, X. Target detection technology of tomato picking robot based on YOLOv5s. Transducer Microsyst. Technol. 2023, 6, 129–132. [Google Scholar]
- Liu, J.; He, J.; Chen, H.; Wang, X.; Zhai, H. Tomato string detection model based on improved YOLOv4 and ICNet. Trans. Chin. Soc. Agric. Mach. 2023, 10, 216–224+254. [Google Scholar]
- Zhao, H.; Li, W.; Yang, Z. Detection of tomato target and grasping position in rain weather based on improved YOLOv4. Jiangsu Agric. Sci. 2023, 1, 202–210. [Google Scholar]
- Wang, J.; Zhou, J.; Zhang, Y.; Hu, H. Multi-pose dragon fruit detection system of picking robot based on optimal YOLOv7 model. Trans. Chin. Soc. Agric. Eng. 2019, 8, 276–283. [Google Scholar]
- Zhou, J.; Wang, J.; Zhang, Y.; Hu, H. Pitaya rapid detection method based on GCAM-YOLOv5. J. For. Eng. 2023, 3, 141–149. [Google Scholar]
- Ma, R.; He, H.; Chen, Y.; Lai, Y.; Jiao, R.; Tang, H. Maturity identification method of dragon fruit based on improved YOLOv5. J. Shenyang Agric. Univ. 2023, 2, 196–206. [Google Scholar]
- Xiong, J.; Huo, Z.; Huang, Q.; Chen, H.; Yang, Z.; Huang, Y.; Su, Y. Detection method of citrus in nighttime environment combined with active light source and improved YOLOv5s model. J. South China Agric. Univ. 2024, 1, 97–107. [Google Scholar]
- Gao, X.; Wei, S.; Wen, Z.; Yu, T. Improved citrus detection method by YOLOv5 lightweight network. Comput. Eng. Appl. 2023, 11, 212–221. [Google Scholar] [CrossRef]
- Huang, T.; Huang, H.; Li, Z.; Lv, S.; Xue, X.; Dai, Q.; Wen, W. Citrus fruit recognition method based on the improved model YOLOv5. J. Huazhong Agric. Univ. 2022, 04, 170–177. [Google Scholar]
- Chen, J.; Kao, S.H.; He, H.; Zhuo, W.; Wen, S.; Lee, C.H.; Chan, S.H.G. Run, don’t walk: Chasing higher FLOPS for faster neural networks. In Proceedings of the 2023 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Vancouver, BC, Canada, 20–22 June 2023; pp. 12021–12031. [Google Scholar]
- Wang, J.; Chen, K.; Xu, R.; Liu, Z.; Loy, C.C.; Lin, D. Carafe: Content-aware reassembly of features. In Proceedings of the 2019 IEEE/CVF International Conference on Computer Vision (ICCV), Seoul, Republic of Korea, 27 October–2 November 2019; pp. 3007–3016. [Google Scholar]
- Liu, M.; Wan, L.; Wang, B.; Wang, T. SE-YOLOv4: Shuffle expansion YOLOv4 for pedestrian detection based on PixelShuffle. Appl. Intell. 2023, 53, 18171–18188. [Google Scholar] [CrossRef]
- Quan, Y.; Zhang, D.; Zhang, L.; Tang, J. Centralized feature pyramid for object detection. In IEEE Transactions on Image Processing (TIP); IEEE: Piscataway, NJ, USA, 2023; Volume 43, pp. 4341–4354. [Google Scholar]
- Yu, W.; Luo, M.; Zhou, P.; Si, C.; Zhou, Y.; Wang, X.; Feng, J.; Yan, S. Metaformer is actually what you need for vision. In Proceedings of the 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), New Orleans, LA, USA, 18–24 June 2022; pp. 10819–10829. [Google Scholar]
- Larsson, G.; Maire, M.; Shakhnarovich, G. Fractalnet: Ultra-deep neural networks without residuals. arXiv 2016, arXiv:1605.07648. [Google Scholar]
- Tolstikhin, I.O.; Houlsby, N.; Kolesnikov, A.; Beyer, L.; Zhai, X.; Unterthiner, T.; Yung, J.; Steiner, A.; Keysers, D.; Uszkoreit, J.; et al. Mlp-mixer: An all-mlp architecture for vision. Adv. Neural Inf. Process. Syst. 2021, 34, 24261–24272. [Google Scholar]
- Beć, K.B.; Grabska, J.; Huck, C.W. Miniaturized NIR spectroscopy in food analysis and quality control: Promises, challenges, and perspectives. Foods 2022, 11, 1465. [Google Scholar] [CrossRef]
Algorithm | P/% | R/% | AP50/% | AP50–95/% | Ms/MB | Pa | T/ms |
---|---|---|---|---|---|---|---|
YOLOv7-tiny + FasterNet | 95.6 | 94.7 | 96.2 | 76.6 | 10.1 | 4,933,548 | 13.3 |
YOLOv7-tiny + CARAFE | 92.4 | 91.2 | 95.4 | 73.3 | 12.4 | 6,073,552 | 18.4 |
YOLOv7-tiny + LightMLP | 97.0 | 90.3 | 96.0 | 76.2 | 12.7 | 6,215,276 | 17.9 |
YOLOv7-Tiny | FasterNet | CARAFE | LightMLP | AP50/% | AP50–95/% | Ms/MB | Pa | T/ms |
---|---|---|---|---|---|---|---|---|
√ * | 94.3 | 73.3 | 12.3 | 6,007,596 | 16.5 | |||
√ | √ | 96.2 | 76.6 | 10.1 | 4,933,548 | 13.3 | ||
√ | √ | 95.4 | 73.3 | 12.4 | 6,073,552 | 18.4 | ||
√ | √ | 96.0 | 76.2 | 12.7 | 6,215,276 | 17.9 | ||
√ | √ | √ | 97.0 | 76.9 | 10.2 | 4,999,504 | 15.3 | |
√ | √ | √ | 97.4 | 77.3 | 10.5 | 5,141,228 | 15.4 | |
√ | √ | √ | 94.2 | 72.2 | 23.9 | 6,281,232 | 17.6 | |
√ | √ | √ | √ | 96.8 | 77.3 | 10.7 | 5,207,184 | 15.2 |
Experiment Number | Some of the Fruits Are Covered | The Fruits Are Not Covered | Total Number of Fruits | Total Number of Fruits Correctly Detected | ||
---|---|---|---|---|---|---|
Sum | Number of Detections | Sum | Number of Detections | |||
1 | 3 | 3 | 2 | 2 | 5 | 5 |
2 | 1 | 1 | 0 | 0 | 1 | 1 |
3 | 1 | 1 | 3 | 3 | 4 | 4 |
4 | 0 | 0 | 6 | 6 | 6 | 6 |
5 | 3 | 2 | 0 | 0 | 3 | 2 |
6 | 5 | 4 | 2 | 2 | 7 | 6 |
7 | 0 | 0 | 8 | 8 | 8 | 8 |
8 | 6 | 6 | 5 | 4 | 11 | 10 |
9 | 3 | 3 | 2 | 2 | 5 | 5 |
10 | 0 | 0 | 1 | 1 | 1 | 1 |
11 | 4 | 4 | 0 | 0 | 4 | 4 |
12 | 1 | 1 | 5 | 5 | 6 | 6 |
13 | 3 | 3 | 0 | 0 | 3 | 3 |
14 | 5 | 4 | 7 | 6 | 12 | 10 |
15 | 7 | 6 | 0 | 0 | 7 | 6 |
Scheme Sequence Number | Upsample1-ke | Upsample1-kr | Upsample2-ke | Upsample2-kr | AP50/% | AP50–95/% | Ms/MB | Pa | T/ms |
---|---|---|---|---|---|---|---|---|---|
1 | 1 | 3 | 1 | 3 | 94.5 | 72.2 | 12.3 | 6,024,692 | 20.4 |
2 | 3 | 5 | 1 | 3 | 94.6 | 73.1 | 12.5 | 6,080,052 | 20.7 |
3 | 1 | 3 | 3 | 5 | 94.5 | 73.1 | 12.5 | 6,080,052 | 21.5 |
4 | 1 | 3 | - | - | 94.4 | 72.7 | 12.3 | 6,018,192 | 17.5 |
5 | - | - | 1 | 3 | 94.4 | 72.0 | 12.3 | 6,014,096 | 19.0 |
6 | 3 | 5 | - | - | 95.4 | 73.3 | 12.4 | 6,073,552 | 18.4 |
7 | - | - | - | - | 94.3 | 73.3 | 12.3 | 6,007,596 | 16.5 |
Algorithm | AP50/% | AP50–95/% | Ms/MB | Pa | T/ms |
---|---|---|---|---|---|
YOLOv3-tiny | 96.7 | 76.5 | 22.4 | 12,128,178 | 14.5 |
YOLOv5n | 95.7 | 75.3 | 3.9 | 1,760,518 | 11.5 |
YOLOv5s | 96.4 | 77.4 | 14.5 | 7,012,822 | 21.3 |
YOLOv6-3.0s | 97.1 | 79.3 | 8.7 | 4,233,843 | 13.3 |
YOLOv8n | 96.6 | 78.4 | 6.3 | 3,005,843 | 13.5 |
YOLOv8s | 97.1 | 80.1 | 22.5 | 11,125,971 | 25.9 |
YOLOv7-tiny | 94.3 | 73.3 | 12.3 | 6,007,596 | 16.5 |
FL-YOLOv7-tiny | 97.4 | 77.3 | 10.5 | 5,141,228 | 15.4 |
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
Fu, X.; Wang, J.; Zhang, F.; Pan, W.; Zhang, Y.; Zhao, F. Study on Target Detection Method of Walnuts during Oil Conversion Period. Horticulturae 2024, 10, 275. https://doi.org/10.3390/horticulturae10030275
Fu X, Wang J, Zhang F, Pan W, Zhang Y, Zhao F. Study on Target Detection Method of Walnuts during Oil Conversion Period. Horticulturae. 2024; 10(3):275. https://doi.org/10.3390/horticulturae10030275
Chicago/Turabian StyleFu, Xiahui, Juxia Wang, Fengzi Zhang, Weizheng Pan, Yu Zhang, and Fu Zhao. 2024. "Study on Target Detection Method of Walnuts during Oil Conversion Period" Horticulturae 10, no. 3: 275. https://doi.org/10.3390/horticulturae10030275
APA StyleFu, X., Wang, J., Zhang, F., Pan, W., Zhang, Y., & Zhao, F. (2024). Study on Target Detection Method of Walnuts during Oil Conversion Period. Horticulturae, 10(3), 275. https://doi.org/10.3390/horticulturae10030275