Maize Kernel Batch Counting System Based on YOLOv8-ByteTrack
Abstract
1. Introduction
2. Materials and Methods
2.1. Counting Device System Design
2.1.1. Hardware Components of the Counting System
2.1.2. Principle and Workflow of the Counting Device
2.1.3. Experimental Data Processing Block
2.2. Experimental Data Collection
2.3. Crop Kernel Counting and Tracking Method
2.3.1. Counting Method
2.3.2. Line-Crossing Counting Method
2.3.3. YOLOv8 Model
2.3.4. ByteTrack Model
3. Results and Analysis
3.1. Model Evaluation Metrics
3.2. Maize Kernel Object Detection
3.3. Maize Kernel Counting Results
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Conflicts of Interest
References
- Swati, P.; Rasane, P.; Kaur, J.; Kaur, S.; Ercisli, S.; Assouguem, A.; Ullah, R.; Alqahtani, A.S.; Singh, J. The nutritional, phytochemical composition, and utilisation of different parts of maize: A comparative analysis. Open Agric. 2024, 9, 20220358. [Google Scholar] [CrossRef] [Scilit]
- Ai, Y.; Jane, J. Macronutrients in corn and human nutrition. Compr. Rev. Food Sci. Food Saf. 2016, 15, 581–598. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Corsato Alvarenga, I.; Dainton, A.N.; Aldrich, C.G. A review: Nutrition and process attributes of corn in pet foods. Crit. Rev. Food Sci. Nutr. 2022, 62, 8567–8576. [Google Scholar] [CrossRef] [Scilit] [PubMed]
- Rivera, G.; Porras, R.; Florencia, R.; Sánchez-Solís, J.P. LiDAR applications in precision agriculture for cultivating crops: A review of recent advances. Comput. Electron. Agric. 2023, 207, 107737. [Google Scholar] [CrossRef] [Scilit]
- Karim, M.R.; Reza, M.N.; Jin, H.; Haque, M.A.; Lee, K.H.; Sung, J.; Chung, S.O. Application of LiDAR sensors for crop and working environment recognition in agriculture: A review. Remote Sens. 2024, 16, 4623. [Google Scholar] [CrossRef] [Scilit]
- Wang, H.; Zhang, W.; Yang, G.; Lei, L.; Han, S.; Xu, W.; Chen, R.; Zhang, C.; Yang, H. Maize ear height and ear–plant height ratio estimation with LiDAR data and vertical leaf area profile. Remote Sens. 2023, 15, 964. [Google Scholar] [CrossRef] [Scilit]
- Nandan, R.; Bandaru, V.; He, J.; Daughtry, C.; Gowda, P.; Suyker, A.E. Evaluating optical remote sensing methods for estimating leaf area index for corn and soybean. Remote Sens. 2022, 14, 5301. [Google Scholar] [CrossRef] [Scilit]
- Jiao, Y.; Chen, H.D.; Han, H.; Chang, Y. Development and utilization of corn processing by-products: A review. Foods 2022, 11, 3709. [Google Scholar] [CrossRef] [Scilit]
- Wang, Z.; Zhang, Y.; Chen, L.; Wu, D.; Wang, Y.; Liu, L. High-throughput analysis of maize azimuth and spacing from Lidar data. Int. J. Agric. Biol. Eng. 2024, 17, 105–111. [Google Scholar] [CrossRef] [Scilit]
- Hu, X.; Sun, L.; Gu, X.; Sun, Q.; Wei, Z.; Pan, Y.; Chen, L. Assessing the self-recovery ability of maize after lodging using UAV-LiDAR data. Remote Sens. 2021, 13, 2270. [Google Scholar] [CrossRef] [Scilit]
- Yadav, P.K.; Thomasson, J.A.; Hardin, R.; Searcy, S.W.; Braga-Neto, U.; Popescu, S.C.; Martin, D.E.; Rodriguez, R.; Meza, K.; Enciso, J.; et al. Detecting volunteer cotton plants in a corn field with deep learning on UAV remote-sensing imagery. Comput. Electron. Agric. 2023, 204, 107551. [Google Scholar] [CrossRef] [Scilit]
- Su, W.; Zhang, M.; Liu, J.; Sun, Z. Automated extraction of corn leaf points from unorganized terrestrial LiDAR point clouds. Int. J. Agric. Biol. Eng. 2018, 11, 166–170. [Google Scholar] [CrossRef] [Scilit]
- Wang, Y.W.; Cai, J.X.; Zhang, D.S.; Chen, X.C.; Wang, Y.J. Nonlinear correction for fringe projection profilometry with shifted-phase histogram equalization. IEEE Trans. Instrum. Meas. 2022, 71, 5005509. [Google Scholar] [CrossRef] [Scilit]
- Xu, R.; Li, C.Y. A review of high-throughput field phenotyping systems: Focusing on ground robots. Plant Phenomics 2022, 4, 215–234. [Google Scholar] [CrossRef] [Scilit]
- Kamilaris, A.; Prenafeta-Boldú, F.X. Deep learning in agriculture: A survey. Comput. Electron. Agric. 2018, 147, 70–90. [Google Scholar] [CrossRef] [Scilit]
- Bharman, P.; Saad, S.A.; Khan, S.; Jahan, I.; Ray, M.; Biswas, M. Deep learning in agriculture: A review. Asian J. Res. Comput. Sci. 2022, 13, 28–47. [Google Scholar] [CrossRef] [Scilit]
- Bah, M.D.; Hafiane, A.; Canals, R. Deep learning with unsupervised data labeling for weed detection in line crops in UAV images. Remote Sens. 2018, 10, 1690. [Google Scholar] [CrossRef] [Scilit]
- Attri, I.; Awasthi, L.K.; Sharma, T.P.; Rathee, P. A review of deep learning techniques used in agriculture. Ecol. Inform. 2023, 77, 102217. [Google Scholar] [CrossRef] [Scilit]
- Yu, H.; Liu, J.; Chen, C.; Heidari, A.A.; Zhang, Q.; Chen, H.; Mafarja, M.; Turabieh, H. Corn leaf diseases diagnosis based on K-means clustering and deep learning. IEEE Access 2021, 9, 143824–143835. [Google Scholar] [CrossRef] [Scilit]
- Zhu, N.; Liu, X.; Liu, Z.; Hu, K.; Wang, Y.; Tan, J.; Huang, M.; Zhu, Q.; Ji, X.; Jiang, Y.; et al. Deep learning for smart agriculture: Concepts, tools, applications, and opportunities. Int. J. Agric. Biol. Eng. 2018, 11, 32–44. [Google Scholar] [CrossRef]
- Kitano, B.T.; Mendes, C.C.T.; Geus, A.R.; Oliveira, H.C.; Souza, J.R. Corn plant counting using deep learning and UAV images. IEEE Geosci. Remote Sens. Lett. 2019, 16, 1–5. [Google Scholar] [CrossRef] [Scilit]
- Yang, J.; Ma, X.; Guan, H.; Yang, C.; Zhang, Y.; Li, G.; Li, Z. A recognition method of corn varieties based on spectral technology and deep learning model. Infrared Phys. Technol. 2023, 128, 104533. [Google Scholar] [CrossRef] [Scilit]
- Amin, H.; Darwish, A.; Hassanien, A.E.; Soliman, M. End-to-end deep learning model for corn leaf disease classification. IEEE Access 2022, 10, 31103–31115. [Google Scholar] [CrossRef] [Scilit]
- Divyanth, L.G.; Ahmad, A.; Saraswat, D. A two-stage deep-learning based segmentation model for crop disease quantification based on corn field imagery. Smart Agric. Technol. 2023, 3, 100108. [Google Scholar] [CrossRef] [Scilit]
- Xiao, J.; Suab, S.A.; Chen, X.; Singh, C.K.; Singh, D.; Aggarwal, A.K.; Korom, A.; Widyatmanti, W.; Mollah, T.H.; Minh, H.V.T.; et al. Enhancing assessment of corn growth performance using unmanned aerial vehicles (UAVs) and deep learning. Measurement 2023, 214, 112764. [Google Scholar] [CrossRef] [Scilit]
- Zhang, Y.; Sun, P.; Jiang, Y.; Yu, D.; Weng, F.; Yuan, Z.; Luo, P.; Liu, W.; Wang, X. Bytetrack: Multi-object tracking by associating every detection box. In Proceedings of the 17th European Conference on Computer Vision (ECCV), Tel Aviv, Israel, 23–27 October 2022; Springer Nature: Cham, Switzerland, 2022; pp. 1–21. [Google Scholar]
- Xiao, C.; Song, C.; Li, J.; Liao, M.; Pu, Y.; Du, K. Potato precision planter metering system based on improved YOLOv5n-ByteTrack. Front. Plant Sci. 2025, 16, 1563551. [Google Scholar] [CrossRef] [Scilit] [PubMed]














| Category | Number of Images | Number of Labels |
|---|---|---|
| Training Set | 304 | 2432 |
| Validation Set | 72 | 584 |
| Model. | Precision | Recall | mAP |
|---|---|---|---|
| YOLOv5 | 0.997 | 0.995 | 0.998 |
| YOLOv8 | 0.998 | 0.996 | 0.998 |
| YOLOv11 | 0.998 | 0.997 | 0.998 |
| Trial No. | Ground Truth | Predicted Count | Accuracy |
|---|---|---|---|
| 1 | 300 | 299 | 99.6% |
| 2 | 300 | 300 | 100% |
| 3 | 300 | 298 | 99.3% |
| 4 | 300 | 299 | 99.6% |
| 5 | 300 | 298 | 99.3% |
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. |
© 2025 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, R.; Liu, Q.; Wang, M.; Su, Y.; Li, C.; Ou, M.; Liu, L. Maize Kernel Batch Counting System Based on YOLOv8-ByteTrack. Sensors 2025, 25, 5584. https://doi.org/10.3390/s25175584
Li R, Liu Q, Wang M, Su Y, Li C, Ou M, Liu L. Maize Kernel Batch Counting System Based on YOLOv8-ByteTrack. Sensors. 2025; 25(17):5584. https://doi.org/10.3390/s25175584
Chicago/Turabian StyleLi, Ran, Qiming Liu, Miao Wang, Yuchen Su, Chen Li, Mingxiong Ou, and Lu Liu. 2025. "Maize Kernel Batch Counting System Based on YOLOv8-ByteTrack" Sensors 25, no. 17: 5584. https://doi.org/10.3390/s25175584
APA StyleLi, R., Liu, Q., Wang, M., Su, Y., Li, C., Ou, M., & Liu, L. (2025). Maize Kernel Batch Counting System Based on YOLOv8-ByteTrack. Sensors, 25(17), 5584. https://doi.org/10.3390/s25175584

