  This paper proposed a novel anomaly detection (AD) approach of High-speed
Train images based on convolutional neural networks and the Vision Transformer.
Different from previous AD works, in which anomalies are identified with a
single image using classification, segmentation, or object detection methods,
the proposed method detects abnormal difference between two images taken at
different times of the same region. In other words, we cast anomaly detection
problem with a single image into a difference detection problem with two
images. The core idea of the proposed method is that the 'anomaly' usually
represents an abnormal state instead of a specific object, and this state
should be identified by a pair of images. In addition, we introduced a deep
feature difference AD network (AnoDFDNet) which sufficiently explored the
potential of the Vision Transformer and convolutional neural networks. To
verify the effectiveness of the proposed AnoDFDNet, we collected three
datasets, a difference dataset (Diff Dataset), a foreign body dataset (FB
Dataset), and an oil leakage dataset (OL Dataset). Experimental results on
above datasets demonstrate the superiority of proposed method. Source code are
available at https://github.com/wangle53/AnoDFDNet.
