| With the continuous improvement of the level of automation,the production process of ceramic tiles has been basically automated,but most of the quality inspection links are still detected manually.The coast of manual detection is high and the efficiency is low,so it is of great significance and value to design an efficient tile defect detection algorithm.In recent years,target detection algorithms based on deep learning have been applied to various fields,and the YOLOv5 target detection algorithm is one of them,which has a good detection effect.Therefore,the tile defect detection is combined with the YOLOv5 target detection algorithm,and a tile defect detection model based on improved YOLOv5 is proposed to verify the effectiveness of the improved algorithm in tile defect detection.The main contents are as follows:(1)The original tile defect dataset used was analyzed.For the problem of large image size and imbalance between categories in the original dataset,image cutting and data enhancement were used for processing.Finally a total of 19,900 tile defect images were generated for model training and testing.(2)Research on performance optimization of YOLOv5 detection model.Four attention modules nodules of SE,CBAM,ECA and CA were added to the backbone network of YOLOv5 to enhance the model’s ability to ectract key features.After comparative analysis on the tile defect dataset,adding the SE attention module could increase the average detection accuracy(m AP)of the model the most,from 69.69% to 70.51%.The feature fusion structure of YOLOv5 was improved,and the bidirectional weighted feature pyramid network(Bi FPN)was introduced to enhance the feature fusion effect.The average detection accuracy(m AP)of the model was increased from 69.69% to70.98%.The 3×3 convolution block of YOLOv5 was structurally reparameterized,1×1 convolution branch and identity mapping branch were added during the training process,and the three branches were combined during the inference process.The m AP of the model increased from 69.69% to 70.50%.After combining the above three improvement measures,the final optimization model was obtained,and its m AP was increased by 3.47 percentage points to73.16%,which verified the effectiveness of the improvement measures.(3)Due to the low computing power of edge devices such as mobile terminals,large models cannot be deployed.Take YOLOv5 as an example to make lightweight improvements.The backbone of YOLOv5 was improved by introducing three modules: depthwise separable convolution,channel shuffling and Ghost Module.The detection performance,parameter amount and calculation amount of the model were compared and analyzed on the tile defect dataset.Finally,it was concluded that all three methods can reduce the amount of parameters and computation of the model.The YOLOv5 based on depthwise separable convolution reduced the amount of parameters and computation by28.9% and 33.5%,respectively,and m AP decreased by 1.54%.YOLOv5 based on channel shuffling dropped the most parameters and computations by 81.38%and 76.58%,m AP dropped by up to 6.71%.The improved YOLOv5 based on Ghost Module reduced the amount of parameters and computation to about half of the original,and the m AP droped by 3.19%.It can be found that usually smaller models also have lower detection performance.Specifically,an appropriate detection model can be selected according to the actual application scenario and equipment. |