COMPARATIVE ANALYSIS OF TRANSFORMER-BASED AND CONVENTIONAL CONVOLUTIONAL NEURAL NETWORK (CNN) MODELS FOR DEFECT DETECTION IN CAST PRODUCTS - Igwe, Lazarus Uduma; Olugboji, Oluwafemi Ayodeji (FUDMA Journal of Sciences, 2026)
Casting is a widely used manufacturing process which is frequently affected by surface and internal defects that compromise product quality and structural integrity. Conventional inspection methods, such as manual visual inspection, rely heavily on human expertise and are often slow, subjective, and prone to oversight. To address these limitations, this study develops a computer vision system for the detection of defects in cast products using Transformer-based and conventional convolutional neural network (CNN) models. The performance of both models was evaluated in terms of accuracy, precision, recall, specificity, sensitivity, and F1-score. The models were trained on a dataset of 7,348 grayscale images using the Google Colab platform. Experimental results show that the Transformer-based model outperformed the traditional CNN, achieving an accuracy of 98.4%, precision of 96.7%, recall of 94.9%, F1-score of 96.2%, specificity of 95.9%, and sensitivity of 97.8%. The proposed system enhances quality assurance, reduces manufacturing waste, and supports continuous process optimization, offering significant benefits for medium-sized foundries seeking improved efficiency and product reliability.
Keywords: Defect Detection; Cast; Transformer-Based Model; Convolutional Neural Network (CNN); Computer Vision