Nguyễn Đức Tài , Lê Việt Phương , Tô Thanh Tuần Nguyễn Hoàng Dũng *

* Tác giả liên hệ (hoangdung@ctu.edu.vn)

Abstract

Welded joints are among the most failure-prone regions in mechanical structures, particularly as the weld surface is directly exposed to environmental conditions. Manual inspection of large volumes of welds is prone to human error. This study proposes an approach for anomaly detection and localization on weld surface images within regions of interest (ROI) using two deep learning models: FastFlow and PatchCore-Lite. A total of 5,451 images were standardized to a resolution of 512×512 pixels. Each image includes a weld mask, while anomalous samples are additionally annotated with defect masks serving as ground truth. Experimental results indicate that PatchCore-Lite achieves superior performance in anomaly detection at the image level, with an AUROC of 0.8978. In contrast, FastFlow demonstrates better localization performance within the ROI, achieving an FPR of 0.01875, a Dice score of 0.04175, and an IoU of 0.02161.These findings provide a foundation for developing automated weld surface defect inspection systems under conditions of limited defect data, which is a common constraint in industrial applications.

Keywords: FastFlow, PatchCore-lite, Region of Interest (ROI), weld defect localization

Tóm tắt

Mối hàn là vị trí dễ phát sinh hư hỏng trong kết cấu cơ khí, đặc biệt khi bề mặt mối hàn tiếp xúc trực tiếp với môi trường. Việc kiểm tra thủ công với số lượng lớn dễ dẫn đến sai sót. Nghiên cứu này đề xuất phương pháp nhận dạng và định vị bất thường trên ảnh bề mặt mối hàn trong vùng quan tâm (ROI) dựa trên hai mô hình học sâu FastFlow và PatchCore-Lite. Bộ dữ liệu gồm 5.451 ảnh được chuẩn hóa về kích thước 512×512 pixels. Mỗi ảnh có mặt nạ mối hàn (weld mask), trong khi các ảnh bất thường có thêm mặt nạ lỗi (defect mask) làm dữ liệu chuẩn (ground truth). Kết quả thực nghiệm cho thấy PatchCore-Lite đạt hiệu quả tốt hơn ở mức nhận dạng bất thường với AUROC = 0,8978, trong khi FastFlow cho kết quả tốt hơn ở định vị trong ROI với FPR = 0,01875, Dice = 0,04175 và IoU = 0,02161. Nghiên cứu là cơ sở cho việc phát triển các phương pháp kiểm tra tự động lỗi bề mặt mối hàn trong điều kiện dữ liệu lỗi hạn chế.

Từ khóa: Định vị lỗi mối hàn, FastFlow, PatchCore-lite, vùng quan tâm (ROI)

Article Details

Tài liệu tham khảo

Bergmann, P., Batzner, K., Fauser, M., Sattlegger, D., & Steger, C. (2021). The MVTec Anomaly Detection Dataset: A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. International Journal of Computer Vision, 129(4), 1038–1059. https://doi.org/10.1007/s11263-020-01400-4

Dai, W., Li, D., Tang, D., Jiang, Q., Wang, D., Wang, H., & Peng, Y. (2021). Deep learning assisted vision inspection of resistance spot welds. Journal of Manufacturing Processes, 62, 262–274. https://doi.org/10.1016/j.jmapro.2020.12.015

Gudovskiy, D., Ishizaka, S., & Kozuka, K. (2022). CFLOW-AD: Real-Time Unsupervised Anomaly Detection with Localization via Conditional Normalizing Flows. 2022 IEEE/CVF Winter Conference on Applications of Computer Vision (WACV)) (pp. 1819–1828).
https://doi.org/10.1109/WACV51458.2022.00188

Hassaballah, M., & Awad, A. I. (2020). Deep Learning in Computer Vision: Principles and Applications (M. Hassaballah & A. I. Awad, B.t.v; 1st a.b). CRC Press. https://doi.org/10.1201/9781351003827

Li, C.-L., Sohn, K., Yoon, J., & Pfister, T. (2021). CutPaste: Self-Supervised Learning for Anomaly Detection and Localization. 2021 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 9659–9669). https://doi.org/10.1109/CVPR46437.2021.00954

Li, Z., Yan, Y., Wang, X., Ge, Y., & Meng, L. (2025). A survey of deep learning for industrial visual anomaly detection. Artificial Intelligence Review, 58(9), 279. https://doi.org/10.1007/s10462-025-11287-7

Liu, J., Fan, Z., Olsen, S. I., Christensen, K. H., & Kristensen, J. K. (2017). Boosting Active Contours for Weld Pool Visual Tracking in Automatic Arc Welding. IEEE Transactions on Automation Science and Engineering, 14(2), 1096–1108.
https://doi.org/10.1109/TASE.2015.2498929

Liu, J., Xie, G., Wang, J., Li, S., Wang, C., Zheng, F., & Jin, Y. (2024). Deep Industrial Image Anomaly Detection: A Survey. Machine Intelligence Research, 21(1), 104–135. https://doi.org/10.1007/s11633-023-1459-z

Nguyen, D. T., Le, V. P., To, T. T., & Nguyen, H. D. (2025). Weld detection and segmentation using improved deep learning approach. Trong N. T. Hai, N. H. Q. Thinh, N. H. Loc, & L. C. Hiep (B.t.v), 2nd EAI International Conference on Renewable Energy and Sustainable Manufacturing) (pp. 623–635). Springer Nature Switzerland. https://doi.org/10.1007/978-3-031-90629-9_39

Roth, K., Pemula, L., Zepeda, J., Scholkopf, B., Brox, T., & Gehler, P. (2022). Towards Total Recall in Industrial Anomaly Detection. 2022 IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) (pp. 14298–14308). https://doi.org/10.1109/CVPR52688.2022.01392

Say, D., & Zidi, S. (2023). Application of a new multi-binary classification strategy in the Weld Defects Images. 2023 IEEE International Workshop on Mechatronic Systems Supervision (IW_MSS) (pp. 1–6). https://doi.org/10.1109/IW_MSS59200.2023.10368597

Shaloo, M., Schnall, M., Klein, T., Huber, N., & Reitinger, B. (2022). A Review of Non-Destructive Testing (NDT) Techniques for Defect Detection: Application to Fusion Welding and Future Wire Arc Additive Manufacturing Processes. Materials, 15(10), 3697. https://doi.org/10.3390/ma15103697

Wang, X., Zhang, Y., Liu, J., Luo, Z., Zielinska, T., & Ge, W. (2022). Online detection of weld surface defects based on improved incremental learning approach. Expert Systems with Applications, 195, 116407. https://doi.org/10.1016/j.eswa.2021.116407

Xu, H., Yan, Z. H., Ji, B. W., Huang, P. F., Cheng, J. P., & Wu, X. D. (2022). Defect detection in welding radiographic images based on semantic segmentation methods. Measurement, 188, 110569. https://doi.org/10.1016/j.measurement.2021.110569

Yu, J., Zheng, Y., Wang, X., Li, W., Wu, Y., Zhao, R., & Wu, L. (2021). FastFlow: Unsupervised Anomaly Detection and Localization via 2D Normalizing Flows (Version 2). arXiv.
https://doi.org/10.48550/ARXIV.2111.07677

Zavrtanik, V., Kristan, M., & Skocaj, D. (2021). DRÆM – A discriminatively trained reconstruction embedding for surface anomaly detection. 2021 IEEE/CVF International Conference on Computer Vision (ICCV) (pp. 8310–8319). https://doi.org/10.1109/ICCV48922.2021.00822

Zhang, M., Feng, M., Chen, C., Yu, X., & Lian, G. (2025). Weld Defect Detection: Deep Learning-Based Image Processing and the Mechanisms of Defect Formation. Archives of Computational Methods in Engineering, 33, 3525-3563. https://doi.org/10.1007/s11831-025-10407-4