# YOLOv8m for Automated Pepper Variety Identification: Improving Accuracy with Data Augmentation
## 5 Discussion  
The reduction in precision observed for the Fidalga-Pepper and Habanero-Pepper classes may be attributed to the introduction of variations that do not accurately represent the actual distribution of the training images. The reduced performance observed in certain pepper varieties, such as Fidalga, is likely attributable to their visual similarity to other yellow, rounded types like Habanero and Scotch Bonnet, combined with the possible introduction of unrealistic variations during data augmentation, which may have impaired the model's ability to distinguish subtle inter-class differences. This effect has already been documented in the literature, as noted by [PERSON] and [PERSON] [36], who indicate that data augmentation techniques can, in some cases, generate unrealistic instances, hindering the model's generalization capacity. The variation in performance across classes suggests that some pepper varieties possess visual characteristics that facilitate detection, while others require further refinement of the model to improve detection. The application of data augmentation also impacted the total training time of the model. Without augmentation, training was completed in 200 epochs, totaling 3 h and 43 min. Using the augmentation technique, there was a reduction in epochs (170), but the processing time more than doubled, reaching 6 h and 54 min. This increase in processing  
Figure 5: Example of results of the model tests using samples of the _Capsicum_ fruits: (**a**) Biquinho; (**b**) Bode; (**c**) Cambuci; (**d**) Chilli; (**e**) Fidalga; (**f**) Habanero; (**g**) Jalapeno; and (**h**) Scotch Bonnet. The bounding box defines the spatial location and extent of the detected object. time, from 3 h and 43 min without augmentation to 6 h and 54 min with augmentation, can be attributed to the larger volume of images and the increased computational complexity introduced by greater sample diversity. This impact on training time aligns with the findings of [PERSON] and [PERSON] [36], who report that applying data augmentation techniques can significantly increase model execution time, especially when implemented on large datasets. The increase in training time needs to be weighed against the gains in model accuracy. Although data augmentation yielded better performance for some pepper classes, the computational cost remains a critical factor for deploying the model in real-world applications. The present study's findings confirm previous research [43], indicating the effectiveness of computer vision in agricultural product identification while highlighting the challenges associated with automated pepper detection. An earlier study [17] highlights the increasing application of computer vision in agricultural automation, noting that CNN-based models can replace traditional screening methods, thereby reducing time and minimizing human error. Similarly, [PERSON] et al. [10] show that the performance of CNNs is highly dependent on the quantity and diversity of the dataset, which explains the positive impact of data augmentation observed in the present study. The choice of YOLOv8m for this study aligns with research by [PERSON] [25] and [PERSON] and [PERSON] [11], who highlight the YOLO architecture's advances in efficiency and speed in agricultural object detection. This study reinforces these findings, demonstrating that YOLOv8m can accurately identify pepper varieties, especially when trained on a diverse dataset. We observed a clear trend based on the experimental results: model performance, as indicated by metrics such as mAP50 and AP50-95, generally improves with increased training from 10 to 200 epochs without data augmentation. However, further training to 400 epochs yields diminishing returns and introduces the risk of overfitting. In contrast, data augmentation, particularly evident after 50 epochs, substantially enhances the model's generalization capabilities across the eight distinct pepper varieties.