Pedestrian detection is an important research branch in computer vision.Pedestrian detection uses detection algorithms to determine whether a pedestrian target is present in the image,and if so,to mark the exact location of the pedestrian.Pedestrian detection technology has become widely used in a variety of fields,including intelligent security,intelligent driving,and intelligent robotics,thanks to the rapid growth of computer hardware,deep learning,and convolutional neural networks in recent years.In real life,there are numerous influencing factors when performing pedestrian detection such as diverse pedestrian scale and postures,pedestrian being obstructed,uneven lighting,and background interference.Among them,diverse pedestrian scale and postures and pedestrian being obscured are the focus of this paper.On the one hand,the size of the pedestrian target in the image often affects the accuracy of the detection model.When the pedestrian size is small,it is difficult for most of the detection models to detect such targets,and the pedestrians in real life will also have a variety of postures,which also increases the detection difficulty.On the other hand,when the target is obscured by other pedestrians or objects,its contour edge and other feature information will change,and the features of multiple pedestrians will overlap together,leading to false detection and leakage.In this paper,we address the above problems and improve on the base model YOLO,and main content of this article are as follows.(1)Image datasets with pedestrian targets should be acquired and processed.The video data samples are acquired using surveillance cameras,and then the video samples are cut into a single image by frame to label the pedestrians in the images.The lack of diversity of pedestrians in the images is expanded using data enhancement processing to complete the pedestrian dataset in complex situations.(2)Improving YOLOv4 model and using it for pedestrian detection.Firstly,the optimized k-means algorithm analyzes the size of the ground truth in the training set,and then specifies the anchor box size.Secondly,improve PANet for multi-scale feature fusion to make the detection model more sensitive to multi-scale and multi-posture pedestrian targets and improve the detection result.Finally,for the problem that pedestrians are occluded and thus affect the detection,a repulsive loss function is introduced based on the original loss function of YOLOv4,which makes the prediction box as close as possible to its own target and repels the wrong target.The detection results of the improved detection model are compared with those of Faster R-CNN,SSD and the original YOLOv4 model.(3)Improving YOLOv5 model and using it for pedestrian detection.Firstly,the characteristics of the four effective layers in the backbone network are output to obtain more location information of the small target pedestrian.Secondly,the Multi-Shot Path Aggregation Neural Architecture Search Network is introduced on the four effective layers to make full use of the characteristics of each scale to improve the sensitivity of the model to multi-scale and multi-posture pedestrians.Finally,the improved Visibility Guide NMS based on both pixels and modes is used to improve the detection performance of the model in the case of heavily congested obscured pedestrians.By comparing with Faster R-CNN,SSD,YOLOv4 and the original YOLOv5 model,it is demonstrated that the proposed improved method has better detection accuracy.And the detection results of pedestrians in real-life scenarios show that the pedestrian detection model proposed in this paper can meet the requirements of complex pedestrian detection in complex situations in real life. |