| At present,there are some problems in cocoon sorting process,such as high manual participation,low efficiency and backward automatic device,etc.,so the industry is in urgent need of upgrading cocoon defect detection technology to improve the quality of raw silk.Therefore,in order to meet the intelligent requirements of cocoon sorting technology,this paper carried out the application research of cocoon defect detection algorithm.The specific research contents and work are as follows:1.An improved YOLOv5 multi-object cocoon defect detection algorithm was proposed.Taking the reelable cocoons,yellow-spotted cocoons,decayed cocoons and cocoons pressed by cocooning frame as the objects,the residual layer structure was modified and the attention mechanism was introduced to enhance the network’s attention to the defect features,weaken the interference of complex background,and improve the accuracy of target detection.Soft-NMS algorithm was used to optimize the late-stage prediction box screening strategy to reduce the rate of missed detection.The improved algorithm has an average accuracy of 95.78% and recognition speed of40.7ms,which can realize real-time detection of multi-target cocoon defects.2.A lightweight cocoon defect detection and tracking algorithm was deployed on edge computing equipment.Considering the limitation of platform resources,Mobile Net V2 was used to replace the backbone feature extraction network of YOLOv5,which reduced the number of model parameters by 60%.In order to improve the stability of dynamic cocoon detection,Deep SORT algorithm was used to obtain the prediction frame information of each image defect,predict the motion track of the prediction frame and update the status.The improved algorithm realizes multi-target cocoon tracking.3.Combined with the improved algorithm,a cocoon defect detection system was established.The system can realize the functions of real-time detection and tracking of cocoon defects,image storage,operator information management,report query and print,and data traceability. |