Determination of Optimal Dataset Characteristics for Improving YOLO Performance in Agricultural Object Detection
Abstract
:1. Introduction
2. Materials and Methods
2.1. Background
2.1.1. Optimal Dataset
2.1.2. YOLO Object Detection Model
2.2. Computing Environment
2.3. Data Collection and Preprocessing
2.4. Data Analysis and Preprocessing
2.5. Dataset Splitting Strategy
2.6. Model Training Method
2.7. Model Performance Evaluation Based on AP Metrics
2.7.1. Calculation of IoU and Average Precision (AP)
2.7.2. AP Curve Smoothing with Savitzky–Golay Filter and EEM
3. Results and Discussion
3.1. Determination of Optimal Model Performance Using AP Metrics and Kneedle Algorithm
3.2. Comparison of YOLOv8 Models Trained by Label Count and Image Size
3.2.1. Analysis: Strawberry Dataset
3.2.2. Analysis: Tomato Dataset
3.2.3. Analysis: Chili Dataset
3.2.4. Analysis: Pepper Dataset
3.3. Comparison of Training Times and GPU Usage on YOLOv8
3.3.1. Comparison of Training Times
3.3.2. Comparison of GPU Usage
3.4. Comparison of YOLOv8 and 11 Models Trained on Number of Labels and Image Size
3.5. Inference Time Comparison on Jetson Orin Nano and a Desktop Training System
4. Conclusions
Author Contributions
Funding
Institutional Review Board Statement
Data Availability Statement
Conflicts of Interest
References
- Dahikar, S.S.; Rode, S.V. Agricultural Crop Yield Prediction Using Artificial Neural Network Approach. Int. J. Innov. Res. Electr. Electron. Instrum. Control. Eng. 2014, 2, 683–686. [Google Scholar]
- Deivakani, M.; Singh, C.; Bhadane, J.R.; Ramachandran, G.; Sanjeev Kumar, N. ANN Algorithm based Smart Agriculture Cultivation for Helping the Farmers. In Proceedings of the 2021 2nd International Conference on Smart Electronics and Communication (ICOSEC), Trichy, India, 7–9 October 2021; pp. 1–6. [Google Scholar]
- Hsieh, T.H.; Kiang, J.F. Comparison of CNN Algorithms on Hyperspectral Image Classification in Agricultural Lands. Sensors 2020, 20, 1734. [Google Scholar] [CrossRef]
- Sarma, K.K.; Das, K.K.; Mishra, V.; Bhuiya, S.; Kaplun, D. Learning Aided System for Agriculture Monitoring Designed Using Image Processing and IoT-CNN. IEEE Access 2022, 10, 41525–41536. [Google Scholar] [CrossRef]
- Hamadani, H.; Rashid, S.M.; Parrah, J.D.; Khan, A.A.; Dar, K.A.; Ganie, A.A.; Gazal, A.; Dar, R.A.; Ali, A. Traditional Farming Practices and Its Consequences. In Microbiota and Biofertilizers; Springer: Cham, Switzerland, 2021; Volume 2, pp. 119–128. [Google Scholar]
- Wu, B.; Zhang, M.; Zeng, H.; Tian, F.; Potgieter, A.B.; Qin, X.; Yan, N.; Chang, S.; Zhao, Y.; Dong, Q.; et al. Challenges and opportunities in remote sensing-based crop monitoring: A review. Natl. Sci. Rev. 2023, 10, nwac290. [Google Scholar] [CrossRef]
- Hanuschak Sr, G.A. Timely and accurate crop yield forecasting and estimation: History and initial gap analysis. In Proceedings of the First Scientific Advisory Committee Meeting, Global Strategy; Food and Agriculture Organization of the United Nations: Rome, Italy, 2013; Volume 198. [Google Scholar]
- Budach, L.; Feuerpfeil, M.; Ihde, N.; Nathansen, A.; Noack, N.; Patzlaff, H.; Harmouch, H. The Effects of Data Quality on Machine Learning Performance. arXiv 2022, arXiv:2207.14529. [Google Scholar]
- Bailly, A.; Blanc, C.; Francis, E.; Guillotin, T.; Jamal, F.; Wakim, B.; Roy, P. Effects of dataset size and interactions on the prediction performance of logistic regression and deep learning models. Comput. Methods Programs Biomed. 2022, 213, 106504. [Google Scholar] [CrossRef]
- Nesteruk, S.; Shadrin, D.; Pukalchik, M. Image augmentation for multitask few-shot learning: Agricultural domain use-case. arXiv 2021, arXiv:2102.12295. [Google Scholar]
- Kodors, S.; Sondors, M.; Apeinans, I.; Zarembo, I.; Lacis, G.; Rubauskis, E.; Karklina, K. Importance of mosaic augmentation for agricultural image dataset. In Agronomy Research; Estonian University of Life Sciences: Tartu, Estonia, 2024; Volume 22. [Google Scholar]
- Zou, K.; Shan, Y.; Zhao, X.; Che, X. A deep learning image augmentation method for field agriculture. IEEE Access 2024, 12, 37432–37442. [Google Scholar]
- Abbas, A.; Jain, S.; Gour, M.; Vankudothu, S. Tomato plant disease detection using transfer learning with C-GAN synthetic images. Comput. Electron. Agric. 2021, 187, 106279. [Google Scholar] [CrossRef]
- Zhou, C.; Zhang, Z.; Zhou, S.; Xing, J.; Wu, Q.; Song, J. Grape Leaf Spot Identification Under Limited Samples by Fine Grained-GAN. IEEE Access 2021, 9, 100480–100489. [Google Scholar] [CrossRef]
- Fawakherji, M.; Suriani, V.; Nardi, D.; Bloisi, D.D. Shape and style GAN-based multispectral data augmentation for crop/weed segmentation in precision farming. Crop Prot. 2024, 184, 106848. [Google Scholar]
- Liu, C.e.a. Towards robust gan-generated image detection a multi-view completion representation. arXiv 2023, arXiv:2306.01364. [Google Scholar]
- Tan, C.; Zhao, Y.; Wei, S.; Gu, G.; Wei, Y. Learning on gradients Generalized artifacts representation for gan-generated images detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, Vancouver, BC, Canada, 17–24 June 2023; pp. 12105–12114. [Google Scholar]
- Pérez-Borrero, I.; Marín-Santos, D.; Gegúndez-Arias, M.E.; Cortés-Ancos, E. A fast and accurate deep learning method for strawberry instance segmentation. Comput. Electron. Agric. 2020, 178, 105736. [Google Scholar] [CrossRef]
- Yuan, W. AriAplBud: An Aerial Multi-Growth Stage Apple Flower Bud Dataset for Agricultural Object Detection Benchmarking. Data 2024, 9, 36. [Google Scholar] [CrossRef]
- Hu, T.; Wang, W.; Gu, J.; Xia, Z.; Zhang, J.; Wang, B. Research on apple object detection and localization method based on improved yolox and rgb-d images. Agronomy 2023, 13, 1816. [Google Scholar] [CrossRef]
- Karthikeyan, M.; Subashini, T.; Srinivasan, R.; Santhanakrishnan, C.; Ahilan, A. YOLOAPPLE: Augment Yolov3 deep learning algorithm for apple fruit quality detection. Signal Image Video Process. 2024, 18, 119–128. [Google Scholar]
- Gong, X.; Zhang, S. A high-precision detection method of apple leaf diseases using improved faster R-CNN. Agriculture 2023, 13, 240. [Google Scholar] [CrossRef]
- Jia, W.; Wang, Z.; Zhang, Z.; Yang, X.; Hou, S.; Zheng, Y. A fast and efficient green apple object detection model based on Foveabox. J. King Saud. Univ.-Comput. Inf. Sci. 2022, 34, 5156–5169. [Google Scholar]
- Ji, W.; Pan, Y.; Xu, B.; Wang, J. A real-time apple targets detection method for picking robot based on ShufflenetV2-YOLOX. Agriculture 2022, 12, 856. [Google Scholar] [CrossRef]
- Yuan, S.-Q.; Cao, Y.; Cheng, X. Research on Strawberry Quality Grading Based on Object Detection and Stacking Fusion Model. IEEE Access 2023, 11, 137475–137484. [Google Scholar]
- Nergiz, M. Enhancing Strawberry Harvesting Efficiency through Yolo-v7 Object Detection Assessment. Turk. J. Sci. Technol. 2023, 18, 519–533. [Google Scholar]
- Wang, C.; Wang, H.; Han, Q.; Zhang, Z.; Kong, D.; Zou, X. Strawberry Detection and Ripeness Classification Using YOLOv8+ Model and Image Processing Method. Agriculture 2024, 14, 751. [Google Scholar] [CrossRef]
- Luo, Q.; Wu, C.; Wu, G.; Li, W. A Small Target Strawberry Recognition Method Based on Improved YOLOv8n Model. IEEE Access 2024, 12, 14987–14995. [Google Scholar]
- Chai, J.J.; Xu, J.-L.; O’Sullivan, C. Real-Time Detection of Strawberry Ripeness Using Augmented Reality and Deep Learning. Sensors 2023, 23, 7639. [Google Scholar] [CrossRef]
- Li, Y.; Xue, J.; Zhang, M.; Yin, J.; Liu, Y.; Qiao, X.; Zheng, D.; Li, Z. YOLOv5-ASFF: A Multistage Strawberry Detection Algorithm Based on Improved YOLOv5. Agronomy 2023, 13, 1901. [Google Scholar] [CrossRef]
- Salim, R.; Fajar, A.N. OBJECT DETECTION OF CHILI USING CONVOLUTIONAL NEURAL NETWORK YOLOV7. J. Theor. Appl. Inf. Technol. 2024, 102, 2419–2427. [Google Scholar]
- Chen, H.; Zhang, R.; Peng, J.; Peng, H.; Hu, W.; Wang, Y.; Jiang, P. YOLO-chili: An efficient lightweight network model for localization of pepper picking in complex environments. Appl. Sci. 2024, 14, 5524. [Google Scholar] [CrossRef]
- Abubeker, K.; Akhil, S.; Kumar, V.A.; Jose, B.K. Computer Vision-Assisted Real-Time Bird Eye Chili Classification Using YOLO V5 Framework. J. Artif. Intell. Technol. 2024, 4, 265–271. [Google Scholar]
- Appe, S.N.; Arulselvi, G.; Balaji, G. CAM-YOLO: Tomato detection and classification based on improved YOLOv5 using combining attention mechanism. PeerJ Comput. Sci. 2023, 9, e1463. [Google Scholar]
- Liu, G.; Hou, Z.; Liu, H.; Liu, J.; Zhao, W.; Li, K. TomatoDet: Anchor-free detector for tomato detection. Front. Plant Sci. 2022, 13, 942875. [Google Scholar]
- Li, P.; Zheng, J.; Li, P.; Long, H.; Li, M.; Gao, L. Tomato maturity detection and counting model based on MHSA-YOLOv8. Sensors 2023, 23, 6701. [Google Scholar] [CrossRef]
- Facility Crop Disease Diagnostics. Available online: https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&dataSetSn=153 (accessed on 25 November 2024).
- Integrated Plant Disease Outbreak Data. Available online: https://www.aihub.or.kr/aihubdata/data/view.do?currMenu=115&topMenu=100&dataSetSn=525 (accessed on 25 November 2024).
- Laboro Tomato: Instance Segmentation Dataset. 2020. Available online: https://github.com/laboroai/LaboroTomato (accessed on 15 December 2024).
- Roboflow. Maturity Peppers in Greenhouses by Object Detection Image Dataset. Available online: https://universe.roboflow.com/viktor-vanchov/pepper-detector-cfpbq/dataset/2 (accessed on 20 January 2025).
- Bi, J.; Li, K.; Zheng, X.; Zhang, G.; Lei, T. SPDC-YOLO: An Efficient Small Target Detection Network Based on Improved YOLOv8 for Drone Aerial Image. Remote Sens. 2025, 17, 685. [Google Scholar] [CrossRef]
- Lin, T.-Y.; Maire, M.; Belongie, S.; Hays, J.; Perona, P.; Ramanan, D.; Dollár, P.; Zitnick, C.L. Microsoft coco: Common objects in context. In Proceedings of the Computer Vision–ECCV 2014: 13th European Conference, Zurich, Switzerland, 6–12 September 2014; Proceedings, Part V 13. Springer: Cham, Switzerland, 2014; pp. 740–755. [Google Scholar]
- Khan, A.T.; Jensen, S.M.; Khan, A.R. Advancing precision agriculture: A comparative analysis of YOLOv8 for multi-class weed detection in cotton cultivation. Artif. Intell. Agric. 2025, 15, 182–191. [Google Scholar] [CrossRef]
- Huang, J.; Rathod, V.; Sun, C.; Zhu, M.; Korattikara, A.; Fathi, A.; Fischer, I.; Wojna, Z.; Song, Y.; Guadarrama, S. Speed/accuracy trade-offs for modern convolutional object detectors. In Proceedings of the IEEE Conference on Computer Vision And pattern Recognition, Honolulu, HI, USA, 21–27 July 2017; pp. 7310–7311. [Google Scholar]
- Li, J.; Wang, Q.; Ma, J.; Guo, J. Multi-defect segmentation from façade images using balanced copy–paste method. Comput.-Aided Civ. Infrastruct. Eng. 2022, 37, 1434–1449. [Google Scholar] [CrossRef]
- Yang, S.; Luo, P.; Loy, C.-C.; Tang, X. Wider face: A face detection benchmark. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, Las Vegas, NV, USA, 27–30 June 2016; pp. 5525–5533. [Google Scholar]
- Savitzky, A.; Golay, M.J. Smoothing and differentiation of data by simplified least squares procedures. Anal. Chem. 1964, 36, 1627–1639. [Google Scholar]
- Che, Y.; Zheng, Y.; Forest, F.E.; Sui, X.; Hu, X.; Teodorescu, R. Predictive health assessment for lithium-ion batteries with probabilistic degradation prediction and accelerating aging detection. Reliab. Eng. Syst. Saf. 2024, 241, 109603. [Google Scholar]
- Satopaa, V.; Albrecht, J.; Irwin, D.; Raghavan, B. Finding a” kneedle” in a haystack: Detecting knee points in system behavior. In Proceedings of the 2011 31st International Conference on Distributed Computing Systems Workshops, Minneapolis, MN, USA, 20–24 June 2011; pp. 166–171. [Google Scholar]
Author(s) and Year | Dataset | Number of Classes | Dataset Size | Model or Architecture | Result |
---|---|---|---|---|---|
Wenan Yuan (2024) [19] | RGB Apple Buds Based on UAV | 6 | 3600 | YOLOv8 | 72.7% (mAP@50) |
Tiantian Hu et al. (2023) [20] | RGB-D Apple | 1 | 4785 | Improved YOLOX | 94.1% (mAP@50) |
M. Karthikeyan et al. (2024) [21] | RGB Apple | 3 | 1800 | Augment YOLOv3 | 99.1% (mAP@50) |
Xulu Gong et al. (2023) [22] | Apple Leaf Disease | 5 | 4182 | Improved Faster R-CNN | 63.1% (AP) |
Weikuan Jia et al. (2022) [23] | Green Apple | 1 | 1386 | Fast-FDM | 62.3% (mAP@50-95) |
Wei Ji et al. (2022) [24] | Apple | 1 | 17,930 | ShufflenetV2-YOLOX | 96.7% (AP) |
Shi-Qi Yuan et al. (2023) [25] | DanDong Strawberries | 4 | 420 | YOLOv5 | 85.4% (Accuracy) |
Mehmet NERGİZ et al. (2023) [26] | Strawberry-DS | 6 | 247 | YOLOv7 | 46.0% (mAP@50-95) |
Chenlin Wang et al. (2024) [27] | Strawberry | 2 | 1187 | YOLOv8+ | 97.8% (Accuracy) |
Qiang Luo et al. (2024) [28] | Strawberry | 2 | 3264 | YOLOv8 | 91.2% (mAP@50) |
Jackey J. K. Chai et al. (2023) [29] | StrawDI Team | 3 | 3100 | YOLOv7 | 89.0% (mAP@50) |
Yaodi Li et al. (2023) [30] | Strawberry | 4 | 1217 | YOLOv5-ASFF | 91.9% (mAP@50) |
Richard Salim et al. (2024) [31] | Curly Red Chili | 5 | 700 | YOLOv7 | 97.7% (mAP@50) |
HaiLin Chen et al. (2024) [32] | Chili | 1 | 1456 | YOLOv5 | 93.1% (AP@50) |
Abubeker K. M. et al. (2024) [33] | Bird Eye Chili | 2 | 1558 | YOLOv5 | 94.0% (mAP@50) |
Seetharam Negesh Appe (2023) [34] | Laboro Tomato | 2 | 2034 | CAM-YOLO | 88.1% (mAP@50) |
Guoxu Liu at al. (2022) [35] | Tomato | 1 | 966 | TomatoDet | 98.2% (AP@50) |
Ping Li et al. (2023) [36] | Tomato | 3 | 2208 | MHSA-YOLOv8 | 91.6% (mAP@50) |
Component | Specification |
---|---|
CPU | AMD Ryzen 5 7600 5.1 GHz |
GPU | NVIDIA GeForce RTX 4090 24 GB |
Memory | 64 GB |
Programming Language | Python 3.9.19 |
Operating System | Window 11 |
CUDA | 11.8 |
Torch | 2.0.1 + cu118 |
Torchvision | 0.15.2 + cu118 |
Component | Specification |
---|---|
CPU | 6-core Arm Cortex-A78AE v8.2 64-bit CPU 1.5 MB L2 + 4 MB L3 |
GPU | 1024-CUDA core NVIDIA Ampere architecture GPU with 32 Tensor Cores |
Memory | 8 GB 128-bit LPDDR5 68 GB/s |
Module Power | 15 W |
Programming Language | Python 3.8 |
Operating System | Jetpack 5.1.1 |
Torch | 2.0.0 + nv23.05 |
Torchvision | 0.15.1a0 + 42759b1 |
Dataset | Number of Images | Number of Labels |
---|---|---|
Strawberry | 3386 | 23,359 |
Tomato | 804 | 9777 |
Chili | 682 | 2258 |
Pepper | 619 | 5324 |
Dataset | Small | Medium | Max_BBoxArea |
---|---|---|---|
Strawberry | 0.061891 | 0.103104 | 0.384039 |
Tomato | 0.126025 | 0.195229 | 0.536674 |
Chili | 0.138742 | 0.234728 | 0.944629 |
Pepper | 0.036184 | 0.061265 | 0.241488 |
Dataset | Split | Total Labels | Mean/Standard Deviation |
---|---|---|---|
Strawberry | Train | 18,418 | 6.8/4.7 |
Validation | 2493 | 4.7/4.6 | |
Test | 2448 | 7.1/4.8 | |
Tomato | Train | 7716 | 12.0/11.7 |
Validation | 1012 | 13.0/11.2 | |
Test | 1049 | 12.5/10.9 | |
Chili | Train | 1457 | 3.1/2.1 |
Validation | 631 | 3.7/2.5 | |
Test | 170 | 4.5/2.4 | |
Pepper | Train | 3957 | 8.8/3.7 |
Validation | 702 | 6.9/4.5 | |
Test | 665 | 10.1/4.7 |
Confusion Matrix | Predicted | ||
---|---|---|---|
Positive | Negative | ||
Actual | Positive | True Positive (TP) | False Positive (FP) |
Negative | False Negative (FN) | True Negative (TN) |
Crop | Image Size | Knee Point (Number of Labels) | Knee AP | Pre-Group AP Increase Rate (%) | Post-Group AP Increase Rate (%) |
---|---|---|---|---|---|
Strawberry | 320 | 175 | 0.6940 | 1.11 (0.67–1.54) * | 0.04 (0.03–0.04) |
640 | 210 | 0.7548 | 1.03 (0.68–1.37) | 0.04 (0.03–0.04) | |
960 | 205 | 0.7605 | 1.03 (0.67–1.39) | 0.04 (0.03–0.04) | |
1280 | 220 | 0.7693 | 0.90 (0.61–1.20) | 0.03 (0.03–0.04) | |
Tomato | 320 | 215 | 0.6986 | 2.05 (1.28–2.83) | 0.07 (0.07–0.08) |
640 | 235 | 0.7979 | 1.40 (0.94–1.87) | 0.05 (0.04–0.05) | |
960 | 220 | 0.8002 | 1.31 (0.86–1.76) | 0.05 (0.04–0.05) | |
1280 | 185 | 0.8096 | 2.12 (1.21–3.04) | 0.05 (0.04–0.05) | |
Chili | 320 | 230 | 0.4392 | 8.68 (1.50–15.87) | 0.10 (0.09–0.11) |
640 | 290 | 0.4820 | 2.60 (2.17–9.03) | 0.11 (0.10–0.11) | |
960 | 290 | 0.4818 | 5.66 (2.16–9.16) | 0.10 (0.10–0.11) | |
1280 | 325 | 0.4878 | 8.43 (0.78–16.09) | 0.10 (0.10–0.11) | |
Pepper | 320 | 430 | 0.4703 | 1.13 (0.89–1.37) | 0.09 (0.08–0.09) |
640 | 325 | 0.5542 | 1.87 (1.31–2.43) | 0.10 (0.09–0.11) | |
960 | 280 | 0.5793 | 2.37 (1.53–3.21) | 0.11 (0.10–0.11) | |
1280 | 300 | 0.5920 | 2.28 (1.51–3.06) | 0.11 (0.10–0.11) |
Crop | 320 | 640 | 960 | 1280 |
---|---|---|---|---|
Strawberry | 42.72 (38.80–46.64) 1 | 87.67 (83.75–91.59) | 151.96 (148.04–155.88) | 209.50 (205.58–213.42) |
Tomato | 68.41 (64.49–72.33) | 77.43 (73.51–81.35) | 113.11 (109.19–117.03) | 212.66 (208.74–216.58) |
Chili | 130.90 (126.98–134.82) | 188.44 (184.52–192.36) | 326.20 (322.28–330.12) | 579.42 (575.50–583.34) |
Pepper | 84.19 (80.27–88.11) | 89.12 (85.20–93.04) | 75.88 (71.96–79.80) | 79.99 (76.07–83.91) |
Crop | 320 | 640 | 960 | 1280 |
---|---|---|---|---|
Strawberry | 1.14 (0.94–1.34) 1 | 3.26 (3.06–3.46) | 6.80 (6.60–7.00) | 12.18 (11.98–12.38) |
Tomato | 0.88 (0.68–1.08) | 2.75 (2.55–2.95) | 5.86 (5.66–6.06) | 12.31 (12.11–12.51) |
Chili | 1.10 (0.90–1.30) | 3.24 (3.04–3.44) | 6.98 (6.78–7.18) | 12.24 (12.04–12.44) |
Pepper | 1.38 (1.18–1.57) | 3.75 (3.56–3.95) | 8.16 (7.96–8.35) | 14.65 (14.46–14.85) |
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
Song, J.; Kim, D.; Jeong, E.; Park, J. Determination of Optimal Dataset Characteristics for Improving YOLO Performance in Agricultural Object Detection. Agriculture 2025, 15, 731. https://doi.org/10.3390/agriculture15070731
Song J, Kim D, Jeong E, Park J. Determination of Optimal Dataset Characteristics for Improving YOLO Performance in Agricultural Object Detection. Agriculture. 2025; 15(7):731. https://doi.org/10.3390/agriculture15070731
Chicago/Turabian StyleSong, Jisu, Dongseok Kim, Eunji Jeong, and Jaesung Park. 2025. "Determination of Optimal Dataset Characteristics for Improving YOLO Performance in Agricultural Object Detection" Agriculture 15, no. 7: 731. https://doi.org/10.3390/agriculture15070731
APA StyleSong, J., Kim, D., Jeong, E., & Park, J. (2025). Determination of Optimal Dataset Characteristics for Improving YOLO Performance in Agricultural Object Detection. Agriculture, 15(7), 731. https://doi.org/10.3390/agriculture15070731