Performance Enhancement of 2D CNN-Based Visual Inspection Using Data Augmentation for Defect Classification in Metal Casting Products - Imaduddien Ariefa; Hutomo Jiwo Satrio; Della Kumalaningrum; Rieky Handoko; Anton Harseno; Fariz Wisda Nugraha (Mechanical Engineering Department - Semarang State Polytechnic, 2025)
Deep learning-based automated visual inspection has become increasingly important for reducing the subjectivity and mistakes that come with manual inspection. However, when the image dataset is small, Convolutional Neural Networks (CNN) often do not perform optimally because the model overfits and fails to generalize effectivelyl. This study investigates the effect of data augmentation on enhancing the performance of an AlexNet-based CNN model for classifying defect and non-defect casting images. There were 13266 grayscale images in total, and they were divided into two groups: defect and non-defect. To increase data variability, several augmentation techniques were used, such as rotation, flipping, zooming, and brightness adjustment. We evaluated two different training scenarios: training a model without adding anything and training a model with adding something. We used accuracy, precision, recall, F1-score, validation loss, and confusion matrix analysis to evaluate model perfomance. The findings demonstrate that data augmentation significantly improves model performance. The validation loss decreased from 0.019747 to 0.014853, and the accuracy, precision, recall, and F1-score all showed slight improvements. The enhanced model also achieved higher true positive and true negative values, signifying improved recognition proficiency. Tests on previously unseen samples yielded 100% correct predictions, indicating enhanced generalization. To sum up, data augmentation is an effective strategy for mitigating small datset limitations and improving the reliability of CNN-based visual inspection systems in industrial environments.