# YOLOv8m for Automated Pepper Variety Identification: Improving Accuracy with Data Augmentation
## 3 Materials and Methods
### Data Augmentation  
In the fourth step, we employed data augmentation. This process enlarges a training dataset through techniques such as rotation, flipping, cropping, and contrast adjustment, thereby enhancing the model's generalization and performance [35]. Data augmentation techniques were applied to the training set to improve the generalization capacity of the YOLOv8m model and optimize its accuracy in pepper identification. This strategy aimed to simulate natural variations in real-world image capture conditions, making the model more robust to changes in lighting, angles, and image sharpness. The augmentation methods, such as rotation and blurring, were selected based on prior studies indicating their positive impact on YOLOv8m accuracy. In contrast, cropping was excluded due to its tendency to eliminate critical features in small objects [36].  
In this study, data augmentation techniques were applied strategically in two distinct phases. Initially, the YOLOv8m model was trained on the original dataset to establish a baseline for performance. Subsequently, data augmentation methods such as rotation and Gaussian blur were introduced during a second training cycle, allowing for a more controlled assessment of their specific impact on the model's generalization capabilities. Although it is common practice to apply data augmentation before the initial training phase, as noted by [PERSON] and [PERSON] [22], the adopted approach offered clearer insights into how augmentation influenced convergence behavior and class-level detection performance. The observed improvements in metrics such as box precision and mAP during the second phase demonstrated that post-baseline augmentation not only enhanced generalization but also contributed to the model's robustness in recognizing subtle morphological differences among pepper varieties. Additionally, this phased methodology enabled more efficient use of computational resources by avoiding unnecessary dataset expansion before validating the model's initial learning performance.  
Based on these indications, the following procedures were applied to the training dataset:  
* Rotation: Images were randomly rotated at angles between \(-30^{\circ}\) and \(+30^{\circ}\), increasing perspective variability and reducing the model's dependence on fixed angles.
* Blurring: A soft Gaussian blur filter (3 \(\times\) 3 kernel) was applied to simulate focus variations that may arise due to camera movement or differences in image quality.
* Following data augmentation, the dataset increased to a total of 3964 images, with the final data split structured as follows:
* Training Set: 3733 images (94% of the total)
* Validation Set: 201 images (5% of the total)
* Test Set 30 images (1% of the total)  
The dataset was divided into training (94%), validation (5%), and test (1%) subsets to increase the volume and diversity of training samples, considering the limitations of the initial dataset. Tables 2 and 3 provide the specifications necessary for reproducibility of the training process. This configuration represents a standard cloud-based training setup, ensuring that the model can be reproduced under similar computational conditions.  
Hyperparameters were defined based on the default configurations provided in the defaults.yaml file of the official Ultralytics YOLOv8 implementation. These values reflect established best practices for training object detection models [37]. The use of standardized configurations ensures methodological consistency with the YOLOv8 framework and facilitates the comparability of results across related studies.