Beyond local receptive fields: vision transformers for real-time surface defect detection in FDM

Document Type

Article

Publication Date

4-1-2026

Abstract

Ensuring real-time quality assurance in additive manufacturing (AM), particularly Fused Deposition Modeling (FDM), is essential due to its widespread adoption across industries driven by its process efficiency, design flexibility, and low material waste. However, conventional defect detection methods exhibit fundamental limitations in capturing spatially distributed and subtle surface anomalies. These limitations stem from their localized receptive fields and strong inductive biases, which restrict their ability to generalize to complex surface patterns. To address these challenges, this study proposes an explicitly optimized method based on Vision Transformers (ViTs) for real-time surface anomaly detection in the FDM process. We evaluate four surface conditions (normal, under-extrusion, over-extrusion, and void/empty regions) and generate explainability outputs on-demand to preserve real-time monitoring. Unlike CNNs, ViTs utilize global self-attention mechanisms, enabling them to capture long-range dependencies and subtle spatial variations across the printed surface. This methodological advantage allows for enhanced sensitivity to defect characteristics that conventional models often overlook. The method integrates depth maps derived from 2D laser scanning to construct high-fidelity surface topology representations, facilitating accurate classification of key defect types, including under-extrusion, over-extrusion, voids, and normal printing. To support practical deployment, we include post-hoc explanation modules based on attention visualization, gradient-based attribution (Integrated Gradients/ Saliency), and embedding-space projection (t-SNE and UMAP) to provide operator-facing evidence of regions and representation structure associated with each prediction. Experimental evaluation achieves a macro-F1 score of 0.877 and a macro-averaged mean AUC (mAUC) of 0.972, with an inference latency of 14.80–32.45 ms per patch, supporting real-time layer-wise inspection. Together, this work delivers a practical solution for surface quality monitoring, representing a significant advancement in intelligent quality assurance for AM processes.

Publication Source (Journal or Book title)

International Journal of Advanced Manufacturing Technology

First Page

5399

Last Page

5420

This document is currently not available here.

Share

COinS