Pedestrian and Vehicle Detection Algorithm Based on Improved YOLOv5 in Haze Weather
Degraded and blurred images captured in hazy weather makes it difficult to perform accurate recognition and detection.To solve this problem,a YOLOv5s-based improved algorithm for pedestrian and vehicle detection in hazy weather is proposed.The proposed algorithm uses a dark channel defogging algorithm in the image pre-processing part to improve the discriminability and robustness of the model to features.The BoT3 module based on the self-attentive mechanism is used to replace the CSP2_1 module in the backbone network to improve the model's ability to extract global features.A lightweight Hybrid Attention Module(HAM)is added to the output of the backbone network to enhance the model's ability to capture important features.The Wise-IOU loss function is used to replace the CIOU loss function in the prediction part to improve the model convergence efficiency and accelerate the convergence speed.The experimental results show that the improved algorithm improves the detection accuracy of the model by 4.13%compared with YOLOv5s in the self-built hazy weather pedestrian-vehicle detection dataset,and the detection speed of a single image is 18.8 ms.This indicates that the improved algorithm has a significant improvement effect and can basically meet the requirements for pedestrian and vehicle detection in hazy weather.
YOLOv5pedestrian detectionobject detectionloss function