NoiseSegAD: diffusion model noise prediction and segmentation for image anomaly detection
Xin Nan Xie, Xingpeng Zheng, Zhijian Yang, Tijian Cai · Journal of Electronic Imaging · 2025
Image anomaly detection methods based on autoencoders or generative adversarial networks often reconstruct anomalies due to the generalization capability of neural networks. In contrast, methods based on diffusion models first perturb the image with noise and then rebuild the image through multi-step denoising, which can effectively reconstruct anomalies as normal. However, these methods face some challenges, such as maintaining the details of the normal parts while reconstructing the anomalies, and the multi-step denoising process can affect the efficiency of anomaly detection. To address these issues, we innovatively segment anomalies based on noise differences and propose an image anomaly detection framework based on diffusion model noise prediction and segmentation. It consists of a noise prediction sub-network and an anomaly segmentation sub-network. To prevent the loss of original image information during noise prediction, a Siamese encoder module is used to encode the information of the original image. To further enhance the noise prediction sub-network’s ability to recognize the normal parts of the image, a spatial feature fusion module is introduced to integrate features at different scales. Finally, the anomaly segmentation sub-network segments the difference between the predicted noise and the perturbed noise to obtain the anomaly mask, achieving efficient anomaly detection. Extensive experiments were conducted on the MVTec and VisA datasets, where the image-level area under the receiver operating characteristic curve reached 99.4% and 97.0%, respectively, which is an improvement of 0.3% points compared with competing methods, demonstrating the superiority of the proposed approach.