๐ฏ Problem
Conventional defect detectors in FDM struggle with anomalies that extend across the printed surface, because their localized receptive fields and strong inductive biases emphasize nearby pixels over global structure.
Beyond local receptive fields: Vision transformers for real-time surface defect detection in FDM
Islam, M. S., Bappy, M. M., Tushar, S. R., et al.
Surface anomalies in fused deposition modeling are often subtle and spatially distributed, which limits CNNs with local receptive fields. We present an optimized vision transformer that operates on depth maps from 2D laser scanning and uses global self-attention to model long-range dependencies across the surface. It achieves a macro-F1 of 0.877 and a support-weighted mAUC of 0.972 while sustaining real-time inference.
Conventional defect detectors in FDM struggle with anomalies that extend across the printed surface, because their localized receptive fields and strong inductive biases emphasize nearby pixels over global structure.
Replace local convolution with a vision transformer. Splitting the surface into patches and applying global self-attention lets every region inform every other region. Depth maps from laser scanning provide a direct, high-fidelity description of surface topology.
A 2D laser profiler measures the printed surface.
Scan lines are assembled into a high-resolution surface topology representation.
The depth map is partitioned into patches and embedded as tokens.
Transformer layers model long-range dependencies between all patches.
The model predicts the defect class in real time, with explainability analysis of the attention.
Reliable real-time surface inspection allows a printer, or the robot operating it, to intervene during a build rather than discover defects after hours of fabrication, which reduces scrap and inspection cost.
Islam, M. S., Bappy, M. M., Tushar, S. R., et al.. "Beyond local receptive fields: Vision transformers for real-time surface defect detection in FDM." The International Journal of Advanced Manufacturing Technology, 2026.