AnomalyControl: Few-Shot Anomaly Generation by ControlNet Inpainting - Musawar Ali; Nicola Fioraio; Samuele Salti; Luigi Di Stefano (IEEE Access)
Quality inspection tasks, i.e., anomaly detection, localization and classification, face the scarcity of non-nominal images in real industrial scenarios. Hence, generative models have been explored as a tool to obtain defective images from few real labelled samples. Despite the fast-increasing quality of such models, generating realistic defective images remains a challenging task due to the same data scarcity problem, which makes it difficult to steer large general-purpose models to produce realistic defects for specific industrial products. In this paper, we show how casting defect generation as inpainting of nominal images and using ControlNet to specialize a state-of-the-art inpainting model based on stable diffusion can be an effective solution for the few-shot anomaly generation task. Extensive experimental results on the MVTec-AD dataset demonstrate that the high quality of the images generated by our method significantly improves the state of the art on downstream anomaly classification.