[Paper Review] Reconstruction from edge image combined with color and gradient difference for industrial surface anomaly detection
This paper proposes EdgRec, a reconstruction-based method for industrial surface anomaly detection that reconstructs RGB images from their grayscale edges using a denoising autoencoder with skip connections. By forcing the model to memorize normal color and low-frequency content while preserving high-frequency edges, and combining a novel color-gradient evaluation function, it achieves state-of-the-art performance (97.8% AUROC for detection and 97.7% for localization) on MVTec AD, with strong results on 3D-AD using only RGB images.
Reconstruction-based methods are widely explored in industrial visual anomaly detection. Such methods commonly require the model to well reconstruct the normal patterns but fail in the anomalies, and thus the anomalies can be detected by evaluating the reconstruction errors. However, in practice, it's usually difficult to control the generalization boundary of the model. The model with an overly strong generalization capability can even well reconstruct the abnormal regions, making them less distinguishable, while the model with a poor generalization capability can not reconstruct those changeable high-frequency components in the normal regions, which ultimately leads to false positives. To tackle the above issue, we propose a new reconstruction network where we reconstruct the original RGB image from its gray value edges (EdgRec). Specifically, this is achieved by an UNet-type denoising autoencoder with skip connections. The input edge and skip connections can well preserve the high-frequency information in the original image. Meanwhile, the proposed restoration task can force the network to memorize the normal low-frequency and color information. Besides, the denoising design can prevent the model from directly copying the original high-frequent components. To evaluate the anomalies, we further propose a new interpretable hand-crafted evaluation function that considers both the color and gradient differences. Our method achieves competitive results on the challenging benchmark MVTec AD (97.8\% for detection and 97.7\% for localization, AUROC). In addition, we conduct experiments on the MVTec 3D-AD dataset and show convincing results using RGB images only. Our code will be available at https://github.com/liutongkun/EdgRec.
Motivation & Objective
- To address the challenge of overgeneralization and undergeneralization in reconstruction-based anomaly detection, where models either fail on normal variations or reconstruct anomalies well.
- To improve reconstruction fidelity for high-frequency normal patterns and reduce false positives caused by degradation during reconstruction.
- To develop a more interpretable and adjustable anomaly evaluation function by combining color and gradient differences.
- To demonstrate effectiveness on both 2D and 3D industrial defect detection benchmarks using only RGB images.
Proposed method
- Proposes a novel edge-to-image reconstruction task: reconstructing the original RGB image from its grayscale edge map.
- Uses a UNet-style denoising autoencoder with skip connections to preserve high-frequency components and improve feature recovery.
- Introduces multi-scale pseudo anomalies via DTD textures and CutPaste augmentation to prevent identity mapping and enhance robustness.
- Employs a denoising design that corrupts input edges with synthetic anomalies to avoid direct copying of edge features.
- Designs a new hand-crafted anomaly evaluation function combining color difference and gradient difference (MSGMS) for improved detection.
- Enables model interpretability and tunability by allowing engineers to reweight components based on domain-specific needs.
Experimental results
Research questions
- RQ1Can reconstructing from edge maps improve the generalization boundary of reconstruction-based anomaly detection models?
- RQ2How does edge-based reconstruction compare to standard image-to-image reconstruction in detecting subtle or high-frequency anomalies?
- RQ3To what extent can a hand-crafted color-gradient evaluation function improve detection performance over standard metrics like L2 or SSIM?
- RQ4Can the proposed method generalize to 3D surface defect detection using only RGB images?
- RQ5How do different pseudo-anomaly generation strategies affect model performance and robustness?
Key findings
- The proposed EdgRec method achieves 97.8% AUROC for image-level anomaly detection and 97.7% for pixel-level localization on the MVTec AD benchmark, outperforming existing reconstruction-based methods.
- The edge-based reconstruction task significantly improves performance over standard image-to-image denoising autoencoders (DeAE), especially in detecting color-based defects like 'cable swap'.
- The combination of MSGMS and the proposed color-based evaluation function yields the highest performance (97.8% AUROC), demonstrating the effectiveness of multi-modal anomaly scoring.
- Even without additional pseudo anomalies, EdgRec achieves competitive results, highlighting the intrinsic benefit of the edge-to-image reconstruction design.
- The method generalizes well to 3D surface defect detection on the MVTec 3D-AD dataset using only RGB images, showing strong potential for real-world deployment.
- Ablation studies confirm that both the edge reconstruction task and the color-gradient evaluation function are critical for performance, with each component contributing significantly to the final result.
Read this paper
Open the full text in the Nubint reader and ask about any passage as you read.
Read this paper on NubintThis review was generated by AI from the original paper. Please check the paper before citing it.