Aiming at the existing problems of low efficiency and poor consistency in the damage detection of retired shaft parts by traditional detection methods,an improved YOLOv5-based surface damage detection method for retired shaft parts is proposed.Firstly,the attention mechanism is embedded into the detection algorithm to enhance the feature representation of damage in the image.Then the network structure of the detection model is improved by using the repeated weighted bidirectional feature fusion method to effectively enhance the network feature extraction capability.Finally,Ghostconv convolution module is used instead of normal convolution,which drastically reduces the number of model parameters.The experimental results show that the accuracy of the modified algorithm model has improved by 6.9%compared to the original YOLOv5,reaching 88.4%,while the number of model parameters has reduced by 6.1%,ensuring the detection speed is on par with YOLOv5.Compared with such mainstream detection methods as YOLOv3,SSD and Faster-RCNN,its detection accuracy has a significant advantage while ensuring a higher detection speed.