Defects in cotton production process will seriously affect the quality of cotton products and bring great economic losses to enterprises.Defect detection is an important measure to ensure the quality of cotton products.Manual inspection requires high-intensity work to complete the inspection task,which is prone to missed inspections and false inspections due to visual fatigue.Therefore,machine vision technology has gradually been applied in the field of cotton defect inspection.Recently,deep learning models have been applied to the field of cotton defect detection,which further improves the detection effect and reduces labor costs.However,most of the current cotton defect detection methods based on convolutional neural networks cannot achieve good results in terms of speed and accuracy.The research direction needs to be further improved and perfected.Based on the EfficientDet framework,this paper proposes three cotton defect detection models,which have good performance in detection speed and accuracy.The research of this paper mainly include:(1)The target aimed at the categories of cotton defect are unbalanced,the size of the defects varies greatly,and the small defect targets are not easy to detect under weak contrast,by comparing some popular target detection frameworks based on convolutional neural networks,the current novel EfficientDet is selected as the benchmark frame of the cotton defect detection model.The EfficientDet model improves the accuracy and efficiency of the detection model by compound scaling the size of the backbone network.The model based on Bi FPN adapts to the task of defect target detection at different scales,and has good detection effect for weak defect targets.The Focal Loss classification function helps to minimize the influence of the imbalance of defect categories and detection accuracy.Compared with the mainstream one-stage target detection models YOLO v3,YOLO v4 and the two-stage target detection model Faster RCNN,the average accuracy of the EfficientDet detection model in this paper is 94.83%,and it has better detection performance of cotton cloth defects.(2)In the process of feature extraction of cotton defect targets,using the same attention to global information will lead to low efficiency of feature information extraction.The channel attention mechanism pays attention to important information during feature extraction,but cannot obtain the global positional relationship.This paper introduces the CA attention mechanism of fusion position information to improve the feature extraction ability and detection accuracy;in addition,an improved CBi FPN feature fusion strategy is proposed,which increases the feature fusion of different levels and improves the multi-scale feature fusion effectively.The results show that the CA attention mechanism fused with location information and the improved CBi FPN feature fusion method can improve the average accuracy of the model by 0.92%.(3)At present,the vast majority of deep learning target detection models are based on anchor boxes,but anchor boxes will bring a large number of sensitive hyperparameters,increase the computational load of the network,and make model training more difficult.In response to the mentioned concerns,this article provides an approach without anchor,using position instead of anchor frame for training,and introducing the "centrality" strategy to improve the quality of training samples.This method reduces the number of parameters of the model,makes the model training simpler,improves the speed of defect target detection,and the accuracy can even exceed of the anchor-based method.It shows that the anchor-free method improves the average accuracy of the model by 0.48% and the detection speed FPS by 3.8,which effectively improves the performance of the model.With experimental and comparative analysis of cotton defect samples provided by production enterprises and publicly available datasets,the model proposed in this paper is suitable for unbalanced defect samples and large range of scale changes.The model also has good detection ability to weak and small flaw targets,The speed and accuracy of detection have been further improved,which is significantly superior to the prevalent cotton flaw detection patterns.The research enhances the quality and productivity of cotton textile enterprises,and has good practical value. |