Article ID: ISIJINT-2022-035
Object detection algorithms like Faster R-CNN have been widely used in the field of industrial defect detection. For weld defect detection, its detection accuracy for some small targets and difficult-to-classify defects is not high. This paper proposes a Cascade R-CNN detection model for weld defects based on bidirectional multi-scale feature fusion and shape pre-classification. There are defects of different sizes in the weld. In order to improve the detection ability of the model for multi-size defects, the model adopts the bidirectional feature pyramid network, in which an extra bottom-up path after the top-down path aggregation network and an extra edge from the original input to output node are added. According to the statistics of the proportion distribution of long and short axes of weld defects, the defects can be divided into two categories: long strip defects with the proportion of about 2:1 and approximate circle defects with a much bigger proportion. Therefore, each cascade detector is connected in parallel with a two-categories classifier for long strip and approximate circle defects and a five-categories classifier for five specific defects, so as to realize the pre-classification of two morphological defects and mine the difference between the two shapes of defects. In order to avoid over fitting caused by small datasets. Firstly, noise is added to augment the data. Then the training samples are expanded by random flip and mirror in the training, and OHEM is introduced to balance the selection of positive and negative samples. The experimental results show that the detection accuracy of the model on small targets and difficult-to-classify defects is significantly improved. The mAP value is increased by about 9.3% compared with the traditional Faster R-CNN and about 3.3% compared with the traditional Cascade R-CNN.