Search for a command to run...
Abstract Aluminum alloy ingot surface defect detection technology is crucial to ensure that product quality meets standards. Existing inspection model inspection precision and speed are difficult to meet requirements of fast and accurate detection on production lines, to address this problem, a new real-time surface defect detection algorithm Al-YOLO on aluminum alloy ingot casting line was proposed. Firstly, K-Means++ was embedded into YOLOv5 to optimize the detection anchor frame for the aluminum alloy ingot scenario. Secondly, the structural reparameterization technique was used to design the main trunk to speed up the model inference speed. Then combined with the dynamic head framework known as DyHead, the attention mechanism was unified with the detector’s head, thereby enhancing the precision of small defect identification. Finally, the Focal function was introduced, and combined with EIoU to get the Focal-EIoU border regression loss function to address the uneven sample distribution. On the aluminum alloy ingot surface defects dataset, the mAP of Al-YOLO reaches 72.5%, and the FPS also reaches 57.1, which improves the mAP and FPS by 4.0% and 11.2, respectively, compared to the original model, and outperforms the current mainstream detection methods on the NEU-DET dataset. Experimental evidence Al-YOLO has better inspection precision and speed, which can better adapted to the requirements of fast and accurate detection in production lines.