| Traffic sign detection technology is a key point for advanced assisted driving and automatic driving,and it also plays an important role in the operation of intelligent transportation systems.Traffic sign detection in natural scenes has problems such as small traffic sign targets,complex and changeable external environments,and many interference factors;in addition,in order to ensure driving safety,traffic sign detection speeds are required to meet the requirements of real-time detection.In the existing solutions,the speed of detecting traffic signs based on algorithms such as Faster R-CNN is slow,and the mean average precision of detecting traffic signs based on algorithms such as SSD and YOLO is low.We propose a detection model based on the improved YOLOv4 algorithm for the above problems,and use the channel pruning square model compression method for the improved model to achieve real-time detection of traffic signs in natural scenes.The main contents in the thesis are as follows:In order to enhance the utilization of the location information of the shallow feature map of traffic signs,this thesis adds an output channel at the 4 times down-sampling position.At the same time,in order to enhance the ability to express the features of small targets of traffic signs,an improved method is proposed to integrate the spatial pyramid pooling(SPP)module before each input path aggregation network(PANet)structure,and an improved YOLOv4 model with four prediction channels is formed.In the training phase,12 anchor box sizes are obtained by clustering the label box data of TT100 K dataset based on the K-means++algorithm,which improves the detection rate of boundary box in the model.The mixup image data enhancement(Mixup)method is used to obtain the virtual training samples after the training samples are input to improve the robustness and generalization ability of the model.At the design level of loss function,Focal Loss function is used as the loss of confidence to alleviate the imbalance between positive and negative samples caused by the increase of the output pixel of 152 × 152 prediction feature map.In order to solve the problems of large amount of calculation parameters and slow inference speed of the improved model,we adopt the compression method of channel pruning for the improved training stable model.Firstly,the model is sparsely trained,and the model is sparse by imposing L1 regular term constraint on the γ coefficient of BN layer.The pruning strategy uses the union of the convolution layer connected by the pruning mask and the residual layer to complete the pruning,and determines the optimal pruning ratio through experiments.Finally,the pruning model is fine-tuning trained to obtain the optimal detection model.The experimental results show that with the pruning method,the number of parameters of the model decreases significantly and the detection reasoning speed increases by about double under the condition that the mean average accuracy mAP decreases slightly.This thesis conducts training and test verification on the public data set of TsinghuaTencent 100 K traffic signs published by Tsinghua University-Tencent Joint Laboratory.The experimental results show that the average accuracy of the optimal model obtained in this thesis reaches 94.9 %,and the frame rate FPS per second reaches 31.28,which proves that the proposed improved model can achieve accurate and fast detection of traffic signs after compression. |