Skip to main content
Log in

Aluminum Casting Inspection using Deep Object Detection Methods and Simulated Ellipsoidal Defects

  • Original Paper
  • Published:
Machine Vision and Applications Aims and scope Submit manuscript

Abstract

In the automotive industry, light-alloy aluminum castings are an important element for determining roadworthiness. X-ray testing with computer vision is used during automated inspections of aluminum castings to identify defects inside of the test object that are not visible to the naked eye. In this article, we evaluate eight state-of-the-art deep object detection methods (based on YOLO, RetinaNet, and EfficientDet) that are used to detect aluminum casting defects. We propose a training strategy that uses a low number of defect-free X-ray images of castings with superimposition of simulated defects (avoiding manual annotations). The proposed solution is simple, effective, and fast. In our experiments, the YOLOv5s object detector was trained in just 2.5 h, and the performance achieved on the testing dataset (with only real defects) was very high (average precision was 0.90 and the \(F_1\) factor was 0.91). This method can process 90 X-ray images per second, i.e. ,this solution can be used to help human operators conduct real-time inspections. The code and datasets used in this paper have been uploaded to a public repository for future studies. It is clear that deep learning-based methods will be used more by the aluminum castings industry in the coming years due to their high level of effectiveness. This paper offers an academic contribution to such efforts.

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

Similar content being viewed by others

Notes

  1. https://colab.research.google.com.

  2. https://github.com/domingomery/defect-detection\(\rightarrow \) will be public after publication.

  3. YOLOv5 was released in June 2020. See https://github.com/ultralytics/yolov5.

  4. In our experiments, \(K=1\) because there is only one class to detect: ‘defects.’

  5. The COCO dataset is a well-known object recognition dataset that contains complex images of common objects (in a natural context) [30].

  6. In the simulation, we chose to use ellipsoidal models instead of GAN models because [37] reports that the former perform better.

  7. \({\mathbb {GDX}}\text {ray}\) can be used free of charge for research and educational purposes only.

  8. https://github.com/ultralytics/yolov3.

  9. https://github.com/fizyr/keras-retinanet.

  10. https://blog.roboflow.com/training-efficientdet-object-detection-model-with-a-custom-dataset/.

  11. In our experiment series C0001 has only 72 X-ray images.

References

  1. Bandara, A., Kan, K., Morii, H., Koike, A., Aoki, T.: X-ray computed tomography to investigate industrial cast Al-alloys. Prod. Eng. Res. Devel. 14(2), 147–156 (2020)

    Article  Google Scholar 

  2. Bengio, Y., Courville, A., Vincent, P.: Representation learning: a review and new perspectives. IEEE Trans. Pattern Anal. Mach. Intell. 35(8), 1798–1828 (2013)

    Article  Google Scholar 

  3. Bochkovskiy, A., Wang C-Y., Liao, H-Y.M.: Yolov4: Optimal speed and accuracy of object detection. arXiv:2004.10934 (2020)

  4. Boerner, H., Strecker, H.: Automated X-ray inspection of aluminum casting. IEEE Trans. Pattern Anal. Mach. Intell. 10(1), 79–91 (1988)

    Article  Google Scholar 

  5. Carrasco, M., Mery, D.: Automatic multiple view inspection using geometrical tracking and feature analysis in aluminum wheels. Mach. Vis. Appl. 22(1), 157–170 (2011)

    Article  Google Scholar 

  6. Cogranne, R., Retraint, F.: Statistical detection of defects in radiographic images using an adaptive parametric model. Signal Process. 96, 173–189 (2014)

    Article  Google Scholar 

  7. Deng, J., Guo, J., Xue, N., Zafeiriou, S.: Arcface: additive angular margin loss for deep face recognition. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 4690–4699 (2019)

  8. Du, W., Shen, H., Fu, J., Zhang, G., He, Q.: Approaches for improvement of the X-ray image defect detection of automobile casting aluminum parts based on deep learning. NDT & E Int. 107, 102144 (2019)

    Article  Google Scholar 

  9. Esteva, A., Kuprel, B., Novoa, R.A., Ko, J., Swetter, S.M., Blau, H.M., Thrun, S.: Dermatologist-level classification of skin cancer with deep neural networks. Nature 542(7639), 115–118 (2017)

    Article  Google Scholar 

  10. Ferguson, M., Ak, R., Lee, Y.T.T., Law, K.H.: Automatic localization of casting defects with convolutional neural networks. In: 2017 IEEE International Conference on Big Data, pp. 1726–1735. IEEE (2017)

  11. Ferguson, M.K., Ronay, A., Lee, Y.T.T., Law, K.H.: Detection and segmentation of manufacturing defects with convolutional neural networks and transfer learning. Smart Sustain. Manuf. Syst.2 (2018)

  12. Filbert, D., Klatte, R., Heinrich, W., Purschke, M.: Computer aided inspection of castings. In: IEEE-IAS Annual Meeting, pp. 1087–1095. Atlanta, USA (1987)

  13. Girshick, R.: Fast R-CNN. In: Proceedings of the IEEE International Conference on Computer Vision, pp. 1440–1448 (2015)

  14. Girshick, R., Donahue, J., Darrell, T., Malik, J.: Rich feature hierarchies for accurate object detection and semantic segmentation. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 580–587 (2014)

  15. Hangai, Y., Kuwazuru, O., Yano, T., Utsunomiya, T., Murata, Y., Kitahara, S., Bidhar, S., Yoshikawa, N.: Clustered shrinkage pores in ILL-conditioned aluminum alloy die castings. Mater. Trans. (2010). https://doi.org/10.1520/SSMS20180033

  16. He, K., Zhang, X., Ren, S., Sun, J.: Deep residual learning for image recognition. CoRR arXiv:1512.03385 (2015)

  17. Hernández, S., Sáez, D., Mery, D.: Neuro-fuzzy method for automated defect detection of aluminium castings. Lect. Notes Comput. Sci. 3212, 826–833 (2004)

    Article  Google Scholar 

  18. Hu, C., Wang, Y.: An efficient convolutional neural network model based on object-level attention mechanism for casting defect detection on radiography images. IEEE Trans. Indus. Electron. 67(12), 10922–10930 (2020). https://doi.org/10.1109/TIE.2019.2962437

  19. Jiang, X., Hou, Y., Zhang, D., Feng, X.: Deep learning in face recognition across variations in pose and illumination. In: Deep Learning in Object Detection and Recognition, pp. 59–90. Springer, Singapore (2019). https://link.springer.com/chapter/10.1007/978-981-10-5152-4_3

  20. Jin, C., Kong, X., Chang, J., Cheng, H., Liu, X.: Internal crack detection of castings: a study based on relief algorithm and adaboost-svm. In: The International Journal of Advanced Manufacturing Technology, pp. 1–10 (2020)

  21. Kamalakannan, A., Rajamanickam, G.: Spatial smoothing based segmentation method for internal defect detection in X-ray images of casting components. In: 2017 Trends in Industrial Measurement and Automation (TIMA), pp. 1–6. IEEE (2017)

  22. Krizhevsky, A., Sutskever, I., Hinton, G.E.: ImageNet classification with deep convolutional neural networks. NIPS, pp. 1106–1114 (2012)

  23. LeCun, Y., Bottou, L., Bengio, Y.: Gradient-based learning applied to document recognition. In: Proceedings of the Third International Conference on Research in Air Transportation (1998)

  24. Li, J., Oberdorfer, B., Schumacher, P.: Determining casting defects in thixomolding mg casting part by computed tomography. In: Shape Casting, pp. 99–103. Springer, Cham (2019). https://link.springer.com/chapter/10.1007/978-3-030-06034-3_9

  25. Li, W., Li, K., Huang, Y., Deng, X.: A new trend peak algorithm with X-ray image for wheel hubs detection and recognition. In: International Symposium on Computational Intelligence and Intelligent Systems, pp. 23–31. Springer, Singapore (2015). https://link.springer.com/chapter/10.1007/978-981-10-0356-1_3

  26. Li, X., Tso, S.K., Guan, X.P., Huang, Q.: Improving automatic detection of defects in castings by applying wavelet technique. IEEE Trans. Ind. Electron. 53(6), 1927–1934 (2006)

    Article  Google Scholar 

  27. Lin, J., Yao, Y., Ma, L., Wang, Y.: Detection of a casting defect tracked by deep convolution neural network. Int. J. Adv. Manuf. Technol. 97(1–4), 573–581 (2018)

    Article  Google Scholar 

  28. Lin, T., Goyal, P., Girshick, R.B., He, K., Dollár, P.: Focal loss for dense object detection. CoRR abs/1708.02002 (2017)

  29. Lin, T.Y., Dollár, P., Girshick, R., He, K., Hariharan, B., Belongie, S.: Feature pyramid networks for object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2117–2125 (2017)

  30. Lin, T-Y., Maire, M., Belongie, S., Hays, J., Perona, P., Ramanan, D., Dollár, P., Lawrence Zitnick, C.: Microsoft coco: common objects in context. In: European Conference on Computer Vision, pp. 740–755. Springer, Cham (2014). https://link.springer.com/chapter/10.1007/978-3-319-10602-1_48

  31. Liu, L., Ouyang, W., Wang, X., Fieguth, P., Chen, J., Liu, X., Pietikäinen, M.: Deep learning for generic object detection: a survey. Int. J. Comput. Vision 128(2), 261–318 (2020)

    Article  Google Scholar 

  32. Martz, H.E., Logan, C.M., Schneberk, D.J., Shull, P.J.: X-ray Imaging: Fundamentals, Industrial Techniques and Applications. CRC Press, Boca Raton (2016)

    Book  Google Scholar 

  33. Mery, D.: A new algorithm for flaw simulation in castings by superimposing projections of 3D models onto X-ray images. In: Proceedings of the XXI International Conference of the Chilean Computer Science Society (SCCC-2001), pp. 193–202. IEEE Computer Society Press, Punta Arenas (2001)

  34. Mery, D.: Crossing line profile: a new approach to detecting defects in aluminium castings. In: Proceedings of the Scandinavian Conference on Image Analysis (SCIA 2003), Lecture Notes in Computer Science, vol. 2749, pp. 725–732 (2003)

  35. Mery, D.: Automated radioscopic testing of aluminum die castings. Mater. Eval. 64(2), 135–143 (2006)

    Google Scholar 

  36. Mery, D.: Inspection of complex objects using multiple-X-ray views. IEEE/ASME Trans. Mechatron. 20(1), 338–347 (2015)

    Article  Google Scholar 

  37. Mery, D.: Aluminum casting inspection using deep learning: a method based on convolutional neural networks. J. Nondestr. Eval. 39(1), 12 (2020)

    Article  Google Scholar 

  38. Mery, D., Arteta, C.: Automatic defect recognition in X-ray testing using computer vision. In: 2017 IEEE Winter Conference on Applications of Computer Vision (WACV), pp. 1026–1035. IEEE (2017)

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

    Article  Google Scholar 

  40. Mery, D., Hahn, D., Hitschfeld, N.: Simulation of defects in aluminum castings using cad models of flaws and real X-ray images. Insight 47(10), 618–624 (2005)

    Article  Google Scholar 

  41. Mery, D., Pieringer, C.: Computer Vision for X-ray testing, 2nd edn. Springer, New York (2021)

    Book  Google Scholar 

  42. Mery, D., Riffo, V., Zscherpel, U., Mondragón, G., Lillo, I., Zuccar, I., Lobel, H., Carrasco, M.: GDXray: the database of X-ray images for nondestructive testing. J. Nondestr. Eval. 34(4), 1–12 (2015)

    Article  Google Scholar 

  43. Mery, D., Riffo, V., Zuccar, I., Pieringer, C.: Automated X-ray object recognition using an efficient search algorithm in multiple views. In: Proceedings of the 9th IEEE CVPR workshop on Perception Beyond the Visible Spectrum, Portland (2013)

  44. Nagpal, K., Foote, D., Liu, Y., Chen, P.H.C., Wulczyn, E., Tan, F., Olson, N., Smith, J.L., Mohtashamian, A., Wren, J.H., et al.: Development and validation of a deep learning algorithm for improving gleason scoring of prostate cancer. NPJ Digit. Med. 2(1), 1–10 (2019)

    Article  Google Scholar 

  45. Pieringer, C., Mery, D.: Flaw detection in aluminium die castings using simultaneous combination of multiple views. Insight 52(10), 548–552 (2010)

    Article  Google Scholar 

  46. Pizarro, L., Mery, D., Delpiano, R., Carrasco, M.: Robust automated multiple view inspection. Pattern Anal. Appl. 11(1), 21–32 (2008)

    Article  MathSciNet  Google Scholar 

  47. Ramírez, F., Allende, H.: Detection of flaws in aluminium castings: a comparative study between generative and discriminant approaches. Insight Non Destr. Test. Cond. Monit. 55(7), 366–371 (2013)

    Article  Google Scholar 

  48. Redmon, J., Divvala, S.K., Girshick, R.B., Farhadi, A.: You only look once: Unified, real-time object detection. CoRR arXiv:1506.02640 (2015)

  49. Redmon, J., Farhadi, A.: YOLO9000: better, faster, stronger. CoRR arXiv:1612.08242 (2016)

  50. Redmon, J., Farhadi, A.: Yolov3: An incremental improvement. CoRR arXiv:1804.02767 (2018)

  51. Ren, J., Ren, R., Green, M., Huang, X.: Defect detection from X-ray images using a three-stage deep learning algorithm. In: 2019 IEEE Canadian Conference of Electrical and Computer Engineering (CCECE), pp. 1–4. IEEE (2019)

  52. Ren, S., He, K., Girshick, R., Sun, J.: Faster R-CNN: Towards real-time object detection with region proposal networks. In: Advances in Neural Information Processing Systems, pp. 91–99 (2015)

  53. Saavedra, D., Banerjee, S., Mery, D.: Detection of threat objects in baggage inspection with x-ray images using deep learning. Neural Comput. Appl. (2020). https://doi.org/10.1007/s00521-020-05521-2

  54. Tan, M., Pang, R., Le, Q.V.: EfficientDet: scalable and efficient object detection. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 10781–10790 (2020)

  55. Tang, Y., Zhang, X., Li, X., Guan, X.: Application of a new image segmentation method to detection of defects in castings. Int. J. Adv. Manuf. Technol. 43(5–6), 431–439 (2009)

    Article  Google Scholar 

  56. Tang, Z., Tian, E., Wang, Y., Wang, L., Yang, T.: Non-destructive defect detection in castings by using spatial attention bilinear convolutional neural network. IEEE Trans. Ind. Inf. (2020). https://doi.org/10.1109/TII.2020.2985159

  57. Tremblay, J., Prakash, A., Acuna, D., Brophy, M., Jampani, V., Anil, C., To, T., Cameracci, E., Boochoon, S., Birchfield, S.: Training deep networks with synthetic data: Bridging the reality gap by domain randomization. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 969–977 (2018)

  58. Tripathi, S., Chandra, S., Agrawal, A., Tyagi, A., Rehg, J.M., Chari, V.: Learning to generate synthetic data via compositing. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 461–470 (2019)

  59. Yongwei, Y., Liuqing, D., Cuilan, Z., Jianheng, Z.: Automatic localization method of small casting defect based on deep learning feature. Chin. J. Sci. Instrum. 2016(6), 21 (2016)

    Google Scholar 

  60. Zhang, J., Guo, Z., Jiao, T., Wang, M.: Defect detection of aluminum alloy wheels in radiography images using adaptive threshold and morphological reconstruction. Appl. Sci. 8(12), 2365 (2018)

    Article  Google Scholar 

  61. Zhao, X., He, Z., Zhang, S.: Defect detection of castings in radiography images using a robust statistical feature. JOSA A 31(1), 196–205 (2014)

    Article  Google Scholar 

  62. Zhao, X., He, Z., Zhang, S., Liang, D.: A sparse-representation-based robust inspection system for hidden defects classification in casting components. Neurocomputing 153, 1–10 (2015)

    Article  Google Scholar 

  63. Zhao, Z., Zheng, P., Xu, S., Wu, X.: Object detection with deep learning: a review. IEEE Trans. Neural Netw. Learn. Syst. 30(11), 3212–3232 (2019). https://doi.org/10.1109/TNNLS.2018.2876865

    Article  Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Domingo Mery.

Ethics declarations

Conflict of interest

The author declares that he has no conflict of interest.

Additional information

Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

This work was supported in part by Fondecyt Grant 1191131 from CONICYT–Chile.

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Mery, D. Aluminum Casting Inspection using Deep Object Detection Methods and Simulated Ellipsoidal Defects. Machine Vision and Applications 32, 72 (2021). https://doi.org/10.1007/s00138-021-01195-5

Download citation

  • Received:

  • Revised:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s00138-021-01195-5

Keywords

Navigation