{'fraction_non_alphanumeric': 0.027414330218068536, 'fraction_numerical': 0.0024922118380062306, 'mean_word_length': 5.424, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
SMD Anomaly Detection: A Self-Supervised Texture–Structure Anomaly Detection Framework

In electronic manufacturing, anomaly detection of surface mount devices (SMDs) through computer vision (CV) is an important task to control the production quality of SMDs. The difficulty of the detection is that some anomalous regions on the surfaces of SMDs are very minor and with variable shapes, which leads to poor detection efficiency. To solve this problem, based on the assumption that normal samples can be reconstructed more accurately than anomalous samples, a self-supervised image anomaly detection framework with a multiscale two-branch feature fusion strategy is proposed. Specifically, it adopts autoencoder (AE) as the basic framework, and to enhance the reconstruction error between input anomalous samples and the reconstructed ones, a self-supervised learning task of reconstructing images is introduced to have the model neglect the encoding of the suspected anomalous regions found by a contextual attention mask (CAM) module. Meanwhile, a multiscale feature fusion strategy is developed to fuse texture and structure features in the decoder to reconstruct samples. Moreover, a multilevel anomalous score criterion is proposed to enlarge the scores for the samples with very minor anomalies. At last, an SMD-capacitor anomaly detection dataset (SMDC-DET) is built to evaluate the proposed method. The experiments show that the proposed method achieves an average area under the curve (AUC) accuracy of 98.82%, much better when compared to the start-of-the-art existing anomaly detection methods.