Detection of Broken Hongshan Buckwheat Seeds Based on Improved YOLOv5s Model
Abstract
:1. Introduction
2. Materials and Methods
2.1. Data Acquisition Systems and Experiment Samples
- Random rotation and flipping: simulating different shooting angles in various recognition environments.
- Brightness adjustment: simulating different lighting conditions in various environments.
- Adding pepper and salt noise: the model is capable of resisting random perturbations, which aids in improving the generalization performance.
2.2. Methods
2.2.1. YOLOv5s Network Structure
2.2.2. Improved Model
GhostNet
The Weighted Bidirectional Feature Pyramid Module (BiFPN)
2.3. Model Training and Result Analysis
2.3.1. Model Training
2.3.2. Evaluation Metrics
3. Result
3.1. Network Model Comparison
3.2. Lightweight Comparison
3.3. Confidence Comparison
4. Identification System
5. Discussion
6. Conclusions
- The YOLOv5s+Ghost+BiFPN model outperforms the YOLOv5s model, the YOLOv5s+Ghost model, and the YOLOv5s+BiFPN model. This is evidenced by the precision values, as it can better recognize broken seed features and improve the robustness of the detection algorithm at multiple scales.
- The YOLOv5s+BiFPN model and the YOLOv5s+Ghost model have higher detection precision than the YOLOv5s model. Specifically, in the recognition of WLBMX, the precision improvement of the YOLOv5s+BiFPN model and the YOLOv5s+Ghost model is significant.
- The YOLOv5s+BiFPN model and the YOLOv5s+Ghost model have similar recognition precision, but the YOLOv5s+Ghost model has a smaller size, reduced by 7.7 MB, and a decrease of 9G in FLOPs. Therefore, the YOLOv5s+Ghost model is more suitable for lightweight requirements.
- Through comparative verification, all three improvements contribute to the improvement of the model’s performance. There is a certain degree of mutual compatibility between the three models.
- A Hongshan buckwheat seed recognition system was designed based on the improved YOLOv5s model, and the results showed that the system can effectively recognize seed features. We hope this system can provide technical support for improving the quality and yield of Hongshan buckwheat.
Author Contributions
Funding
Data Availability Statement
Conflicts of Interest
References
- Fan, Z. Buckwheat proteins and peptides: Biological functions and food applications. Trends Food Sci. Technol. 2021, 110, 155–167. [Google Scholar]
- Tang, Y.; Ding, M.Q.; Tang, Y.X.; Wu, Y.M.; Shao, J.R.; Zhou, M.L. Germplasm Resources of Buckwheat in China. In Molecular Breeding and Nutritional Aspects of Buckwheat; Academic Press: Cambridge, MA, USA, 2016; pp. 13–20. [Google Scholar]
- Suvorova, G.; Zhou, M. Distribution of Cultivated Buckwheat Resources in the World. In Buckwheat Germplasm in the World; Academic Press: Cambridge, MA, USA, 2018. [Google Scholar]
- Suzuki, T.; Noda, T.; Morishita, T.; Ishiguro, K.; Otsuka, S.; Brunori, A. Present status and future perspectives of breeding for buckwheat quality. Breed. Sci. 2020, 70, 48–66. [Google Scholar] [CrossRef] [PubMed]
- Yali, W.; Yankun, P.; Xin, Q.; Qibin, Z. Discriminant analysis and comparison of corn seed vigor based on multiband spectrum. Comput. Electron. Agric. 2021, 190, 106444. [Google Scholar]
- Kiani, S.; Minaee, S. Potential Application of Machine Vision Technology to Saffron (Crocus sativus L.) Quality Characterization. Food Chem. 2016, 212, 392–394. [Google Scholar] [CrossRef] [PubMed]
- Sanaeifar, A.; Guindo, M.L.; Bakhshipour, A.; Fazayeli, H.; Li, X.; Yang, C. Advancing precision agriculture: The potential of deep learning for cereal plant head detection. Comput. Electron. Agric. 2023, 209, 107875. [Google Scholar] [CrossRef]
- Ambrose, A.; Lohumi, S.; Lee, W.-H.; Cho, B.K. Comparative nondestructive measurement of corn seed viability using Fourier transform near-infrared (FT-NIR) and Raman spectroscopy. Sens. Actuators B Chem. 2016, 224, 500–506. [Google Scholar] [CrossRef]
- Jia, S.; An, D.; Liu, Z.; Gu, J.; Yan, Y. Variety identification method of coated maize seeds based on near-infrared spectroscopy and chemometrics. J. Cereal Sci. 2015, 63, 21–26. [Google Scholar] [CrossRef]
- Mukasa, P.; Wakholi, C.; Mo, C.; Oh, M.; Joo, H.-J.; Suh, H.K.; Cho, B.-K. Determination of viability of Retinispora (Hinoki cypress) seeds using FT-NIR spectroscopy. Infrared Phys. Technol. 2019, 98, 62–68. [Google Scholar] [CrossRef]
- Mar, A.-S.; João, V.; Lammert, K.; Henk, K.; Sander, M. Estimation of spinach (Spinacia oleracea) seed yield with 2D UAV data and deep learning. Smart Agric. Technol. 2023, 3, 100129. [Google Scholar]
- Tu, K.; Wu, W.; Cheng, Y.; Zhang, H.; Xu, Y.; Dong, X.; Wang, M.; Sun, Q. AIseed: An automated image analysis software for high-throughput phenotyping and quality non-destructive testing of individual plant seeds. Comput. Electron. Agric. 2023, 207, 107740. [Google Scholar] [CrossRef]
- Guoyang, Z.; Longzhe, Q.; Hailong, L.; Huaiqu, F.; Songwei, L.; Shuhan, Z.; Ruiqi, L. Real-time recognition system of soybean seed full-surface defects based on deep learning. Comput. Electron. Agric. 2021, 187, 106230. [Google Scholar]
- Wang, Y.; Song, S. Variety identification of sweet maize seeds based on hyperspectral imaging combined with deep learning. Infrared Phys. Technol. 2023, 130, 104611. [Google Scholar] [CrossRef]
- Puneet, S.T.; Bhavya, T.; Abhishek, K.; Bhavesh, G.; Vimal, B.; Ondrej, K.; Michal, D.; Jamel, N.; Shashi, P. Deep transfer learning based photonics sensor for assessment of seed-quality. Comput. Electron. Agric. 2022, 196, 106891. [Google Scholar]
- Tongyun, L.; Jianye, Z.; Yujuan, G.; Shuo, Z.; Xi, Q.; Wen, T.; Yangchun, H. Classification of weed seeds based on visual images and deep learning. Inf. Process. Agric. 2023, 10, 40–51. [Google Scholar]
- Redmon, J.; Divvala, S.; Girshick, R.; Farhadi, A. You Only Look Once: Unified, Real-Time Object Detection. In Proceedings of the Computer Vision & Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016. [Google Scholar]
- Ouf, N.S. Leguminous seeds detection based on convolutional neural networks: Comparison of faster R-CNN and YOLOv4 on a small custom dataset. Artif. Intell. Agric. 2023, 8, 30–45. [Google Scholar] [CrossRef]
- Jinfeng, Z.; Yan, M.; Kaicheng, Y.; Min, Z.; Yueqi, W.; Xuan, W.; Wei, L.; Xin, W.; Xuehui, H. Rice seed size measurement using a rotational perception deep learning model. Comput. Electron. Agric. 2023, 205, 107583. [Google Scholar]
- Jinnan, H.; Guo, L.; Haolan, M.; Yibo, L.; Tingting, Q.; Ming, C.; Shenglian, L. Crop Node Detection and Internode Length Estimation Using an Improved YOLOv5 Model. Agriculture 2023, 13, 473. [Google Scholar]
- Jiaxing, X.; Jiajun, P.; Jiaxin, W.; Binhan, C.; Tingwei, J.; Daozong, S.; Peng, G.; Weixing, W.; Jianqiang, L.; Rundong, Y.; et al. Litchi Detection in a Complex Natural Environment Using the YOLOv5-Litchi Model. Agronomy 2022, 12, 3054. [Google Scholar]
- Huang, Z.; Wang, J.; Fu, X.; Yu, T.; Guo, Y.; Wang, R. DC-SPP-YOLO: Dense connection and spatial pyramid pooling based YOLO for object detection. Inf. Sci. 2020, 522, 241–258. [Google Scholar] [CrossRef]
- Sijia, L.; Furkat, S.; Jamshid, T.; JunHyun, P.; Sangseok, Y.; JaeMo, K. Ghostformer: A GhostNet-Based Two-Stage Transformer for Small Object Detection. Sensors 2022, 22, 6939. [Google Scholar]
- Jidong, L.; Hao, X.; Ying, H.; Wenbin, L.; Liming, X.; Hailong, R.; Biao, Y.; Ling, Z.; Zhenghua, M. A visual identification method for the apple growth forms in the orchard. Comput. Electron. Agric. 2022, 197, 106954. [Google Scholar]
- Liu, Z.; Wang, S. Broken Corn Detection Based on an Adjusted YOLO With Focal Loss. IEEE Access 2019, 7, 68281–68289. [Google Scholar] [CrossRef]
- Shuai, X.; Siyu, W.; Mei, X.; Wenyan, W.; Weiguo, L. YOLO POD: A fast and accurate multi-task model for dense Soybean Pod counting. Plant Methods 2023, 19, 8. [Google Scholar]
Agricultural Crops | Seed Type | Number of Images | |
---|---|---|---|
Pre-Enhancement | After Enhancement | ||
Seeds | WL | 500 | 1000 |
WLBMX | 500 | 1000 | |
WWL | 500 | 1000 | |
PS | 200 | 1000 | |
Total | 1700 | 4000 |
YOLOv5s | GhostNet | BiFPN | Precision/% | Recall/% | [email protected]/% | [email protected]:.95/% | Time-Consuming | |
---|---|---|---|---|---|---|---|---|
PS | √ | - | - | 88.0 | 100.0 | 99.5 | 75.6 | 0.121 s |
WL | √ | - | - | 99.6 | 100.0 | 99.5 | 77.8 | |
WLBMX | √ | - | - | 80.9 | 100.0 | 98.5 | 78.3 | |
WWL | √ | - | - | 100.0 | 91.0 | 99.5 | 77.7 | |
PS | √ | √ | - | 98.4 | 99.5 | 99.5 | 75.2 | 0.124 s |
WL | √ | √ | - | 98.7 | 100.0 | 99.5 | 77.6 | |
WLBMX | √ | √ | - | 100.0 | 94.6 | 99.3 | 78.4 | |
WWL | √ | √ | - | 99.5 | 96.5 | 99.4 | 76.4 | |
PS | √ | - | √ | 99.0 | 100.0 | 99.5 | 75.0 | 0.136 s |
WL | √ | - | √ | 100.0 | 98.7 | 99.5 | 77.7 | |
WLBMX | √ | - | √ | 98.3 | 100.0 | 99.5 | 80.3 | |
WWL | √ | - | √ | 100.0 | 64.5 | 99.1 | 77.6 | |
PS | √ | √ | √ | 99.7 | 100.0 | 99.5 | 75.7 | 0.114 s |
WL | √ | √ | √ | 99.5 | 100.0 | 99.5 | 77.3 | |
WLBMX | √ | √ | √ | 100.0 | 94.3 | 99.5 | 78.8 | |
WWL | √ | √ | √ | 100.0 | 99.0 | 99.5 | 76.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. |
© 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
Li, X.; Niu, W.; Yan, Y.; Ma, S.; Huang, J.; Wang, Y.; Chang, R.; Song, H. Detection of Broken Hongshan Buckwheat Seeds Based on Improved YOLOv5s Model. Agronomy 2024, 14, 37. https://doi.org/10.3390/agronomy14010037
Li X, Niu W, Yan Y, Ma S, Huang J, Wang Y, Chang R, Song H. Detection of Broken Hongshan Buckwheat Seeds Based on Improved YOLOv5s Model. Agronomy. 2024; 14(1):37. https://doi.org/10.3390/agronomy14010037
Chicago/Turabian StyleLi, Xin, Wendong Niu, Yinxing Yan, Shixing Ma, Jianxun Huang, Yingmei Wang, Renjie Chang, and Haiyan Song. 2024. "Detection of Broken Hongshan Buckwheat Seeds Based on Improved YOLOv5s Model" Agronomy 14, no. 1: 37. https://doi.org/10.3390/agronomy14010037
APA StyleLi, X., Niu, W., Yan, Y., Ma, S., Huang, J., Wang, Y., Chang, R., & Song, H. (2024). Detection of Broken Hongshan Buckwheat Seeds Based on Improved YOLOv5s Model. Agronomy, 14(1), 37. https://doi.org/10.3390/agronomy14010037