# Image Anomaly Detection and Localization with Position and Neighborhood Information

**Authors:** Jaehyeok Bae, Jae-Han Lee, Seyun Kim  
**arXiv:** [2211.12634](https://arxiv.org/abs/2211.12634)  
**Date:** 2022-11-22  
**Summary page:** https://www.summarizepaper.com/en/paper/2211.12634v1/

## Key points

- Anomaly detection and localization often lack sufficient anomalous samples for training
- Existing methods use pre-trained networks and non-parametric modeling techniques
- Position and neighborhood information is overlooked in these methods
- Proposed approach considers conditional probability given neighborhood features
- Multi-layer perceptron network models relationship between normal features and surrounding context
- Positional information is incorporated through histogram of representative features at each position
- Proposed method includes a refine network for better interpolation of anomaly map
- Experiments on MVTec AD benchmark dataset show state-of-the-art performance in detection and localization (AUROC scores of 99.52% and 98.91%)
- Comprehensive solution that incorporates position and neighborhood information effectively
- Potential for various applications in different domains

## Summary

In the field of anomaly detection and localization, it is often challenging to collect enough anomalous samples for training purposes. To address this issue, many existing methods utilize a pre-trained network to encode input images and non-parametric modeling techniques to estimate the encoded feature distribution. However, these methods tend to overlook the impact of position and neighborhood information on the distribution of normal features. To leverage this valuable information, this paper proposes a novel approach for estimating the normal distribution by considering conditional probability given neighborhood features. This is achieved through the use of a multi-layer perceptron network that models the relationship between normal features and their surrounding context. Additionally, positional information is incorporated by constructing a histogram of representative features at each position. Unlike existing methods that simply resize the anomaly map into the resolution of an input image, the proposed method introduces an additional refine network. This network is trained using synthetic anomaly images and performs better interpolation by taking into account the shape and edge characteristics of the input image. The effectiveness of the proposed method is demonstrated through experiments conducted on the popular industrial dataset known as MVTec AD benchmark. The results showcase state-of-the-art performance in both anomaly detection and localization, with AUROC scores of 99.52% and 98.91% respectively. Overall, this research presents a comprehensive solution for image anomaly detection and localization that effectively incorporates position and neighborhood information. By leveraging conditional probability estimation and refining techniques, it achieves remarkable performance on real-world datasets, highlighting its potential for various applications in different domains.
