Abstract:The surface crack detection and localization for titanium bar polishing was identified as a fundamental step in the manufacturing of titanium profiles. To address the issues of low detection accuracy, poor generalization ability, and low computational efficiency of traditional target detection models for narrow cracks, an improved YOLOv8s model named DEBM-YOLO was proposed. The ELA attention mechanism was added to capture long-range spatial dependencies of cracks. The DCNv3 convolution module was adopted to enhance the receptive field and representation ability of the backbone network. A bidirectional weighted feature pyramid structure replaced the original feature pyramid structure in YOLOv8 to improve multi-scale feature fusion. Finally, MPDIoU was used instead of CIoU to boost generalization performance and convergence speed. Experiments on a dataset captured in real environments showed that the improved DEBM-YOLO model reduced the number of parameters by 4.5%, increased precision by 1.9%, raised mAP@0.5 by 1.4%, mAP@0.5:0.95 by 1.9%, and recall by 4.9%. The model now achieves both enhanced detection accuracy and lightweight design.