The presence of foreign objects in fresh-cut vegetables has become a significant concern for the industry in recent years. Ensuring the safety of consumers and suppliers necessitates comprehensive precautionary measures. This study introduces a novel approach for detecting foreign objects in fresh-cut vegetables using YOLOv5. The results indicate that YOLOv5s excels in identifying foreign objects with a high detection accuracy of 98.30%, a rapid inference time of 2.6 ms, and a compact model size of 13.3 MB. The model effectively identified foreign objects such as transparent and colored plastic, paper, wood, stone, insects, glass, and metal. Moreover, YOLOv5s accurately detected foreign objects with color similarities to green onions, which is particularly challenging due to their wide color variation. Hence, the foreign objects dataset was tested and generated 98.63% and 98.67% for cabbage and green onion, respectively. Additionally, YOLOv5s successfully detected small foreign objects (2–3 mm) in two types of fresh-cut vegetables. Despite its excellent performance, the YOLOv5s model struggles to identify foreign objects that overlap with vegetable samples. To address this issue, installing an automatic conveyor unit could facilitate continuous sample movement, while a feeder unit could reduce the possibility of overlap. This research demonstrates the feasibility of implementing the YOLOv5s, as a non-destructive technique for detecting foreign objects in fresh-cut vegetables. The findings contribute to the development of an accurate, fast, and efficient real-time inspection system, with potential applications in the fresh-cut vegetable industry to enhance product quality and safety.
Read full abstract