Casting Surface Defect Detection Model Based on CCD-YOLOv5 Algorithm
Aiming at the complexities of diverse casting surface defect detection objects,ambiguous targets,and vary-ing features,an enhanced YOLOv5-based model for casting surface defect detection was proposed.The data samples were subjected to flipping,rotation,and color adjustment techniques,alongside the utilization of 9-Mosaic data enhancement to broaden sample pool and enrich characteristics.CSPDarknet53 module was replaced with C2f module,aiming to enrich gradient information within lightweight network.CA attention mechanism was introduced to enhance generalization capabilities of model.Additionally,coupled-head module was replaced with decoupled-head module,enabling a faster fitting process.Consequently,the modified CCD-YOLOv5 model exhibits an increasing defect detec-tion accuracy from 78.2%to 82.9%,and recall rate is enhanced from 74.3%to 76.7%,while mAP@0.5 value is enhanced from 76.4%to 81.0%.The results indicate that the modified model effectively enhances overall recognition performance.