Skip to main content
Log in

Approach for Automatic Defect Detection in Aluminum Casting X-Ray Images Using Deep Learning and Gain-Adaptive Multi-Scale Retinex

  • Published:
Journal of Nondestructive Evaluation Aims and scope Submit manuscript

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%.

This is a preview of subscription content, log in via an institution to check access.

Access this article

Price excludes VAT (USA)
Tax calculation will be finalised during checkout.

Instant access to the full article PDF.

Fig. 1
Fig. 2
Fig. 3
Fig. 4
Fig. 5
Fig. 6
Fig. 7
Fig. 8
Fig. 9
Fig. 10
Fig. 11
Fig. 12
Fig. 13
Fig. 14
Fig. 15
Fig. 16
Fig. 17

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

  1. 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

  2. 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

    Article  Google Scholar 

  3. 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

    Article  Google Scholar 

  4. 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

    Article  Google Scholar 

  5. 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

    Article  Google Scholar 

  6. Rebuffel, V., Sood, S., Blakeley, B.: Defect detection method in digital radiography for porosity in magnesium castings. Materials Evaluation, ECNDT (2006)

  7. 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

    Article  Google Scholar 

  8. 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

  9. 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

    Article  Google Scholar 

  10. 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

    Article  Google Scholar 

  11. 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

    Article  Google Scholar 

  12. 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

    Article  Google Scholar 

  13. 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

  14. 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

    Article  Google Scholar 

  15. 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

    Article  ADS  Google Scholar 

  16. 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

    Article  ADS  MathSciNet  PubMed  Google Scholar 

  17. Bengio, Y.: Learning Deep Architectures for AI. Now Publishers Inc, Hanover (2009)

    Book  Google Scholar 

  18. 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

    Article  Google Scholar 

  19. 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

    Article  Google Scholar 

  20. 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

    Article  PubMed  Google Scholar 

  21. 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

  22. 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

  23. 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

    Article  Google Scholar 

  24. 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

    Article  ADS  Google Scholar 

  25. 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

    Article  CAS  Google Scholar 

  26. 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

    Article  Google Scholar 

  27. 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

  28. 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

    Article  Google Scholar 

  29. 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

    Article  Google Scholar 

  30. 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

  31. 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

    Article  MathSciNet  Google Scholar 

  32. 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

    Article  Google Scholar 

  33. 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

    Article  Google Scholar 

  34. 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

    Article  ADS  Google Scholar 

  35. 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)

    Google Scholar 

  36. 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

  37. 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

  38. Tzutalin. LabelImg. Git code. https://github.com/tzutalin/labelImg (2015)

  39. 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)

    Article  ADS  MathSciNet  PubMed  Google Scholar 

  40. 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)

    Article  Google Scholar 

  41. 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

    Article  ADS  MathSciNet  Google Scholar 

  42. 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

    Article  PubMed  Google Scholar 

Download references

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

Authors

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

Correspondence to Min Yang.

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.

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

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

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10921-023-01033-w

Keywords

Navigation