Fabric defect detection with an attention mechanism based on hard sample training
In view of the various types of fabric defects, and the problems of confusion, density unevenness and small target defects, which are difficult to detect, this paper builds a deep learning defect detection network incorporating an attention mechanism. The data augmentation strategy is used to enrich the number of samples of each defective type, and the enriched samples were extracted by the feature extraction network integrated with the attention mechanism, which can improve the feature extraction ability of confusable defect types and small defect types. Region proposal generation generates a proposal box for extracted features, and adds an online hard example mining strategy to re-learn hard examples to accelerate network convergence. Region feature aggregation maps the proposal box to the feature map to obtain the region of interest. Finally, the defect features are classified and the bounding boxes are regressed. The results show that this algorithm can effectively detect 39 categories of fabric defects with a detection speed of 0.085 s and a detection accuracy of 0.9338.