Skip to main content
Log in

Target Detection by Target Simulation in X-ray Testing

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

Abstract

In X-ray testing, the aim is to inspect those inner parts of an object that cannot be detected by the naked eye. Typical applications are the detection of targets like blow holes in casting inspection, cracks in welding inspection, and prohibited objects in baggage inspection. A straightforward solution today is the use of object detection methods based on deep learning models. Nevertheless, this strategy is not effective when the number of available X-ray images for training is low. Unfortunately, the databases in X-ray testing are rather limited. To overcome this problem, we propose a strategy for deep learning training that is performed with a low number of target-free X-ray images with superimposition of many simulated targets. The simulation is based on the Beer–Lambert law that allows to superimpose different layers. Using this method it is very simple to generate training data. The proposed method was used to train known object detection models (e.g. YOLO, RetinaNet, EfficientDet and SSD) in casting inspection, welding inspection and baggage inspection. The learned models were tested on real X-ray images. In our experiments, we show that the proposed solution is simple (the implementation of the training can be done with a few lines of code using open source libraries), effective (average precision was 0.91, 0.60 and 0.88 for casting, welding and baggage inspection respectively), and fast (training was done in a couple of hours, and testing can be performed in 11ms per image). We believe that this strategy makes a contribution to the implementation of practical solutions to the problem of target detection in X-ray testing.

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

Similar content being viewed by others

Notes

  1. YOLOv5 was released in June 2020. The GitHub repository is available on https://github.com/ultralytics/yolov5.

  2. URL of the repository will be available after publication.

  3. See http://domingomery.ing.uc.cl/material.

  4. Simulators based on GAN have been proposed (see for example [16]) however, we don’t use them in the experiments, because the superimposition of ellipsoidal defects achieved higher performance.

  5. In this case, \(\mu _1 x_1\) represents \(\sum _j \mu _j x_j\) including all cluttered objects j that lie on the X-ray beam [47].

  6. Gaussian filtering is used to blur the sticks. This blurriness does not depend on the sharpness of the X-ray image. The Gaussian filtering eliminates the high frequencies of the perfect lines of the sticks (see image \(\mathbf{Z}\) in Fig. 5). Thus, the tiny lines are replaced by thicker and blurred regions (see image \(\mathbf{d}\) in Fig. 5), whose appearance is similar to the real defects. Parameter \(\sigma \) of the Gaussian mask is set manually according to the thickness of the defect we want to simulate. For instance, for small defects \(\sigma \) can be a low number (e.g. 2.9 pixels as shown in third row of Fig. 5). On the other, for thicker defects, v can be larger (e.g., 6.7 pixels as shown in fourth row of Fig. 5).

  7. \(\mathbb {GDX}\)ray is a public dataset for X-ray testing with around 20.000 X-ray images that can be used free of charge, for research and educational purposes only.

  8. For example, we obtained \(AP=0.53\) for RetinaNet and and \(AP=0.46\) for EfficientDet at \(\alpha = 0.33\) using ellipsoidal defects.

  9. Specifically, we conducted Experiment ‘A’ and Testing Subset 1 of [25].

References

  1. Mery, D., Pieringer, C.: Computer Vision for X-ray Testing, 2nd edn. Springer, Basel (2021)

    Book  Google Scholar 

  2. Duan, J., Liu, X.: Online monitoring of green pellet size distribution in haze-degraded images based on vgg16-lu-net and haze judgment. IEEE Trans. Instrum. Meas. 70, 1–16 (2021)

    Google Scholar 

  3. Zhang, D., Gao, S., Yu, L., Kang, G., Wei, X., Zhan, D.: Defgan: Defect detection gans with latent space pitting for high-speed railway insulator. IEEE Trans. Instrum. Meas. 70, 1–10 (2020)

    Google Scholar 

  4. Yang, J., Fu, G., Zhu, W., Cao, Y., Cao, Y., Yang, M.Y.: A deep learning-based surface defect inspection system using multiscale and channel-compressed features. IEEE Trans. Instrum. Meas. 69(10), 8032–8042 (2020)

    Article  Google Scholar 

  5. Gong, X., Su, H., Xu, D., Zhang, J., Zhang, L., Zhang, Z.: Visual defect inspection for deep-aperture components with coarse-to-fine contour extraction. IEEE Trans. Instrum. Meas. 69(6), 3262–3274 (2020)

    Article  Google Scholar 

  6. Hou, W., Tao, X., Xu, D.: Combining prior knowledge with CNN for weak scratch inspection of optical components. IEEE Trans. Instrum. Meas. 70, 1–11 (2020)

    Google Scholar 

  7. 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. Vis. 128(2), 261–318 (2020)

    Article  Google Scholar 

  8. Lu, X., Ji, J., Xing, Z., Miao, Q.: Attention and feature fusion SSD for remote sensing object detection. IEEE Trans. Instrum. Meas. 70, 1–9 (2021)

    Article  Google Scholar 

  9. Xi, D., Qin, Y., Luo, J., Pu, H., Wang, Z.: Multipath fusion mask R-CNN with double attention and its application into gear pitting detection. IEEE Trans. Instrum. Meas. 70, 1–11 (2021)

    Article  Google Scholar 

  10. Jin, C., Kong, X., Chang, J., Cheng, H., Liu, X.: Internal crack detection of castings: A study based on relief algorithm and Adaboost-SVM. Int. J. Adv. Manuf. Technol. 108, 1–10 (2020)

    Article  Google Scholar 

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

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

    Article  Google Scholar 

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

    Article  Google Scholar 

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

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

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

    Article  Google Scholar 

  17. Mery, D.: Aluminum casting inspection using deep object detection methods and simulated ellipsoidal defects. Mach. Vis. Appl. 32(3), 1–16 (2021)

    Article  Google Scholar 

  18. Shao, J., Du, D., Chang, B., Shi, H.: Automatic weld defect detection based on potential defect tracking in real-time radiographic image sequence. NDT E Int. 46, 14–21 (2012)

    Article  Google Scholar 

  19. Baniukiewicz, P.: Automated defect recognition and identification in digital radiography. J. Nondestruct. Eval. 33(3), 327–334 (2014)

    Article  Google Scholar 

  20. Hou, W., Wei, Y., Guo, J., Jin, Y., et al.: Automatic detection of welding defects using deep neural network. J. Phys. 933, 012006 (2018)

    Google Scholar 

  21. Pan, H., Pang, Z., Wang, Y., Wang, Y., Chen, L.: A new image recognition and classification method combining transfer learning algorithm and mobilenet model for welding defects. IEEE Access (2020)

  22. Suyama, F.M., Delgado, M.R., da Silva, R.D., Centeno, T.M.: Deep neural networks based approach for welded joint detection of oil pipelines in radiographic images with double wall double image exposure. NDT E Int. 105, 46–55 (2019)

    Article  Google Scholar 

  23. Mery, D., Saavedra, D., Prasad, M.: X-ray baggage inspection with computer vision: A survey. IEEE Access 8, 145–620 (2020)

    Article  Google Scholar 

  24. Mery, D., Svec, E., Arias, M., Riffo, V., Saavedra, J.M., Banerjee, S.: Modern computer vision techniques for X-ray testing in baggage inspection. IEEE Trans. Syst. Man Cybern. 47(4), 682–692 (2016)

    Article  Google Scholar 

  25. Saavedra, D., Banerjee, S., Mery, D.: Detection of threat objects in baggage inspection with X-ray images using deep learning. Neural Comput. Appl. 18, 1–17 (2020)

    Google Scholar 

  26. : Akçay, S., Kundegorski, M. E., Devereux, M., Breckon, T. P.: Transfer learning using convolutional neural networks for object classification within X-ray baggage security imagery. In Image Processing (ICIP), 2016 IEEE International Conference on. IEEE, 2016, pp. 1057–1061

  27. Akcay, S., Kundegorski, M.E., Willcocks, C.G., Breckon, T.P.: Using deep convolutional neural network architectures for object classification and detection within X-ray baggage security imagery. IEEE Trans. Inf. Forensic Secur. 13(9), 2203–2215 (2018)

    Article  Google Scholar 

  28. Akcay, S., Breckon, T. P.: An evaluation of region based object detection strategies within X-ray baggage security imagery. In: Image Processing (ICIP), 2017 IEEE International Conference on. IEEE, 2017, pp. 1337–1341

  29. Miao, C., Xie, L., Wan, F., Su, C., Liu, H., Jiao, J., Ye, Q.: Sixray: A large-scale security inspection X-ray benchmark for prohibited item discovery in overlapping images. In: Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pp. 2119–2128 (2019)

  30. Aydin, I., Karakose, M., Erhan, A.: A new approach for baggage inspection by using deep convolutional neural networks. In 2018 International Conference on Artificial Intelligence and Data Processing (IDAP). IEEE, pp. 1–6 (2018)

  31. Bhowmik, N., Wang, Q., Gaus, Y. F. A., Szarek, M., Breckon, T. P.: The good, the bad and the ugly: Evaluating convolutional neural networks for prohibited item detection using real and synthetically composited X-ray imagery. arXiv:1909.11508 (2019)

  32. Goodfellow, I. J., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., Bengio, Y.: Generative Adversarial Networks. arXiv:1406.2661 (2014)

  33. Akcay, S., Atapour-Abarghouei, A., Breckon, T. P.: Ganomaly: Semi-supervised anomaly detection via adversarial training. arXiv:1805.06725 (2018)

  34. Sangwan, D., Jain, D. K.: An evaluation of deep learning based object detection strategies for threat object detection in baggage security imagery. Pattern Recogn. Lett. (2019)

  35. Goodfellow, I., Bengio, Y., Courville, A.: Deep Learning. MIT Press, Cambridge (2016)

    MATH  Google Scholar 

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

    Article  Google Scholar 

  37. Redmon, J., Divvala, S. K., Girshick, R. B., Farhadi, A.: You only look once: Unified, real-time object detection. CoRR In: Proceedings of the IEEE conference on computer vision and pattern recognition. (2015)

  38. Redmon, J., Farhadi, A.: YOLO9000: Better, faster, stronger. CoRR, In: Proceedings of the IEEE conference on computer vision and pattern recognition (2016)

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

  40. Bochkovskiy, A., Wang, C.-Y., Liao, H.-Y. M.: YOLOv4: Optimal speed and accuracy of object detection (2020)

  41. G. J. et al.: ultralytics/yolov5, 2020 (released in June 2020), https://github.com/ultralytics/yolov5

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

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

  44. Liu, W., Anguelov, D., Erhan, D., Szegedy, C., Reed, S. E., Fu, C., Berg, A. C.: SSD: single shot multibox detector. CoRR, vol. arXiv:1512.02325 (2015)

  45. 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). Punta Arenas: IEEE Computer Society Press, 6–8 Nov. 2001, pp. 193–202

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

  47. Mery, D., Katsaggelos, A.: A logarithmic X-ray imaging model for baggage inspection: Simulation and object detection. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition Workshops, pp. 57–65 (2017)

  48. Als-Neielsen, J., McMorrow, D.: Elements of Modern X-ray Physics, 2nd edn. Wiley, Hoboken (2011)

    Book  Google Scholar 

  49. 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. Nondestruct. Eval. 34(4), 1–12 (2015)

    Article  Google Scholar 

  50. Szeliski, R.: Computer Vision: Algorithms and Applications, 2nd edn. Springer, New York (2020)

    MATH  Google Scholar 

  51. Gonzalez, R., Woods, R.: Digital Image Processing, 3rd edn. Prentice Hall, Pearson (2008)

    Google Scholar 

Download references

Acknowledgements

This work was supported in part by Fondecyt Grant, No. 1191131 from National Science Foundation of Chile.

Author information

Authors and Affiliations

Authors

Corresponding author

Correspondence to Domingo Mery.

Additional information

Publisher's Note

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

Rights and permissions

Reprints and permissions

About this article

Check for updates. Verify currency and authenticity via CrossMark

Cite this article

Mery, D., Kaminetzky, A., Golborne, L. et al. Target Detection by Target Simulation in X-ray Testing. J Nondestruct Eval 41, 21 (2022). https://doi.org/10.1007/s10921-022-00851-8

Download citation

  • Received:

  • Accepted:

  • Published:

  • DOI: https://doi.org/10.1007/s10921-022-00851-8

Keywords

Navigation