Advancing Arecanut Quality Grading: A Comparative Analysis of YOLO Models with Hyperparameter Optimization

preprint OA: closed
Full text JSON View at publisher
Full text 151,995 characters · extracted from preprint-html · click to expand
Advancing Arecanut Quality Grading: A Comparative Analysis of YOLO Models with Hyperparameter Optimization | Research Square window.SnipcartSettings = { analytics: { enabled: false } }; (function() { var accessVector = localStorage.getItem('access_vector') || ''; window.dataLayer = window.dataLayer || []; if (accessVector) { window.dataLayer.push({ user: { profile: { profileInfo: { snid: accessVector } } } }); } })(); (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src='https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);})(window,document,'script','dataLayer','GTM-K279D39R'); Browse Preprints In Review Journals COVID-19 Preprints AJE Video Bytes Research Tools Research Promotion AJE Professional Editing AJE Rubriq About Preprint Platform In Review Editorial Policies Our Team Advisory Board Help Center Sign In Submit a Preprint Cite Share Download PDF Research Article Advancing Arecanut Quality Grading: A Comparative Analysis of YOLO Models with Hyperparameter Optimization Dhanush Ghate D, Saishma H, Adithya M, Sudeep D Ghate This is a preprint; it has not been peer reviewed by a journal. https://doi.org/ 10.21203/rs.3.rs-5755373/v1 This work is licensed under a CC BY 4.0 License Status: Posted Version 1 posted You are reading this latest preprint version Abstract Arecanut grading is essential for maintaining quality, fair pricing, and efficient trade. Manual grading methods, dependent on subjective human assessment, are prone to errors, inconsistencies, and inefficiencies, particularly in large-scale operations.Automating this process is vital for improving accuracy and scalability. The You Only Look Once (YOLO) deep learning method autonomously evaluates arecanuts by training on 2,000 high-resolution photos uniformly categorized into four quality ratings. We split the dataset into 80% for training, 20% for validation, and used a separate curated test set to evaluate generalization. Then evaluated YOLOv8 and YOLOv11 models in nano, small, and medium configurations. The optimization process involved tuning batch size, learning rate, and weight decay through grid search and applying data augmentation techniques.The YOLOv8 nano model achieved the highest accuracy of 98.25%, with a precision of 0.98, a recall of 0.98, and a processing time of 220.19 ms per image. In contrast, YOLOv11 models exhibited lower accuracy due to overlapping feature misclassifications. While the results highlight the potential of YOLO models in automating agricultural grading, the study is constrained by dataset size and single-perspective imaging, limiting its generalizability. Future work will focus on expanding datasets, incorporating advanced imaging technologies, and improving model transparency for practical deployment. These results demonstrate the potential of YOLO models in automating agricultural grading, offering a scalable, efficient, and sustainable solution for arecanut classification in real-world applications. Artificial Intelligence and Machine Learning Arecanut grading YOLO models deep learning agricultural classification model optimization hyperparameter tuning Figures Figure 1 Figure 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 1. Introduction Arecanut, commonly referred to as betel nut, is an essential agricultural product in India, predominantly cultivated in states like Karnataka, Kerala, and Assam. India is the largest global producer, contributing to nearly 50% of worldwide production, forming the economic backbone of several agriculture-dependent communities [ 1 ]. This crop holds significant economic and cultural importance, providing a livelihood for millions of farmers and serving as a key raw material in industries such as food, pharmaceuticals, and traditional medicine. In addition to its diverse applications, the grading of arecanut is crucial in determining its market value and ensuring fair pricing for farmers [ 3 ]. However, the current grading practices, which rely on subjective evaluation methods, often fail to meet the growing demand for consistent quality and scalability in both domestic and international markets. These challenges underscore the urgent need for modern, automated grading systems to enhance the efficiency and reliability of arecanut processing, benefiting stakeholders across the supply chain [ 2 ][ 4 ]. Traditional arecanut grading is a labor-intensive process, requiring skilled workers to evaluate nuts based on subjective parameters like size, color, and surface texture [ 5 ]. This dependence on manual labor introduces inconsistencies in grading due to human error, fatigue, and the subjective nature of assessments. Furthermore, the increasing scarcity of skilled labor adds to operational costs and reduces scalability, posing a significant challenge for farmers and stakeholders in the arecanut supply chain [ 6 ]. These limitations demand advanced automated grading solutions that offer reliability, efficiency, and standardization across regions. In our earlier study, we developed a CNN-based framework for automated arecanut grading, evaluating eight state-of-the-art architectures, including DenseNet121 and InceptionV3. The study achieved a classification accuracy of 95.67% using DenseNet121 and highlighted the potential of CNNs for feature extraction and classification in agricultural applications. While CNN-based approaches have proven effective for image classification tasks, they often require additional processing to segment and classify objects. In contrast, YOLO integrates object detection and classification into a single pipeline, offering real-time performance and scalability for large datasets. These capabilities make YOLO uniquely suited for agricultural applications, where rapid analysis of large quantities of produce is essential for maintaining competitiveness in the market [ 7 ]. Machine learning and computer vision technologies have emerged as transformative tools in agricultural automation, enabling precise and scalable grading processes. The YOLO (You Only Look Once) model, a cutting-edge object detection framework, presents a novel solution to address the challenges of arecanut grading. Unlike traditional classifiers such as Convolutional Neural Networks (CNNs), YOLO simultaneously detects and classifies objects in real time by predicting bounding boxes and class probabilities directly from images. Its speed and accuracy make it particularly suitable for high-throughput grading systems where both efficiency and precision are critical. By analyzing visual features like size, color, and surface texture, Yolo can objectively classify areca nuts into predefined grades while significantly reducing human dependency [ 8 ]. [ 9 ][ 10 ]. Recent advancements in deep learning, particularly Convolutional Neural Networks (CNNs) and object detection frameworks like YOLO, have transformed agricultural classification and grading tasks. CNNs have demonstrated high accuracy in applications such as fruit grading, pest detection, and disease diagnosis by extracting detailed visual features from images. However, the primary design of CNNs for classification tasks often necessitates additional segmentation steps, potentially limiting their real-time applicability [ 11 ]. In contrast, YOLO excels by integrating object detection and classification into a single, efficient pipeline, enabling real-time performance [ 8 ]. YOLO's ability to simultaneously predict bounding boxes and class probabilities makes it particularly well-suited for high-throughput grading tasks, where both speed and precision are critical. Applications such as fruit defect detection, seed grading, and plant disease identification have demonstrated its versatility [ 12 ][ 13 ][ 14 ][ 15 ]. These characteristics position YOLO as a highly capable framework for automating arecanut grading, ensuring consistent quality while reducing dependency on manual labour. This study employs YOLOv8 and YOLOv11 classification models and trains nano, small, and medium configurations to optimize performance across varying computational constraints. These configurations allow for scalability, with lightweight models suited for resource-constrained environments and larger models delivering higher accuracy in real-time applications. The selection of these YOLO versions ensure robust, real-time classification while maintaining resource efficiency, making them ideal for agricultural use. The study's primary objectives are to design and train a YOLO-based model specifically for arecanut grading, with a focus on key attributes like size, colour, and surface texture; to enhance the models' performance through hyperparameter tuning; and to evaluate the models using a dedicated testing dataset. To achieve these goals, this study aims to establish an efficient, scalable grading framework that reduces labor dependency, ensures consistent quality, and supports economic sustainability for farmers and the broader industry. 2. Related Works Object detection has evolved significantly with the advent of deep learning, with convolutional neural networks (CNNs) playing a pivotal role in this advancement. Convolutional Neural Networks (CNNs) are proficient in extracting features from extensive picture datasets, facilitating accurate evaluations based on visual attributes such as texture, dimensions, and colour. This has proven a particular utility in agricultural grading tasks, where automatic classification of visual features is critical [ 16 ][ 17 ][ 18 ]. Moreover, the integration of CNNs into agricultural practices has led to the development of smart farming technologies that increase production and sustainability. CNN-based models frequently outperformed traditional grading techniques, providing quicker and more reliable assessments [ 24 ]. As a result, dependence on traditional grading techniques is diminishing, leading to the emergence of data-driven strategies that employ machine learning to optimize agricultural outputs. Yolo has evolved into multiple versions (YOLOv3, YOLOv4, YOLOv5, YOLOv8, and YOLOv11), with each iteration improving accuracy, efficiency, and generalizations for real-time applications. The ability to detect and classify objects simultaneously with high accuracy makes YOLO an ideal candidate for agricultural grading, where rapid, automated classification of features such as size, color, and surface texture is essential [ 19 ], [ 20 ], [ 22 ]. The latest YOLO models, such as YOLOv8 and YOLOv11, have incorporated innovations such as custom anchor boxes and enhanced transfer learning capabilities. These improvements have made the models faster and more accurate, achieving processing speeds of up to 155 frames per second while maintaining high classification precision on benchmark datasets [ 23 ][ 25 ]. Agricultural applications such as pest detection, crop monitoring, and fruit grading, which analyse visual features like colour and size for real-time predictions, find YOLO's real-time operation and accuracy invaluable [ 12 ] [ 21 ][ 26 ]. Several studies have demonstrated YOLO’s potential in agricultural grading tasks. For example, Pham et al. (2024) used YOLO for cashew nut grading, achieving around 95% accuracy, while Liang et al. (2022) employed YOLOv4 for real-time grading of defective apples, achieving 94% accuracy [ 12 ][ 27 ]. Additionally, research on arecanut grading, such as Chikkalingaiah et al.’s work, has used CNNs to segment and classify arecanut bunches, achieving 97% accuracy across different grades [ 32 ]. In our prior work, we applied eight CNN models to classify arecanuts into four quality categories, achieving up to 95.67% accuracy [submitted]. Our current study builds on this by integrating YOLO models to enhance real-time classification, scalability, and accuracy in arecanut grading. Adesh et al. (2023) have presented an innovative approach that uses the YOLOv5 model on a Raspberry Pi for real-time detection and segregation of dehusked arecanuts [ 34 ]. The methodology showcases significant advances in agricultural practices by optimizing efficiency and accuracy in grading processes through a cost-effective AI solution tailored for limited hardware resources. In a study by Naik and Rudra (2023), they used a lightweight YOLOv5 model, enhanced with GhostNet and FPN, to achieve a mAP of 97.84% for a coffee quality assessment based on a custom X-ray image dataset. This model demonstrated superior performance over YOLOv3, YOLOv4, YOLOX, and YOLOv8 with a compact model size of 15 MB [ 35 ]. In 2024, Naik and Rudra created a highly efficient real-time grading model by integrating GhostNet into Darknet-53 and FPN. This model achieved a mAP of 98.85% using a dataset of arecanut images and had a compact model size of only 1.9 MB (Naik and Rudra, 2024a) [ 31 ]. Another study added GhostNet, transformer blocks, and stem layers to YOLOv5. This led to a mAP of 97.30% and a lightweight 9.5 MB model that was perfect for X-ray devices (Naik and Rudra, 2024b) [ 36 ]. We systematically explore parameters such as batch size, learning rate, weight decay, and image size in our current work to identify the most effective hyperparameters that improve classification reliability and processing speed. 3. Materials and Methods 3.1 Dataset Collection and Annotation Karnataka classifies de-husked areca nuts into four quality grades, each defined by distinct features. The training set consists of four sub-classes: Grade 1, Grade 2, Grade 3, and Grade 4, ensuring clear differentiation based on quality. Grade 1, the highest quality, is characterised by a uniform light brown colour and an absence of peel. Grade 2, known as "Phatora," exhibits noticeable surface cuts, distinguishing it from higher-grade nuts. Grade 3, referred to as "Cheppugotu," is identifiable by its white appearance due to its skin. Dark brown colouration and visible signs of rotting distinguish Grade 4, also known as "Karigotu," as the lowest quality. Figure 1 illustrates the visualisation for each grade from the front, bottom, lateral and oblique views. The dataset includes 2,000 arecanut images, with 500 images per grade, ensuring balanced representation of each category. These images capture the unique characteristics of colors, textures, and surface features, providing a robust foundation for classification models. Arecanut plantations from regions surrounding Puttur in Dakshina Kannada, Karnataka (12.40°N, 75.10°E), serve as the primary sources, reflecting the real-world variability in grading. The images were captured under varied lighting, angles, and backgrounds to mimic real-world conditions. Experts from the CPCRI Regional Station, Vittal, Karnataka, annotated the images following commercial grading criteria, such as color, texture, and size. The annotation process involved marking bounding boxes to identify individual nuts and their grades. We captured the images using a high-resolution smartphone camera (50 MP, 6120x6120). We then resized the images to 1080 pixels with three RGB channels, a standard resolution for all models, to ensure uniformity and preserve critical visual features essential for classification. 3.2 Data Augmentation The data augmentation strategy aims to improve the YOLO model's adaptability to real-world challenges in arecanut classification. During preprocessing, we normalize pixel values by scaling each pixel value by 1/255 to ensure consistency. During training, we employ several augmentation techniques dynamically to introduce variability in the dataset. The shear parameter, set to 0.5, handles rotational distortions, simulating angular variations in the appearance of arecanuts. In order to correct for misalignments or off-centre positioning of the nuts in photos, the translate option performs random width and height changes of up to 10%. The scale parameter manages scaling by randomly zooming images in or out within a factor range of 0.3 to 0.7, addressing the variability in the size of the nuts. The flipping augmentations (flipud = 0.5 and fliplr = 0.5) randomly rotate the images in both vertical and horizontal directions, simulating the various orientations observed during the grading processes. Colour variations, crucial for distinguishing arecanut grades, are introduced by adjusting hue, saturation, and brightness through the hsv_h = 0.015–0.05, hsv_s = 0.4–0.7, and hsv_v = 0.3–0.6 parameters. The mosaic parameter set to 1.0 activates mosaic augmentation, which combines four images into one to enhance dataset diversity, while mixup blends images and their labels within a range of 0.2 to 0.5 to create new combinations for enhanced robustness. Additionally, a constant fill mode with a value of 125 manages pixels introduced during transformations, ensuring visual consistency. These techniques improve the model's robustness to real-world variations. 3.3 YOLO models used for arecanut classification YOLOv8 is a state-of-the-art version of the "You Only Look Once" series, designed with a lightweight and modular architecture suitable for diverse machine learning tasks, including classification. The YOLOv8 and YOLOv11 models were selected for arecanut classification due to their advanced architecture and adaptability. The YOLOv8 features a lightweight and modular design, excelling at capturing intricate patterns like color, texture, and size, which are essential for grading tasks. Its scalability, with subtypes such as YOLOv8_n, YOLOv8_s, and YOLOv8_m, allows deployment across diverse resource and performance requirements, ensuring effectiveness in both resource-limited and high-performance environments. Similarly, YOLOv11 introduces a refined architecture and advanced feature extraction capabilities, making it adept at complex classification challenges. Subtypes like YOLOv11_n, YOLOv11_s, and YOLOv11_m provide flexibility, enabling balanced trade-offs between speed, accuracy, and computational demands. Both models employ data augmentation techniques, enhancing robustness to real-world variations in image quality and object appearance. By leveraging these features, YOLOv8 and YOLOv11 offer a reliable framework for automating agricultural grading tasks, addressing variations in object features and environmental conditions with precision and efficiency. 3.4 Hyperparameter Tuning Hyperparameter tuning was conducted using Optuna [ 37 ], a powerful optimisation framework, to optimise the performance of the YOLOv8 model for the arecanut classification task. The tuning process employed Bayesian optimisation [ 38 ], which efficiently explores the hyperparameter space to identify optimal configurations. Key hyperparameters, including learning rate, batch size, image size, and the number of training epochs, were systematically adjusted. The learning rate, critical for balancing convergence speed and stability, was tuned within a logarithmic range of 1e-5 to 1e-2. Batch sizes of 16, 32, and 64 were tested to identify the best trade-off between memory usage and generalization. Image sizes of 64, 128, 224, and 256 pixels were explored to ensure the resolution was sufficient for extracting essential visual features while maintaining computational feasibility. Other hyperparameters, such as weight decay for regularisation, were adjusted between 1e-5 and 1e-3 to mitigate overfitting. This comprehensive tuning approach ensured the model's adaptability to diverse grading scenarios and robust performance across the dataset. The tuning process was iterative, with 100 trials conducted to optimise the validation accuracy (top-1 accuracy) as the primary metric. The early stopping mechanism with a patience of 5 epochs was implemented to prevent overtraining. The best-performing hyperparameters were identified through Optuna; it demonstrated a significant improvement in the model's performance, ensuring adaptability to diverse grading scenarios and robust classification across the dataset. 3.5 Model Training, validation and testing The final training phase focused on evaluating models across four different patience levels (p-0, p-10, p-15, and p-20) to determine the optimal early stopping criteria for each architecture. This resulted in a total of 24 distinct model configurations derived from six architectures—YOLOv8n, YOLOv8s, YOLOv8m, YOLOv11n, YOLOv11s, and YOLOv11m—each trained with the selected patience levels. The hyperparameters optimised through Bayesian tuning were applied, and training was extended to 150 epochs to allow sufficient convergence and assess the impact of extended training on model performance. We split the dataset into 80% for training, 20% for validation, and used a separate, curated test dataset of 100 images to ensure a realistic evaluation of the model's generalisation ability. We assessed the model performance using accuracy, precision, recall, and F1-score, selecting the best model from each architecture based on the highest test accuracy for further analysis. Table 4 presents a comparison of these models, including key performance metrics, and provides additional insights through training/validation graphs and confusion matrices, enabling a comprehensive evaluation of model capabilities in real-world applications. 3.6 Experimental Setup The experiments were conducted on a system with an 11th-generation Intel Core i7 processor, 32GB of RAM, and an NVIDIA RTX 3060 GPU with 12GB of memory. The YOLO models were trained using PyTorch [ 45 ], and the experiments were executed within Jupyter Notebook to facilitate iterative development and evaluation. Python scripts were employed for generation of visualizations including composite figures of key metrics (train loss, validation loss, top-1 accuracy, and top-5 accuracy) with Gaussian smoothing [ 39 ] for improved interpretability. Scripts are available in the accompanying GitHub repository for reproducibility and further exploration. The following libraries were utilized in the analysis: Python 3.10, PyTorch 2.5.0, pandas, matplotlib [ 46 ], seaborn [ 47 ], scipy [ 48 ], and numpy. 4. Results The arecanut industry encounters significant challenges in achieving consistent and precise grading due to the inherent variation in the size, shape, and texture of arecanuts, exacerbated by the subjective nature of manual evaluation. This study seeks to mitigate these challenges by employing the YOLO (You Only Look Once) framework for the automated classification of arecanuts. Utilizing a balanced dataset comprising 2,000 images categorized across four quality grades, we systematically investigated various YOLO architectures, including YOLOv8_n, YOLOv8_s, YOLOv8_m, YOLOv11_n, YOLOv11_s, and YOLOv11_m (n-nano, s-small, and m-medium varieties), to determine the most effective model for this classification task. Figure 2 illustrates the workflow for arecanut classification, utilizing custom-trained YOLO models developed in this study. 4.1 Hyperparameter tuning : Hyperparameter tuning was conducted using Optuna with Bayesian optimization to systematically explore and identify the best configurations for YOLOv8 and YOLOv11 models. The tuning process, consisting of 100 trials per model, optimized key parameters such as learning rate, batch size, image size, epochs, and weight decay to maximize validation accuracy. Table 2 presents the final best-performing hyperparameter settings obtained for each model configuration. Table 1 Summary of related studies using YOLO models for nut classification Study Dataset size Technique/ Algorithms Performance Limitations Chikkalingaiah et al, 2024 [ 32 ] 388 ripe, 629 unripe images YOLOv3 (YOLO-areca) Accuracy: 94.7% Partial occlusion and overlapping of arecanuts, which hinder accurate segmentation and yield counting. Pham et al, 2024 [ 27 ] 6000 images YOLOv8 + SC3T Accuracy: 97.04% Limited dataset and the potential impact of low-quality image Yang et al., 2023 [ 29 ] 3098 images YOLOv8 + FEM + DPAG mAP: 93.4% Potential overfitting due to the limited dataset used for training Xiao et al, 2024 [ 30 ] 4000 images YOLOV8 + CSP + C2F Accuracy: 99.5% Insufficient exploration of varying lighting conditions and occlusions, need for better resource optimization and image annotation processes Naik and Rudra, 2023 [ 35 ] 900 images YOLOv5 + FPN Accuracy: 97.84% X-ray images may not fully represent the variability in arecanut quality Qin et al, 2021 [ 35 ] 400 images Ag- YOLO F1- score: 92.05% Small dataset and overfitting due to the strong data augmentation Liang et al, 2023 [ 12 ] 230 images YOLOv4 Accuracy: 92.42% F1: 94.31 Small dataset Our work 2000 images YOLOv8, YOLOv11 Accuracy: 92.30% Precision: 95% Recall: 94% Limited dataset size, Frontal images restrict feature assessment. Table 2 Best params for model after hyperparameter tuning Model\Best params Image size Batch size Learning rate Weight decay YOLO8n 256 16 0.007242 8.10662 e-05 YOLO8m 256 32 0.00001486 0.0009686 YOLO8s 256 32 0.0000399 0.0005853 YOLO11s 256 32 0.000154 0.0004391 YOLO11n 256 16 0.000131 0.000760 YOLO11m 224 32 0.000014 0.000465 The YOLOv8_n model demonstrated optimal performance with a smaller batch size of 16, a high learning rate of 0.007242, and a weight decay of 8.107e-05. This configuration prioritized faster convergence, making it well-suited for scenarios requiring quicker updates, although careful data augmentation was necessary to prevent overfitting. YOLOv8_m and YOLOv8_s, employing batch sizes of 32, and lower learning rates of 0.00001486 and 0.0000399, respectively, achieved stable training and consistent generalization across diverse conditions. Similarly, YOLOv11_n's best configuration featured a batch size of 16, a learning rate of 0.000131, and a weight decay of 0.00076. This setup balanced adaptability and generalization, especially in challenging datasets. YOLOv11_m and YOLOv11_s used batch sizes of 32 with conservative learning rates of 0.000014 and 0.000154, respectively, to achieve robust and stable performance. The models also benefited from optimal image resizing, with most configurations using 256 pixels, except for YOLOv11_m, which used 224 pixels to improve memory efficiency. Epochs were fine-tuned for each model, ranging from 19 to 38, to balance convergence speed and generalization. Data augmentation strategies further enhanced model robustness, with YOLOv11_n employing aggressive augmentation settings (saturation jitter: 0.5931, mixup strength: 0.3904), resulting in improved adaptability to diverse lighting and object size variations. This systematic hyperparameter tuning process, coupled with the iterative trials and early stopping mechanism, ensured that each model configuration was optimized for performance, resource efficiency, and adaptability. 4.2 Model training and validation: The results presented here correspond to the best-performing configurations from the six architectures (YOLOv8_n, YOLOv8_s, YOLOv8_m, YOLOv11_n, YOLOv11_s, YOLOv11_m), selected based on their optimal performance across four patience levels (p-0, p-10, p-15, and p-20). These models represent the most effective configurations out of the 24 distinct setups evaluated during training, with detailed results of the remaining 18 models provided in the supplementary materials. During the YOLO model training process, both the best-performing model and the final model were automatically saved as .pt files, ensuring reproducibility and providing a foundation for further fine-tuning and experimentation.The YOLOv8_n classifier converged within 50 epochs, achieving a Top-1 accuracy of 97.5% and a Top-5 accuracy of 100%, demonstrating strong predictive performance (Fig. 3 ). YOLOv8_s and YOLOv8_m achieved similar success over 150 epochs, with Top-1 accuracies of 98.0% and 98.5%, respectively, and consistent Top-5 accuracies of 100%, reflecting robust learning and generalization (Figs. 4 , 5 ). For YOLOv11 models, YOLOv11_n converged in 50 epochs, achieving a stable Top-1 accuracy range of 97.5–98.5% and a Top-5 accuracy of 100% (Fig. 6 ). YOLOv11_s showed similar trends, with Top-1 accuracy plateauing around 97.0% (Fig. 7 ). YOLOv11_m, although converging over 150 epochs, exhibited variability in validation loss but maintained a Top-1 accuracy of approximately 96.0% and a Top-5 accuracy of 100% (Fig. 8 ). By focusing on the best-performing configurations for each architecture, this analysis underscores the effectiveness of YOLO-based classifiers in achieving reliable object detection performance while highlighting opportunities for further optimization. These results, supported by comprehensive performance metrics, training/validation graphs, and confusion matrices, provide actionable insights for real-world applications. The validation results for the best YOLO models demonstrated excellent performance in classifying arecanuts into four grades. Grades 1 and 4 consistently achieved perfect classification across all models, highlighting the models' ability to identify these grades reliably. However, Grades 2 and 3 presented more challenges, particularly with some misclassifications between these two grades. YOLOv8_m achieved the highest overall accuracy, but misclassifications occurred more frequently between Grades 2 and 3, indicating the need for further analysis of feature overlaps. YOLOv11_n struggled with Grade 3, misclassifying it as Grade 2, while YOLOv8_n showed similar difficulties, suggesting that smaller architectures may benefit from fine-tuning or feature enhancement techniques (Fig. 9 ). Overall, the true positives for Grades 1 and 4 were high across all models, while misclassifications primarily occurred in Grades 2 and 3. These results highlight areas for potential improvement, including refining model architectures or augmenting training data to address the subtle differences between these categories. 4.3 Testing The comparative testing of the six YOLO models reveals significant performance differences in arecanut grading (Table 3 ). Among these models, YOLOv8_n achieved the highest overall accuracy of 98.25%, followed by YOLOv8_m at 97.5%, and YOLOv8_s at 92.75%. The YOLOv11 models demonstrated lower overall accuracies, with YOLOv11_s at 91.75%, YOLOv11_n at 89.75%, and YOLOv11_m at 83.25%. In terms of precision, YOLOv8 models exhibited consistently high scores, with YOLOv8_n and YOLOv8_m both achieving a precision of 0.98. In contrast, the YOLOv11 models showed more variability, particularly YOLOv11_n, which recorded significantly lower precision (0.1). Recall values were similarly high for the YOLOv8 models (0.98 for YOLOv8_n, 0.97 for YOLOv8_m), while the YOLOv11 models showed lower recall, particularly in challenging grades such as Grade 2 and Grade 4. The F1-scores for YOLOv8 models were also robust, with YOLOv8_n and YOLOv8_m both achieving F1 scores of 0.98, indicating balanced performance in both precision and recall. On the other hand, YOLOv11_n and YOLOv11_m had F1 scores closer to 0.9, signaling areas for improvement in classification. Table 3 Test performance metrics of final selected YOLO models for arecanut classification. Model\Metrics Patience Overall Accuracy (%) W. Precision W. Recall W. F1-Score Time (ms)/ img YOLO8n 10 98.25 0.98 0.98 0.98 220.19 YOLO8m 0 97.5 0.98 0.97 0.98 219.01 YOLO8s 0 92.75 0.94 0.93 0.92 214.94 YOLO11s 20 91.75 0.93 0.92 0.92 231.43 YOLO11n 10 89.75 0.1 0.9 0.9 230.84 YOLO11m 0 83.25 0.89 0.83 0.83 221.18 The confusion matrix analysis further elucidated the model’s strengths and weaknesses (Fig. 10 ). While YOLOv8 models achieved near-perfect classification for all grades, YOLOv11 models faced challenges, particularly with Grade 2 and Grade 4. YOLOv8_n showed excellent classification across Grades 1 to 3 but struggled with Grade 4, where it had low recall despite high precision. YOLOv11_n misclassified Grade 2 as Grade 1 and faced difficulties with Grade 4. Similarly, YOLOv11_m displayed low precision for Grade 4. These results highlight the need for further refinement in classifying lower-quality grades. Regarding inference speed, the models demonstrated competitive performance. YOLOv8_n took 220.19 ms per image, closely followed by YOLOv8_m at 219.01 ms and YOLOv8_s at 214.94 ms. The YOLOv11 models had slightly longer inference times, with YOLOv11_s at 231.43 ms, YOLOv11_n at 230.84 ms, and YOLOv11_m at 221.18 ms. This suggests that the YOLOv11 models may have a slight computational overhead compared to the YOLOv8 variants, which could be a consideration in real-time applications where inference speed is crucial. Overall, while the YOLOv8 models excelled in all performance metrics, the YOLOv11 models, particularly YOLOv11_n and YOLOv11_m, require further optimization. Enhancements to their feature extraction and classification capabilities could improve their accuracy in challenging grades and reduce misclassifications. Additionally, although the YOLOv8 models are faster in inference, future work could further optimize the YOLOv11 models to balance performance and speed for real-time deployment in arecanut grading tasks. 5. Discussion This current study demonstrates the transformative potential of YOLO-based models, particularly YOLOv8_n, in automating the grading of arecanuts. YOLOv8_n achieved the highest accuracy (98.25%), followed by YOLOv8_m (97.5%) and YOLOv8_s (92.75%). In contrast, the YOLOv11 models showed lower accuracies, with YOLOv11_s at 91.75%, YOLOv11_n at 89.75%, and YOLOv11_m at 83.25%. These results highlight YOLOv8's superior performance in classification accuracy and inference speed, making it ideal for real-time deployment in agricultural applications. The consistently high Top-5 accuracies across all models suggest effective learning with minimal overfitting. However, the observed plateau in Top-1 accuracy highlights opportunities for improvement through techniques like architecture refinement, advanced data augmentation, or ensemble methods. Validation loss variability in YOLOv11_m indicates a potential need for enhanced regularization techniques to improve stability and generalization. Integrating YOLO models into handheld devices and drones could significantly reduce labor costs and address workforce shortages in agriculture. Recent study has demonstrated the effectiveness of integrating YOLO models into drone-based agricultural systems, where real-time grading was achieved with improved throughput and reduced labor costs [ 40 ]. By automating grading, farmers can enhance throughput, ensure consistent product quality, and make real-time, data-driven decisions that optimize resource management. The economic benefits of automating arecanut grading are clear. Increased throughput allows farmers to handle more produce without increasing labor costs, promoting greater profitability. Studies have shown that automation of grading and sorting tasks in agriculture leads to significant cost savings, especially when scaling production without increasing labor costs [ 41 ][ 42 ]. Consistent grading also minimizes waste by ensuring high-quality nuts are accurately identified, supporting supply chain reliability. The YOLO models' high inference speed (under 250 ms per image for YOLOv8 variants) also make them highly practical for real-time use, which is crucial in agricultural applications. In addition, YOLOv8_n demonstrated the fastest inference time (220.19 ms per image), closely followed by YOLOv8_m at 219.01 ms, and YOLOv8_s at 214.94 ms. This speed advantage of the YOLOv8 models over YOLOv11 models emphasizes their suitability for time-sensitive tasks like automated grading in agriculture. Nevertheless, further exploration of real-world deployment challenges, including varying environmental conditions and computational resource constraints, is necessary to ensure seamless integration into agricultural workflows, particularly in rural and resource-limited settings. Targeted feature engineering and advanced data augmentation, such as rotations, scaling, and brightness adjustments, can further improve model robustness and generalization. The aggressive data augmentation in YOLOv11_n, including saturation jitter and mixup, demonstrated its adaptability to varying conditions, suggesting that further enhancements to the feature extraction process could help in addressing challenges, particularly in differentiating between Grades 2 and 3. Smaller architectures like YOLOv8_n and YOLOv11_n faced misclassifications between these grades, indicating room for improvement through fine-tuning or feature enhancement. This approach is in line with previous studies, such as Smith et al. (2021) and Zhang et al. (2020), which also showed the success of YOLO models in agricultural grading tasks. While Smith et al. (2021) focused on fruit grading, they found similar results with YOLO models achieving high accuracy, reinforcing the adaptability of YOLO in agricultural tasks. Similarly, Zhang et al. (2020) utilized YOLOv3 in detecting quality grades of tea leaves, achieving high precision in a comparable context. YOLO’s ability to automate the grading process is consistent with the growing trend of applying deep learning techniques to agricultural challenges. While this study emphasizes the positive outcomes of automating arecanut grading, there are several potential limitations and areas for improvement. The dataset used for training the models should be more diverse, including a wider range of lighting conditions, varying nut surface textures, and different crop maturity levels. This would increase the robustness of the models in real-world environments where such variability is common. Additionally, imbalanced class distributions in the dataset may have led to biases in model performance. Future work should address these issues, perhaps by using techniques such as class balancing, synthetic data generation, or more advanced augmentation strategies. Furthermore, while the models performed well under controlled conditions, more robust evaluation using real-world data is needed to confirm their effectiveness and ability to adapt to diverse environmental challenges, such as changes in lighting, weather, or crop variety. The consistency and reliability in grading not only streamline operations but also help in maintaining high standards for product quality, thereby contributing to more sustainable and profitable agricultural practices. Automated grading systems, as highlighted in studies by [ 43 ][ 44 ], have shown to contribute to more sustainable practices by reducing waste and ensuring product consistency, thus promoting profitability in agriculture. In conclusion, this study underscores the significant impact of YOLO-based models, particularly YOLOv8_n, in automating the grading process of arecanuts. By demonstrating superior classification accuracy and fast inference times, YOLOv8_n proves to be highly effective for real-time agricultural applications. These results highlight the potential for integrating such systems into handheld devices and drones, which could revolutionize grading practices by reducing labor costs, increasing throughput, and ensuring consistent product quality. The success of this study contributes to the broader body of research advocating for the use of deep learning models to enhance efficiency and sustainability in agricultural operations. 6. Limitations of the Study This study highlights the potential of YOLO models for automating arecanut grading while acknowledging several limitations. The dataset, consisting of 2,000 images with 500 per grade, may not fully capture the variability in arecanut features across real-world conditions, limiting the model's generalizability. Additionally, the use of frontal images alone restricts the model’s ability to assess critical features like texture, color uniformity, and hidden defects that multi-angle imaging could reveal. The controlled laboratory conditions under which the images were captured, with uniform lighting and background, do not reflect real-world scenarios involving uneven lighting or background noise, potentially affecting model performance in practical applications. Moreover, the study does not consider lightweight implementations of YOLO models, which are essential for deployment in resource-limited settings. Finally, the black-box nature of YOLO models pose challenges for interpretability, potentially hindering adoption in contexts where understanding the decision-making process is crucial. Addressing these limitations through larger, more diverse datasets, advanced imaging techniques, edge-device optimization, and explainable AI could enhance the models’ practical applicability and reliability. 7. Future works Future advancements in arecanut grading using YOLO models should address key limitations and explore innovative directions to enhance real-world applicability. Expanding the dataset to include a wider range of arecanut grades, sourced from diverse regions and environmental conditions, alongside integrating multi-angle and advanced imaging techniques such as thermal or infrared, can improve generalization and capture subtle quality differences. Efficient annotation through semi-supervised learning and advanced data augmentation strategies that simulate real-world defects, such as discoloration and deformities, will further enhance model robustness. Explainable AI (XAI) methods, such as confidence scores, uncertainty estimates, and visual heatmaps, are critical to improving model transparency and fostering user trust. Optimizing model performance through hyperparameter tuning, addressing visual artifacts, and creating lightweight versions of YOLO models will ensure reliability and adaptability for resource-limited settings and edge-device deployment. Integrating multimodal sensor data and leveraging transfer learning with pre-trained weights can further boost accuracy and training efficiency. Additionally, refining multi-class classification techniques will enable the models to handle nuanced grade distinctions effectively. Prioritizing real-time deployment through inference speed optimization will bridge the gap between laboratory results and practical applications, paving the way for scalable and efficient arecanut grading solutions. 8. Conclusion This study highlights the transformative potential of YOLO-based deep learning models for automating arecanut grading, offering a scalable and efficient solution to agricultural quality assessment challenges. Among the models tested, YOLOv8_n achieved the highest accuracy (98.25%), excelling in identifying higher-quality grades, while YOLOv8_s demonstrated consistent performance across all grades, making it versatile for diverse tasks. In contrast, YOLOv11 models exhibited lower accuracies, indicating the need for further refinement. The findings validate YOLO's capability for real-time grading, reducing manual labor, ensuring consistent quality, and enhancing economic sustainability for farmers and industries. However, limitations such as a small, single-perspective dataset constraint model generalizability. Addressing these through advanced imaging, dataset expansion, and improved annotation will be vital for future progress. This research establishes a foundation for integrating automated grading systems into agricultural workflows, paving the way for improved efficiency, cost reduction, and sustainable growth in the sector. Declarations CRediT authorship contribution statement DDG : Data curation, Methodology, Software, Validation, Writing - original draft. SH : Data curation, Writing - original draft. AM : Data curation, Methodology, Software, Validation. SDG : Conceptualization, Resources, Software, Validation, Methodology, Supervision, Writing - original draft, Writing - review & editing. Declaration of generative AI and AI-assisted technologies in the writing process During the preparation of this work, the author(s) used [QuillBot] to improve clarity, engagement, and grammar. After using this tool/service, the author(s) reviewed and edited the content as needed and take(s) full responsibility for the content of the publication. Declaration of Competing Interest The authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper. Data availability The code used in this study is publicly available on GitHub at github.com/ghatesudi/Arecanut-classification-YOLO and can be freely accessed under the MIT License. The dataset comprising annotated arecanut images is stored on a secure drive and is not publicly available due to storage constraints. Researchers interested in accessing the dataset may contact the corresponding author for further information or access instructions. Acknowledgments The authors would like to thank Dr. Nagaraj , Plant Pathologist, ICAR-CPCRI, Vitla, Puttur, Karnataka for the assistance provided during field data collection. ORCID ID Dhanush Ghate D https://orcid.org/0009-0004-9143-1267 Saishma H https://orcid.org/0009-0003-4454-3584 Adithya M https://orcid.org/0009-0004-2073-8210 Sudeep D. Ghate https://orcid.org/0000-0001-9996-3605 Recommendation This is a preprint of a manuscript that will be submitted to IEEE Access for consideration after further refinement. It is made available for early feedback. References Mitra SK, Devi H (2016), November Arecanut in India-present situation and future prospects. In International Symposia on Tropical and Temperate Horticulture-ISTTH2016 1205 (pp. 789–794) Hiremata V, Narayanaswamy M, Shet RM (2022) Assessment of growth and yield parameters in Arecanut (Areca catechu L.) through correlation and path analysis under hilly zone of Karnataka. J Hortic Sci 17(2):333–340 Salehi B, Konovalov DA, Fru P, Kapewangolo P, Peron G, Ksenija MS, Sharifi-Rad J (2020) Areca catechu—From farm to food and biomedical applications. Phytother Res 34(9):2140–2158 Jamanal H, Murthy C (2023) A Study on Growth of Procurement of Arecanut by Different Marketing Agencies for the Benefit of the Farmers. Asian J Agricultural Ext Econ Sociol 41(8):120–126 Satheesha KM, Rajanna KS (2023) A Review of the Literature on Arecanut Sorting and Grading Using Computer Vision and Image Processing. Int J Appl Eng Manage Lett (IJAEML) 7(2):50–67 Osterman P, Weaver A (2014) Why claims of skills shortages in manufacturing are overblown? Economic Policy Inst Issue Brief 376:1–12 Enhancing Arecanut Quality Grading: A Comparison of Custom CNNs and Transfer Learning Models, Ghate D, Hegde P, Saishma H, Pallavi KN, Ghate (2024) S. D. AIA(Submitted) Chandana RK, Ramachandra AC (2022) Real time object detection system with YOLO and CNN models: A review. arXiv Prepr. arXiv2208 , 773 Boppiniti ST (2020) Big Data Meets Machine Learning: Strategies for Efficient Data Processing and Analysis in Large Datasets. International Journal of Creative Research In Computer Technology and Design , 2 (2) Vijayakumar A, Vairavasundaram S (2024) Yolo-based object detection models: A review and its applications. Multimedia Tools Appl, 1–40 Dhanya VG, Subeesh A, Kushwaha NL, Vishwakarma DK, Kumar TN, Ritika G, Singh AN (2022) Deep learning-based computer vision approaches for smart agricultural applications. Artif Intell Agric 6:211–229 Liang, X., Jia, X., Huang, W., He, X., Li, L., Fan, S., … Zhang, C. (2022). Real-time grading of defect apples using semantic segmentation combination with a pruned YOLO V4 network. Foods, 11(19), 3150. Phan TTH, Ho HT, Hoang TN (2023), July Investigating YOLO Models for Rice Seed Classification. In Conference on Information Technology and its Applications (pp. 181–192). Cham: Springer Nature Switzerland Gomez, D., Selvaraj, M. G., Casas, J., Mathiyazhagan, K., Rodriguez, M., Assefa, T.,… Espitia, E. (2024). Advancing common bean (Phaseolus vulgaris L.) disease detection with YOLO driven deep learning to enhance agricultural AI. Scientific Reports, 14(1), 15596. Akintuyi OB (2024) Adaptive AI in precision agriculture: a review: investigating the use of self-learning algorithms in optimizing farm operations based on real-time data. Res J Multidisciplinary Stud 7(02):016–030 Ahmad T, Ma Y, Yahya M, Ahmad B, Nazir S, Haq AU (2020) Object detection through modified YOLO neural network. Sci Program 2020(1):8403262 Dhanya VG, Subeesh A, Kushwaha NL, Vishwakarma DK, Kumar TN, Ritika G, Singh AN (2022) Deep learning-based computer vision approaches for smart agricultural applications. Artif Intell Agric 6:211–229 Sharma V, Tripathi AK, Mittal H (2022) Technological revolutions in smart farming: Current trends, challenges & future directions. Comput Electron Agric 201:107217 Vijayakumar A, Vairavasundaram S (2024) Yolo-based object detection models: A review and its applications. Multimedia Tools Appl, 1–40 Lavanya G, Pande SD (2024) Enhancing Real-time Object Detection with YOLO Algorithm. EAI Endorsed Trans Internet Things, 10 Moya V, Quito A, Pilco A, Vásconez JP, Vargas C (2024) Crop detection and maturity classification using a yolov5-based image analysis. Emerg Sci J 8(2):496–512 Paul A, Machavaram R, Kumar D, Nagar H (2024) Smart solutions for capsicum Harvesting: Unleashing the power of YOLO for Detection, Segmentation, growth stage Classification, Counting, and real-time mobile identification. Comput Electron Agric 219:108832 Goudah AA, Jarofka M, El-Habrouk M, Schramm D, Dessouky YG (2023) Object detection in inland vessels using combined trained and pretrained models of YOLO8. Adv Comput Eng, 3 (2) Ali ML, Zhang Z (2024) The YOLO framework: A comprehensive review of evolution, applications, and benchmarks in object detection. Computers , 13 (12), 336. / Wei J, Ni L, Luo L, Chen M, You M, Sun Y, Hu T (2024) GFS-YOLO11: A Maturity Detection Model for Multi-Variety Tomato. Agronomy 14(11):2644 Vilar-Andreu M, García L, Garcia-Sanchez AJ, Asorey-Cacheda R, Garcia-Haro J (2024) Enhancing Precision Agriculture Pest Control: A generalized Deep Learning Approach with YOLOv8-based Insect Detection. IEEE Access Pham VN, Ba D, Le QHT, Nguyen DA, Van QMD, D., Nguyen L (2024) A Low-Cost Deep-Learning-Based System for Grading Cashew Nuts. Computers 13(3):71 Zainudin MS, Azlan MS, Yin LL, Saad WM, Idris MI, Muhammad S, Razak MSJA (2022) Analysis on localization and prediction of depth chili fruits images using YOLOv5. Int J Adv Technol Eng Explor 9(97):1786 Yang G, Wang J, Nie Z, Yang H, Yu S (2023) A lightweight YOLOv8 tomato detection algorithm combining feature enhancement and attention. Agronomy 13(7):1824 Xiao B, Nguyen M, Yan WQ (2024) Fruit ripeness identification using YOLOv8 model. Multimedia Tools Appl 83(9):28039–28056 Naik P, Rudra B (2024) Framework for Lightweight Deep Learning Model Using YOLOv5 for Arecanut Grade Assessment. SN Comput Sci 5(8):1015 Chikkalingaiah AA, Dhanesha R, Palya SNC, Laxmana KAN, Puttaswamy AM, Ayengar P Segmentation and yield count of an arecanut bunch using deep learning techniques. Int J Artif Intell ISSN, 2252 (8938), 543 Qin Z, Wang W, Dammer KH, Guo L, Cao Z (2021) Ag-YOLO: A real-time low-cost detector for precise spraying with case study of palms. Front Plant Sci 12:753603 Adesh ND, Harshith M, Bhardwaj S, Renuka A (2023), November Segregation of Dehusked Arecanut using Artificial Intelligence Technique on Raspberry Pi. In 2023 IEEE North Karnataka Subsection Flagship International Conference (NKCon) (pp. 1–6). IEEE Naik PM, Rudra B (2023) Classification of arecanut x-ray images for quality assessment using adaptive genetic algorithm and deep learning. IEEE Access 11:127619–127636 Naik PM, Rudra B (2024) Deep learning-based arecanut detection for X-ray radiography: improving performance and efficiency for automated classification and quality control. Nondestructive Test Evaluation, 1–21 Akiba T, Sano S, Yanase T, Ohta T, Koyama M (2019), July Optuna: A next-generation hyperparameter optimization framework. In Proceedings of the 25th ACM SIGKDD international conference on knowledge discovery & data mining (pp. 2623–2631) Snoek J, Larochelle H, Adams RP (2012) Practical bayesian optimization of machine learning algorithms. Adv Neural Inf Process Syst, 25 de Brecht M, Yamagishi N (2012) Combining sparseness and smoothness improves classification accuracy and interpretability. NeuroImage 60(2):1550–1561 de Oca AM, Flores G (2021) The AgriQ: A low-cost unmanned aerial system for precision agriculture. Expert Syst Appl 182:115163 Tian H, Wang T, Liu Y, Qiao X, Li Y (2020) Computer vision technology in agricultural automation—A review. Inform Process Agric 7(1):1–19 Londhe DH, Nalawade SM, Pawar GS, Atkari VT, Wandkar SV (2013) Grader: A review of different methods of grading for fruits and vegetables. Agricultural Eng International: CIGR J 15(3):217–230 Ünay D (2021) Automation on Fruit and Vegetable Grading System and Traceability. Nondestructive Evaluation of Agro-products by Intelligent Sensing Techniques. Bentham Science, pp 235–247 Zhang W (2023) Automated Fruit Grading in Precise Agriculture using You Only Look Once Algorithm. International Journal of Advanced Computer Science and Applications , 14 (10) Paszke A, Gross S, Chintala S (2017) Automatic differentiation in PyTorch. Proceedings of Neural Information Processing Systems (NeurIPS) Hunter JD (2007) Matplotlib: A 2D graphics environment. Comput Sci Eng 9(3):90–95 Waskom M et al (2020) Seaborn: statistical data visualization. J Open Source Softw 5(51):241 Virtanen P et al (2020) SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods 17(3):261–272 Supplementary Figures Supplementary Figures S1 to S6 are not available with this version. Additional Declarations The authors declare no competing interests. Supplementary Files YOLOarecav1supplementary.docx Advancing Arecanut Quality Grading: A Comparative Analysis of YOLO Models with Hyperparameter Optimization Cite Share Download PDF Status: Posted Version 1 posted You are reading this latest preprint version Research Square lets you share your work early, gain feedback from the community, and start making changes to your manuscript prior to peer review in a journal. As a division of Research Square Company, we’re committed to making research communication faster, fairer, and more useful. We do this by developing innovative software and high quality services for the global research community. Our growing team is made up of researchers and industry professionals working together to solve the most critical problems facing scientific publishing. Also discoverable on Platform About Our Team In Review Editorial Policies Advisory Board Help Center Resources Author Services Accessibility API Access RSS feed Manage Cookie Preferences © Research Square 2026 | ISSN 2693-5015 (online) Privacy Policy Terms of Service Do Not Sell My Personal Information {"props":{"pageProps":{"initialData":{"identity":"rs-5755373","acceptedTermsAndConditions":true,"allowDirectSubmit":true,"archivedVersions":[],"articleType":"Research Article","associatedPublications":[],"authors":[{"id":397104122,"identity":"4df00606-fb31-4895-ad05-4203bb5f904e","order_by":0,"name":"Dhanush Ghate D","email":"","orcid":"https://orcid.org/0009-0004-9143-1267","institution":"NMAM Institute of Technology, NITTE deemed to be University","correspondingAuthor":false,"prefix":"","firstName":"Dhanush","middleName":"Ghate","lastName":"D","suffix":""},{"id":397104123,"identity":"87348ad7-8f82-4a43-b4f2-af050caf2555","order_by":1,"name":"Saishma H","email":"","orcid":"https://orcid.org/0009-0003-4454-3584","institution":"NITTE deemed to be University","correspondingAuthor":false,"prefix":"","firstName":"Saishma","middleName":"","lastName":"H","suffix":""},{"id":397104124,"identity":"093a9064-5e9e-4efb-bf2d-a6329ceb1327","order_by":2,"name":"Adithya M","email":"","orcid":"https://orcid.org/0009-0004-2073-8210","institution":"NMAM Institute of Technology, NITTE deemed to be University","correspondingAuthor":false,"prefix":"","firstName":"Adithya","middleName":"","lastName":"M","suffix":""},{"id":397104125,"identity":"0e148243-afcb-47fb-91eb-73ffa0a2a8c4","order_by":3,"name":"Sudeep D Ghate","email":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZAAAAAyAQMAAABI0h/eAAAABlBMVEX///8AAABVwtN+AAAACXBIWXMAAA7EAAAOxAGVKw4bAAAA5UlEQVRIiWNgGAWjYHACAyCW4OFnbz4AYsgQq8VCRrLnWAJYL7FaKmwMbuSAGAyEtcjPSN744OMOoOE3cj6/ulFjwcPAfvjoBrxW3EgrNpx5RoKHseftNuucY0C9PGlpN/Bqkcgxk+Ztk+BhZs/dZpzDBtQiwWOGV4v8jBzz33+BWtgYcp4Z5/wjQgvQC2bMjEAtPBw5zI9z24jQYnDmWbFkL9AvEjzHzJhz+4DWEfKLfHvyxg8/d9TZ2x9vfvw551udHD/74WP4HQYCjA1gik0CTBJUjqSF+QNRqkfBKBgFo2DEAQDor0VP/Ng/dAAAAABJRU5ErkJggg==","orcid":"https://orcid.org/0000-0001-9996-3605","institution":"Center for Bioinformatics, NITTE deemed to be University","correspondingAuthor":true,"prefix":"","firstName":"Sudeep","middleName":"D","lastName":"Ghate","suffix":""}],"badges":[],"createdAt":"2025-01-03 05:07:54","currentVersionCode":1,"declarations":{"humanSubjects":false,"vertebrateSubjects":false,"conflictsOfInterestStatement":false,"humanSubjectEthicalGuidelines":false,"humanSubjectConsent":false,"humanSubjectClinicalTrial":false,"humanSubjectCaseReport":false,"vertebrateSubjectEthicalGuidelines":false},"doi":"10.21203/rs.3.rs-5755373/v1","doiUrl":"https://doi.org/10.21203/rs.3.rs-5755373/v1","draftVersion":[],"editorialEvents":[],"editorialNote":"","failedWorkflow":false,"files":[{"id":73085344,"identity":"3fd32894-8f27-4ad2-b45b-22760c0ce702","added_by":"auto","created_at":"2025-01-06 14:49:43","extension":"png","order_by":1,"title":"Figure 1","display":"","copyAsset":false,"role":"figure","size":4489011,"visible":true,"origin":"","legend":"\u003cp\u003eVisualization of arecanut grades with multiple perspectives: (a) Top view, (b) Bottom view, (c) Lateral view, and (d) Oblique view, arranged row-wise for each grade. Each row represents a single grade, highlighting distinctive features from different angles.\u003c/p\u003e","description":"","filename":"image1.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/251e970be601bb376927aacb.png"},{"id":73083051,"identity":"279db217-b524-436a-a47c-9f050e47ab66","added_by":"auto","created_at":"2025-01-06 14:33:43","extension":"png","order_by":2,"title":"Figure 2","display":"","copyAsset":false,"role":"figure","size":111165,"visible":true,"origin":"","legend":"\u003cp\u003eWorkflow illustrating the YOLO-based process for arecanut classification. The diagram details steps including data acquisition, preprocessing, and augmentation, followed by model training, hyperparameter optimization, validation, and testing. The workflow emphasizes the role of YOLO architectures and hyperparameter tuning in achieving accurate and efficient arecanut grading and classification.\u003c/p\u003e","description":"","filename":"image2.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/919827db8e8ce2d43b129e78.png"},{"id":73083054,"identity":"7e1cfbe1-9491-433c-bd49-817a5a6f629c","added_by":"auto","created_at":"2025-01-06 14:33:43","extension":"png","order_by":3,"title":"Figure 3","display":"","copyAsset":false,"role":"figure","size":362735,"visible":true,"origin":"","legend":"\u003cp\u003eYOLOv8_n classifier results using the best model after 50 epochs with selected hyperparameters: (a) Train loss vs. epochs, (b) Validation loss vs. epochs, (c) Top-1 accuracy vs. epochs, and (d) Top-5 accuracy vs. epochs. Each curve represents the performance over 150 epochs, highlighting trends and variability across training and validation. The plots are arranged in a clockwise manner, starting from the top left, with the labels corresponding to train loss, validation loss, top-1 accuracy, and top-5 accuracy, respectively.\u003c/p\u003e","description":"","filename":"image3.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/a27a53aa9af2f422edc66c52.png"},{"id":73083063,"identity":"8caf5df9-97f1-4e86-b4a0-3806bc12ec13","added_by":"auto","created_at":"2025-01-06 14:33:43","extension":"png","order_by":4,"title":"Figure 4","display":"","copyAsset":false,"role":"figure","size":421366,"visible":true,"origin":"","legend":"\u003cp\u003eYOLOv8_s classifier results using the best model after 150 epochs with selected hyperparameters: (a) Train loss vs. epochs, (b) Validation loss vs. epochs, (c) Top-1 accuracy vs. epochs, and (d) Top-5 accuracy vs. epochs. Each curve represents the performance over 150 epochs, highlighting trends and variability across training and validation. The plots are arranged in a clockwise manner, starting from the top left, with the labels corresponding to train loss, validation loss, top-1 accuracy, and top-5 accuracy, respectively.\u003c/p\u003e","description":"","filename":"image4.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/5200a54b7afdfbb72c9d358f.png"},{"id":73083067,"identity":"97a49754-661d-43f0-9c13-2da5b49decbf","added_by":"auto","created_at":"2025-01-06 14:33:43","extension":"png","order_by":5,"title":"Figure 5","display":"","copyAsset":false,"role":"figure","size":405303,"visible":true,"origin":"","legend":"\u003cp\u003eYOLOv8_m classifier results using the best model after 150 epochs with selected hyperparameters: (a) Train loss vs. epochs, (b) Validation loss vs. epochs, (c) Top-1 accuracy vs. epochs, and (d) Top-5 accuracy vs. epochs. Each curve represents the performance over 150 epochs, highlighting trends and variability across training and validation. The plots are arranged in a clockwise manner, starting from the top left, with the labels corresponding to train loss, validation loss, top-1 accuracy, and top-5 accuracy, respectively.\u003c/p\u003e","description":"","filename":"image5.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/110cb89761f130c0faee40ed.png"},{"id":73083061,"identity":"f45f94b4-a243-46fc-aff0-61f6e3e678f7","added_by":"auto","created_at":"2025-01-06 14:33:43","extension":"png","order_by":6,"title":"Figure 6","display":"","copyAsset":false,"role":"figure","size":393369,"visible":true,"origin":"","legend":"\u003cp\u003eYOLOv11_n classifier results using the best model after 50 epochs with selected hyperparameters: (a) Train loss vs. epochs, (b) Validation loss vs. epochs, (c) Top-1 accuracy vs. epochs, and (d) Top-5 accuracy vs. epochs. Each curve represents the performance over 150 epochs, highlighting trends and variability across training and validation. The plots are arranged in a clockwise manner, starting from the top left, with the labels corresponding to train loss, validation loss, top-1 accuracy, and top-5 accuracy, respectively.\u003c/p\u003e","description":"","filename":"image6.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/68ec0023c545b12f18a4216e.png"},{"id":73083059,"identity":"f437d70b-3365-41ee-b913-f468d7df5ca2","added_by":"auto","created_at":"2025-01-06 14:33:43","extension":"png","order_by":7,"title":"Figure 7","display":"","copyAsset":false,"role":"figure","size":369682,"visible":true,"origin":"","legend":"\u003cp\u003eYOLOv11_s classifier results using the best model after 50 epochs with selected hyperparameters: (a) Train loss vs. epochs, (b) Validation loss vs. epochs, (c) Top-1 accuracy vs. epochs, and (d) Top-5 accuracy vs. epochs. Each curve represents the performance over 150 epochs, highlighting trends and variability across training and validation. The plots are arranged in a clockwise manner, starting from the top left, with the labels corresponding to train loss, validation loss, top-1 accuracy, and top-5 accuracy, respectively.\u003c/p\u003e","description":"","filename":"image7.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/1849beb38ae98cc9e722e746.png"},{"id":73083065,"identity":"3b9d041d-5a2a-4112-a021-1abebf3c5da3","added_by":"auto","created_at":"2025-01-06 14:33:43","extension":"png","order_by":8,"title":"Figure 8","display":"","copyAsset":false,"role":"figure","size":522280,"visible":true,"origin":"","legend":"\u003cp\u003eYOLOv11_m classifier results using the best model after 150 epochs with selected hyperparameters: (a) Train loss vs. epochs, (b) Validation loss vs. epochs, (c) Top-1 accuracy vs. epochs, and (d) Top-5 accuracy vs. epochs. Each curve represents the performance over 150 epochs, highlighting trends and variability across training and validation. The plots are arranged in a clockwise manner, starting from the top left, with the labels corresponding to train loss, validation loss, top-1 accuracy, and top-5 accuracy, respectively.\u003c/p\u003e","description":"","filename":"image8.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/2132cc8b592d84a73f89a9e9.png"},{"id":73083080,"identity":"c266b578-9053-4dd1-927e-d1423038844a","added_by":"auto","created_at":"2025-01-06 14:33:44","extension":"png","order_by":9,"title":"Figure 9","display":"","copyAsset":false,"role":"figure","size":255789,"visible":true,"origin":"","legend":"\u003cp\u003eConfusion matrix for validation performance of six YOLO models: (A) YOLOv8_n, (B) YOLOv8_s, (C) YOLOv8_m, (D) YOLOv11_n, (E) YOLOv11_s, and (F) YOLOv11_m. The diagonal values indicate correctly classified instances, while off-diagonal values represent misclassifications. The predicted labels are shown on the x-axis, and the actual labels are on the y-axis. The model sizes (nano, small, medium) correspond to different versions of the YOLO architecture with varying model complexities.\u003c/p\u003e","description":"","filename":"image9.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/f86e03ba66c6102a65df4212.png"},{"id":73083073,"identity":"5403a6d8-c5f7-4455-96e3-b815c8bf5d7b","added_by":"auto","created_at":"2025-01-06 14:33:44","extension":"png","order_by":10,"title":"Figure 10","display":"","copyAsset":false,"role":"figure","size":266132,"visible":true,"origin":"","legend":"\u003cp\u003eConfusion matrix for testing performance of eight YOLO models with test dataset: (A) YOLOv8_n, (B) YOLOv8_s, (C) YOLOv8_m, (D) YOLOv11_n, (E) YOLOv11_s, and (F) YOLOv11_m. The diagonal values indicate correctly classified instances, while off-diagonal values represent misclassifications. The predicted labels are shown on the x-axis, and the actual labels are on the y-axis. The model sizes (nano, small, medium) correspond to different versions of the YOLO architecture with varying model complexities.\u003c/p\u003e","description":"","filename":"image10.png","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/df9c400599bf26bd4af0f626.png"},{"id":73087024,"identity":"4da0eb01-4a41-4c5a-9ac0-7930867cae81","added_by":"auto","created_at":"2025-01-06 14:57:47","extension":"pdf","order_by":0,"title":"","display":"","copyAsset":false,"role":"manuscript-pdf","size":7313011,"visible":true,"origin":"","legend":"","description":"","filename":"manuscript.pdf","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/d5568adf-29b9-4a19-91e0-ec8341efcb66.pdf"},{"id":73084662,"identity":"7b8a51b1-0843-4a14-a75e-50716c859cf4","added_by":"auto","created_at":"2025-01-06 14:41:43","extension":"docx","order_by":1,"title":"","display":"","copyAsset":false,"role":"supplement","size":19583,"visible":true,"origin":"","legend":"\u003cp\u003e\u003cstrong\u003eAdvancing Arecanut Quality Grading: A Comparative Analysis of YOLO Models with Hyperparameter Optimization\u003c/strong\u003e\u003c/p\u003e","description":"","filename":"YOLOarecav1supplementary.docx","url":"https://assets-eu.researchsquare.com/files/rs-5755373/v1/4bbc41eb3a93ac0231c761fc.docx"}],"financialInterests":"The authors declare no competing interests.","formattedTitle":"\u003cp\u003e\u003cstrong\u003eAdvancing Arecanut Quality Grading: A Comparative Analysis of YOLO Models with Hyperparameter Optimization\u003c/strong\u003e\u003c/p\u003e","fulltext":[{"header":"1. Introduction","content":"\u003cp\u003eArecanut, commonly referred to as betel nut, is an essential agricultural product in India, predominantly cultivated in states like Karnataka, Kerala, and Assam. India is the largest global producer, contributing to nearly 50% of worldwide production, forming the economic backbone of several agriculture-dependent communities [\u003cspan citationid=\"CR1\" class=\"CitationRef\"\u003e1\u003c/span\u003e]. This crop holds significant economic and cultural importance, providing a livelihood for millions of farmers and serving as a key raw material in industries such as food, pharmaceuticals, and traditional medicine. In addition to its diverse applications, the grading of arecanut is crucial in determining its market value and ensuring fair pricing for farmers [\u003cspan citationid=\"CR3\" class=\"CitationRef\"\u003e3\u003c/span\u003e]. However, the current grading practices, which rely on subjective evaluation methods, often fail to meet the growing demand for consistent quality and scalability in both domestic and international markets. These challenges underscore the urgent need for modern, automated grading systems to enhance the efficiency and reliability of arecanut processing, benefiting stakeholders across the supply chain [\u003cspan citationid=\"CR2\" class=\"CitationRef\"\u003e2\u003c/span\u003e][\u003cspan citationid=\"CR4\" class=\"CitationRef\"\u003e4\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eTraditional arecanut grading is a labor-intensive process, requiring skilled workers to evaluate nuts based on subjective parameters like size, color, and surface texture [\u003cspan citationid=\"CR5\" class=\"CitationRef\"\u003e5\u003c/span\u003e]. This dependence on manual labor introduces inconsistencies in grading due to human error, fatigue, and the subjective nature of assessments. Furthermore, the increasing scarcity of skilled labor adds to operational costs and reduces scalability, posing a significant challenge for farmers and stakeholders in the arecanut supply chain [\u003cspan citationid=\"CR6\" class=\"CitationRef\"\u003e6\u003c/span\u003e]. These limitations demand advanced automated grading solutions that offer reliability, efficiency, and standardization across regions.\u003c/p\u003e \u003cp\u003eIn our earlier study, we developed a CNN-based framework for automated arecanut grading, evaluating eight state-of-the-art architectures, including DenseNet121 and InceptionV3. The study achieved a classification accuracy of 95.67% using DenseNet121 and highlighted the potential of CNNs for feature extraction and classification in agricultural applications. While CNN-based approaches have proven effective for image classification tasks, they often require additional processing to segment and classify objects. In contrast, YOLO integrates object detection and classification into a single pipeline, offering real-time performance and scalability for large datasets. These capabilities make YOLO uniquely suited for agricultural applications, where rapid analysis of large quantities of produce is essential for maintaining competitiveness in the market [\u003cspan citationid=\"CR7\" class=\"CitationRef\"\u003e7\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eMachine learning and computer vision technologies have emerged as transformative tools in agricultural automation, enabling precise and scalable grading processes. The YOLO (You Only Look Once) model, a cutting-edge object detection framework, presents a novel solution to address the challenges of arecanut grading. Unlike traditional classifiers such as Convolutional Neural Networks (CNNs), YOLO simultaneously detects and classifies objects in real time by predicting bounding boxes and class probabilities directly from images. Its speed and accuracy make it particularly suitable for high-throughput grading systems where both efficiency and precision are critical. By analyzing visual features like size, color, and surface texture, Yolo can objectively classify areca nuts into predefined grades while significantly reducing human dependency [\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e]. [\u003cspan citationid=\"CR9\" class=\"CitationRef\"\u003e9\u003c/span\u003e][\u003cspan citationid=\"CR10\" class=\"CitationRef\"\u003e10\u003c/span\u003e]. Recent advancements in deep learning, particularly Convolutional Neural Networks (CNNs) and object detection frameworks like YOLO, have transformed agricultural classification and grading tasks. CNNs have demonstrated high accuracy in applications such as fruit grading, pest detection, and disease diagnosis by extracting detailed visual features from images. However, the primary design of CNNs for classification tasks often necessitates additional segmentation steps, potentially limiting their real-time applicability [\u003cspan citationid=\"CR11\" class=\"CitationRef\"\u003e11\u003c/span\u003e]. In contrast, YOLO excels by integrating object detection and classification into a single, efficient pipeline, enabling real-time performance [\u003cspan citationid=\"CR8\" class=\"CitationRef\"\u003e8\u003c/span\u003e]. YOLO's ability to simultaneously predict bounding boxes and class probabilities makes it particularly well-suited for high-throughput grading tasks, where both speed and precision are critical. Applications such as fruit defect detection, seed grading, and plant disease identification have demonstrated its versatility [\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e][\u003cspan citationid=\"CR13\" class=\"CitationRef\"\u003e13\u003c/span\u003e][\u003cspan citationid=\"CR14\" class=\"CitationRef\"\u003e14\u003c/span\u003e][\u003cspan citationid=\"CR15\" class=\"CitationRef\"\u003e15\u003c/span\u003e]. These characteristics position YOLO as a highly capable framework for automating arecanut grading, ensuring consistent quality while reducing dependency on manual labour.\u003c/p\u003e \u003cp\u003eThis study employs YOLOv8 and YOLOv11 classification models and trains nano, small, and medium configurations to optimize performance across varying computational constraints. These configurations allow for scalability, with lightweight models suited for resource-constrained environments and larger models delivering higher accuracy in real-time applications. The selection of these YOLO versions ensure robust, real-time classification while maintaining resource efficiency, making them ideal for agricultural use. The study's primary objectives are to design and train a YOLO-based model specifically for arecanut grading, with a focus on key attributes like size, colour, and surface texture; to enhance the models' performance through hyperparameter tuning; and to evaluate the models using a dedicated testing dataset. To achieve these goals, this study aims to establish an efficient, scalable grading framework that reduces labor dependency, ensures consistent quality, and supports economic sustainability for farmers and the broader industry.\u003c/p\u003e"},{"header":"2. Related Works","content":"\u003cp\u003eObject detection has evolved significantly with the advent of deep learning, with convolutional neural networks (CNNs) playing a pivotal role in this advancement. Convolutional Neural Networks (CNNs) are proficient in extracting features from extensive picture datasets, facilitating accurate evaluations based on visual attributes such as texture, dimensions, and colour. This has proven a particular utility in agricultural grading tasks, where automatic classification of visual features is critical [\u003cspan citationid=\"CR16\" class=\"CitationRef\"\u003e16\u003c/span\u003e][\u003cspan citationid=\"CR17\" class=\"CitationRef\"\u003e17\u003c/span\u003e][\u003cspan citationid=\"CR18\" class=\"CitationRef\"\u003e18\u003c/span\u003e]. Moreover, the integration of CNNs into agricultural practices has led to the development of smart farming technologies that increase production and sustainability. CNN-based models frequently outperformed traditional grading techniques, providing quicker and more reliable assessments [\u003cspan citationid=\"CR24\" class=\"CitationRef\"\u003e24\u003c/span\u003e]. As a result, dependence on traditional grading techniques is diminishing, leading to the emergence of data-driven strategies that employ machine learning to optimize agricultural outputs.\u003c/p\u003e \u003cp\u003eYolo has evolved into multiple versions (YOLOv3, YOLOv4, YOLOv5, YOLOv8, and YOLOv11), with each iteration improving accuracy, efficiency, and generalizations for real-time applications. The ability to detect and classify objects simultaneously with high accuracy makes YOLO an ideal candidate for agricultural grading, where rapid, automated classification of features such as size, color, and surface texture is essential [\u003cspan citationid=\"CR19\" class=\"CitationRef\"\u003e19\u003c/span\u003e], [\u003cspan citationid=\"CR20\" class=\"CitationRef\"\u003e20\u003c/span\u003e], [\u003cspan citationid=\"CR22\" class=\"CitationRef\"\u003e22\u003c/span\u003e]. The latest YOLO models, such as YOLOv8 and YOLOv11, have incorporated innovations such as custom anchor boxes and enhanced transfer learning capabilities. These improvements have made the models faster and more accurate, achieving processing speeds of up to 155 frames per second while maintaining high classification precision on benchmark datasets [\u003cspan citationid=\"CR23\" class=\"CitationRef\"\u003e23\u003c/span\u003e][\u003cspan citationid=\"CR25\" class=\"CitationRef\"\u003e25\u003c/span\u003e]. Agricultural applications such as pest detection, crop monitoring, and fruit grading, which analyse visual features like colour and size for real-time predictions, find YOLO's real-time operation and accuracy invaluable [\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e] [\u003cspan citationid=\"CR21\" class=\"CitationRef\"\u003e21\u003c/span\u003e][\u003cspan citationid=\"CR26\" class=\"CitationRef\"\u003e26\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eSeveral studies have demonstrated YOLO\u0026rsquo;s potential in agricultural grading tasks. For example, Pham et al. (2024) used YOLO for cashew nut grading, achieving around 95% accuracy, while Liang et al. (2022) employed YOLOv4 for real-time grading of defective apples, achieving 94% accuracy [\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e][\u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e27\u003c/span\u003e]. Additionally, research on arecanut grading, such as Chikkalingaiah et al.\u0026rsquo;s work, has used CNNs to segment and classify arecanut bunches, achieving 97% accuracy across different grades [\u003cspan citationid=\"CR32\" class=\"CitationRef\"\u003e32\u003c/span\u003e]. In our prior work, we applied eight CNN models to classify arecanuts into four quality categories, achieving up to 95.67% accuracy [submitted]. Our current study builds on this by integrating YOLO models to enhance real-time classification, scalability, and accuracy in arecanut grading. Adesh et al. (2023) have presented an innovative approach that uses the YOLOv5 model on a Raspberry Pi for real-time detection and segregation of dehusked arecanuts [\u003cspan citationid=\"CR34\" class=\"CitationRef\"\u003e34\u003c/span\u003e]. The methodology showcases significant advances in agricultural practices by optimizing efficiency and accuracy in grading processes through a cost-effective AI solution tailored for limited hardware resources.\u003c/p\u003e \u003cp\u003eIn a study by Naik and Rudra (2023), they used a lightweight YOLOv5 model, enhanced with GhostNet and FPN, to achieve a mAP of 97.84% for a coffee quality assessment based on a custom X-ray image dataset. This model demonstrated superior performance over YOLOv3, YOLOv4, YOLOX, and YOLOv8 with a compact model size of 15 MB [\u003cspan citationid=\"CR35\" class=\"CitationRef\"\u003e35\u003c/span\u003e]. In 2024, Naik and Rudra created a highly efficient real-time grading model by integrating GhostNet into Darknet-53 and FPN. This model achieved a mAP of 98.85% using a dataset of arecanut images and had a compact model size of only 1.9 MB (Naik and Rudra, 2024a) [\u003cspan citationid=\"CR31\" class=\"CitationRef\"\u003e31\u003c/span\u003e]. Another study added GhostNet, transformer blocks, and stem layers to YOLOv5. This led to a mAP of 97.30% and a lightweight 9.5 MB model that was perfect for X-ray devices (Naik and Rudra, 2024b) [\u003cspan citationid=\"CR36\" class=\"CitationRef\"\u003e36\u003c/span\u003e].\u003c/p\u003e \u003cp\u003eWe systematically explore parameters such as batch size, learning rate, weight decay, and image size in our current work to identify the most effective hyperparameters that improve classification reliability and processing speed.\u003c/p\u003e"},{"header":"3. Materials and Methods","content":"\u003cdiv id=\"Sec4\" class=\"Section2\"\u003e \u003ch2\u003e3.1 Dataset Collection and Annotation\u003c/h2\u003e \u003cp\u003eKarnataka classifies de-husked areca nuts into four quality grades, each defined by distinct features. The training set consists of four sub-classes: Grade 1, Grade 2, Grade 3, and Grade 4, ensuring clear differentiation based on quality. Grade 1, the highest quality, is characterised by a uniform light brown colour and an absence of peel. Grade 2, known as \"Phatora,\" exhibits noticeable surface cuts, distinguishing it from higher-grade nuts. Grade 3, referred to as \"Cheppugotu,\" is identifiable by its white appearance due to its skin. Dark brown colouration and visible signs of rotting distinguish Grade 4, also known as \"Karigotu,\" as the lowest quality. Figure\u0026nbsp;\u003cspan refid=\"Fig1\" class=\"InternalRef\"\u003e1\u003c/span\u003e illustrates the visualisation for each grade from the front, bottom, lateral and oblique views. The dataset includes 2,000 arecanut images, with 500 images per grade, ensuring balanced representation of each category. These images capture the unique characteristics of colors, textures, and surface features, providing a robust foundation for classification models. Arecanut plantations from regions surrounding Puttur in Dakshina Kannada, Karnataka (12.40\u0026deg;N, 75.10\u0026deg;E), serve as the primary sources, reflecting the real-world variability in grading. The images were captured under varied lighting, angles, and backgrounds to mimic real-world conditions. Experts from the CPCRI Regional Station, Vittal, Karnataka, annotated the images following commercial grading criteria, such as color, texture, and size. The annotation process involved marking bounding boxes to identify individual nuts and their grades. We captured the images using a high-resolution smartphone camera (50 MP, 6120x6120). We then resized the images to 1080 pixels with three RGB channels, a standard resolution for all models, to ensure uniformity and preserve critical visual features essential for classification.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec5\" class=\"Section2\"\u003e \u003ch2\u003e3.2 Data Augmentation\u003c/h2\u003e \u003cp\u003eThe data augmentation strategy aims to improve the YOLO model's adaptability to real-world challenges in arecanut classification. During preprocessing, we normalize pixel values by scaling each pixel value by 1/255 to ensure consistency. During training, we employ several augmentation techniques dynamically to introduce variability in the dataset. The \u003cem\u003eshear\u003c/em\u003e parameter, set to 0.5, handles rotational distortions, simulating angular variations in the appearance of arecanuts. In order to correct for misalignments or off-centre positioning of the nuts in photos, the \u003cem\u003etranslate\u003c/em\u003e option performs random width and height changes of up to 10%. The \u003cem\u003escale\u003c/em\u003e parameter manages scaling by randomly zooming images in or out within a factor range of 0.3 to 0.7, addressing the variability in the size of the nuts. The flipping augmentations (flipud\u0026thinsp;=\u0026thinsp;0.5 and fliplr\u0026thinsp;=\u0026thinsp;0.5) randomly rotate the images in both vertical and horizontal directions, simulating the various orientations observed during the grading processes. Colour variations, crucial for distinguishing arecanut grades, are introduced by adjusting hue, saturation, and brightness through the \u003cem\u003ehsv_h\u003c/em\u003e\u0026thinsp;=\u0026thinsp;0.015\u0026ndash;0.05, \u003cem\u003ehsv_s\u003c/em\u003e\u0026thinsp;=\u0026thinsp;0.4\u0026ndash;0.7, and \u003cem\u003ehsv_v\u003c/em\u003e\u0026thinsp;=\u0026thinsp;0.3\u0026ndash;0.6 parameters. The \u003cem\u003emosaic\u003c/em\u003e parameter set to 1.0 activates mosaic augmentation, which combines four images into one to enhance dataset diversity, while mixup blends images and their labels within a range of 0.2 to 0.5 to create new combinations for enhanced robustness. Additionally, a constant fill mode with a value of 125 manages pixels introduced during transformations, ensuring visual consistency. These techniques improve the model's robustness to real-world variations.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec6\" class=\"Section2\"\u003e \u003ch2\u003e3.3 YOLO models used for arecanut classification\u003c/h2\u003e \u003cp\u003eYOLOv8 is a state-of-the-art version of the \"You Only Look Once\" series, designed with a lightweight and modular architecture suitable for diverse machine learning tasks, including classification. The YOLOv8 and YOLOv11 models were selected for arecanut classification due to their advanced architecture and adaptability. The YOLOv8 features a lightweight and modular design, excelling at capturing intricate patterns like color, texture, and size, which are essential for grading tasks. Its scalability, with subtypes such as YOLOv8_n, YOLOv8_s, and YOLOv8_m, allows deployment across diverse resource and performance requirements, ensuring effectiveness in both resource-limited and high-performance environments. Similarly, YOLOv11 introduces a refined architecture and advanced feature extraction capabilities, making it adept at complex classification challenges. Subtypes like YOLOv11_n, YOLOv11_s, and YOLOv11_m provide flexibility, enabling balanced trade-offs between speed, accuracy, and computational demands. Both models employ data augmentation techniques, enhancing robustness to real-world variations in image quality and object appearance. By leveraging these features, YOLOv8 and YOLOv11 offer a reliable framework for automating agricultural grading tasks, addressing variations in object features and environmental conditions with precision and efficiency.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec7\" class=\"Section2\"\u003e \u003ch2\u003e3.4 Hyperparameter Tuning\u003c/h2\u003e \u003cp\u003eHyperparameter tuning was conducted using Optuna [\u003cspan citationid=\"CR37\" class=\"CitationRef\"\u003e37\u003c/span\u003e], a powerful optimisation framework, to optimise the performance of the YOLOv8 model for the arecanut classification task. The tuning process employed Bayesian optimisation [\u003cspan citationid=\"CR38\" class=\"CitationRef\"\u003e38\u003c/span\u003e], which efficiently explores the hyperparameter space to identify optimal configurations. Key hyperparameters, including learning rate, batch size, image size, and the number of training epochs, were systematically adjusted. The learning rate, critical for balancing convergence speed and stability, was tuned within a logarithmic range of 1e-5 to 1e-2. Batch sizes of 16, 32, and 64 were tested to identify the best trade-off between memory usage and generalization. Image sizes of 64, 128, 224, and 256 pixels were explored to ensure the resolution was sufficient for extracting essential visual features while maintaining computational feasibility. Other hyperparameters, such as weight decay for regularisation, were adjusted between 1e-5 and 1e-3 to mitigate overfitting. This comprehensive tuning approach ensured the model's adaptability to diverse grading scenarios and robust performance across the dataset. The tuning process was iterative, with 100 trials conducted to optimise the validation accuracy (top-1 accuracy) as the primary metric. The early stopping mechanism with a patience of 5 epochs was implemented to prevent overtraining. The best-performing hyperparameters were identified through Optuna; it demonstrated a significant improvement in the model's performance, ensuring adaptability to diverse grading scenarios and robust classification across the dataset.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec8\" class=\"Section2\"\u003e \u003ch2\u003e3.5 Model Training, validation and testing\u003c/h2\u003e \u003cp\u003eThe final training phase focused on evaluating models across four different patience levels (p-0, p-10, p-15, and p-20) to determine the optimal early stopping criteria for each architecture. This resulted in a total of 24 distinct model configurations derived from six architectures\u0026mdash;YOLOv8n, YOLOv8s, YOLOv8m, YOLOv11n, YOLOv11s, and YOLOv11m\u0026mdash;each trained with the selected patience levels. The hyperparameters optimised through Bayesian tuning were applied, and training was extended to 150 epochs to allow sufficient convergence and assess the impact of extended training on model performance. We split the dataset into 80% for training, 20% for validation, and used a separate, curated test dataset of 100 images to ensure a realistic evaluation of the model's generalisation ability. We assessed the model performance using accuracy, precision, recall, and F1-score, selecting the best model from each architecture based on the highest test accuracy for further analysis. Table\u0026nbsp;4 presents a comparison of these models, including key performance metrics, and provides additional insights through training/validation graphs and confusion matrices, enabling a comprehensive evaluation of model capabilities in real-world applications.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec9\" class=\"Section2\"\u003e \u003ch2\u003e3.6 Experimental Setup\u003c/h2\u003e \u003cp\u003eThe experiments were conducted on a system with an 11th-generation Intel Core i7 processor, 32GB of RAM, and an NVIDIA RTX 3060 GPU with 12GB of memory. The YOLO models were trained using PyTorch [\u003cspan citationid=\"CR45\" class=\"CitationRef\"\u003e45\u003c/span\u003e], and the experiments were executed within Jupyter Notebook to facilitate iterative development and evaluation. Python scripts were employed for generation of visualizations including composite figures of key metrics (train loss, validation loss, top-1 accuracy, and top-5 accuracy) with Gaussian smoothing [\u003cspan citationid=\"CR39\" class=\"CitationRef\"\u003e39\u003c/span\u003e] for improved interpretability. Scripts are available in the accompanying GitHub repository for reproducibility and further exploration. The following libraries were utilized in the analysis: Python 3.10, PyTorch 2.5.0, pandas, matplotlib [\u003cspan citationid=\"CR46\" class=\"CitationRef\"\u003e46\u003c/span\u003e], seaborn [\u003cspan citationid=\"CR47\" class=\"CitationRef\"\u003e47\u003c/span\u003e], scipy [\u003cspan citationid=\"CR48\" class=\"CitationRef\"\u003e48\u003c/span\u003e], and numpy.\u003c/p\u003e \u003c/div\u003e"},{"header":"4. Results","content":"\u003cp\u003eThe arecanut industry encounters significant challenges in achieving consistent and precise grading due to the inherent variation in the size, shape, and texture of arecanuts, exacerbated by the subjective nature of manual evaluation. This study seeks to mitigate these challenges by employing the YOLO (You Only Look Once) framework for the automated classification of arecanuts. Utilizing a balanced dataset comprising 2,000 images categorized across four quality grades, we systematically investigated various YOLO architectures, including YOLOv8_n, YOLOv8_s, YOLOv8_m, YOLOv11_n, YOLOv11_s, and YOLOv11_m (n-nano, s-small, and m-medium varieties), to determine the most effective model for this classification task. Figure\u0026nbsp;\u003cspan refid=\"Fig2\" class=\"InternalRef\"\u003e2\u003c/span\u003e illustrates the workflow for arecanut classification, utilizing custom-trained YOLO models developed in this study.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cdiv id=\"Sec11\" class=\"Section2\"\u003e \u003ch2\u003e\u003cb\u003e4.1 Hyperparameter tuning\u003c/b\u003e:\u003c/h2\u003e \u003cp\u003eHyperparameter tuning was conducted using Optuna with Bayesian optimization to systematically explore and identify the best configurations for YOLOv8 and YOLOv11 models. The tuning process, consisting of 100 trials per model, optimized key parameters such as learning rate, batch size, image size, epochs, and weight decay to maximize validation accuracy. Table\u0026nbsp;\u003cspan refid=\"Tab2\" class=\"InternalRef\"\u003e2\u003c/span\u003e presents the final best-performing hyperparameter settings obtained for each model configuration.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab1\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 1\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eSummary of related studies using YOLO models for nut classification\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"5\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eStudy\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eDataset size\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eTechnique/ Algorithms\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003ePerformance\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c5\"\u003e \u003cp\u003eLimitations\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eChikkalingaiah et al, 2024 [\u003cspan citationid=\"CR32\" class=\"CitationRef\"\u003e32\u003c/span\u003e]\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e388 ripe, 629 unripe images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eYOLOv3 (YOLO-areca)\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAccuracy: 94.7%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003ePartial occlusion and overlapping of arecanuts, which hinder accurate segmentation and yield counting.\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003ePham et al, 2024 [\u003cspan citationid=\"CR27\" class=\"CitationRef\"\u003e27\u003c/span\u003e]\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e6000 images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eYOLOv8\u0026thinsp;+\u0026thinsp;SC3T\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAccuracy: 97.04%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003eLimited dataset and the potential impact of low-quality image\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYang et al., 2023 [\u003cspan citationid=\"CR29\" class=\"CitationRef\"\u003e29\u003c/span\u003e]\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e3098 images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eYOLOv8\u0026thinsp;+\u0026thinsp;FEM\u0026thinsp;+\u0026thinsp;DPAG\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003emAP: 93.4%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003ePotential overfitting due to the limited dataset used for training\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eXiao et al, 2024 [\u003cspan citationid=\"CR30\" class=\"CitationRef\"\u003e30\u003c/span\u003e]\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e4000 images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eYOLOV8\u0026thinsp;+\u0026thinsp;CSP\u0026thinsp;+\u0026thinsp;C2F\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAccuracy: 99.5%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003eInsufficient exploration of varying lighting conditions and occlusions, need for better resource optimization and image annotation processes\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eNaik and Rudra, 2023 [\u003cspan citationid=\"CR35\" class=\"CitationRef\"\u003e35\u003c/span\u003e]\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e900 images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eYOLOv5\u0026thinsp;+\u0026thinsp;FPN\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAccuracy: 97.84%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003eX-ray images may not fully represent the variability in arecanut quality\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eQin et al, 2021 [\u003cspan citationid=\"CR35\" class=\"CitationRef\"\u003e35\u003c/span\u003e]\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e400 images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eAg- YOLO\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003eF1- score: 92.05%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003eSmall dataset and overfitting due to the strong data augmentation\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eLiang et al, 2023 [\u003cspan citationid=\"CR12\" class=\"CitationRef\"\u003e12\u003c/span\u003e]\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e230 images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eYOLOv4\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAccuracy: 92.42%\u003c/p\u003e \u003cp\u003eF1: 94.31\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003eSmall dataset\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eOur work\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c2\"\u003e \u003cp\u003e2000 images\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c3\"\u003e \u003cp\u003eYOLOv8, YOLOv11\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c4\"\u003e \u003cp\u003eAccuracy: 92.30%\u003c/p\u003e \u003cp\u003ePrecision: 95%\u003c/p\u003e \u003cp\u003eRecall: 94%\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003eLimited dataset size, Frontal images restrict feature assessment.\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab2\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 2\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eBest params for model after hyperparameter tuning\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"5\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eModel\\Best params\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003eImage size\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eBatch size\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003eLearning rate\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c5\"\u003e \u003cp\u003eWeight decay\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO8n\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e256\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e16\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.007242\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003e8.10662 e-05\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO8m\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e256\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e32\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.00001486\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003e0.0009686\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO8s\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e256\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e32\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.0000399\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003e0.0005853\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO11s\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e256\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e32\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.000154\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003e0.0004391\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO11n\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e256\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e16\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.000131\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003e0.000760\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO11m\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e224\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e32\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.000014\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"left\" colname=\"c5\"\u003e \u003cp\u003e0.000465\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003eThe YOLOv8_n model demonstrated optimal performance with a smaller batch size of 16, a high learning rate of 0.007242, and a weight decay of 8.107e-05. This configuration prioritized faster convergence, making it well-suited for scenarios requiring quicker updates, although careful data augmentation was necessary to prevent overfitting. YOLOv8_m and YOLOv8_s, employing batch sizes of 32, and lower learning rates of 0.00001486 and 0.0000399, respectively, achieved stable training and consistent generalization across diverse conditions. Similarly, YOLOv11_n's best configuration featured a batch size of 16, a learning rate of 0.000131, and a weight decay of 0.00076. This setup balanced adaptability and generalization, especially in challenging datasets. YOLOv11_m and YOLOv11_s used batch sizes of 32 with conservative learning rates of 0.000014 and 0.000154, respectively, to achieve robust and stable performance.\u003c/p\u003e \u003cp\u003eThe models also benefited from optimal image resizing, with most configurations using 256 pixels, except for YOLOv11_m, which used 224 pixels to improve memory efficiency. Epochs were fine-tuned for each model, ranging from 19 to 38, to balance convergence speed and generalization. Data augmentation strategies further enhanced model robustness, with YOLOv11_n employing aggressive augmentation settings (saturation jitter: 0.5931, mixup strength: 0.3904), resulting in improved adaptability to diverse lighting and object size variations. This systematic hyperparameter tuning process, coupled with the iterative trials and early stopping mechanism, ensured that each model configuration was optimized for performance, resource efficiency, and adaptability.\u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec12\" class=\"Section2\"\u003e \u003ch2\u003e4.2 Model training and validation:\u003c/h2\u003e \u003cp\u003eThe results presented here correspond to the best-performing configurations from the six architectures (YOLOv8_n, YOLOv8_s, YOLOv8_m, YOLOv11_n, YOLOv11_s, YOLOv11_m), selected based on their optimal performance across four patience levels (p-0, p-10, p-15, and p-20). These models represent the most effective configurations out of the 24 distinct setups evaluated during training, with detailed results of the remaining 18 models provided in the supplementary materials. During the YOLO model training process, both the best-performing model and the final model were automatically saved as .pt files, ensuring reproducibility and providing a foundation for further fine-tuning and experimentation.The YOLOv8_n classifier converged within 50 epochs, achieving a Top-1 accuracy of 97.5% and a Top-5 accuracy of 100%, demonstrating strong predictive performance (Fig.\u0026nbsp;\u003cspan refid=\"Fig3\" class=\"InternalRef\"\u003e3\u003c/span\u003e). YOLOv8_s and YOLOv8_m achieved similar success over 150 epochs, with Top-1 accuracies of 98.0% and 98.5%, respectively, and consistent Top-5 accuracies of 100%, reflecting robust learning and generalization (Figs.\u0026nbsp;\u003cspan refid=\"Fig4\" class=\"InternalRef\"\u003e4\u003c/span\u003e, \u003cspan refid=\"Fig5\" class=\"InternalRef\"\u003e5\u003c/span\u003e).\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eFor YOLOv11 models, YOLOv11_n converged in 50 epochs, achieving a stable Top-1 accuracy range of 97.5\u0026ndash;98.5% and a Top-5 accuracy of 100% (Fig.\u0026nbsp;\u003cspan refid=\"Fig6\" class=\"InternalRef\"\u003e6\u003c/span\u003e). YOLOv11_s showed similar trends, with Top-1 accuracy plateauing around 97.0% (Fig.\u0026nbsp;\u003cspan refid=\"Fig7\" class=\"InternalRef\"\u003e7\u003c/span\u003e). YOLOv11_m, although converging over 150 epochs, exhibited variability in validation loss but maintained a Top-1 accuracy of approximately 96.0% and a Top-5 accuracy of 100% (Fig.\u0026nbsp;\u003cspan refid=\"Fig8\" class=\"InternalRef\"\u003e8\u003c/span\u003e). By focusing on the best-performing configurations for each architecture, this analysis underscores the effectiveness of YOLO-based classifiers in achieving reliable object detection performance while highlighting opportunities for further optimization. These results, supported by comprehensive performance metrics, training/validation graphs, and confusion matrices, provide actionable insights for real-world applications.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eThe validation results for the best YOLO models demonstrated excellent performance in classifying arecanuts into four grades. Grades 1 and 4 consistently achieved perfect classification across all models, highlighting the models' ability to identify these grades reliably. However, Grades 2 and 3 presented more challenges, particularly with some misclassifications between these two grades. YOLOv8_m achieved the highest overall accuracy, but misclassifications occurred more frequently between Grades 2 and 3, indicating the need for further analysis of feature overlaps. YOLOv11_n struggled with Grade 3, misclassifying it as Grade 2, while YOLOv8_n showed similar difficulties, suggesting that smaller architectures may benefit from fine-tuning or feature enhancement techniques (Fig.\u0026nbsp;\u003cspan refid=\"Fig9\" class=\"InternalRef\"\u003e9\u003c/span\u003e). Overall, the true positives for Grades 1 and 4 were high across all models, while misclassifications primarily occurred in Grades 2 and 3. These results highlight areas for potential improvement, including refining model architectures or augmenting training data to address the subtle differences between these categories.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003c/div\u003e \u003cdiv id=\"Sec13\" class=\"Section2\"\u003e \u003ch2\u003e4.3 Testing\u003c/h2\u003e \u003cp\u003eThe comparative testing of the six YOLO models reveals significant performance differences in arecanut grading (Table\u0026nbsp;\u003cspan refid=\"Tab3\" class=\"InternalRef\"\u003e3\u003c/span\u003e). Among these models, YOLOv8_n achieved the highest overall accuracy of 98.25%, followed by YOLOv8_m at 97.5%, and YOLOv8_s at 92.75%. The YOLOv11 models demonstrated lower overall accuracies, with YOLOv11_s at 91.75%, YOLOv11_n at 89.75%, and YOLOv11_m at 83.25%. In terms of precision, YOLOv8 models exhibited consistently high scores, with YOLOv8_n and YOLOv8_m both achieving a precision of 0.98. In contrast, the YOLOv11 models showed more variability, particularly YOLOv11_n, which recorded significantly lower precision (0.1). Recall values were similarly high for the YOLOv8 models (0.98 for YOLOv8_n, 0.97 for YOLOv8_m), while the YOLOv11 models showed lower recall, particularly in challenging grades such as Grade 2 and Grade 4. The F1-scores for YOLOv8 models were also robust, with YOLOv8_n and YOLOv8_m both achieving F1 scores of 0.98, indicating balanced performance in both precision and recall. On the other hand, YOLOv11_n and YOLOv11_m had F1 scores closer to 0.9, signaling areas for improvement in classification.\u003c/p\u003e \u003cp\u003e \u003cdiv class=\"gridtable\"\u003e\u003ctable float=\"Yes\" id=\"Tab3\" border=\"1\"\u003e \u003ccaption language=\"En\"\u003e \u003cdiv class=\"CaptionNumber\"\u003eTable 3\u003c/div\u003e \u003cdiv class=\"CaptionContent\"\u003e \u003cp\u003eTest performance metrics of final selected YOLO models for arecanut classification.\u003c/p\u003e \u003c/div\u003e \u003c/caption\u003e \u003ccolgroup cols=\"7\"\u003e \u003cdiv align=\"left\" class=\"colspec\" colname=\"c1\" colnum=\"1\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c2\" colnum=\"2\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c3\" colnum=\"3\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c4\" colnum=\"4\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c5\" colnum=\"5\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c6\" colnum=\"6\"\u003e\u003c/div\u003e \u003cdiv align=\"char\" char=\".\" class=\"colspec\" colname=\"c7\" colnum=\"7\"\u003e\u003c/div\u003e \u003cthead\u003e \u003ctr\u003e \u003cth align=\"left\" colname=\"c1\"\u003e \u003cp\u003eModel\\Metrics\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c2\"\u003e \u003cp\u003ePatience\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c3\"\u003e \u003cp\u003eOverall Accuracy (%)\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c4\"\u003e \u003cp\u003eW. Precision\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c5\"\u003e \u003cp\u003eW. Recall\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c6\"\u003e \u003cp\u003eW. F1-Score\u003c/p\u003e \u003c/th\u003e \u003cth align=\"left\" colname=\"c7\"\u003e \u003cp\u003eTime (ms)/ img\u003c/p\u003e \u003c/th\u003e \u003c/tr\u003e \u003c/thead\u003e \u003ctbody\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO8n\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e10\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e98.25\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e220.19\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO8m\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e97.5\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.97\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.98\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e219.01\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO8s\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e92.75\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.94\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.93\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.92\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e214.94\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO11s\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e20\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e91.75\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.93\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.92\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.92\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e231.43\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO11n\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e10\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e89.75\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.1\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.9\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e230.84\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003ctr\u003e \u003ctd align=\"left\" colname=\"c1\"\u003e \u003cp\u003eYOLO11m\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c2\"\u003e \u003cp\u003e0\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c3\"\u003e \u003cp\u003e83.25\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c4\"\u003e \u003cp\u003e0.89\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c5\"\u003e \u003cp\u003e0.83\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c6\"\u003e \u003cp\u003e0.83\u003c/p\u003e \u003c/td\u003e \u003ctd align=\"char\" char=\".\" colname=\"c7\"\u003e \u003cp\u003e221.18\u003c/p\u003e \u003c/td\u003e \u003c/tr\u003e \u003c/tbody\u003e \u003c/colgroup\u003e \u003c/table\u003e\u003c/div\u003e \u003c/p\u003e \u003cp\u003eThe confusion matrix analysis further elucidated the model\u0026rsquo;s strengths and weaknesses (Fig.\u0026nbsp;\u003cspan refid=\"Fig10\" class=\"InternalRef\"\u003e10\u003c/span\u003e). While YOLOv8 models achieved near-perfect classification for all grades, YOLOv11 models faced challenges, particularly with Grade 2 and Grade 4. YOLOv8_n showed excellent classification across Grades 1 to 3 but struggled with Grade 4, where it had low recall despite high precision. YOLOv11_n misclassified Grade 2 as Grade 1 and faced difficulties with Grade 4. Similarly, YOLOv11_m displayed low precision for Grade 4. These results highlight the need for further refinement in classifying lower-quality grades. Regarding inference speed, the models demonstrated competitive performance. YOLOv8_n took 220.19 ms per image, closely followed by YOLOv8_m at 219.01 ms and YOLOv8_s at 214.94 ms. The YOLOv11 models had slightly longer inference times, with YOLOv11_s at 231.43 ms, YOLOv11_n at 230.84 ms, and YOLOv11_m at 221.18 ms. This suggests that the YOLOv11 models may have a slight computational overhead compared to the YOLOv8 variants, which could be a consideration in real-time applications where inference speed is crucial.\u003c/p\u003e \u003cp\u003e \u003c/p\u003e \u003cp\u003eOverall, while the YOLOv8 models excelled in all performance metrics, the YOLOv11 models, particularly YOLOv11_n and YOLOv11_m, require further optimization. Enhancements to their feature extraction and classification capabilities could improve their accuracy in challenging grades and reduce misclassifications. Additionally, although the YOLOv8 models are faster in inference, future work could further optimize the YOLOv11 models to balance performance and speed for real-time deployment in arecanut grading tasks.\u003c/p\u003e \u003c/div\u003e"},{"header":"5. Discussion","content":"\u003cp\u003eThis current study demonstrates the transformative potential of YOLO-based models, particularly YOLOv8_n, in automating the grading of arecanuts. YOLOv8_n achieved the highest accuracy (98.25%), followed by YOLOv8_m (97.5%) and YOLOv8_s (92.75%). In contrast, the YOLOv11 models showed lower accuracies, with YOLOv11_s at 91.75%, YOLOv11_n at 89.75%, and YOLOv11_m at 83.25%. These results highlight YOLOv8's superior performance in classification accuracy and inference speed, making it ideal for real-time deployment in agricultural applications. The consistently high Top-5 accuracies across all models suggest effective learning with minimal overfitting. However, the observed plateau in Top-1 accuracy highlights opportunities for improvement through techniques like architecture refinement, advanced data augmentation, or ensemble methods. Validation loss variability in YOLOv11_m indicates a potential need for enhanced regularization techniques to improve stability and generalization. Integrating YOLO models into handheld devices and drones could significantly reduce labor costs and address workforce shortages in agriculture. Recent study has demonstrated the effectiveness of integrating YOLO models into drone-based agricultural systems, where real-time grading was achieved with improved throughput and reduced labor costs [\u003cspan citationid=\"CR40\" class=\"CitationRef\"\u003e40\u003c/span\u003e]. By automating grading, farmers can enhance throughput, ensure consistent product quality, and make real-time, data-driven decisions that optimize resource management.\u003c/p\u003e \u003cp\u003eThe economic benefits of automating arecanut grading are clear. Increased throughput allows farmers to handle more produce without increasing labor costs, promoting greater profitability. Studies have shown that automation of grading and sorting tasks in agriculture leads to significant cost savings, especially when scaling production without increasing labor costs [\u003cspan citationid=\"CR41\" class=\"CitationRef\"\u003e41\u003c/span\u003e][\u003cspan citationid=\"CR42\" class=\"CitationRef\"\u003e42\u003c/span\u003e]. Consistent grading also minimizes waste by ensuring high-quality nuts are accurately identified, supporting supply chain reliability. The YOLO models' high inference speed (under 250 ms per image for YOLOv8 variants) also make them highly practical for real-time use, which is crucial in agricultural applications. In addition, YOLOv8_n demonstrated the fastest inference time (220.19 ms per image), closely followed by YOLOv8_m at 219.01 ms, and YOLOv8_s at 214.94 ms. This speed advantage of the YOLOv8 models over YOLOv11 models emphasizes their suitability for time-sensitive tasks like automated grading in agriculture. Nevertheless, further exploration of real-world deployment challenges, including varying environmental conditions and computational resource constraints, is necessary to ensure seamless integration into agricultural workflows, particularly in rural and resource-limited settings.\u003c/p\u003e \u003cp\u003eTargeted feature engineering and advanced data augmentation, such as rotations, scaling, and brightness adjustments, can further improve model robustness and generalization. The aggressive data augmentation in YOLOv11_n, including saturation jitter and mixup, demonstrated its adaptability to varying conditions, suggesting that further enhancements to the feature extraction process could help in addressing challenges, particularly in differentiating between Grades 2 and 3. Smaller architectures like YOLOv8_n and YOLOv11_n faced misclassifications between these grades, indicating room for improvement through fine-tuning or feature enhancement. This approach is in line with previous studies, such as Smith et al. (2021) and Zhang et al. (2020), which also showed the success of YOLO models in agricultural grading tasks. While Smith et al. (2021) focused on fruit grading, they found similar results with YOLO models achieving high accuracy, reinforcing the adaptability of YOLO in agricultural tasks. Similarly, Zhang et al. (2020) utilized YOLOv3 in detecting quality grades of tea leaves, achieving high precision in a comparable context. YOLO\u0026rsquo;s ability to automate the grading process is consistent with the growing trend of applying deep learning techniques to agricultural challenges.\u003c/p\u003e \u003cp\u003eWhile this study emphasizes the positive outcomes of automating arecanut grading, there are several potential limitations and areas for improvement. The dataset used for training the models should be more diverse, including a wider range of lighting conditions, varying nut surface textures, and different crop maturity levels. This would increase the robustness of the models in real-world environments where such variability is common. Additionally, imbalanced class distributions in the dataset may have led to biases in model performance. Future work should address these issues, perhaps by using techniques such as class balancing, synthetic data generation, or more advanced augmentation strategies. Furthermore, while the models performed well under controlled conditions, more robust evaluation using real-world data is needed to confirm their effectiveness and ability to adapt to diverse environmental challenges, such as changes in lighting, weather, or crop variety.\u003c/p\u003e \u003cp\u003eThe consistency and reliability in grading not only streamline operations but also help in maintaining high standards for product quality, thereby contributing to more sustainable and profitable agricultural practices. Automated grading systems, as highlighted in studies by [\u003cspan citationid=\"CR43\" class=\"CitationRef\"\u003e43\u003c/span\u003e][\u003cspan citationid=\"CR44\" class=\"CitationRef\"\u003e44\u003c/span\u003e], have shown to contribute to more sustainable practices by reducing waste and ensuring product consistency, thus promoting profitability in agriculture. In conclusion, this study underscores the significant impact of YOLO-based models, particularly YOLOv8_n, in automating the grading process of arecanuts. By demonstrating superior classification accuracy and fast inference times, YOLOv8_n proves to be highly effective for real-time agricultural applications. These results highlight the potential for integrating such systems into handheld devices and drones, which could revolutionize grading practices by reducing labor costs, increasing throughput, and ensuring consistent product quality. The success of this study contributes to the broader body of research advocating for the use of deep learning models to enhance efficiency and sustainability in agricultural operations.\u003c/p\u003e"},{"header":"6. Limitations of the Study","content":"\u003cp\u003eThis study highlights the potential of YOLO models for automating arecanut grading while acknowledging several limitations. The dataset, consisting of 2,000 images with 500 per grade, may not fully capture the variability in arecanut features across real-world conditions, limiting the model's generalizability. Additionally, the use of frontal images alone restricts the model\u0026rsquo;s ability to assess critical features like texture, color uniformity, and hidden defects that multi-angle imaging could reveal. The controlled laboratory conditions under which the images were captured, with uniform lighting and background, do not reflect real-world scenarios involving uneven lighting or background noise, potentially affecting model performance in practical applications. Moreover, the study does not consider lightweight implementations of YOLO models, which are essential for deployment in resource-limited settings. Finally, the black-box nature of YOLO models pose challenges for interpretability, potentially hindering adoption in contexts where understanding the decision-making process is crucial. Addressing these limitations through larger, more diverse datasets, advanced imaging techniques, edge-device optimization, and explainable AI could enhance the models\u0026rsquo; practical applicability and reliability.\u003c/p\u003e"},{"header":"7. Future works","content":"\u003cp\u003eFuture advancements in arecanut grading using YOLO models should address key limitations and explore innovative directions to enhance real-world applicability. Expanding the dataset to include a wider range of arecanut grades, sourced from diverse regions and environmental conditions, alongside integrating multi-angle and advanced imaging techniques such as thermal or infrared, can improve generalization and capture subtle quality differences. Efficient annotation through semi-supervised learning and advanced data augmentation strategies that simulate real-world defects, such as discoloration and deformities, will further enhance model robustness. Explainable AI (XAI) methods, such as confidence scores, uncertainty estimates, and visual heatmaps, are critical to improving model transparency and fostering user trust. Optimizing model performance through hyperparameter tuning, addressing visual artifacts, and creating lightweight versions of YOLO models will ensure reliability and adaptability for resource-limited settings and edge-device deployment. Integrating multimodal sensor data and leveraging transfer learning with pre-trained weights can further boost accuracy and training efficiency. Additionally, refining multi-class classification techniques will enable the models to handle nuanced grade distinctions effectively. Prioritizing real-time deployment through inference speed optimization will bridge the gap between laboratory results and practical applications, paving the way for scalable and efficient arecanut grading solutions.\u003c/p\u003e"},{"header":"8. Conclusion","content":"\u003cp\u003eThis study highlights the transformative potential of YOLO-based deep learning models for automating arecanut grading, offering a scalable and efficient solution to agricultural quality assessment challenges. Among the models tested, YOLOv8_n achieved the highest accuracy (98.25%), excelling in identifying higher-quality grades, while YOLOv8_s demonstrated consistent performance across all grades, making it versatile for diverse tasks. In contrast, YOLOv11 models exhibited lower accuracies, indicating the need for further refinement. The findings validate YOLO's capability for real-time grading, reducing manual labor, ensuring consistent quality, and enhancing economic sustainability for farmers and industries. However, limitations such as a small, single-perspective dataset constraint model generalizability. Addressing these through advanced imaging, dataset expansion, and improved annotation will be vital for future progress. This research establishes a foundation for integrating automated grading systems into agricultural workflows, paving the way for improved efficiency, cost reduction, and sustainable growth in the sector.\u003c/p\u003e "},{"header":"Declarations","content":"\u003cp\u003e\u003cstrong\u003eCRediT authorship contribution statement\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDDG\u003c/strong\u003e: Data curation, Methodology, Software, Validation, Writing - original draft. \u003cstrong\u003eSH\u003c/strong\u003e: Data curation, Writing - original draft. \u003cstrong\u003eAM\u003c/strong\u003e: Data curation, Methodology, Software, Validation. \u003cstrong\u003eSDG\u003c/strong\u003e: Conceptualization, Resources, Software, Validation, Methodology, Supervision, Writing - original draft, Writing - review \u0026amp; editing. \u0026nbsp;\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDeclaration of generative AI and AI-assisted technologies in the writing process\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eDuring the preparation of this work, the author(s) used [QuillBot] to improve clarity, engagement, and grammar. After using this tool/service, the author(s) reviewed and edited the content as needed and take(s) full responsibility for the content of the publication.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eDeclaration of Competing Interest\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe authors declare that they have no known competing financial interests or personal relationships that could have appeared to influence the work reported in this paper.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eData availability\u003c/strong\u003e\u0026nbsp;\u003c/p\u003e\n\u003cp\u003eThe code used in this study is publicly available on GitHub at github.com/ghatesudi/Arecanut-classification-YOLO and can be freely accessed under the MIT License. The dataset comprising annotated arecanut images is stored on a secure drive and is not publicly available due to storage constraints. Researchers interested in accessing the dataset may contact the corresponding author for further information or access instructions.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eAcknowledgments\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThe authors would like to thank Dr. Nagaraj , Plant Pathologist, ICAR-CPCRI, Vitla, Puttur,\u003c/p\u003e\n\u003cp\u003eKarnataka for the assistance provided during field data collection.\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eORCID ID\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eDhanush Ghate D \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; https://orcid.org/0009-0004-9143-1267\u003c/p\u003e\n\u003cp\u003eSaishma H \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;https://orcid.org/0009-0003-4454-3584\u003c/p\u003e\n\u003cp\u003eAdithya M \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u003cu\u003ehttps://orcid.org/0009-0004-2073-8210\u003c/u\u003e\u003c/p\u003e\n\u003cp\u003eSudeep D. Ghate \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp; https://orcid.org/0000-0001-9996-3605\u003c/p\u003e\n\u003cp\u003e\u003cstrong\u003eRecommendation\u003c/strong\u003e\u003c/p\u003e\n\u003cp\u003eThis is a preprint of a manuscript that will be submitted to IEEE Access for consideration after further refinement. It is made available for early feedback.\u0026nbsp; \u0026nbsp; \u0026nbsp; \u0026nbsp;\u0026nbsp;\u003c/p\u003e"},{"header":"References","content":"\u003col\u003e\u003cli\u003e\u003cspan\u003eMitra SK, Devi H (2016), November Arecanut in India-present situation and future prospects. In \u003cem\u003eInternational Symposia on Tropical and Temperate Horticulture-ISTTH2016 1205\u003c/em\u003e (pp. 789\u0026ndash;794)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHiremata V, Narayanaswamy M, Shet RM (2022) Assessment of growth and yield parameters in Arecanut (Areca catechu L.) through correlation and path analysis under hilly zone of Karnataka. J Hortic Sci 17(2):333\u0026ndash;340\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSalehi B, Konovalov DA, Fru P, Kapewangolo P, Peron G, Ksenija MS, Sharifi-Rad J (2020) Areca catechu\u0026mdash;From farm to food and biomedical applications. Phytother Res 34(9):2140\u0026ndash;2158\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eJamanal H, Murthy C (2023) A Study on Growth of Procurement of Arecanut by Different Marketing Agencies for the Benefit of the Farmers. Asian J Agricultural Ext Econ Sociol 41(8):120\u0026ndash;126\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSatheesha KM, Rajanna KS (2023) A Review of the Literature on Arecanut Sorting and Grading Using Computer Vision and Image Processing. Int J Appl Eng Manage Lett (IJAEML) 7(2):50\u0026ndash;67\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eOsterman P, Weaver A (2014) Why claims of skills shortages in manufacturing are overblown? Economic Policy Inst Issue Brief 376:1\u0026ndash;12\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eEnhancing Arecanut Quality Grading: A Comparison of Custom CNNs and Transfer Learning Models, Ghate D, Hegde P, Saishma H, Pallavi KN, Ghate (2024) S. D. AIA(Submitted)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eChandana RK, Ramachandra AC (2022) Real time object detection system with YOLO and CNN models: A review. \u003cem\u003earXiv Prepr. arXiv2208\u003c/em\u003e, \u003cem\u003e773\u003c/em\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eBoppiniti ST (2020) Big Data Meets Machine Learning: Strategies for Efficient Data Processing and Analysis in Large Datasets. \u003cem\u003eInternational Journal of Creative Research In Computer Technology and Design\u003c/em\u003e, \u003cem\u003e2\u003c/em\u003e(2)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eVijayakumar A, Vairavasundaram S (2024) Yolo-based object detection models: A review and its applications. Multimedia Tools Appl, 1\u0026ndash;40\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eDhanya VG, Subeesh A, Kushwaha NL, Vishwakarma DK, Kumar TN, Ritika G, Singh AN (2022) Deep learning-based computer vision approaches for smart agricultural applications. Artif Intell Agric 6:211\u0026ndash;229\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLiang, X., Jia, X., Huang, W., He, X., Li, L., Fan, S., \u0026hellip; Zhang, C. (2022). Real-time grading of defect apples using semantic segmentation combination with a pruned YOLO V4 network. Foods, 11(19), 3150.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePhan TTH, Ho HT, Hoang TN (2023), July Investigating YOLO Models for Rice Seed Classification. In \u003cem\u003eConference on Information Technology and its Applications\u003c/em\u003e (pp. 181\u0026ndash;192). Cham: Springer Nature Switzerland\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eGomez, D., Selvaraj, M. G., Casas, J., Mathiyazhagan, K., Rodriguez, M., Assefa, T.,\u0026hellip; Espitia, E. (2024). Advancing common bean (Phaseolus vulgaris L.) disease detection with YOLO driven deep learning to enhance agricultural AI. Scientific Reports, 14(1), 15596.\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAkintuyi OB (2024) Adaptive AI in precision agriculture: a review: investigating the use of self-learning algorithms in optimizing farm operations based on real-time data. Res J Multidisciplinary Stud 7(02):016\u0026ndash;030\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAhmad T, Ma Y, Yahya M, Ahmad B, Nazir S, Haq AU (2020) Object detection through modified YOLO neural network. Sci Program 2020(1):8403262\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eDhanya VG, Subeesh A, Kushwaha NL, Vishwakarma DK, Kumar TN, Ritika G, Singh AN (2022) Deep learning-based computer vision approaches for smart agricultural applications. Artif Intell Agric 6:211\u0026ndash;229\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSharma V, Tripathi AK, Mittal H (2022) Technological revolutions in smart farming: Current trends, challenges \u0026amp; future directions. Comput Electron Agric 201:107217\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eVijayakumar A, Vairavasundaram S (2024) Yolo-based object detection models: A review and its applications. Multimedia Tools Appl, 1\u0026ndash;40\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLavanya G, Pande SD (2024) Enhancing Real-time Object Detection with YOLO Algorithm. EAI Endorsed Trans Internet Things, \u003cem\u003e10\u003c/em\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eMoya V, Quito A, Pilco A, V\u0026aacute;sconez JP, Vargas C (2024) Crop detection and maturity classification using a yolov5-based image analysis. Emerg Sci J 8(2):496\u0026ndash;512\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePaul A, Machavaram R, Kumar D, Nagar H (2024) Smart solutions for capsicum Harvesting: Unleashing the power of YOLO for Detection, Segmentation, growth stage Classification, Counting, and real-time mobile identification. Comput Electron Agric 219:108832\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eGoudah AA, Jarofka M, El-Habrouk M, Schramm D, Dessouky YG (2023) Object detection in inland vessels using combined trained and pretrained models of YOLO8. Adv Comput Eng, \u003cem\u003e3\u003c/em\u003e(2)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAli ML, Zhang Z (2024) The YOLO framework: A comprehensive review of evolution, applications, and benchmarks in object detection. \u003cem\u003eComputers\u003c/em\u003e, \u003cem\u003e13\u003c/em\u003e(12), 336. /\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eWei J, Ni L, Luo L, Chen M, You M, Sun Y, Hu T (2024) GFS-YOLO11: A Maturity Detection Model for Multi-Variety Tomato. Agronomy 14(11):2644\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eVilar-Andreu M, Garc\u0026iacute;a L, Garcia-Sanchez AJ, Asorey-Cacheda R, Garcia-Haro J (2024) Enhancing Precision Agriculture Pest Control: A generalized Deep Learning Approach with YOLOv8-based Insect Detection. \u003cem\u003eIEEE Access\u003c/em\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePham VN, Ba D, Le QHT, Nguyen DA, Van QMD, D., Nguyen L (2024) A Low-Cost Deep-Learning-Based System for Grading Cashew Nuts. Computers 13(3):71\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eZainudin MS, Azlan MS, Yin LL, Saad WM, Idris MI, Muhammad S, Razak MSJA (2022) Analysis on localization and prediction of depth chili fruits images using YOLOv5. Int J Adv Technol Eng Explor 9(97):1786\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eYang G, Wang J, Nie Z, Yang H, Yu S (2023) A lightweight YOLOv8 tomato detection algorithm combining feature enhancement and attention. Agronomy 13(7):1824\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eXiao B, Nguyen M, Yan WQ (2024) Fruit ripeness identification using YOLOv8 model. Multimedia Tools Appl 83(9):28039\u0026ndash;28056\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eNaik P, Rudra B (2024) Framework for Lightweight Deep Learning Model Using YOLOv5 for Arecanut Grade Assessment. SN Comput Sci 5(8):1015\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eChikkalingaiah AA, Dhanesha R, Palya SNC, Laxmana KAN, Puttaswamy AM, Ayengar P Segmentation and yield count of an arecanut bunch using deep learning techniques. Int J Artif Intell ISSN, \u003cem\u003e2252\u003c/em\u003e(8938), 543\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eQin Z, Wang W, Dammer KH, Guo L, Cao Z (2021) Ag-YOLO: A real-time low-cost detector for precise spraying with case study of palms. Front Plant Sci 12:753603\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAdesh ND, Harshith M, Bhardwaj S, Renuka A (2023), November Segregation of Dehusked Arecanut using Artificial Intelligence Technique on Raspberry Pi. In \u003cem\u003e2023 IEEE North Karnataka Subsection Flagship International Conference (NKCon)\u003c/em\u003e (pp. 1\u0026ndash;6). IEEE\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eNaik PM, Rudra B (2023) Classification of arecanut x-ray images for quality assessment using adaptive genetic algorithm and deep learning. IEEE Access 11:127619\u0026ndash;127636\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eNaik PM, Rudra B (2024) Deep learning-based arecanut detection for X-ray radiography: improving performance and efficiency for automated classification and quality control. Nondestructive Test Evaluation, 1\u0026ndash;21\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eAkiba T, Sano S, Yanase T, Ohta T, Koyama M (2019), July Optuna: A next-generation hyperparameter optimization framework. In \u003cem\u003eProceedings of the 25th ACM SIGKDD international conference on knowledge discovery \u0026amp; data mining\u003c/em\u003e (pp. 2623\u0026ndash;2631)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eSnoek J, Larochelle H, Adams RP (2012) Practical bayesian optimization of machine learning algorithms. Adv Neural Inf Process Syst, \u003cem\u003e25\u003c/em\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ede Brecht M, Yamagishi N (2012) Combining sparseness and smoothness improves classification accuracy and interpretability. NeuroImage 60(2):1550\u0026ndash;1561\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ede Oca AM, Flores G (2021) The AgriQ: A low-cost unmanned aerial system for precision agriculture. Expert Syst Appl 182:115163\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eTian H, Wang T, Liu Y, Qiao X, Li Y (2020) Computer vision technology in agricultural automation\u0026mdash;A review. Inform Process Agric 7(1):1\u0026ndash;19\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eLondhe DH, Nalawade SM, Pawar GS, Atkari VT, Wandkar SV (2013) Grader: A review of different methods of grading for fruits and vegetables. Agricultural Eng International: CIGR J 15(3):217\u0026ndash;230\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003e\u0026Uuml;nay D (2021) Automation on Fruit and Vegetable Grading System and Traceability. Nondestructive Evaluation of Agro-products by Intelligent Sensing Techniques. Bentham Science, pp 235\u0026ndash;247\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eZhang W (2023) Automated Fruit Grading in Precise Agriculture using You Only Look Once Algorithm. \u003cem\u003eInternational Journal of Advanced Computer Science and Applications\u003c/em\u003e, \u003cem\u003e14\u003c/em\u003e(10)\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003ePaszke A, Gross S, Chintala S (2017) Automatic differentiation in PyTorch. \u003cem\u003eProceedings of Neural Information Processing Systems (NeurIPS)\u003c/em\u003e\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eHunter JD (2007) Matplotlib: A 2D graphics environment. Comput Sci Eng 9(3):90\u0026ndash;95\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eWaskom M et al (2020) Seaborn: statistical data visualization. J Open Source Softw 5(51):241\u003c/span\u003e\u003c/li\u003e \u003cli\u003e\u003cspan\u003eVirtanen P et al (2020) SciPy 1.0: fundamental algorithms for scientific computing in Python. Nat Methods 17(3):261\u0026ndash;272\u003c/span\u003e\u003c/li\u003e\u003c/ol\u003e"},{"header":"Supplementary Figures","content":"\u003cp\u003eSupplementary Figures S1 to S6 are not available with this version.\u003c/p\u003e"}],"fulltextSource":"","fullText":"","funders":[],"hasAdminPriorityOnWorkflow":false,"hasManuscriptDocX":true,"hasOptedInToPreprint":true,"hasPassedJournalQc":"","hasAnyPriority":true,"hideJournal":true,"highlight":"","institution":"Nitte University","isAcceptedByJournal":false,"isAuthorSuppliedPdf":false,"isDeskRejected":"","isHiddenFromSearch":false,"isInQc":false,"isInWorkflow":false,"isPdf":false,"isPdfUpToDate":true,"isWithdrawnOrRetracted":false,"journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true},"keywords":"Arecanut grading, YOLO models, deep learning, agricultural classification, model optimization, hyperparameter tuning","lastPublishedDoi":"10.21203/rs.3.rs-5755373/v1","lastPublishedDoiUrl":"https://doi.org/10.21203/rs.3.rs-5755373/v1","license":{"name":"CC BY 4.0","url":"https://creativecommons.org/licenses/by/4.0/"},"manuscriptAbstract":"\u003cp\u003eArecanut grading is essential for maintaining quality, fair pricing, and efficient trade. Manual grading methods, dependent on subjective human assessment, are prone to errors, inconsistencies, and inefficiencies, particularly in large-scale operations.Automating this process is vital for improving accuracy and scalability. The You Only Look Once (YOLO) deep learning method autonomously evaluates arecanuts by training on 2,000 high-resolution photos uniformly categorized into four quality ratings. We split the dataset into 80% for training, 20% for validation, and used a separate curated test set to evaluate generalization. Then evaluated YOLOv8 and YOLOv11 models in nano, small, and medium configurations. The optimization process involved tuning batch size, learning rate, and weight decay through grid search and applying data augmentation techniques.The YOLOv8 nano model achieved the highest accuracy of 98.25%, with a precision of 0.98, a recall of 0.98, and a processing time of 220.19 ms per image. In contrast, YOLOv11 models exhibited lower accuracy due to overlapping feature misclassifications. While the results highlight the potential of YOLO models in automating agricultural grading, the study is constrained by dataset size and single-perspective imaging, limiting its generalizability. Future work will focus on expanding datasets, incorporating advanced imaging technologies, and improving model transparency for practical deployment. These results demonstrate the potential of YOLO models in automating agricultural grading, offering a scalable, efficient, and sustainable solution for arecanut classification in real-world applications.\u003c/p\u003e","manuscriptTitle":"Advancing Arecanut Quality Grading: A Comparative Analysis of YOLO Models with Hyperparameter Optimization","msid":"","msnumber":"","nonDraftVersions":[{"code":1,"date":"2025-01-06 14:33:38","doi":"10.21203/rs.3.rs-5755373/v1","editorialEvents":[{"type":"communityComments","content":0}],"status":"published","journal":{"display":true,"email":"[email protected]","identity":"researchsquare","isNatureJournal":false,"hasQc":true,"allowDirectSubmit":true,"externalIdentity":"","sideBox":"","snPcode":"","submissionUrl":"/submission","title":"Research Square","twitterHandle":"researchsquare","acdcEnabled":true,"dfaEnabled":false,"editorialSystem":"","reportingPortfolio":"","inReviewEnabled":false,"inReviewRevisionsEnabled":true}}],"origin":"","ownerIdentity":"29cf4949-0f02-49cf-a5ef-29e5228b426b","owner":[],"postedDate":"January 6th, 2025","published":true,"recentEditorialEvents":[],"rejectedJournal":[],"revision":"","amendment":"","status":"posted","subjectAreas":[{"id":42310461,"name":"Artificial Intelligence and Machine Learning"}],"tags":[],"updatedAt":"2025-01-06T14:33:38+00:00","versionOfRecord":[],"versionCreatedAt":"2025-01-06 14:33:38","video":"","vorDoi":"","vorDoiUrl":"","workflowStages":[]},"version":"v1","identity":"rs-5755373","journalConfig":"researchsquare"},"__N_SSP":true},"page":"/article/[identity]/[[...version]]","query":{"redirect":"/article/rs-5755373","identity":"rs-5755373","version":["v1"]},"buildId":"8U1c8b4HqxoKbykW_rLl7","isFallback":false,"isExperimentalCompile":false,"dynamicIds":[84888],"gssp":true,"scriptLoader":[]}

Text is read by the "Ask this paper" AI Q&A widget below. Extraction quality varies by source — PMC NXML preserves structure cleanly, OA-HTML may include some navigation residue, and OA-PDF can have broken hyphenation. The publisher copy (via DOI) is the canonical version.

My notes (saved in your browser only)

Ask this paper AI returns verbatim quotes from the full text · source: preprint-html

Answers must be backed by verbatim quotes from this paper's full text. Hallucinated quotes are dropped automatically; if no verbatim passage answers the question, we say so. How this works

Citation neighborhood (no data yet)

We don't have any in-corpus citations linked to this paper yet. This is a recent paper (2025) — citers typically take a year or two to land, and the OpenAlex reference graph may still be filling in.

Source provenance

europepmc
last seen: 2026-05-20T01:45:00.602351+00:00