소수 샷 이상 현상 기반 생성: 이상 분류 및 세분화를 위한 접근법
Few-Shot Anomaly-Driven Generation for Anomaly Classification and Segmentation
May 14, 2025
저자: Guan Gui, Bin-Bin Gao, Jun Liu, Chengjie Wang, Yunsheng Wu
cs.AI
초록
이상 탐지는 산업 검사에서 이상 샘플이 부족하기 때문에 실용적이면서도 도전적인 과제입니다. 기존의 일부 이상 탐지 방법들은 노이즈나 외부 데이터를 사용하여 이상을 합성함으로써 이 문제를 해결하려고 합니다. 그러나 합성된 이상과 실제 세계의 이상 사이에는 항상 큰 의미론적 차이가 존재하며, 이로 인해 이상 탐지 성능이 약화됩니다. 이 문제를 해결하기 위해, 우리는 소수의 실제 이상만으로도 현실적이고 다양한 이상을 생성할 수 있는 few-shot Anomaly-driven Generation(AnoGen) 방법을 제안합니다. 이를 통해 이상 탐지 모델의 학습에 도움을 줄 수 있습니다. 구체적으로, 우리의 작업은 세 단계로 나뉩니다. 첫 번째 단계에서는 소수의 실제 이상을 기반으로 이상 분포를 학습하고, 이 학습된 지식을 임베딩에 주입합니다. 두 번째 단계에서는 이 임베딩과 주어진 바운딩 박스를 사용하여 확산 모델이 특정 객체(또는 텍스처)에 현실적이고 다양한 이상을 생성하도록 유도합니다. 마지막 단계에서는 생성된 이상을 사용하여 더 강력한 모델을 학습시키기 위한 약한 감독 이상 탐지 방법을 제안합니다. 우리의 방법은 DRAEM과 DesTSeg를 기반 모델로 사용하며, 일반적으로 사용되는 산업 이상 탐지 데이터셋인 MVTec에서 실험을 진행합니다. 실험 결과, 우리가 생성한 이상은 이상 분류 및 세그멘테이션 작업 모두에서 모델 성능을 효과적으로 향상시켰습니다. 예를 들어, DRAEM과 DseTSeg는 세그멘테이션 작업에서 AU-PR 지표가 각각 5.8%와 1.5% 향상되었습니다. 코드와 생성된 이상 데이터는 https://github.com/gaobb/AnoGen에서 확인할 수 있습니다.
English
Anomaly detection is a practical and challenging task due to the scarcity of
anomaly samples in industrial inspection. Some existing anomaly detection
methods address this issue by synthesizing anomalies with noise or external
data. However, there is always a large semantic gap between synthetic and
real-world anomalies, resulting in weak performance in anomaly detection. To
solve the problem, we propose a few-shot Anomaly-driven Generation (AnoGen)
method, which guides the diffusion model to generate realistic and diverse
anomalies with only a few real anomalies, thereby benefiting training anomaly
detection models. Specifically, our work is divided into three stages. In the
first stage, we learn the anomaly distribution based on a few given real
anomalies and inject the learned knowledge into an embedding. In the second
stage, we use the embedding and given bounding boxes to guide the diffusion
model to generate realistic and diverse anomalies on specific objects (or
textures). In the final stage, we propose a weakly-supervised anomaly detection
method to train a more powerful model with generated anomalies. Our method
builds upon DRAEM and DesTSeg as the foundation model and conducts experiments
on the commonly used industrial anomaly detection dataset, MVTec. The
experiments demonstrate that our generated anomalies effectively improve the
model performance of both anomaly classification and segmentation tasks
simultaneously, \eg, DRAEM and DseTSeg achieved a 5.8\% and 1.5\% improvement
in AU-PR metric on segmentation task, respectively. The code and generated
anomalous data are available at https://github.com/gaobb/AnoGen.Summary
AI-Generated Summary