This introduction paper is based on the paper "Improving Die-Casting Part Classification using Transfer Learning with Deep Convolutional Neural Networks" published by "IEOM Society International".

1. Overview:
- Title: Improving Die-Casting Part Classification using Transfer Learning with Deep Convolutional Neural Networks
- Author: Al Sani, Khalilur Rahman, Md Nuruzzaman, Md Mahfuzur Rahman
- Year of publication: 2024
- Journal/academic society of publication: IEOM Society International
- Keywords: Die-casting, Classification, Transfer Learning, Convolutional Neural Network, Deep Learning
2. Abstract:
Product quality is a crucial factor in the manufacturing process today, as it determines the company's competitive advantages and the consumer's requirements. The problem arises from traditional techniques and quality control methods becoming less effective in the current environments, hence the increasing demand for advanced technologies. This study aims to design and evaluate the effectiveness of the deep learning (DL) technique in identifying defects in die-casting parts. The dataset has been preprocessed, and data augmentation techniques are then employed to mitigate the risk of model overfitting and improve generalization capability. Five pretrained DL models—AlexNet, DenseNet, EfficientNet, SqueezeNet, and WideResNet—were compared with a proposed custom Convolutional Neural Network (CNN) model. The evaluation was conducted using performance metrics, including precision, recall, accuracy, and F1-score. The proposed custom CNN model achieved the highest accuracy of 98.08%, outperforming all other models, with the next best accuracy being 97.70% from the SqueezeNet model. The results show that the proposed DL-based approach, especially the custom CNN model, can greatly improve the quality control process and lower the manufacturing of faulty goods.
3. Introduction:
Maintaining profitability and competitiveness requires eliminating defects in manufacturing, particularly in casting processes like die-casting, which is essential for producing complex metal components in various industries (aerospace, automotive, electronics). Defective products pose risks due to weak and unreliable constructions, necessitating comprehensive inspection before shipment. Traditional manual inspection methods are costly, time-consuming, and prone to human error. With industrial automation and digitalization, there's a growing demand for efficient and precise defect detection. Deep Learning (DL) methods, especially with transfer learning to address limited data challenges, offer significant potential to improve the speed and accuracy of automated inspection. This enhances product quality, reduces production costs and waste, and ensures higher output quality. This research aims to improve defect detection in die-casting through DL techniques.
4. Summary of the study:
Background of the research topic:
Product quality is paramount in manufacturing. Die-casting is a vital process for complex parts, but defects can lead to failures. Traditional inspection methods are inadequate for modern demands, creating a need for automated, accurate, and efficient defect detection systems. Deep learning (DL) and transfer learning offer promising solutions.
Status of previous research:
Researchers have applied various Artificial Intelligence (AI) and DL techniques for casting defect inspection. Studies include using deep learning for cast iron parts (Wang & Jing, 2024), CNNs with small datasets (Dong et al., 2020), evaluating algorithms like EfficientNetB7 with limited data (Pranav et al., 2023), developing lightweight networks for steel defects (Lal et al., 2023), using CNNs for pump impellers (Chigateri et al., 2023), employing deep object detection with simulated defects (Mery, 2021), designing CNNs for radiography images (Hu & Wang, 2022), using Gaussian models for ceramic bearings (Dongling et al., 2022), investigating pre-trained CNNs (Habibpour et al., 2021), developing recursive attention models like RCNN-DC (Zhao & Wu, 2022), and using attention-guided data augmentation for X-ray images (Jiang et al., 2021). These studies highlight ongoing efforts to improve automated defect detection using AI.
Purpose of the study:
The primary objectives are:
- To design and develop a custom Convolutional Neural Network (CNN) model specifically for classifying defects in die-casting products.
- To analyze this custom model's performance using hyperparameter optimization techniques.
- To evaluate several state-of-the-art transfer learning techniques using a Die-casting dataset.
- To compare the performance of the transfer learning models with the proposed custom CNN model.
- To contribute to advancements in die-casting inspection by enhancing the efficiency and accuracy of defect detection, thereby improving overall quality assurance.
Core study:
The study focuses on applying deep learning for die-casting defect classification. It involves collecting a dataset of die-cast part images, preprocessing them (contrast adjustment, resizing, noise removal), and augmenting the data (rotation, zoom, flip) to improve model robustness. Five pre-trained DL models (AlexNet, DenseNet, EfficientNet, SqueezeNet, WideResNet) are fine-tuned using transfer learning and compared against a newly developed custom CNN model. The models are trained and evaluated on their ability to classify images as 'defective' or 'non-defective'. Performance is measured using standard metrics (accuracy, precision, recall, F1-score). An ablation study is conducted on the custom CNN to assess the impact of different optimizers, learning rates, and epochs. Finally, the best model's performance is compared with results from existing literature.
5. Research Methodology
Research Design:
The research follows a systematic workflow as depicted in Figure 1:
- Data Collection: Gathering images of die-casting parts.
- Data Preprocessing: Applying contrast adjustment, resizing, and noise removal.
- Train/Test Split: Dividing the dataset into training (80%), validation (10%), and testing (10%) sets.
- Data Augmentation: Applying techniques like rotation range, zoom range, and horizontal flip to the training set.
- Model Selection: Choosing five pre-trained models (WideResNet, EfficientNet, SqueezeNet, AlexNet, DenseNet) and proposing a Custom CNN.
- Model Training: Training the selected models on the prepared dataset.
- Ablation Study: Analyzing the impact of loss function, optimizer, learning rate, and epochs on the Custom CNN.
- Evaluation: Assessing model performance using Precision, F1 Score, Accuracy, and Recall metrics.
- Comparison: Comparing the results with other relevant works.
The experiments were conducted using Python, Scikit-learn, and PyTorch on Kaggle, utilizing an NVIDIA Tesla P100 GPU.
Data Collection and Analysis Methods:
The dataset consists of 1300 high-resolution (512×512 pixels, grayscale) JPEG images of cast submersible pump impellers, collected from Pilot Technocast (2024) using a Canon EOS 1300D digital single-lens reflex camera. The dataset is imbalanced, containing two classes: Defective (781 images) and No Defect (519 images). Dataset analysis aimed to identify key patterns distinguishing the classes. The data was split using a random seed for reproducibility: 1040 images for training, 130 for validation, and 130 for testing (Table 1, Table 2).
Research Topics and Scope:
This research investigates the application of deep learning, specifically Convolutional Neural Networks (CNNs) and transfer learning, for the classification of defects in die-casting parts. The scope includes:
- Utilizing a specific dataset of die-cast pump impeller images.
- Implementing and evaluating five pre-trained DL models (AlexNet, EfficientNet, DenseNet, WideResNet, SqueezeNet).
- Designing, implementing, and evaluating a custom CNN architecture.
- Comparing the performance of these models using standard classification metrics.
- Conducting an ablation study to understand hyperparameter effects on the custom model.
- Comparing the achieved results against existing methods reported in the literature.
6. Key Results:
Key Results:
- The proposed custom CNN model achieved the highest performance across all metrics, with an accuracy of 98.08%, precision of 98%, recall of 98%, and an F1 score of 98% (Table 3).
- Among the pre-trained models evaluated using transfer learning, SqueezeNet performed best with an accuracy of 97.70% and an F1 score of 98% (Table 3).
- Performance of other pre-trained models varied: AlexNet (95% accuracy), EfficientNet (91% accuracy), WideResNet (69% accuracy), and DenseNet (61% accuracy) (Table 3).
- The ablation study on the custom CNN (Table 4) identified the optimal parameters: Adam optimizer, learning rate of 0.0001, and 40 epochs, resulting in the peak accuracy of 98.08% and the lowest loss of 13.69%. The SGD optimizer achieved a maximum accuracy of 97%.
- The confusion matrix for the custom CNN (Figure 10) indicated high overall accuracy, correctly classifying 153 defective and 103 non-defective instances in the test set, with only 4 false negatives and 1 false positive.
- The ROC-AUC curve for the custom CNN (Figure 11) showed an Area Under the Curve (AUC) of 0.99 for both defect and no-defect classes, indicating excellent discriminative ability.
- Comparison with existing work (Table 5) demonstrated that the proposed custom CNN model's accuracy (98.08%) surpassed previously reported machine learning (e.g., RBF-SVM 97.09%) and deep learning methods (e.g., YOLOv5m 95.9%, VGG16Inception-V3 95.29%) for casting defect classification tasks cited in the paper.
Figure Name List:
- Figure 1. Systematic workflow to analyze datasets, preprocessing, selecting models, and evaluating them to improve die-casting part classification systems.
- Figure 2. Sample images of casting products from the quality inspection dataset.
- Figure 3. Accuracy and Loss over Epochs for the Alexnet Model during Training and Validation.
- Figure 4. Accuracy and Loss over Epochs for the EfficientNet Model during Training and Validation.
- Figure 5. Accuracy and Loss over Epochs for the DenseNet Model during Training and Validation.
- Figure 6. Accuracy and Loss over Epochs for the WideResNet Model during Training and Validation.
- Figure 7. Accuracy and Loss over Epochs for the SqueezeNet Model during Training and Validation.
- Figure 8. The architecture of the DL model used for improving die-casting part Classification
- Figure 9. Accuracy and Loss over Epochs for the CNN Model during Training and Validation.
- Figure 10. Confusion Matrix for proposed CNN Model
- Figure 11. ROC-AUC curve of Custom CNN model, showing a perfect AUC of 0.99 for defect and no-defect classification
7. Conclusion:
This research successfully developed and evaluated deep learning models for classifying defects in die-casting components to enhance industrial quality inspection. A custom CNN model was designed and demonstrated superior performance, achieving 98.08% accuracy, outperforming five distinct pre-trained DL models applied via transfer learning. Data augmentation techniques were employed to improve model generalization and robustness. The findings highlight the significant potential of the proposed custom CNN model for accurately classifying casting products, which can help manufacturers reduce faulty products, improve consumer satisfaction, and enhance brand reputation. Future work could explore fusion models combining multiple DL architectures and validate the models using diverse datasets under challenging real-world conditions to further test robustness and reliability.
8. References:
- Chigateri, K. B., Poojary, S., & Padmashali, S., Recognition and classification of casting defects using the CNN algorithm. Materials Today: Proceedings, 92, 121–130,2023. https://doi.org/10.1016/j.matpr.2023.03.818
- Dong, X., Taylor, C. J., & Cootes, T. F.,Defect Detection and Classification by Training a Generic Convolutional Neural Network Encoder. IEEE Transactions on Signal Processing, 68, 6055–6069, 2020. https://doi.org/10.1109/TSP.2020.3031188
- Dongling, Y., Xiaohui, Z., Jianzhen, Z., & Nanxing, W., An enhancement algorithm based on adaptive updating template with Gaussian model for Si3N4 ceramic bearing roller surface defects detection. Ceramics International, 48(5), 6672–6680,2022. https://doi.org/10.1016/j.ceramint.2021.11.217
- Duan, Z., Chen, W., Pei, X., Hou, H., & Zhao, Y. (2023). A multimodal data-driven design of low pressure die casting gating system for aluminum alloy cabin. Journal of Materials Research and Technology, 27, 2723– 2736. https://doi.org/10.1016/j.jmrt.2023.10.076
- Gupta, R., Anand, V., Gupta, S., & Koundal, D.,Deep learning model for defect analysis in industry using casting images. Expert Systems with Applications, 232, 120758,2023. https://doi.org/10.1016/j.eswa.2023.120758
- Habibpour, M., Gharoun, H., Tajally, A., Shamsi, A., Asgharnezhad, H., Khosravi, A., & Nahavandi, S. (2021). An Uncertainty-Aware Deep Learning Framework for Defect Detection in Casting Products (No. arXiv:2107.11643). arXiv. https://doi.org/10.48550/arXiv.2107.11643
- Hu, C., & Wang, Y. (n.d.). An Efficient CNN Model Based on Object-level Attention Mechanism for Casting Defects Detection on Radiography Images. IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS.
- Huang, G., Liu, Z., van der Maaten, L., & Weinberger, K. Q., Densely Connected Convolutional Networks. 4700– 4708,2017. https://openaccess.thecvf.com/content_cvpr_2017/html/Huang_Densely_Connected_Convolutional_CVPR _2017_paper.html
- Iandola, F. N., Han, S., Moskewicz, M. W., Ashraf, K., Dally, W. J., & Keutzer, K. (2016). SqueezeNet: AlexNet- level accuracy with 50x fewer parameters and <0.5MB model size (No. arXiv:1602.07360). arXiv. https://doi.org/10.48550/arXiv.1602.07360
- Ireri, D., Belal, E., Okinda, C., Makange, N., & Ji, C., A computer vision system for defect discrimination and grading in tomatoes using machine learning and image processing. Artificial Intelligence in Agriculture, 2, 28–37,2019. https://doi.org/10.1016/j.aiia.2019.06.001
- Islam, M. T., Rahim, N., Anwar, S., Saqib, M., Bakshi, S., & Muhammad, K. „HazeSpace2M: A Dataset for Haze Aware Single Image Dehazing. Proceedings of the 32nd ACM International Conference on Multimedia, 9155–9164,2024. https://doi.org/10.1145/3664647.3681382
- Jiang, L., Wang, Y., Tang, Z., Miao, Y., & Chen, S., Casting defect detection in X-ray images using convolutional neural networks and attention-guided data augmentation. Measurement, 170, 108736,2021. https://doi.org/10.1016/j.measurement.2020.108736
- Krizhevsky, A., Sutskever, I., & Hinton, G. E. (2017). ImageNet classification with deep convolutional neural networks. Commun. ACM, 60(6), 84–90. https://doi.org/10.1145/3065386
- Lal, R., Bolla, B. K., & Sabeesh, E. (2023). Efficient Neural Net Approaches in Metal Casting Defect Detection. Procedia Computer Science, 218, 1958–1967. https://doi.org/10.1016/j.procs.2023.01.172
- Liqun, W., Jiansheng, W., & Dingjin, W. (2020). Research on Vehicle Parts Defect Detection Based on Deep Learning. Journal of Physics: Conference Series, 1437(1), 012004. https://doi.org/10.1088/1742- 6596/1437/1/012004
- Mery, D., Aluminum Casting Inspection using Deep Object Detection Methods and Simulated Ellipsoidal Defects. Machine Vision and Applications, 32(3), 72,2021. https://doi.org/10.1007/s00138-021-01195-5
- Oh, S., Cha, J., Kim, D., & Jeong, J. (2020). Quality Inspection of Casting Product Using CAE and CNN. 2020 4th International Conference on Imaging, Signal Processing and Communications (ICISPC), 34–38. https://doi.org/10.1109/ICISPC51671.2020.00014
- Parlak, İ. E., & Emel, E.,Deep learning-based detection of aluminum casting defects and their types. Engineering Applications of Artificial Intelligence, 118, 105636,2023. https://doi.org/10.1016/j.engappai.2022.105636
- Pilot Technocast. (n.d.). Pilot Technocast | Precision Core Casting Solutions. Retrieved December 1, 2024, from https://pilottechnocast.com/
- Pranav, G., Sonam, T., & Sree Sharmila, T. (2023). Defect Detection with less training samples using Deep Neural Networks. 2023 2nd International Conference on Smart Technologies and Systems for Next Generation Computing (ICSTSN), 1–4. https://doi.org/10.1109/ICSTSN57873.2023.10151506
- Sahoo, S. K., Mahesh Sharma, M., & Choudhury, B. B. (2019). A Dynamic Bottle Inspection Structure. In H. S. Behera, J. Nayak, B. Naik, & A. Abraham (Eds.), Computational Intelligence in Data Mining (pp. 873– 884). Springer. https://doi.org/10.1007/978-981-10-8055-5_77
- Tan, M., & Le, Q. ,EfficientNet: Rethinking Model Scaling for Convolutional Neural Networks. Proceedings of the 36th International Conference on Machine Learning, 6105–6114,2019. https://proceedings.mlr.press/v97/tan19a.html
- Wang, P., & Jing, P., Deep learning-based methods for detecting defects in cast iron parts and surfaces. IET Image Processing, 18(1), 47–58,2024. https://doi.org/10.1049/ipr2.12932
- Yousef, N., & Sata, A., Innovative Inspection Device for Investment Casting Foundries. International Journal of Metalcasting, 17(4), 2663–2673,2023. https://doi.org/10.1007/s40962-023-01051-4
- Zagoruyko, S., & Komodakis, N. (2017). Wide Residual Networks (No. arXiv:1605.07146). arXiv. https://doi.org/10.48550/arXiv.1605.07146
- Zhao, Z., & Wu, T.,Casting Defect Detection and Classification of Convolutional Neural Network Based on Recursive Attention Model. Scientific Programming, 2022, 1–11,2022. https://doi.org/10.1155/2022/4385565
9. Copyright:
- This material is a paper by "Al Sani, Khalilur Rahman, Md Nuruzzaman, and Md Mahfuzur Rahman". Based on "Improving Die-Casting Part Classification using Transfer Learning with Deep Convolutional Neural Networks".
- Source of the paper: https://doi.org/10.46254/BA07.20240233
This material is summarized based on the above paper, and unauthorized use for commercial purposes is prohibited.
Copyright © 2025 CASTMAN. All rights reserved.