CLAIR: A Reference-Free Framework for In Situ Defect Detection in Fused Filament Fabrication Using Contra-Lateral Sampling and Inpainting Residuals
Abstract
Manufacturing defects occur routinely in the fused filament fabrication (FFF) process, and a single undetected failure converts machine time, filament, and operator attention into scrap. This paper presents CLAIR (Contra-Lateral Inpainting Residuals), a reference-free monitoring framework that operates when no defect-free print exists anywhere in the available data. In this work, “reference-free” refers to the framework’s capacity to construct its own reference from within each defective image. CLAIR pairs each defect region with a position-matched sound region from the same frame, reconstructs the masked center of both with a frozen large-mask inpainting network, embeds the observed-minus-reconstructed residual with frozen self-supervised transformer features, and classifies with a single linear layer of 385 trained parameters. Evaluated on a public dataset with whole objects held out of training, CLAIR reaches a macro-averaged F1 of 0.733 over a population spanning all three failure modes, and 0.768 on the cracking and warping subset. Here, five part-relative geometric descriptors identify the failure mode on unseen objects at macro-F1 0.805, establishing defect placement as a transferable, physically interpretable signal. The study positions reference-free contra-lateral sampling as a practical complement to supervised detectors in data-scarce print environments, while delineating their limitations in dataset breadth, class-object entanglement, and single-installation scope.
// Source
Authors: Mehrab Hasan, Carter Thomas, Yingtao Liu
Institutions: University of Oklahoma, Norman Regional Hospital