Fig. 3 Online data augmentation expansion dataset
⑵ Data augmentation
Large-scale datasets can enhance the generalization ability[17] and robustness of target detection models[18]. The effects of data enhancement are as follows: ⑴ Increase the amount of data for training to improve the generalization ability of the model. ⑵ Increase the noisy data to improve the robustness of the model and avoid overfitting[19]. Data augmentation can be divided into two categories: ⑴offline augmentation, ⑵online augmentation. Online augmentation enhances the acquired batch data, such as rotation, translation, folding, etc. And is used in the case of a larger dataset size.
In this paper, online augmentation is used to expand the surface defect dataset, and the online data enhanced image is shown in Figure 3. After data augmentation, surface images are obtained and divided into training data set, validation data set and test data set according to the ratio of 7:2:1.
Tab 1 Table of data set size and number of defects