The detection of surface defects in textiles is the most important step in the quality inspection process.Low efficiency,large fluctuation of precision and serious harming to human health are some defects of the traditional manual detection methods.Meanwhile,some existing automated detection methods require artificial design feature representation which depends greatly on experience and luck that affects the iteration and generalization ability of the algorithm.In recent years,convolutional neural network technology has developed rapidly.Many breakthroughs have been achieved in the detection and identification of targets.Therefore,based on the actual research,this paper applies the convolutional neural network technology to the defect detection of textiles(plain cloth).Firstly,this paper analyzes the technical difficulties of textile defect detection.And then the corresponding improved algorithm is proposed to achieve fast and accurate detection of textile defects through the research of classical detection algorithm and deep learning.Then,this paper first analyzes various weaknesses of classical methods.Then we design the parallel network structure to extract features,fusing the features by the deep fuse.We solve the problem of low detection efficiency caused by high resolution and guarantee detection accuracy through these improvements in the end.Also this paper analyzes the limitations of the classical data enhancement method in the detection of textile defects.Given the characteristics of the defective images of textiles,we improve SMOTE to enrich sample diversity and design Copy-Pasting method to enrich the defect location diversity.The generalization and robustness of the model is improved by artificially generating data enhancement methods for new samples.And this paper designs the characteristic pyramid network structure under the attention mechanism.The feature information used in the detection is added through the feature pyramid to strengthen the detection of minor defects,and the attention mechanism is used to add weight to the features of each position to enhance the significant features and suppress the ineffective interference.Then,this paper analyzes the disadvantages of traditional cross entropy Loss in the treatment of too few detection targets and uses Focal Loss to measure the classification error,enhance the weight of Loss in the foreground frame,strengthen the training of hard-to-classify samples,and improve the accuracy.Finally,this paper completes the design of a complete end-to-end network,connects various improvement methods,and completes the training of a convolutional neural network.Through the experimental analysis,the research algorithm in this paper has certain advantages in various aspects compared with the existing detection network and can meet the requirements of precision and efficiency of industrial production. |