Ultra-Lightweight Fast Anomaly Detectors for Industrial Applications
Abstract
:1. Introduction
2. Related Works
2.1. Importance of Quality Control in Industry
2.2. Computer Vision Quality Control
2.3. Artificial Intelligence Tools in Vision Systems
- Ability to learn: Neural networks, especially deep neural networks, can learn from data. As a result, they can adapt to various patterns in images and perform complex visual analysis tasks with proper training.
- Detecting caesuras: Neural networks can detect abstract and complex caesuras in visual data, such as objects, textures, shapes, and patterns. This makes them ideal for object recognition, image classification, and defect detection tasks.
- Scalability: Neural networks can be adapted to different tasks and levels of complexity. They can be used for simple tasks, such as recognizing characters in photos, and for more advanced ones, such as autonomous vehicles moving in a natural environment.
- Efficiency: Over the last few years, there have been significant developments in neural networks, making them increasingly efficient and precise. Modern neural network architectures, such as convolutional neural networks (CNNs), are particularly effective in image analysis.
- Understanding the context: Neural networks can consider the context in the analysis of images. They can recognize objects in the context of other objects or elements of the environment, which is essential in more advanced applications, such as facial recognition or autonomous navigation.
- Adaptation to changing conditions: Neural networks can be trained on a wide range of data, which allows them to cope with different lighting conditions, perspectives, or noise. This makes them useful in real-world applications where conditions can vary.
- Availability of tools and frameworks: Many machine learning tools and frameworks make it easier to work with neural networks, making them accessible to a wide range of people and companies.
2.4. Anomaly Detectors
- High rate of false positives: One of the main problems with anomaly detectors is the propensity to generate false positives (incorrectly detecting anomalies on nondefective samples) [23].
- Lack of interpretability: With more advanced anomaly detector models, such as deep neural networks, it is not easy to understand why a given model considers certain data to be anomalies. Lack of interpretability can be a problem in cases where decisions need to be understood by humans.
- Dependence on training data: The performance of anomaly detectors can be highly dependent on the quality and representativeness of training data. The model may not perform well if the training data does not reflect actual conditions or is not sufficiently varied.
- The need to update the model: As the situation changes, the anomaly detection models may need to be updated regularly to continue detecting new types of anomalies.
- Difficulty in choosing the correct hyperparameters: Choosing the right hyperparameters for anomaly detection models can be challenging and require experimentation.
2.5. Anomaly Detection Tools
2.6. Autoencoders
2.7. The Use of Autoencoders for Quality Control in the Industry
2.8. Autoencoders and X-ray
2.9. Conclusions from the Literature Review
3. The Methodology
3.1. System Overview
3.2. Features Extraction
3.3. Feature Preprocessing Block
3.4. Autoencoder
3.5. Training
4. The Experiments
4.1. Datasets
4.2. Anomaly Detection Models
4.3. Metrics and Experimental Setup
- AUROC;
- F1-score.
4.4. Results
4.5. X-ray: Use Case of Our Anomaly Detector
5. Conclusions and Future Works
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Montgomery, D.C. Introduction to Statistical Quality Control, 5th ed.; John Wiley: Hoboken, NJ, USA, 2005. [Google Scholar]
- Avigdor, Z.; Kenett, R.S. Quality 4.0—the challenging future of quality engineering. Qual. Eng. 2020, 32, 614–626. [Google Scholar]
- Villalba-Diez, J.; Schmidt, D.; Gevers, R.; Ordieres-Meré, J.; Buchwitz, M.; Wellbrock, W. Deep learning for industrial computer vision quality control in the printing industry 4.0. Sensors 2019, 19, 3987. [Google Scholar] [CrossRef] [PubMed]
- Nascimento, R.; Martins, I.; Dutra, T.A.; Moreira, L. Computer vision based quality control for additive manufacturing parts. Int. J. Adv. Manuf. Technol. 2023, 124, 3241–3256. [Google Scholar] [CrossRef]
- Longfei, Z.; Zhang, L.; Konz, N. Computer vision techniques in manufacturing. IEEE Trans. Syst. Man Cybern. Syst. 2022, 53, 105–117. [Google Scholar]
- Jinjiang, W.; Fu, P.; Gao, R.X. Machine vision intelligence for product defect inspection based on deep learning and Hough transform. J. Manuf. Syst. 2019, 51, 52–60. [Google Scholar]
- Luo, Q.; Fang, X.; Liu, L.; Yang, C.; Sun, Y. Automated visual defect detection for flat steel surface: A survey. IEEE Trans. Instrum. Meas. 2020, 69, 626–644. [Google Scholar] [CrossRef]
- Ciberlin, J.; Grbic, R.; Teslić, N.; Pilipović, M. Object detection and object tracking in front of the vehicle using front view camera. In Proceedings of the 2019 Zooming Innovation in Consumer Technologies Conference (ZINC), Novi Sad, Serbia, 29–30 May 2019. [Google Scholar]
- Monika, B.; Kumar, M.; Kumar, M. 2D object recognition: A comparative analysis of SIFT, SURF and ORB feature descriptors. Multimed. Tools Appl. 2021, 80, 18839–18857. [Google Scholar]
- Zhou, W.; Gao, S.; Zhang, L.; Lou, X. Histogram of oriented gradients feature extraction from raw bayer pattern images. IEEE Trans. Circuits Syst. II Express Briefs 2020, 67, 946–950. [Google Scholar] [CrossRef]
- Kumar, S.D.; Esakkirajan, S.; Bama, S.; Keerthiveena, B. A microcontroller based machine vision approach for tomato grading and sorting using SVM classifier. Microprocess. Microsyst. 2020, 76, 103090. [Google Scholar] [CrossRef]
- Abrar, A.; Jalal, A.; Kim, K. Region and decision tree-based segmentations for Multi-objects detection and classification in Outdoor Scenes. In Proceedings of the 2019 International Conference on Frontiers of Information Technology (FIT), Islamabad, Pakistan, 16–18 December 2019. [Google Scholar]
- Rachana, P.; Patel, S. A comprehensive study of applying convolutional neural network for computer vision. Int. J. Adv. Sci. Technol. 2020, 6, 2161–2174. [Google Scholar]
- Bhatt, D.; Patel, C.; Talsania, H.; Patel, J.; Vaghela, R.; Pandya, S.; Ghayvat, H. CNN variants for computer vision: History, architecture, application, challenges and future scope. Electronics 2021, 10, 2470. [Google Scholar] [CrossRef]
- Esteva, A.; Chou, K.; Yeung, S.; Naik, N.; Madani, A.; Mottaghi, A.; Liu, Y.; Topol, E.; Dean, J.; Socher, R. Deep learning-enabled medical computer vision. NPJ Digit. Med. 2021, 4, 5. [Google Scholar] [CrossRef]
- Magnus, E. Learning Deep Learning: Theory and Practice of Neural Networks, Computer Vision, Natural Language Processing, and Transformers Using TensorFlow; Addison-Wesley Professional: Boston, MA, USA, 2021. [Google Scholar]
- O’Mahony, N.; Campbell, S.; Carvalho, A.; Harapanahalli, S.; Hernandez, G.V.; Krpalkova, L.; Riordan, D.; Walsh, J. Deep learning vs. traditional computer vision. In Proceedings of the 2019 Computer Vision Conference (CVC), Las Vegas, NV, USA, 25–26 April 2019; Volume 1. [Google Scholar]
- Ahmed, M.; Anwar, A.; Mahmood, A.N.; Shah, Z.; Maher, M.J. An investigation of performance analysis of anomaly detection techniques for big data in scada systems. Eai Endorsed Trans. Ind. Netw. Intell. Syst. 2015, 2, e5. [Google Scholar] [CrossRef]
- Pooja, K.; Sugandhi, R. Anomaly detection for predictive maintenance in industry 4.0—A survey. In Proceedings of the 6th International Conference on Energy and City of the Future (EVF’2019), Pune City, India, 18–20 December 2019; Volume 170. [Google Scholar]
- Susto, G.A.; Terzi, M.; Beghi, A. Anomaly detection approaches for semiconductor manufacturing. Procedia Manuf. 2017, 11, 2018–2024. [Google Scholar] [CrossRef]
- Chandola, V.; Banerjee, A.; Kumar, V. Anomaly detection: A survey. ACM Comput. Surv. 2009, 41, 1–58. [Google Scholar] [CrossRef]
- Bhuyan, M.H.; Bhattacharyya, D.K.; Kalita, J.K. Network anomaly detection: Methods, systems and tools. IEEE Commun. Surv. Tutor. 2013, 16, 303–336. [Google Scholar] [CrossRef]
- Choi, K.; Yi, J.; Park, C.; Yoon, S. Deep Learning for Anomaly Detection in Time-Series Data: Review, Analysis, and Guidelines. IEEE Access 2021, 9, 120043–120065. [Google Scholar] [CrossRef]
- Roth, K.; Pemula, L.; Zepeda, J.; Schölkopf, B.; Brox, T.; Gehler, P. Towards Total Recall in Industrial Anomaly Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, New Orleans, LA, USA, 18–24 June 2022. [Google Scholar]
- Ding, K.; Zhang, J.; Ding, H.; Liu, Y.; Chen, F.; Li, Y. Fault detection of photovoltaic array based on Grubbs criterion and local outlier factor. Iet Renew. Power Gener. 2020, 14, 551–559. [Google Scholar] [CrossRef]
- Gu, X.; Akoglu, L.; Rinaldo, A. Statistical analysis of nearest neighbor methods for anomaly detection. In Proceedings of the 2019 Conference on Neural Information Processing Systems, Vancouver, BC, Canada, 8–14 December 2019; Volume 32. [Google Scholar]
- Leon-Lopez, K.M.; Mouret, F.; Arguello, H.; Tourneret, J.Y. Anomaly detection and classification in multispectral time series based on hidden Markov models. IEEE Trans. Geosci. Remote. Sens. 2021, 60, 1–11. [Google Scholar] [CrossRef]
- Gong, D.; Liu, L.; Le, V.; Saha, B.; Mansour, M.R.; Venkatesh, S.; Hengel, A.V.D. Memorizing normality to detect anomaly: Memory-augmented deep autoencoder for unsupervised anomaly detection. In Proceedings of the IEEE/CVF International Conference on Computer Vision, Seoul, Republic of Korea, 27 October–2 November 2019. [Google Scholar]
- Ahmad, Z.; Shahid Khan, A.; Nisar, K.; Haider, I.; Hassan, R.; Haque, M.R.; Tarmizi, S.; Rodrigues, J.J.P.C. Anomaly detection using deep neural network for IoT architecture. Appl. Sci. 2021, 11, 7050. [Google Scholar] [CrossRef]
- Omar, S.; Ngadi, A.; Jebur, H.H. Machine Learning Techniques for Anomaly Detection: An Overview. Int. J. Comput. Appl. 2013, 79, 33–41. [Google Scholar] [CrossRef]
- Zhou, Y.; Song, X.; Zhang, Y.; Liu, F.; Zhu, C.; Liu, L. Feature encoding with autoencoders for weakly supervised anomaly detection. IEEE Trans. Neural Netw. Learn. Syst. 2021, 33, 2454–2465. [Google Scholar] [CrossRef] [PubMed]
- Shujian, Y.; Príncipe, J.C. Understanding Autoencoders with Information Theoretic Concepts. Neural Netw. 2019, 117, 104–123. [Google Scholar]
- Qian, J.; Song, Z.; Yao, Y.; Zhu, Z.; Zhang, X. A Review on Autoencoder Based Representation Learning for Fault Detection and Diagnosis in Industrial Processes. Chemom. Intell. Lab. Syst. 2022, 231, 104711. [Google Scholar] [CrossRef]
- Charte, D.; Charte, F.; del Jesus, M.J.; Herrera, F. An analysis on the use of autoencoders for representation learning: Fundamentals, learning task case studies, explainability and challenges. Neurocomputing 2020, 404, 93–107. [Google Scholar] [CrossRef]
- Song, Y.; Hyun, S.; Cheong, Y.G. Analysis of autoencoders for network intrusion detection. Sensors 2021, 21, 4294. [Google Scholar] [CrossRef] [PubMed]
- Nguyen, D.T.; Lou, Z.; Klar, M.; Brox, T. Anomaly Detection With Multiple-Hypotheses Predictions. Int. Conf. Mach. Learn. 2019, 4800–4809. [Google Scholar]
- Liu, J.; Song, K.; Feng, M.; Yan, Y.; Tu, Z.; Zhu, L. Semi-supervised Anomaly Detection with Dual Prototypes Autoencoder for Industrial Surface Inspection. Opt. Lasers Eng. 2021, 136, 106324. [Google Scholar] [CrossRef]
- Angelov, S.; Lazarova, M. Convolutional Autoencoders for Image Comparison in Printing Industry Quality Control. In Proceedings of the 2022 10th International Scientific Conference on Computer Science (COMSCI), Sofia, Bulgaria, 30 May–2 June 2022. [Google Scholar]
- Kozamernik, N.; Bračun, D. Visual inspection system for anomaly detection on KTL coatings using variational autoencoders. Procedia CIRP 2020, 93, 1558–1563. [Google Scholar] [CrossRef]
- Heger, J.; Desai, G.; El Abdine, M.Z. Anomaly detection in formed sheet metals using convolutional autoencoders. Procedia CIRP 2020, 93, 1281–1285. [Google Scholar] [CrossRef]
- Niu, T.; Li, B.; Li, W.; Qiu, Y.; Niu, S. Positive-sample-based surface defect detection using memory-augmented adversarial autoencoders. IEEE ASME Trans. Mechatron. 2021, 27, 46–57. [Google Scholar] [CrossRef]
- Kim, J.; Ko, J.; Choi, H.; Kim, H. Printed circuit board defect detection using deep learning via a skip-connected convolutional autoencoder. Sensors 2021, 21, 4968. [Google Scholar] [CrossRef] [PubMed]
- Maggipinto, M.; Beghi, A.; Susto, G.A. A deep convolutional autoencoder-based approach for anomaly detection with industrial, non-images, 2-dimensional data: A semiconductor manufacturing case study. IEEE Trans. Autom. Sci. Eng. 2022, 19, 1477–1490. [Google Scholar] [CrossRef]
- Ren, H.; Chai, Y.; Qu, J.; Zhang, K.; Tang, Q. An intelligent fault detection method based on sparse auto-encoder for industrial process systems: A case study on tennessee eastman process chemical system. In Proceedings of the 2018 10th International Conference on Intelligent Human-Machine Systems and Cybernetics (IHMSC), Hangzhou, China, 25–26 August 2018; Volume 1. [Google Scholar]
- Zhu, J.; Jiang, M.; Liu, Z. Fault detection and diagnosis in industrial processes with variational autoencoder: A comprehensive study. Sensors 2021, 22, 227. [Google Scholar] [CrossRef] [PubMed]
- Davletshina, D.; Melnychuk, V.; Tran, V.; Singla, H.; Berrendorf, M.; Faerman, E.; Fromm, M.; Schubert, M. Unsupervised Anomaly Detection for X-Ray Images. arXiv 2020, arXiv:2001.10883. [Google Scholar]
- Mao, Y.; Xue, F.F.; Wang, R.; Zhang, J.; Zheng, W.S.; Liu, H. Abnormality detection in chest X-ray images using uncertainty prediction autoencoders. In Proceedings of the Medical Image Computing and Computer Assisted Intervention–MICCAI 2020: 23rd International Conference, Proceedings, Part VI 23, Lima, Peru, 4–8 October 2020; Springer: Berlin/Heidelberg, Germany, 2020. [Google Scholar]
- Tekawade, A.; Liu, Z.; Kenesei, P.; Bicer, T.; De Carlo, F.; Kettimuthu, R.; Foster, I. 3d autoencoders for feature extraction in X-ray tomography. In Proceedings of the 2021 IEEE International Conference on Image Processing (ICIP), Anchorage, AK, USA, 19–22 September 2021. [Google Scholar]
- Presenti, A.; Liang, Z.; Alves Pereira, L.F.; Sijbers, J.; De Beenhouwer, J. Automatic anomaly detection from X-ray images based on autoencoders. Nondestruct. Test. Eval. 2022, 37, 552–565. [Google Scholar] [CrossRef]
- Tang, W.; Vian, C.M.; Tang, Z.; Yang, B. Anomaly detection of core failures in die casting X-ray inspection images using a convolutional autoencoder. Mach. Vis. Appl. 2021, 32, 102. [Google Scholar] [CrossRef]
- Ren, J.; Ren, R.; Green, M.; Huang, X. Defect detection from X-ray images using a three-stage deep learning algorithm. In Proceedings of the 2019 IEEE Canadian Conference of Electrical and Computer Engineering (CCECE), Edmonton, AB, Canada, 5–8 May 2019. [Google Scholar]
- Sandler, M.; Howard, A.; Zhu, M.; Zhmoginov, A.; Chen, L.C. MobileNetV2: Inverted Residuals and Linear Bottlenecks. In Proceedings of the 2018 IEEE/CVF Conference on Computer Vision and Pattern Recognition, Salt Lake City, UT, USA, 18–23 June 2018; pp. 4510–4520. [Google Scholar]
- Deng, J.; Dong, W.; Socher, R.; Li, L.J.; Li, K.; Fei-Fei, L. ImageNet: A large-scale hierarchical image database. In Proceedings of the 2009 IEEE Conference on Computer Vision and Pattern Recognition, Miami, FL, USA, 20–25 June 2009; pp. 248–255. [Google Scholar]
- Bergmann, P.; Batzner, K.; Fauser, M.; Sattlegger, D.; Steger, C. The MVTec Anomaly Detection Dataset: A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. Int. J. Comput. Vis. 2021, 129, 1038–1059. [Google Scholar] [CrossRef]
- Bergmann, P.; Fauser, M.; Sattlegger, D.; Steger, C. MVTec AD—A Comprehensive Real-World Dataset for Unsupervised Anomaly Detection. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR), Long Beach, CA, USA, 15–20 June 2019; pp. 9584–9592. [Google Scholar]
- Malesa, M.; Rajkiewicz, P. Quality Control of PET Bottles Caps with Dedicated Image Calibration and Deep Neural Networks. Sensors 2021, 21, 501. [Google Scholar] [CrossRef]
- Yu, J.; Zheng, Y.; Wang, X.; Li, W.; Wu, Y.; Zhao, R.; Wu, L. FastFlow: Unsupervised Anomaly Detection and Localization via 2D Normalizing Flows. arXiv 2021, arXiv:2111.07677. [Google Scholar]
- Batzner, K.; Heckler, L.; König, R. EfficientAD: Accurate Visual Anomaly Detection at Millisecond-Level Latencies. arXiv 2023, arXiv:2303.14535. [Google Scholar]
- Ahuja, N.A.; Ndiour, I.; Kalyanpur, T.; Tickoo, O. Probabilistic Modeling of Deep Features for Out-of-Distribution and Adversarial Detection. arXiv 2019, arXiv:1909.11786. [Google Scholar]
- Defard, T.; Setkov, A.; Loesch, A.; Audigier, R. PaDiM: A Patch Distribution Modeling Framework for Anomaly Detection and Localization. In International Conference on Pattern Recognition; Springer International Publishing: Cham, Switzerland, 2021. [Google Scholar]
- Akcay, S.; Ameln, D.; Vaidya, A.; Lakshmanan, B.; Ahuja, N.; Genc, U. Anomalib: A Deep Learning Library for Anomaly Detection. In Proceedings of the 2022 IEEE International Conference on Image Processing (ICIP), Bordeaux, France, 16–19 October 2022; pp. 1706–1710. [Google Scholar]
- Intel® Distribution of OpenVINO™ Toolkit. Available online: https://www.intel.com/content/www/us/en/developer/tools/openvino-toolkit/overview.html (accessed on 1 December 2023).
- Kim, K.; Kim, H.; Chun, J.; Kang, M.; Hong, M.; Min, B. Real-Time Anomaly Detection in Packaged Food X-Ray Images Using Supervised Learning. Comput. Mater. Contin. 2021, 67, 2547–2568. [Google Scholar] [CrossRef]
- Wang, Y.; Zhang, Y.; Zheng, L.; Yin, L.; Chen, J.; Lu, J. Unsupervised Learning with Generative Adversarial Network for Automatic Tire Defect Detection from X-ray Images. Sensors 2021, 21, 6773. [Google Scholar] [CrossRef]
Layer Type | Neurons |
---|---|
Input | 7840 |
Dropout | |
Dense | 128 |
BatchNormalization | |
Dense | 64 |
BatchNormalization | |
Dense | 64 |
BatchNormalization | |
Dense | 64 |
BatchNormalization | |
Dense | 256 |
BatchNormalization | |
Dense | 7840 |
MVTec AD | Pills Dataset | Bottle Cap Dataset | ||||
---|---|---|---|---|---|---|
Method | AUROC | F1-Score | AUROC | F1-Score | AUROC | F1-Score |
FastFlow | 0.907/0.979 | 0.916 | 0.985 | 0.957 | 1.0 | 1.0 |
EfficientAD | 0.982/0.988 | 0.970 | 0.961 | 0.932 | 1.0 | 1.0 |
DFKDE | 0.762 | 0.872 | 0.954 | 0.905 | 0.992 | 0.969 |
DFM | 0.936 | 0.943 | 0.990 | 0.975 | 1.0 | 1.0 |
PaDiM | 0.891 | 0.916 | 0.993 | 0.956 | 0.996 | 0.996 |
PatchCore | 0.980/0.990 | 0.976 | 0.997 | 0.987 | 1.0 | 1.0 |
Our | 0.908 | 0.925 | 0.985 | 0.960 | 1.0 | 1.0 |
Method | Latency [ms] | Training Time—Pills Dataset [s] | Training Time—Bottle Cap Dataset [s] |
---|---|---|---|
FastFlow | 50.3 | 3308 | 2072 |
EfficientAD | 128.0 | 12,779 | 2091 |
DFKDE | 24.7 | 123 | 117 |
DFM | 47.6 | 165 | 143 |
PaDiM | 35.6 | 138 | 127 |
PatchCore | 438.4 | 7699 | 3741 |
Our | 3.5 | 13 | 10 |
Set Name or Number | ||||||||
---|---|---|---|---|---|---|---|---|
Ref. Set | 1 | 2 | 3 | 4 | 5 | 6 | 7 | |
Training set size | 357 | 306 | 257 | 208 | 154 | 106 | 57 | 10 |
Training set | 97% | 95% | 95% | 96% | 97% | 0% | 0% | 100% |
Nondefective test set | 96% | 93% | 94% | 97% | 98% | 7% | 0% | 100% |
Defective test set | 88% | 93% | 92% | 91% | 91% | 98% | 100% | 0% |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2023 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (https://creativecommons.org/licenses/by/4.0/).
Share and Cite
Kocon, M.; Malesa, M.; Rapcewicz, J. Ultra-Lightweight Fast Anomaly Detectors for Industrial Applications. Sensors 2024, 24, 161. https://doi.org/10.3390/s24010161
Kocon M, Malesa M, Rapcewicz J. Ultra-Lightweight Fast Anomaly Detectors for Industrial Applications. Sensors. 2024; 24(1):161. https://doi.org/10.3390/s24010161
Chicago/Turabian StyleKocon, Michał, Marcin Malesa, and Jerzy Rapcewicz. 2024. "Ultra-Lightweight Fast Anomaly Detectors for Industrial Applications" Sensors 24, no. 1: 161. https://doi.org/10.3390/s24010161
APA StyleKocon, M., Malesa, M., & Rapcewicz, J. (2024). Ultra-Lightweight Fast Anomaly Detectors for Industrial Applications. Sensors, 24(1), 161. https://doi.org/10.3390/s24010161