Automated inspection is a crucial aspect in modern industrial manufacturing. Despite its importance, the methods used to perform it suffer from the data scarcity intrinsic to the problem, where only a few anomalous samples are usually available. Recently, fine-tuning of foundation inpainting models has been proposed as a solution. The fine-tuned model is then used to inpaint nominal images where areas corresponding to defective masks have been removed. While effective, random pairing sometimes applies the mask on background or logically unfeasible areas. To counteract this phenomenon, we experiment with generating high-resolution defective images inpainting the few available real defects. Since the resulting images would show limited variance in the non-defective parts, we propose to fine-tune another inpainting model to change nominal parts of generated images. Experimental results on the MVTec-AD dataset demonstrate that our method generates images with complementary properties with respect to those produced by the baseline and training on an ensemble of generated data produces a new state of the art result.

Carkaxhia, R., Ali, M., Fioraio, N., Di Stefano, L., Salti, S. (2025). Few-Shot Anomaly Classification by Learning to Inpaint Nominal Images. Springer Science and Business Media Deutschland GmbH [10.1007/978-3-032-10185-3_41].

Few-Shot Anomaly Classification by Learning to Inpaint Nominal Images

Musawar Ali
;
Luigi Di Stefano;Samuele Salti
2025

Abstract

Automated inspection is a crucial aspect in modern industrial manufacturing. Despite its importance, the methods used to perform it suffer from the data scarcity intrinsic to the problem, where only a few anomalous samples are usually available. Recently, fine-tuning of foundation inpainting models has been proposed as a solution. The fine-tuned model is then used to inpaint nominal images where areas corresponding to defective masks have been removed. While effective, random pairing sometimes applies the mask on background or logically unfeasible areas. To counteract this phenomenon, we experiment with generating high-resolution defective images inpainting the few available real defects. Since the resulting images would show limited variance in the non-defective parts, we propose to fine-tune another inpainting model to change nominal parts of generated images. Experimental results on the MVTec-AD dataset demonstrate that our method generates images with complementary properties with respect to those produced by the baseline and training on an ensemble of generated data produces a new state of the art result.
2025
Lecture Notes in Computer Science
520
532
Carkaxhia, R., Ali, M., Fioraio, N., Di Stefano, L., Salti, S. (2025). Few-Shot Anomaly Classification by Learning to Inpaint Nominal Images. Springer Science and Business Media Deutschland GmbH [10.1007/978-3-032-10185-3_41].
Carkaxhia, Rubin; Ali, Musawar; Fioraio, Nicola; Di Stefano, Luigi; Salti, Samuele
File in questo prodotto:
Eventuali allegati, non sono esposti

I documenti in IRIS sono protetti da copyright e tutti i diritti sono riservati, salvo diversa indicazione.

Utilizza questo identificativo per citare o creare un link a questo documento: https://hdl.handle.net/11585/1046435
 Attenzione

Attenzione! I dati visualizzati non sono stati sottoposti a validazione da parte dell'ateneo

Citazioni
  • ???jsp.display-item.citation.pmc??? ND
  • Scopus 0
  • ???jsp.display-item.citation.isi??? ND
social impact