Abstract:In order to solve the problems of low detection accuracy, high computational complexity and high false detection and missed detection rate of the current road defect detection model in complex background, this paper is improved based on the YOLOv8 model. Firstly, the EMA attention mechanism is integrated into the feature extraction network(Backbone) of the model to improve the feature representation ability of the model, while retaining important information and reducing the computational cost .Secondly, the lightweight feature fusion network structure SlimNeck and the weighted feature fusion mechanism Weighted Fusion were combined to form a new neck network structure SWNeck, which effectively reduced the number of model parameters and computational complexity, improved the feature fusion efficiency, and reduced the feature redundancy of noise. Finally, the Slide Loss weight function is introduced to give greater weight to the samples that are difficult to classify correctly, improve the learning ability of the model for difficult sample data in road defects, and further enhance the detection performance of the model.The experimental results show that the improved road defect detection model improved mAP by 2.7% compared to the original YOLOv8n model, and the amount of parameters and computational complexity of the model were reduced by 7% and 10%, respectively.