Hierarchical Multi-Scale Feature Fusion Combined with Convolutional Block Attention Modules for Industrial Defect Detection and Classification
Abstract
Quality control in manufacturing is expensive because the cost of manual inspection is high for several reasons: it is slow, inconsistent, and does not scale. Even control by image processing systems can be very expensive because it works well when everything is under control, i.e. when the lighting is fixed and the defects are all of a certain morphology. When any of these factors vary, then the rules must be changed and the system must be re-tuned. This paper describes a defect detection network that uses hierarchical multi-scale feature extraction in conjunction with Convolutional Block Attention Modules (CBAMs) to improve defect detection. Three parallel convolutional branches are used, each of which corresponds to a different depth in a ResNet-34 backbone. The first branch extracts fine-grained features at 56×56 pixels, the second extracts structural features at 28×28 pixels, and the third extracts global features at 14×14 pixels. The outputs of the three branches are attended by three independent CBAMs and then merged by a learnable weighted sum to produce a single set of features. These features are refined by another CBAM before being classified. The network was tested on the NEU surface defect database and on six different texture categories from the MVTec dataset. The results show an average F1-score of 92.00% on the NEU database and 93.63% on the MVTec dataset, an increase of 0.92% and 3.37%, respectively, over a plain CNN. The results show that the proposed hierarchical multi-scale network design becomes more valuable as the diversity of the samples in the dataset increases.