Detecting Anomalies in Textured Images Using Modified Transformer Masked Autoencoder

Afshin Dini, Esa Rahtu

2024

Abstract

We present a new method for detecting and locating anomalies in textured-type images using transformer-based autoencoders. In this approach, a rectangular patch of an image is masked by setting its value to gray and then fetched into a pre-trained autoencoder with several blocks of transformer encoders and decoders in order to reconstruct the unknown part. It is shown that the pre-trained model is not able to reconstruct the defective parts properly when they are inside the masked patch. In this regard, the combination of the Structural Similarity Index Measure and absolute error between the reconstructed image and the original one can be used to define a new anomaly map to find and locate anomalies. In the experiment with the textured images of the MVTec dataset, we discover that not only can this approach find anomalous samples properly, but also the anomaly map itself can specify the exact locations of defects correctly at the same time. Moreover, not only is our method computationally efficient, as it utilizes a pre-trained model and does not require any training, but also it has a better performance compared to previous autoencoders and other reconstruction-based methods. Due to these reasons, one can use this method as a base approach to find and locate irregularities in real-world applications.

Download


Paper Citation


in Harvard Style

Dini A. and Rahtu E. (2024). Detecting Anomalies in Textured Images Using Modified Transformer Masked Autoencoder. In Proceedings of the 19th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 2: VISAPP; ISBN 978-989-758-679-8, SciTePress, pages 191-200. DOI: 10.5220/0012416400003660


in Bibtex Style

@conference{visapp24,
author={Afshin Dini and Esa Rahtu},
title={Detecting Anomalies in Textured Images Using Modified Transformer Masked Autoencoder},
booktitle={Proceedings of the 19th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 2: VISAPP},
year={2024},
pages={191-200},
publisher={SciTePress},
organization={INSTICC},
doi={10.5220/0012416400003660},
isbn={978-989-758-679-8},
}


in EndNote Style

TY - CONF

JO - Proceedings of the 19th International Joint Conference on Computer Vision, Imaging and Computer Graphics Theory and Applications - Volume 2: VISAPP
TI - Detecting Anomalies in Textured Images Using Modified Transformer Masked Autoencoder
SN - 978-989-758-679-8
AU - Dini A.
AU - Rahtu E.
PY - 2024
SP - 191
EP - 200
DO - 10.5220/0012416400003660
PB - SciTePress