Abstract:Addressing the issues of image blurring and uneven light distribution encountered when capturing images in adverse weather conditions, which lead to decreased scene contrast and subsequently increase the difficulty of distinguishing detection targets from the background in images, this paper proposes an improved YOLOv8s algorithm to enhance the detection capability of vehicles and pedestrians in harsh weather environments. Firstly, based on the YOLOv8s algorithm, this paper optimizes the C2F module in the backbone network with an expandable residual structure, enhancing the model′s adaptability to environmental changes. At the same time, an efficient multi-scale attention mechanism is introduced before the SPPF module in the backbone network, which can more effectively capture the rich and varied multi-scale features in images. Secondly, the detection head of the YOLOv8s algorithm is redesigned to reduce the model′s complexity while maintaining accuracy. Finally, the introduction of Wise-IoU improves the regression loss function of the YOLOv8s algorithm, enhancing the algorithm′s convergence speed and detection accuracy. Experimental results show that the improved YOLOv8s algorithm achieves an mean average precision of 91.41% on datasets for vehicle and pedestrian detection under adverse weather conditions, which is a 2.56% improvement over the original algorithm, with a model parameter reduction of 8% and a computational reduction of 4.9 GFLOPs. Compared to other mainstream object detection algorithms, the significantly improved YOLOv8s algorithm not only ensures real-time performance but also effectively meets the challenging requirements for vehicle and pedestrian detection under adverse weather conditions.