Dual Branch Learning with Prior Information for Surface Anomaly Detection - Wang, Shuyuan; Lv, Chengkan; Zhang, Zhengtao; Wei, Xueyan (IEEE transactions on instrumentation and measurement, 2023)
Visual surface anomaly detection focuses on the classification and location of regions that deviate from the normal appearance, and generally, only normal samples are provided for training. The reconstruction-based method is widely used, which locates the anomalies by analyzing the reconstruction error. However, there are two problems unsettled in the reconstruction-based method. First, the reconstruction error in the normal regions is sometimes large. This might mislead the model to take the normal regions as anomalies, which is named as overkill problem. Second, it has been observed that the anomalous regions sometimes cannot be repaired to normal, which results in a small reconstruction error in the anomalous regions. This misleads the model to take the anomalies as normal, which is called as anomaly escape problem. Aiming at the above two problems, we propose a model named DBPI which is mainly composed of a dual branch autoencoder structure and GA unit. To alleviate the overkill problem, a natural idea is to reduce the reconstruction error in the normal regions, therefore a dual branch autoencoder is proposed. The dual branch autoencoder reconstructs two images with consistent normal regions and different anomalous regions. By analyzing the reconstruction error between the above two reconstructed images, the anomalies can be detected without causing overkill. For the anomaly escape problem, an effective solution is to add prior information of normal appearance to the reconstructive network, which assists in repairing the anomalous regions and increasing the reconstruction error in the anomalous regions. Since the mathematical expectation map of the training data contains crucial features of the normal appearance, we utilize it as the prior information of the normal appearance. And the prior information is selectively introduced by the proposed Gated Attention unit, which effectively assists in reconstructing a normal image and further mitigates the anomaly escape problem. On the AP metric for the anomaly detection benchmark dataset MVTec, the proposed unsupervised method outperforms the current state-of-the-art reconstruction-based method SSPCAB by 7.4%. Meanwhile, our unsupervised method also exhibits comparable performance to the best supervised methods on the surface defect detection DAGM dataset.