Applied Sciences (Aug 2024)
A Raisin Foreign Object Target Detection Method Based on Improved YOLOv8
Abstract
During the drying and processing of raisins, the presence of foreign matter such as fruit stems, branches, stones, and plastics is a common issue. To address this, we propose an enhanced real-time detection approach leveraging an improved YOLOv8 model. This novel method integrates the multi-head self-attention mechanism (MHSA) from BoTNet into YOLOv8’s backbone. In the model’s neck layer, selected C2f modules have been strategically replaced with RFAConv modules. The model also adopts an EIoU loss function in place of the original CIoU. Our experiments reveal that the refined YOLOv8 boasts a precision of 94.5%, a recall rate of 89.9%, and an F1-score of 0.921, with a mAP reaching 96.2% at the 0.5 IoU threshold and 81.5% across the 0.5–0.95 IoU range. For this model, comprising 13,177,692 parameters, the average time required for detecting each image on a GPU is 7.8 milliseconds. In contrast to several prevalent models of today, our enhanced model excels in mAP0.5 and demonstrates superiority in F1-score, parameter economy, computational efficiency, and speed. This study conclusively validates the capability of our improved YOLOv8 model to execute real-time foreign object detection on raisin production lines with high efficacy.
Keywords