Lightweight YOLO-based object detection for industrial casting defect inspection
Ching-Chang Kuo, Jia-Lang XuAutomated defect detection plays a crucial role in maintaining product quality and improving production efficiency in modern manufacturing. This study established a reproducible benchmark to compare the performance of recent YOLO architectures for casting defect detection under standardized experimental conditions and to investigate the trade-off between detection accuracy and computational efficiency. A publicly available casting defect dataset from Kaggle was used to evaluate four object detection models, namely YOLOv8x, YOLOv10s, YOLO11s, and YOLOv12s. All models were trained and evaluated using identical preprocessing procedures, training configurations, and evaluation protocols. Performance was assessed using precision, recall, mAP50, and mAP50–95, while computational efficiency was evaluated in terms of model size, parameter count, FLOPs, inference latency, and frames per second (FPS). Experimental results showed that YOLOv12s achieved the best overall performance, attaining an mAP50 of 70.91% and an mAP50–95 of 33.37% on the testing dataset while maintaining a lightweight architecture with 9.23 million parameters, 21.5 GFLOPs, and a model size of 18.06 MB. Although YOLOv10s achieved the highest precision (70.78%) and YOLOv8x achieved the highest recall (69.54%), YOLOv12s provided the most balanced performance in terms of detection accuracy, localization robustness, and computational efficiency. The proposed benchmark provides a fair and reproducible comparison of recent YOLO architectures and demonstrates that YOLOv12s offers the most favorable trade-off between detection performance and computational cost, making it a promising solution for automated visual inspection in resource-constrained industrial manufacturing environments.