Abstract
Nondestructive testing (NDT) plays a vital role in the production and quality control of the casting process. Due to the complexity of inspection procedures and the extensive scale of mass production, it becomes imperative to develop fast and precise automatic detection methods. This paper introduces a deep learning-based approach for detecting defects in X-ray images of aluminum castings. Firstly, we introduce the Gain-Adaptive Multi-Scale Retinex (GAMSR) algorithm, which is designed to enhance the low-contrast and noisy X-ray raw data. To address the problem of minor blowhole defects being overlooked during detections, we combine the Feature Pyramid Network (FPN) with the Convolutional Block Attention Module (CBAM) to extract high-level semantic information from the X-ray images. It can also promote the feature extraction network to focus more on the casting defect features. Furthermore, we employ Weighted Region of Interest pooling (W-RoI pooling) in place of RoIAlign. This strategy eliminates area misalignment and significantly enhances the precision of defect identification. Experiment results demonstrate that the proposed approaches can improve the performance of defect detection for aluminum casting DR images, with the accuracy increasing by 20.08%.
Similar content being viewed by others
Data Availability
The data that support the findings of this study are available upon reasonable request from the authors.
References
Riaz, F., Kamal, K., Zafar, T., Qayyum, R.: An inspection approach for casting defects detection using image segmentation. In: 2017 International Conference on Mechanical, System and Control Engineering (ICMSC) (2017). https://doi.org/10.1109/icmsc.2017.7959451
Ingle, V., Sorte, M.: Defects, root causes in casting process and their remedies: review. Int. J. Eng. Res. Appl. 07, 47–54 (2017). https://doi.org/10.9790/9622-0703034754
Fiorese, E., Llo, F.B., Timelli, G., et al.: New classification of defects and imperfections for aluminum alloy castings. Int. J. Metalcast. 9(1), 55–66 (2015). https://doi.org/10.1007/bf03355602
Dwivedi, S.K., Vishwakarma, M., Soni, P.A.: Advances and researches on non destructive testing: a review. Mater. Today: Proc. 5(2), 3690–3698 (2018). https://doi.org/10.1016/j.matpr.2017.11.620
Strecker, H.: A local feature method for the detection of flaws in automated x-ray inspection of castings. Signal Process. 5(5), 423–431 (1983). https://doi.org/10.1016/0165-1684(83)90005-1
Rebuffel, V., Sood, S., Blakeley, B.: Defect detection method in digital radiography for porosity in magnesium castings. Materials Evaluation, ECNDT (2006)
Zhao, X., Liang, J., He, Z., et al.: Blowhole detection based on bidirectional enhancement and omnidirectional analysis for X-ray inspection of castings. Math. Probl. Eng. (2019). https://doi.org/10.1155/2019/2468505
Mery, D.: Automated detection in complex objects using a tracking algorithm in multiple X-ray views. CVPR 2011 Workshops (2011). https://doi.org/10.1109/cvprw.2011.5981715
Mery, D., Filbert, D.: Automated flaw detection in aluminum castings based on the tracking of potential defects in a radioscopic image sequence. IEEE Trans. Robot. Autom. 18(6), 890–901 (2002). https://doi.org/10.1109/tra.2002.805646
Zou, Y., Du, D., Chang, B., et al.: Automatic weld defect detection method based on Kalman filtering for real-time radiographic inspection of spiral pipe. NDT E Int. 72, 1–9 (2015). https://doi.org/10.1016/j.ndteint.2015.01.002
Lecomte, G., Kaftandjian, V., Cendre, E., et al.: A robust segmentation approach based on analysis of features for defect detection in X-ray images of aluminium castings. Insight 49(10), 572–577 (2007). https://doi.org/10.1784/insi.2007.49.10.572
Tang, Y., Zhang, X., Li, X., et al.: Application of a new image segmentation method to detection of defects in castings. Int. J. Adv. Manuf. Technol. 43(5–6), 431–439 (2008). https://doi.org/10.1007/s00170-008-1720-1
Li, W., Li, K., Huang, Y., et al.: A new trend peak algorithm with X-ray image for wheel hubs detection and recognition. In: Computational Intelligence and Intelligent Systems(2016). https://doi.org/10.1007/978-981-10-0356-1_3
Cogranne, R., Retraint, F.: Statistical detection of defects in radiographic images using an adaptive parametric model. Signal Process. 96, 173–189 (2014). https://doi.org/10.1016/j.sigpro.2013.09.016
Zhao, X., He, Z., Zhang, S.: Defect detection of castings in radiography images using a robust statistical feature. J. Opt. Soc. Am. A 31(1), 196 (2013). https://doi.org/10.1364/josaa.31.000196
Fillatre, L., Nikiforov, I., Retraint, F.: ε-Optimal non-Bayesian anomaly detection for parametric tomography. IEEE Trans. Image Process. 17(November (11)), 1985–1999 (2008). https://doi.org/10.1109/TIP.2008.2004431
Bengio, Y.: Learning Deep Architectures for AI. Now Publishers Inc, Hanover (2009)
Krizhevsky, A., Sutskever, I., Hinton, G.E.: ImageNet classification with deep convolutional neural networks. Commun. ACM 60(6), 84–90 (2017). https://doi.org/10.1145/3065386
Girshick, R., Donahue, J., Darrell, T., et al.: Rich feature hierarchies for accurate object detection and semantic segmentation. IEEE Conf. Comput. Vis. Pattern Recognit. 2014, 580–587 (2014). https://doi.org/10.1109/cvpr.2014.81
Ren, S., He, K., Girshick, R., et al.: Faster R-CNN: towards real-time object detection with region proposal networks. IEEE Trans. Pattern Anal. Mach. Intell. 39(6), 1137–1149 (2017). https://doi.org/10.1109/tpami.2016.2577031
Liu, W., Anguelov, D., Erhan, D., et al.: SSD: single shot multibox detector. Lecture Notes in Computer Science, pp. 21–37 (2016). https://doi.org/10.1007/978-3-319-46448-0_2
Redmon, J., Divvala, S., Girshick, R., et al.: You only look once: unified, real-time object detection. In: 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016). https://doi.org/10.1109/cvpr.2016.91
Jiang, L., Wang, Y., Tang, Z., et al.: Casting defect detection in X-ray images using convolutional neural networks and attention-guided data augmentation. Measurement (2021). https://doi.org/10.1016/j.measurement.2020.108736
Hou, W., Wei, Y., Jin, Y., et al.: Deep features based on a DCNN model for classifying imbalanced weld flaw types. Measurement 131, 482–489 (2019). https://doi.org/10.1016/j.measurement.2018.09.011
Wang, S., Xia, X., Ye, L., et al.: Automatic detection and classification of steel surface defect using deep convolutional neural networks. Metals 11(3), 388 (2021). https://doi.org/10.3390/met11030388
Mery, D.: Aluminum casting inspection using deep learning: a method based on convolutional neural networks. J. Nondestruct. Eval. (2020). https://doi.org/10.1007/s10921-020-0655-9
Ferguson, M., Ak, R., Lee, Y.T., et al.: Automatic localization of casting defects with convolutional neural networks. In: 2017 IEEE International Conference on Big Data (Big Data) (2017). https://doi.org/10.1109/bigdata.2017.8258115
Ferguson, M., Ak, R., Lee, Y.T., et al.: Detection and segmentation of manufacturing defects with convolutional neural networks and transfer learning. Smart Sustain. Manuf. Syst. 2(1), 20180033 (2018). https://doi.org/10.1520/ssms20180033
Uijlings, J.R.R., Van De Sande, K.E.A., Gevers, T., et al.: Selective search for object recognition. Int. J. Comput. Vis. 104(2), 154–171 (2013). https://doi.org/10.1007/s11263-013-0620-5
He, K., Zhang, X., Ren, S., et al.: Deep residual learning for image recognition. In: 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR) (2016). https://doi.org/10.1109/cvpr.2016.90
Russakovsky, O., Deng, J., Su, H., et al.: ImageNet large scale visual recognition challenge. Int. J. Comput. Vis. 115(3), 211–252 (2015). https://doi.org/10.1007/s11263-015-0816-y
Xu, X., Lei, Y., Yang, F.: Railway subgrade defect automatic recognition method based on improved Faster R-CNN. Sci. Program. (2018). https://doi.org/10.1155/2018/4832972
Bai, T., Yang, J., Xu, G., et al.: An optimized railway fastener detection method based on modified Faster R-CNN. Measurement 182, 109742 (2021). https://doi.org/10.1016/j.measurement.2021.109742
Lei, X., Sui, Z.: Intelligent fault detection of high voltage line based on the Faster R-CNN. Measurement 138, 379–385 (2019). https://doi.org/10.1016/j.measurement.2019.01.072
Liao, S., Piao, Y., Li, B.: Low illumination color image enhancement based on improved Retinex. LIDAR imaging detection and target recognition 2017. SPIE 10605, 811–819 (2017)
Lin, T.Y., Dollár, P., Girshick, R., et al.: Feature pyramid networks for object detection. In: 2017 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), Honolulu, HI, USA, pp. 936–944 (2017). https://doi.org/10.1109/cvpr.2017.106
He, K., Gkioxari, G., Dollár, P., et al.: Mask R-cnn. In: Proceedings of the IEEE International Conference on Computer Vision, Venice, Italy, pp. 2980–2988 (2017). https://doi.org/10.1109/ICCV.2017.322
Tzutalin. LabelImg. Git code. https://github.com/tzutalin/labelImg (2015)
Agaian, S.S., Silver, B., Panetta, K.A.: Transform coefficient histogram-based image enhancement algorithms using contrast entropy. IEEE Trans. Image Process. 16(3), 741–758 (2007)
Raju, G., Nair, M.S.: A fast and efficient color image enhancement method based on fuzzy-logic and histogram. AEU Int. J. Electron. Commun. 68(3), 237–243 (2014)
Guo, X., Li, Y., Ling, H.: LIME: low-light image enhancement via illumination map estimation. IEEE Trans. Image Process. 26(2), 982–993 (2016). https://doi.org/10.1109/TIP.2016.2639450
Lin, T.Y., Goyal, P., Girshick, R., et al.: Focal loss for dense object detection. IEEE Trans. Pattern Anal. Mach. Intell. (2020). https://doi.org/10.1109/tpami.2018.2858826
Acknowledgements
Not applicable.
Funding
This work was supported by the [National Natural Science Foundation of China (NSFC)] (Grant number [52227802]), [National Key R&D Program of China] (Grant number [2022YFA1604000]), and open research fund of State Key Laboratory of Mesoscience and Engineering (Grant number [MESO-23-D02]).
Author information
Authors and Affiliations
Contributions
CH: conceptualization, methodology, validation, software, writing—original draft. YW: validation, writing—review & editing. HZ: resources. FM: funding. DT: writing—review & editing. MY: resources, supervision, writing—review & editing.
Corresponding author
Ethics declarations
Competing Interests
All authors of this article declare they have no financial interests.
Consent for Publication
All authors of this article agree to publish this article.
Additional information
Publisher's Note
Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.
Rights and permissions
Springer Nature or its licensor (e.g. a society or other partner) holds exclusive rights to this article under a publishing agreement with the author(s) or other rightsholder(s); author self-archiving of the accepted manuscript version of this article is solely governed by the terms of such publishing agreement and applicable law.
About this article
Cite this article
Hai, C., Wu, Y., Zhang, H. et al. Approach for Automatic Defect Detection in Aluminum Casting X-Ray Images Using Deep Learning and Gain-Adaptive Multi-Scale Retinex. J Nondestruct Eval 43, 29 (2024). https://doi.org/10.1007/s10921-023-01033-w
Received:
Accepted:
Published:
DOI: https://doi.org/10.1007/s10921-023-01033-w