Anomaly Detection and Localization Using Attention-Guided Synthetic Anomaly and Test-Time Adaptation


Behzad Bozorgtabar (EPFL),* Dwarikanath Mahapatra (Inception Institute of Artificial Intelligence), Jean-Philippe Thiran (École Polytechnique Fédérale de Lausanne)
The 33rd British Machine Vision Conference

Abstract

Despite the impressive success of vision transformers in various vision tasks, they are largely overlooked for anomaly detection and segmentation tasks. In this paper, we focus on the attention mechanism in the transformer and propose a new proxy task for model training followed by a test-time adaptation. In particular, we present a simple yet effective attention-guided cut-and-paste data augmentation for creating synthetic anomalies from nominal training images by intermixing scaled patches of various sizes guided by the transformer’s attention map. Subsequently, we solve a proxy task by discriminating between nominal examples and synthetic anomalies. Furthermore, to alleviate the distribution discrepancy between training and test data, we adopt a test-time adaptation scheme based on the transformer’s attention entropy. Extensive experimental results for anomaly detection and localization task on a popular MVTec AD benchmark and NIH Chest X-ray dataset demonstrate the superiority of our method over competitive baselines and its generalization capabilities to detect and localize test-time anomalies.

Video



Citation

@inproceedings{Bozorgtabar_2022_BMVC,
author    = {Behzad Bozorgtabar and Dwarikanath Mahapatra and Jean-Philippe Thiran},
title     = {Anomaly Detection and Localization Using Attention-Guided Synthetic Anomaly and Test-Time Adaptation },
booktitle = {33rd British Machine Vision Conference 2022, {BMVC} 2022, London, UK, November 21-24, 2022},
publisher = {{BMVA} Press},
year      = {2022},
url       = {https://bmvc2022.mpi-inf.mpg.de/0472.pdf}
}


Copyright © 2022 The British Machine Vision Association and Society for Pattern Recognition
The British Machine Vision Conference is organised by The British Machine Vision Association and Society for Pattern Recognition. The Association is a Company limited by guarantee, No.2543446, and a non-profit-making body, registered in England and Wales as Charity No.1002307 (Registered Office: Dept. of Computer Science, Durham University, South Road, Durham, DH1 3LE, UK).

Imprint | Data Protection