Learning To Detect And Localize Anomaly Using Thin Plate Spline Transformation
Dini, Afshin (2022)
Dini, Afshin
2022
Master's Programme in Computing Sciences
Informaatioteknologian ja viestinnän tiedekunta - Faculty of Information Technology and Communication Sciences
This publication is copyrighted. You may download, display and print it for Your own personal use. Commercial use is prohibited.
Hyväksymispäivämäärä
2022-10-20
Julkaisun pysyvä osoite on
https://urn.fi/URN:NBN:fi:tuni-202210067461
https://urn.fi/URN:NBN:fi:tuni-202210067461
Tiivistelmä
Detecting and localizing anomalies in vision applications is a topic of interest in the field of computer vision and machine learning. Detecting defective products of a factory production line by analyzing images of final products, recognizing the existence of injuries and diseases in medical images, and video surveillance are some of these applications in which irregular patterns that differ significantly from normal ones will be detected by appropriate anomaly detection methods. Although many recent researches have focused on developing data-driven methods to find visual defects properly, they face some challenges due to inherent properties of abnormalities such as unknownness, rarity, and diversity.
Since anomalies are diverse and unknown, as any type of irregularity can be considered an anomaly, and they are unknown until they occur in the real world, it is challenging to develop a generalized model that can detect all types of unknown anomalies precisely. The main goal of this thesis is to investigate these challenges in more detail and try to develop a generalized model that can detect and locate various types of subtle and large-size anomalies properly.
We find out that using simulated anomalies that are similar to real defects in the training procedure of a model helps to develop more generalized detectors. The most important thing in creating artificial anomalies is that they should be as similar to real defects as possible and random in size and location to meet the diversity and unknownness properties of real anomalies. In this regard, we develop a two-stage self-supervised learning approach where in the first stage, a pre-trained neural network is optimized with the help of artificial anomalies of various sizes and shapes, which are created based on applying random thin-plate spline (TPS) transformation to the eminent area of normal images selected by the Canny edge detector technique, and then in the second stage, the optimized model is utilized to detect anomalous data from the normal ones.
We evaluate the proposed method on the MVTec dataset and discover that it outperforms the previous anomaly detection methods due to the ability of TPS transformation to simulate various types of fine-grained and large-size defects that are monolithic in borders and are more similar to real defects. Utilizing the Canny edge detector also helps the method to create anomalies on the random prominent areas of an image instead of background areas which itself leads to better results. Moreover, this method is computationally efficient in both training and testing phases since it fine-tunes a pre-trained model instead of training one from scratch. These features make our approach a suitable candidate for detecting and localizing anomalies in real-world applications, as we discuss in this thesis.
Since anomalies are diverse and unknown, as any type of irregularity can be considered an anomaly, and they are unknown until they occur in the real world, it is challenging to develop a generalized model that can detect all types of unknown anomalies precisely. The main goal of this thesis is to investigate these challenges in more detail and try to develop a generalized model that can detect and locate various types of subtle and large-size anomalies properly.
We find out that using simulated anomalies that are similar to real defects in the training procedure of a model helps to develop more generalized detectors. The most important thing in creating artificial anomalies is that they should be as similar to real defects as possible and random in size and location to meet the diversity and unknownness properties of real anomalies. In this regard, we develop a two-stage self-supervised learning approach where in the first stage, a pre-trained neural network is optimized with the help of artificial anomalies of various sizes and shapes, which are created based on applying random thin-plate spline (TPS) transformation to the eminent area of normal images selected by the Canny edge detector technique, and then in the second stage, the optimized model is utilized to detect anomalous data from the normal ones.
We evaluate the proposed method on the MVTec dataset and discover that it outperforms the previous anomaly detection methods due to the ability of TPS transformation to simulate various types of fine-grained and large-size defects that are monolithic in borders and are more similar to real defects. Utilizing the Canny edge detector also helps the method to create anomalies on the random prominent areas of an image instead of background areas which itself leads to better results. Moreover, this method is computationally efficient in both training and testing phases since it fine-tunes a pre-trained model instead of training one from scratch. These features make our approach a suitable candidate for detecting and localizing anomalies in real-world applications, as we discuss in this thesis.