# A Real-Time Chinese Traffic Sign Detection Algorithm Based on Modified YOLOv2
## 3 The Chinese Traffic Sign Detection Algorithm Based on Modified YOLOv2
### Improved Network Structure for Chinese Traffic Sign Detection
By analyzing the datasets, we found that the object in VOC is larger compared to the entire image and the background is not very complex. The image sizes are around 500 \(\times\) 300 and 300 \(\times\) 500. However, the traffic signs are smaller compared to the entire image; for example, a traffic sign is 32 \(\times\) 30 pixels in a 1280 \(\times\) 720 pixel image, just 0.1% of the image. Figure 5 shows some samples in the VOC dataset and CCTSDB. In addition, the final output maps are very small compared to the size of input images through several pooling operations in a deep network model. Considering the small sizes of traffic signs, the features of traffic signs corresponding to output maps are too abstract to predict well. It is thus necessary to design a proper network structure to learn more effective features from shallow layers. We tried several network models according to the aforementioned CNNs, and finally propose three network models (A, B, and C) in this paper, as shown in Table 1. We found that the networks of YOLO and YOLOv2 pay more attention on the top layers due to the detection of various objects. Compared to YOLO, YOLOv2 simplifies the network by decreasing the stacked convolutional layers in intermediate layers. The detection speed is faster as well. As a reference, Model-A is used to verify that the repeated convolutional layers in the top layers are not very efficient for Chinese traffic sign detection. This is mainly because the differences among the three categories traffic signs are not obvious, unlike the differences between a person and a ship. We decreased the repeated convolutional layers in the top layers and designed the network with a fine grid in Model-A. As the input images are divided into \(S\times S\) grid, we encoded the final prediction as an \(S\times S\times(k\times 5+C)\) tensor or \(S\times S\times k\times(5+C)\) tensor in YOLO and YOLOv2, respectively. These variables were explained in Section 3.1. The value of \(S\) is smaller, the grid is coarser, and the recall rate is lower. Moreover, the grid size is dependent on the size of the input image and network structure. In YOLO and YOLOv2, the input sizes are 224 \(\times\) 224 to 544 \(\times\) 544 and the gird sizes are  
Figure 5: Some samples in the VOC and CCTSDB. \(7\times 7\) to \(17\times 17\), respectively. The differences between the VOC dataset and CCTSDB can be seen in Figure 5. To avoid losing more information, we determined the input size to be 608 \(\times\) 608 and the grid to be 19 \(\times\) 19 according to the characteristics of traffic signs. These sets of variables were applied to all experiments. Model-B was designed to make full use of the channels information by 1 \(\times\) 1 convolutional layers. We attempted to add a 1 \(\times\) 1 convolutional layer followed by another 1 \(\times\) 1 convolutional layer to learn more features via cross channels. Although the 1 \(\times\) 1 convolution kernel indicates a linear operation, the multiple 1 \(\times\) 1 convolutional layers can increase the nonlinear learning ability of Model-B. The filters in half of the 1 \(\times\) 1 convolutional layer compared to 3 \(\times\) 3 convolutional layers can obviously reduce the number of parameters and reduce the running time. The number of parameters concerning convolution operations in Model-B was decreased by at least 21 times compared to Model-A and 27 times compared to YOLOv2. Model-C is combined the features between the intermediate layers and top layers. We know that the feature maps in the intermediate layers contain specific information. In contrast, the top layers contain highly abstract representations. They respond to some area around the object. We combined the fourth and fifth sections of feature maps divided by the max-pooling layers into the final output maps to integrate the features in the response areas.