Skip to main content
QUICK REVIEW

[논문 리뷰] AnomalyDiffusion: Few-Shot Anomaly Image Generation with Diffusion Model

Teng Hu, Jiangning Zhang|arXiv (Cornell University)|2023. 12. 10.
Anomaly Detection Techniques and ApplicationsComputer Science인용 수 8
한 줄 요약

AnomalyDiffusion은 Spatial Anomaly Embedding으로 이상Appearance과 위치를 분리하고 Adaptive Attention Re-weighting을 사용하여 진짜처럼 보이고 마스크에 정렬된 이상 이미지-마스크 쌍을 생성함으로써 다운스트림 이상 점검 작업을 향상시키는 few-shot 이상 이미지 생성용 확산 기반 프레임워크이다.

ABSTRACT

Anomaly inspection plays an important role in industrial manufacture. Existing anomaly inspection methods are limited in their performance due to insufficient anomaly data. Although anomaly generation methods have been proposed to augment the anomaly data, they either suffer from poor generation authenticity or inaccurate alignment between the generated anomalies and masks. To address the above problems, we propose AnomalyDiffusion, a novel diffusion-based few-shot anomaly generation model, which utilizes the strong prior information of latent diffusion model learned from large-scale dataset to enhance the generation authenticity under few-shot training data. Firstly, we propose Spatial Anomaly Embedding, which consists of a learnable anomaly embedding and a spatial embedding encoded from an anomaly mask, disentangling the anomaly information into anomaly appearance and location information. Moreover, to improve the alignment between the generated anomalies and the anomaly masks, we introduce a novel Adaptive Attention Re-weighting Mechanism. Based on the disparities between the generated anomaly image and normal sample, it dynamically guides the model to focus more on the areas with less noticeable generated anomalies, enabling generation of accurately-matched anomalous image-mask pairs. Extensive experiments demonstrate that our model significantly outperforms the state-of-the-art methods in generation authenticity and diversity, and effectively improves the performance of downstream anomaly inspection tasks. The code and data are available in https://github.com/sjtuplayer/anomalydiffusion.

연구 동기 및 목표

  • 제조 현장에서 이상 데이터가 희소한 상황에서 이상 점검의 개선을 동기화한다.
  • 적은 샘플로도 진짜 같고 다양한 이상 샘플을 생성하는 확산 기반 방법을 제안한다.
  • 이상 외관과 위치를 분리하여 이상 유형과 배치를 제어한다.
  • 생성된 이상과 마스크 간의 정렬을 개선하여 지역화 및 분류 작업을 지원한다.

제안 방법

  • 대규모 데이터로부터의 사전 지식을 전달하기 위해 사전 학습된 Latent Diffusion Model (LDM)을 활용하여 few-shot 이상 생성을 수행한다.
  • 생성 조건 부여를 위해 이상 임베딩(appearance)과 공간 임베딩(location)을 결합한 Spatial Anomaly Embedding을 도입한다.
  • 마스크된 텍스트 역전을 적용하여 이상 영역에 초점을 맞추면서 이상 appearance 토큰을 학습한다.
  • 범주 간에 공유되는 전용 spatial encoder를 통해 이상 마스크를 공간 임베딩으로 인코딩한다.
  • denoising 중 덜 눈에 띄는 영역을 동적으로 강조하기 위해 Adaptive Attention Re-weighting을 도입하여 마스크 정렬을 개선한다.
  • 마스크에 따라 이상 영역을 정상 콘텐츠와 혼합하는 혼합 확산 프로세스를 사용하여 입력 정상 샘플에서 이상을 생성한다.
  • 다운스트림 작업용 학습 데이터를 보강하기 위해 학습된 마스크 임베딩으로 이상 마스크를 선택적으로 생성한다.

실험 결과

연구 질문

  • RQ1적은 수의 이상 샘플로도 주어진 마스크에 잘 정렬된 진짜 같고 다양한 이상 이미지를 생성할 수 있는가?
  • RQ2이상 외관과 위치를 분리하는 것이 생성된 이상에 대한 제어 가능성을 향상시키는가?
  • RQ3확산 생성 과정에서 Adaptive Attention Re-weighting이 생성된 이상과 이상 마스크의 정렬을 개선하는가?
  • RQ4생성된 이상 샘플이 감지, 위치화(localization), 분류와 같은 다운스트림 이상 점검 작업을 향상시키는가?
  • RQ5학습된 임베딩을 통한 마스크 생성이 이상 작업용 학습 데이터 확장에 얼마나 효과적인가?

주요 결과

  • AnomalyDiffusion은 MVTec 데이터세트에서 생성 진정성 및 다양성 면에서 최첨단 이상 생성 모델을 능가한다.
  • 본 방법은 Adaptive Attention Re-weighting 메커니즘의 도움으로 입력 마스크와 밀집하게 정렬된 고품질의 이상 이미지를 달성한다.
  • 생성된 이상 데이터는 픽셀 수준의 위치화(localization)를 포함한 다운스트림 이상 점검 성능을 크게 향상시킨다.
  • MVTec에서 이 방법은 생성된 데이터를 학습한 간단한 U-Net으로 평가했을 때 픽셀 수준 위치화 AUROC가 99.1%, AP가 81.4%를 얻는다.
  • 모델은 실제 이상 샘플이 몇 개만 있어도 각 이상 유형당 1000개의 광범위한 이상 이미지-마스크 쌍을 생성할 수 있으며, Spatial Anomaly Embedding은 이상들의 배치와 외관을 제어 가능하게 한다.
  • 생성된 이상은 분류기 학습에 사용될 때 강한 범주 분류 성능을 달성하여 여러 기준선(baselines)을 능가한다.

이 논문 읽기

누빈트 뷰어에서 원문을 열고, 읽으면서 궁금한 곳을 바로 물어보세요.

누빈트에서 이 논문 읽기

이 리뷰는 AI가 논문 원문을 바탕으로 만들었습니다. 인용하기 전에 원문을 확인해 주세요.