# YOLOv8m for Automated Pepper Variety Identification: Improving Accuracy with Data Augmentation
## 3 Materials and Methods
### YOLO Usage  
The selection of the YOLOv8m model is justified by its superior performance in agricultural contexts, particularly in terms of accuracy, inference speed, and model compactness, compared to alternatives such as EfficientDet and CenterNet. YOLO's architecture, which frames object detection as a single-pass regression problem, provides a significant velocity advantage crucial for real-time applications [12]. This claim is substantiated by a systematic review of 30 studies by [PERSON] et al. [26], which concluded that YOLO models consistently outperform frameworks such as SSD, Faster R-CNN, and EfficientDet in agricultural tasks. Given its verified efficiency and accuracy, YOLOv8m is well suited for the present study on varietal pepper classification in uncontrolled environments. Figure 2 illustrates the flow of features through convolutional layers, C2f modules, and the anchor-free detection head. The fifth step involved model training conducted using the Google Colab Pro infrastructure [38], which ensured access to hardware acceleration for deep learning tasks. The computational configuration comprised an NVIDIA Tesla T4 GPU with 15 GB of VRAM, driver version 550.54.15, and CUDA version 12.4. Available memory was 15.36 GB, with GPU power consumption ranging from 9 W (minimum usage) to 70 W (maximum capacity). The frameworks used were Python 3.10.12 [39], PyTorch 2.5.1 [40], and Ultralytics YOLOv8m [37], along with OpenCV [41] and Roboflow [33]. Google Colab Pro was selected due to its access to high-performance GPUs, which enables the efficient training of the YOLOv8m model within a reduced time frame. The programming language used was Python [39], in combination with several specialized libraries, including: \begin{table}
\begin{tabular}{c c} \hline \hline
**Parameter** & **IT Environment** \\ \hline Operating system & Ubuntu 20.04/Google Colab VM \\ Processor & Intel(R) Xeon(R) CPU @ 2.20 GHz \\ RAM & 13 GB \\ GPU & NVIDIA Tesla T4 (16 GB VRAM) \\ CUDA version & 11.8 \\ Python version & 3.10 \\ YOLOv8 version & Ultralytics 8.1.0 \\ PyTorch version & 2.0.1 \\ Training environment & Google Colab \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Hardware specifications and relevant software environments for the reproducibility of the training process. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Hyperparameter** & **Value** & **Description** \\ \hline epochs & 200 & Number of training iterations \\ batch\_size & 16 & Training samples per batch \\ imgsz & 640 & Input image resolution (square) \\ lr0 & 0.01 & Initial learning rate \\ lrf & 0.01 & Final learning rate decay factor \\ momentum & 0.937 & SGD momentum \\ weight\_decay & 0.0005 & Regularization parameter \\ optimizer & auto & Optimizer automatically selected (typically SGD) \\ patience & 100 & Early stopping patience (epochs without gain) \\ mosaic & 1.0 & Mosaic augmentation enabled \\ fliplr & 0.5 & Horizontal flip probability \\ translate & 0.1 & Image shift augmentation \\ scale & 0.5 & Image scaling range for augmentation \\ \hline \hline \end{tabular}
\end{table} 
Table 3: Key hyperparameters adopted for training the YOLOv8m model. After training, the model's performance was evaluated using the following metrics provided by the YOLOv8m CNN (Equations (1)-(3)):  
* Box Precision (BoxP): Measures the accuracy of bounding box predictions relative to the annotated boxes (Equation (1)). \[\text{Precision = TP/(TP + FP)}\] (1)  
Figure 2: Diagram of the YOLOv8 architecture, including backbone, neck, and head components. Adapted from [33]. where TP = true positive, and FP = false positive. The TP is a predicted bounding box that correctly matches a ground truth bounding box of the same class. FP is a predicted bounding box that does not correspond to a real object. * Recall (R): Measures the proportion of true positives among all positive instances in the dataset (Equation (2)). \[\text{Recall}=\text{TP}/(\text{TP})+(\text{FN})\] (2) where TP = true positive, and FN = false negative.