[Paper Review] A Comparison of Supervised and Unsupervised Deep Learning Methods for Anomaly Detection in Images
This paper compares supervised and unsupervised deep learning methods for image anomaly detection using the MVTec AD dataset, evaluating CNNs, KD-CAE, NI-CAE, and DCGANs. Results show unsupervised autoencoders—particularly KD-CAE—outperform supervised CNNs, with NI-CAE excelling on the transistor dataset, confirming that unsupervised methods are more effective when anomalous data is scarce or unlabeled.
Anomaly detection in images plays a significant role for many applications across all industries, such as disease diagnosis in healthcare or quality assurance in manufacturing. Manual inspection of images, when extended over a monotonously repetitive period of time is very time consuming and can lead to anomalies being overlooked.Artificial neural networks have proven themselves very successful on simple, repetitive tasks, in some cases even outperforming humans. Therefore, in this paper we investigate different methods of deep learning, including supervised and unsupervised learning, for anomaly detection applied to a quality assurance use case. We utilize the MVTec anomaly dataset and develop three different models, a CNN for supervised anomaly detection, KD-CAE for autoencoder anomaly detection, NI-CAE for noise induced anomaly detection and a DCGAN for generating reconstructed images. By experiments, we found that KD-CAE performs better on the anomaly datasets compared to CNN and NI-CAE, with NI-CAE performing the best on the Transistor dataset. We also implemented a DCGAN for the creation of new training data but due to computational limitation and lack of extrapolating the mechanics of AnoGAN, we restricted ourselves just to the generation of GAN based images. We conclude that unsupervised methods are more powerful for anomaly detection in images, especially in a setting where only a small amount of anomalous data is available, or the data is unlabeled.
Motivation & Objective
- To evaluate the effectiveness of supervised and unsupervised deep learning models in detecting anomalies in industrial images.
- To address the challenge of limited or unlabeled anomalous data in real-world applications such as quality assurance.
- To investigate whether autoencoders and GANs can serve as viable alternatives to supervised learning when labeled anomalies are scarce.
- To explore the use of GANs for data augmentation to improve anomaly detection performance in low-data regimes.
Proposed method
- Trained a convolutional neural network (CNN) as a supervised baseline using fully labeled normal and anomalous images.
- Implemented a knowledge distillation-based convolutional autoencoder (KD-CAE) to learn robust feature representations from normal images only.
- Applied noise injection in a noise-induced convolutional autoencoder (NI-CAE) to improve robustness and reconstruction fidelity.
- Trained a deep convolutional GAN (DCGAN) to generate synthetic normal images for data augmentation.
- Used reconstruction error and structural similarity (SSIM) to detect anomalies by measuring deviation between input and reconstructed images.
- Evaluated models using F1-score, precision, recall, and visual inspection of reconstruction quality across multiple MVTec AD categories.
Experimental results
Research questions
- RQ1How do supervised deep learning models like CNNs compare to unsupervised autoencoders in anomaly detection on industrial image datasets?
- RQ2What impact does noise injection have on the performance of convolutional autoencoders in detecting subtle image anomalies?
- RQ3Can GAN-generated images effectively augment training data to improve anomaly detection performance?
- RQ4In low-data or zero-anomaly scenarios, which method—supervised or unsupervised—yields better detection performance?
Key findings
- The CNN-based supervised model performed poorly due to insufficient labeled anomalous data, with low F1-scores, especially on small defects.
- KD-CAE outperformed both CNN and NI-CAE across most MVTec AD categories, demonstrating superior generalization and reconstruction fidelity.
- NI-CAE showed the best performance on the transistor dataset, with only a 2.56% drop in F1-score when Gaussian noise was injected, indicating high robustness.
- The reconstruction error distribution and SSIM difference maps revealed that KD-CAE effectively highlighted anomalous regions even in complex textures.
- The DCGAN successfully generated realistic toothbrush images, suggesting potential for data augmentation, though no performance gains were measured due to computational constraints.
- Overfitting to normal data was beneficial in anomaly detection, as it reduced the model’s ability to reconstruct anomalies, thereby improving detection sensitivity.
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.