# Improved Traffic Sign Detection and Recognition Algorithm for Intelligent Vehicles
## 4 Traffic Sign Recognition Experiment
### Traffic Sign Recognition Experiment
#### 4.2.2 Traffic Sign Classification and Recognition Experiment  
Traffic sign classification and recognition experiment can be divided into two stages, namely, the network training and testing stages. In the network training stage, the training set samples of GTSRB are taken as input. By performing thousands of network iterations, parameters, such as network weights and offsets, are continuously updated on the basis of forward learning and back propagation mechanisms until the loss function is reduced to the minimum, thereby classifying and predicting traffic signs. In the network testing stage, the testing set samples of GTSRB are inputted into the trained network model to test the accurate recognition rate of the training network. Figure 10 shows the flow chart of the entire traffic sign classification and recognition experiment. The basic steps of the network training stage are as follows. 1. The training set samples are preprocessed, the artificial dataset is generated and the dataset order is disrupted. 2. The Gabor kernel is used as the initial convolutional kernel, and the convolutional kernel size is \(5\times 5\), as activated by the ReLU function. 3. The training set samples are forwardly propagated in the network model, and a series of parameters are set. The BN is used for data normalization after each pooling layer, and the Adam method is used as the optimizer algorithm. The parameters are set as follows: \(\beta_{1}=0.9\), \(\beta_{2}=0.999\), \(\eta=0.001\) and \(\varepsilon=1\times 10^{-8}\). The dropout parameter is set to 0.5 in the fully-connected layers, and the Softmax function is outputted as a classifier. 4. The gradient of loss function is calculated, and the parameters, such as network weights and offsets, are updated on the basis of the back-propagation mechanism. 5. The error between the real and the predicted value of the sample is calculated. When the obtained error is lower than the set error or reaches the maximum number of training, training is stopped and step (6) is executed; otherwise, step (1) is repeated for the next network iteration. 6. The classification test is conducted in the network model. The subordinate categories of traffic signs in the GTSRB are predicted and compared with the real categories. The classification prediction results of traffic signs are counted, and the correct prediction rate is calculated. The basic steps of the network testing stage are as follows. 1. Several images are randomly selected from the testing set samples, and the images are inputted into the trained network model after preprocessing. 2. The recognition results are outputted through the network model, thereby showing the meaning of traffic signs with the highest probability. 3. The output results are compared with the actual reference meanings, and the statistical recognition results are obtained. Figure 9: The number of 43 classes of traffic signs after generating the artificial dataset. All the sample extraction images are completely tested, and the accurate recognition rate of traffic signs is calculated. Figure 11 shows the classification prediction results of some sample images in the network training stage. Figure 10: The flow chart of the entire traffic sign classification and recognition experiment. In the network testing stage, eight different traffic sign test images are randomly selected from the testing set samples and numbered automatically. Figure 13 shows the auto-numbered traffic sign test images. The traffic sign test images are inputted into the trained improved LeNet-5 network model for classification and recognition. For each test image, the traffic sign indicated by the first five probabilities are outputted, and the maximum probability is selected as the recognition result and compared with the actual reference meaning. Figure 14 shows the recognition results of traffic sign test images in the network testing stage.