# A Novel SVM Network Using HOG Feature for Prohibition Traffic Sign Recognition

Authors: Yang Liu; Wei Zhong
Journal: Wireless Communications and Mobile Computing
 (2022)

---

## Abstract

To recognize prohibition traffic sign, this paper proposes a novel method that is trained by a small number of samples and uses the feature of histogram of oriented gradient (HOG) and support vector machine (SVM) network. The recognition method is mainly divided into three stages. The first stage is image preprocessing, which includes image interception based on ellipse detection, image resizing, and Gamma correction. In the part of image interception, a new ellipse detection method called RHT_MCN is proposed based on RHT, which uses the maximum coincidence number (MCN) of image edge points and detected ellipse edge to choose the final ellipse for image interception. The second stage is the feature extraction of HOG. The third stage is the prohibition traffic sign recognition (PTSR) based on SVM network. In the design and implementation of the PTSR model, a new single-layer SVM network is proposed. The ascending spiral training method of the recognition model is introduced in detail. Finally, the data from GTSRB is used to test and analyze the prohibition traffic sign recognition method. The method is proven to have good applicability.


---

## Body

## 1. Introduction

With the development of intelligent vehicles and Internet of Vehicles, traffic sign recognition (TSR) is becoming more and more practical and popular. TSR plays an important role in advanced driver assistance systems (ADAS), intelligent vehicles, and intelligent transportation and plays an important role in vehicle traffic safety and pedestrian safety. More specially, some reported TSR applications are as follows [1]: driver assistance systems, autonomous vehicles, maintenance of traffic signs, engineering measurements, Vehicle-to-X (V2X) communication, reducing fuel consumption, and so on.In the implementation of TSR, the TSR approach is accompanied by the development of pattern recognition methods and classification methods. In the research [2], Ruta et al. summarized that the more popular TSR methods were feature-based approaches and the pixel-based cross-correlation template matching was a baseline approach. With the development of machine learning algorithms such as deep learning (DL) [3] and support vector machine (SVM) [4], the intelligent learning algorithm is applied to establish the model of traffic sign recognition. In the research [5], Wang et al. proposed that the TSR methods can be divided into two categories: traditional (non-DL) machine learning methods and deep learning methods. From the time perspective, Badue et al. [6] summarized that most of the earlier approaches for traffic sign detection and recognition were model-based which used simple features, and learning-based approaches started leveraging simple features but evolved into using more complex ones. In general, the TSR method is feature-based. The difference in feature extraction is the difference between hand-crafted features and self-extraction features. And the difference in classifiers is the difference between the rule-based classification model and the machine learning classification model.Here, we briefly summarize the main application scenarios and implementation methods of traffic sign recognition. The rest of this paper is composed of six parts. In Section2, the typical methods of TSR are introduced. In Section 3, the composition characteristics and color statistical characteristics of prohibition traffic sign (PTS) are discussed. In Section 4, a novel method of prohibition traffic sign recognition is proposed, which is based on histogram of oriented gradient (HOG) feature and support vector machine (SVM) network. In Section 5, the training method of the recognition model is introduced in detail. In Section 6, the self-built data set and GTSRB are used for the verification and analysis. In Section 7, conclusions and the future work of this work are drawn.


## 2. Related Work

Deep learning model has made a great success in ImageNet contest which is a challenging image classification task with 1000 classes and 1.2 million high-resolution images [7]. TSR is an image classification problem. More and more deep learning models were successfully utilized to recognize the traffic sign. Convolutional neural network (CNN) and its variant are used for the deep learning model for TSR since CNN has witnessed great success in the task of image classification. Especially, the multicolumn deep neural network (MCDNN) was used to win the championship of the 2012 German traffic sign recognition competition, and its recognition rate exceeded the human recognition rate [8]. In the work of Zhang et al. [9], they used a shallow network architecture based on convolutional neural networks (CNNs) for TSR and reached a high accuracy (99.84%) based on the full GTSRB [10, 11] data set. The number of samples is large for deep learning models. Here, we list the number of signs of some typical deep learning training data sets for TSR.As shown in Table1, the number of each TSR data set is at least 7125, and it takes time, manpower, and equipment to collect sample signs. However, there are not so many samples for the model training in some applications and the traffic sign recognition model should be trained by using a small number of samples. In this case, the deep learning model is in the dilemma of insufficient samples. It is necessary for finding a new model which only need a small number of samples.Table 1
The list table of the number of signs.
Data setNumber of classesNumber of signsGTSRB4350000+TT100K [12]4530000STS [13]720000BTSC [14]627125ETSD [15]16482476Either the machine learning (non-DL) model or the deep learning model, the thing which is used for the recognition is the features. The features can be extracted from the artificially designed network model, but the feature may not be visualized well and the features are some black boxes. Also, the features can be manually extracted by using some algorithm and the features are white boxes for researchers. In addition, the selected features can be taken to account for the global and local characteristics. For the above reasons, the HOG feature is selected. HOG feature was first proposed by Dalal and Triggs and combined with SVM to realize pedestrian detection [16]. Based on the extraction of HOG feature, the single hidden layer feed-forward network trained by extreme learning machine (ELM) is used to realize the efficient recognition of traffic signs [17]. Based on a multitask convolution neural network, using an amount of data for training, Luo et al. realized the traffic sign recognition [18]. Based on HOG features extended to its color space combined with local self-similar descriptors, the random forest method is used to classify and recognize traffic signs [19].SVM is a classical algorithm of machine learning, which has a good performance in binary classification and multiclassification. Some classification models based on HOG feature and SVM were used for traffic sign recognition. In the work of Yao et al. [20], a traffic sign recognition method using histogram of oriented gradient support vector machine and grid search was proposed, and the grid search technique was applied to optimize the parameters of the support vector machine, and traffic signs were extracted from the different condition images by using HSI color space and normalization. In the work of Junges et al. [21], the red color segmentation and the Hough transform were used to find circular regions for traffic sign detection, and SVM and the HOG feature were used for TSR. In the research of Tun and Lwin [22], Real-time Myanmar Traffic Sign Recognition System (RMTSRS) was proposed, and each incoming frame was segmented using the color threshold method for traffic sign detection, and the HOG feature was extracted and RMTSRS classified traffic sign types using SVM. In the work of Tang et al. [23], the traffic sign was located with Hough transformation based on the spatial characteristics of the image, and the SVM classifier was used to get the training model with HOG features of traffic signs. Tang et al. also pointed out that the first thing to recognize traffic signs is to segment the image, to reduce the interference of the image outside the sign area. In the work of Cotovanu et al. [24], the traffic sign detection which was based on color information and certain object properties used the image processing techniques to identify regions of interest (ROIs) in an image, and a linear SVM binary classifier trained with HOG features was used for TSR.From the above work, it is widely considered to be a good way to divide TSR into three steps:(i)
Segment the traffic sign image(ii)
Extract the features of the traffic sign(iii)
Classify the traffic sign by trained modelHowever, it must also be mentioned that their work remains some uncertainties and problems:(1)
The common method of the segmentation of traffic sign image is usually based on color space. But the color of traffic signs can be easily disturbed by environmental factors and the color is usually not the standard color(2)
Although lots of studies have been conducted to utilize SVM for TSR, little attention has been done to utilizing SVM to construct SVM network. And one of the challenges in SVM model is the optimization of the parameters of SVM modelIn this paper, based on the extraction of HOG feature, a SVM network is used to realize the recognition of prohibition traffic signs and the method of optimizing the parameters of SVM model is introduced.


## 3. Analysis of Prohibition Traffic Sign

In this section, the necessity of prohibition traffic sign recognition (PTSR) will be expounded. The color composition of prohibition traffic sign will be analyzed, and the reason of select ellipse detection for traffic sign segmentation will be introduced too.Traffic signs are mainly divided into seven categories: warning traffic sign, prohibition traffic sign, indication traffic sign, guide traffic sign, tourist area sign, road construction sign, and auxiliary sign [25]. Prohibition traffic sign is one of the commonly used signs. According to the national standard of the People’s Republic of China (gb5768.2-2009), there are 42 kinds of prohibition traffic signs. Some standard prohibition traffic signs are shown in Figure S1.From the composition and frequency of use, it is necessary to research PTSR. From the analysis of the composition color of the prohibition traffic sign image, the main composition colors are red, white, black, and blue. Based on color standardization [26, 27] and image capture of the sign image, the number of pixels of four colors involved in the prohibition traffic sign image is counted, and their proportion in the total pixels of the image is calculated, respectively; then, each sign can obtain four characteristic values of color proportion. The statistical results are shown in Figure 1.Figure 1
Color proportion of standard prohibition signs.As shown in Figure1, there are obvious color differences in some of the prohibition signs. For example, the color composition of the long-term parking prohibition sign and the temporary or long-term parking prohibition sign is red and blue, regardless of the white background of the sign image. Considering the proportions of white, black, blue, and red of all prohibition signs, only the rough classification of prohibition signs can be realized based on the color proportion information, and the better classification of prohibition signs should be realized based on the texture, shape, and other local or global features of prohibition signs. HOG feature describes the local detail features through the directional gradient data and describes the global features of the image through the histogram statistical data of the directional gradient. Therefore, the HOG feature is used to describe the prohibition traffic signs and will be used for the recognition model which is based on HOG feature and SVM.


## 4. Prohibition Traffic Sign Recognition Method Based on HOG-SVM

In this section, the overall framework of the prohibition traffic sign recognition method will be proposed and introduced stage by stage.As shown in Figure2, the method of prohibition traffic sign recognition is mainly divided into the following three steps:
(i)
Image preprocessing(ii)
HOG feature extraction(iii)
Image classification based on SVM modelFigure 2
Flow chart of prohibition traffic sign recognition method.Especially, the image classification based on SVM model is constructed by SVM network. As shown in Figure3, a novel single-layer SVM network is proposed in detail. Each node of the single-layer SVM network is a trained SVM. Each SVM node is a binary classifier. The number of the SVM node is depending on the number of types of prohibition traffic signs.Figure 3
Schematic diagram of prohibition traffic sign recognition network based on SVM which is 42 in this paper.


### 4.1. Image Preprocessing

In this part, image preprocessing includes image interception based on ellipse detection, image resizing, image graying, and Gamma correction.


#### 4.1.1. Image Interception Based on Ellipse Detection

In the actual scene, there are other objects in the background. To get the image of the traffic sign, the interception of the prohibition traffic sign is needed. As is shown in FigureS1, the shape of the prohibition traffic sign is a circle. There are 40 kinds of prohibition traffic signs which is circular. Due to the influence of various factors, most of the shapes of prohibition traffic sign images are an ellipse in the actual scene. And it is necessary to get a method of the detect ellipse in the image.Many researchers have worked on the detection of the ellipse. Hough transformation was proposed by Hough in 1962 [28]. But the traditional ellipse detection method based on Hough transformation has high computational complexity, which is not conducive to the fast interception of traffic sign image. To improve the computational performance, randomized Hough transformation (RHT) was proposed in 1996 [29]. RHT has a better performance in the simple image than the complex image. In this paper, an ellipse detection method is proposed based on RHT, which uses the maximum coincidence number (MCN) of image edge points and detected ellipse edge to choose the final ellipse. The method is called RHT_MCN.The steps of RHT_MCN are as follows:(1)
Get the grayscale image of the prohibition traffic sign and get the binary image of the prohibition traffic sign image(2)
Use the convolution to realize edge extraction of the binary image; the convolution kernel is as follows:(1)K=111101111(3)
Get the alternative ellipse by using the method of RHT(4)
Calculate the coincidence number of the image edge and each alternative ellipse, and choose the ellipse of maximum coincidence number for the final detected ellipseThe general equation of the ellipse is as follows:(2)Ax2+Bxy+Cy2+Dx+Ey+F=0.A, B, C, D, E, and F are the coefficients of elliptic general equations and x and y are the coordinates of points on the ellipse.The pixel of the image is discrete. And there is a setSP and an error d_error.
(3)s.t.Ax2+Bxy+Cy2+Dx+Ey+F≤d_error,∀x,y∈SP.Thex and y are the coordinates of image pixels. And the image edge points included in the set SP are counted, and the coincidence number of the image edge and each alternative ellipse is obtained. Based on ellipse detection, the image is intercepted, to realize the ellipse interception of the prohibition traffic sign image.As is shown in the figure, Figures4(a), 4(c), and 4(e) are the original image before the interception. Figures 4(b), 4(d), and 4(f) are the resulting image after interception based on ellipse detection using RHT_MCN. In Figures 4(b), 4(d), and 4(f), the green ellipse line is the detected ellipse.Figure 4
Interception of prohibition traffic sign based on ellipse detection.As shown in the figure, Figure5(a) is the ideal result of common ellipse detection and there are 4 ellipses detected finally. Typically, more than four ellipses are detected for the discontinuity of image edge point coordinates in the traffic signs. If there are multiple ellipses detected finally, it will be necessary to find a suitable ellipse for the image segmentation. Figure 5(b) is the result of ellipse detection using RHT_MCN, and there is only one ellipse detected which is more suitable for the segmentation of traffic sign image.Figure 5
Comparison of different ellipse detection methods.


#### 4.1.2. Image Resizing and Gamma Correction

As a result of the interception, the shape of the prohibition traffic sign is an ellipse in most cases. The shape change of the image will affect the feature extraction and recognition of the prohibition traffic sign. The image size should be resized. The aspect ratio of an ellipse circumscribed rectangle is not 1 : 1, while that of a circle circumscribed rectangle is 1 : 1. The method of image size adjustment is as follows:Taking the circumscribed rectangle of the intercepted image as the benchmark, the aspect ratio of the circumscribed rectangle is adjusted to 1 : 1 to realize the transformation from rectangle to square. Considering the subsequent HOG feature extraction, the size of the image also needs to be enlarged or reduced. The final image size of this paper is24×24. The schematic diagram of image adjustment is shown in Figure 6.Figure 6
The schematic diagram of image adjustment.Gamma correction is mainly used to process the brightness of the image and weaken the influence of light and shadow on the image.


### 4.2. HOG Feature Extraction

As shown in Figure7, the extraction of HOG feature can be generally divided into 5 steps. And it is important to set the following parameters: spatial/orientation bins, cell, block, and sliding step size. These parameters are related to the comprehensiveness of hog features to global and local features and the dimension of hog features. While extracting HOG features, the corresponding spatial/orientation bins, cell, block, and sliding step size are shown in Table 2. The image size and the corresponding HOG feature dimension are shown in Table 3. The image size used in this paper is 24×24. Therefore, the dimension of HOG feature is 144.Figure 7
The chain of HOG feature extraction.Table 2
Parameter table of HOG feature extraction.
Spatial/orientation bins0°~360°/9 binsCell8×8Block2×2Sliding step1Table 3
Image size and dimensions of HOG features.
Image sizeDimensions of HOG features16×163624×2414432×32324


### 4.3. Image Classification Based on SVM Model

In this part, firstly, based on the training data set, support vector machine is used to generate the initial classifier of prohibition traffic signs. The initial classifier is constructed by 42 binary classifiers. Then, the initial classification result is used to get the final classification result.As shown in Figure8, the prohibition traffic sign recognition network based on SVM binary classification is mainly divided into the following two steps:
(1)
Initial classification based on SVM binary classifierFigure 8
Schematic diagram of prohibition traffic sign recognition network based on SVM binary classification.In this part, the HOG feature data extracted after image preprocessing is input into 42 trained binary classifiers one by one for prediction, and the result [label, score] is obtained. The label is the classification and prediction result of the input data image by the binary classifiers, which is used to indicate which category the image belongs to, and the score is the credit score of each category of the image classification results. In this paper, the label values are “1” and “2,” where “1” indicates that the image belongs to the corresponding prohibition traffic sign image class of the classifier and “2” indicates that the image does not belong to the corresponding prohibition traffic sign image class of the classifier.
(2)
Classification based on the predicted resultIn this part, based on the prediction result [label, score] in step (1), we can get the prediction result label data set LABEL and the prediction result score data set SCORE. The following are the steps:
(i)
Analyze the data set LABEL. If the prediction result of one binary classifierN1 is label=1, the prohibition sign image is considered as the corresponding traffic sign of the binary classifiers N1; otherwise, enter the next step and analyze the data set SCORE(ii)
Analyze the data set SCORE. If the result score of the binary classifierN2 is the maximum value of the data set SCORE, the prohibition traffic sign image is considered as the corresponding traffic sign of the binary classifier N2


## 4.1. Image Preprocessing

In this part, image preprocessing includes image interception based on ellipse detection, image resizing, image graying, and Gamma correction.


### 4.1.1. Image Interception Based on Ellipse Detection

In the actual scene, there are other objects in the background. To get the image of the traffic sign, the interception of the prohibition traffic sign is needed. As is shown in FigureS1, the shape of the prohibition traffic sign is a circle. There are 40 kinds of prohibition traffic signs which is circular. Due to the influence of various factors, most of the shapes of prohibition traffic sign images are an ellipse in the actual scene. And it is necessary to get a method of the detect ellipse in the image.Many researchers have worked on the detection of the ellipse. Hough transformation was proposed by Hough in 1962 [28]. But the traditional ellipse detection method based on Hough transformation has high computational complexity, which is not conducive to the fast interception of traffic sign image. To improve the computational performance, randomized Hough transformation (RHT) was proposed in 1996 [29]. RHT has a better performance in the simple image than the complex image. In this paper, an ellipse detection method is proposed based on RHT, which uses the maximum coincidence number (MCN) of image edge points and detected ellipse edge to choose the final ellipse. The method is called RHT_MCN.The steps of RHT_MCN are as follows:(1)
Get the grayscale image of the prohibition traffic sign and get the binary image of the prohibition traffic sign image(2)
Use the convolution to realize edge extraction of the binary image; the convolution kernel is as follows:(1)K=111101111(3)
Get the alternative ellipse by using the method of RHT(4)
Calculate the coincidence number of the image edge and each alternative ellipse, and choose the ellipse of maximum coincidence number for the final detected ellipseThe general equation of the ellipse is as follows:(2)Ax2+Bxy+Cy2+Dx+Ey+F=0.A, B, C, D, E, and F are the coefficients of elliptic general equations and x and y are the coordinates of points on the ellipse.The pixel of the image is discrete. And there is a setSP and an error d_error.
(3)s.t.Ax2+Bxy+Cy2+Dx+Ey+F≤d_error,∀x,y∈SP.Thex and y are the coordinates of image pixels. And the image edge points included in the set SP are counted, and the coincidence number of the image edge and each alternative ellipse is obtained. Based on ellipse detection, the image is intercepted, to realize the ellipse interception of the prohibition traffic sign image.As is shown in the figure, Figures4(a), 4(c), and 4(e) are the original image before the interception. Figures 4(b), 4(d), and 4(f) are the resulting image after interception based on ellipse detection using RHT_MCN. In Figures 4(b), 4(d), and 4(f), the green ellipse line is the detected ellipse.Figure 4
Interception of prohibition traffic sign based on ellipse detection.As shown in the figure, Figure5(a) is the ideal result of common ellipse detection and there are 4 ellipses detected finally. Typically, more than four ellipses are detected for the discontinuity of image edge point coordinates in the traffic signs. If there are multiple ellipses detected finally, it will be necessary to find a suitable ellipse for the image segmentation. Figure 5(b) is the result of ellipse detection using RHT_MCN, and there is only one ellipse detected which is more suitable for the segmentation of traffic sign image.Figure 5
Comparison of different ellipse detection methods.


### 4.1.2. Image Resizing and Gamma Correction

As a result of the interception, the shape of the prohibition traffic sign is an ellipse in most cases. The shape change of the image will affect the feature extraction and recognition of the prohibition traffic sign. The image size should be resized. The aspect ratio of an ellipse circumscribed rectangle is not 1 : 1, while that of a circle circumscribed rectangle is 1 : 1. The method of image size adjustment is as follows:Taking the circumscribed rectangle of the intercepted image as the benchmark, the aspect ratio of the circumscribed rectangle is adjusted to 1 : 1 to realize the transformation from rectangle to square. Considering the subsequent HOG feature extraction, the size of the image also needs to be enlarged or reduced. The final image size of this paper is24×24. The schematic diagram of image adjustment is shown in Figure 6.Figure 6
The schematic diagram of image adjustment.Gamma correction is mainly used to process the brightness of the image and weaken the influence of light and shadow on the image.


## 4.1.1. Image Interception Based on Ellipse Detection

In the actual scene, there are other objects in the background. To get the image of the traffic sign, the interception of the prohibition traffic sign is needed. As is shown in FigureS1, the shape of the prohibition traffic sign is a circle. There are 40 kinds of prohibition traffic signs which is circular. Due to the influence of various factors, most of the shapes of prohibition traffic sign images are an ellipse in the actual scene. And it is necessary to get a method of the detect ellipse in the image.Many researchers have worked on the detection of the ellipse. Hough transformation was proposed by Hough in 1962 [28]. But the traditional ellipse detection method based on Hough transformation has high computational complexity, which is not conducive to the fast interception of traffic sign image. To improve the computational performance, randomized Hough transformation (RHT) was proposed in 1996 [29]. RHT has a better performance in the simple image than the complex image. In this paper, an ellipse detection method is proposed based on RHT, which uses the maximum coincidence number (MCN) of image edge points and detected ellipse edge to choose the final ellipse. The method is called RHT_MCN.The steps of RHT_MCN are as follows:(1)
Get the grayscale image of the prohibition traffic sign and get the binary image of the prohibition traffic sign image(2)
Use the convolution to realize edge extraction of the binary image; the convolution kernel is as follows:(1)K=111101111(3)
Get the alternative ellipse by using the method of RHT(4)
Calculate the coincidence number of the image edge and each alternative ellipse, and choose the ellipse of maximum coincidence number for the final detected ellipseThe general equation of the ellipse is as follows:(2)Ax2+Bxy+Cy2+Dx+Ey+F=0.A, B, C, D, E, and F are the coefficients of elliptic general equations and x and y are the coordinates of points on the ellipse.The pixel of the image is discrete. And there is a setSP and an error d_error.
(3)s.t.Ax2+Bxy+Cy2+Dx+Ey+F≤d_error,∀x,y∈SP.Thex and y are the coordinates of image pixels. And the image edge points included in the set SP are counted, and the coincidence number of the image edge and each alternative ellipse is obtained. Based on ellipse detection, the image is intercepted, to realize the ellipse interception of the prohibition traffic sign image.As is shown in the figure, Figures4(a), 4(c), and 4(e) are the original image before the interception. Figures 4(b), 4(d), and 4(f) are the resulting image after interception based on ellipse detection using RHT_MCN. In Figures 4(b), 4(d), and 4(f), the green ellipse line is the detected ellipse.Figure 4
Interception of prohibition traffic sign based on ellipse detection.As shown in the figure, Figure5(a) is the ideal result of common ellipse detection and there are 4 ellipses detected finally. Typically, more than four ellipses are detected for the discontinuity of image edge point coordinates in the traffic signs. If there are multiple ellipses detected finally, it will be necessary to find a suitable ellipse for the image segmentation. Figure 5(b) is the result of ellipse detection using RHT_MCN, and there is only one ellipse detected which is more suitable for the segmentation of traffic sign image.Figure 5
Comparison of different ellipse detection methods.


## 4.1.2. Image Resizing and Gamma Correction

As a result of the interception, the shape of the prohibition traffic sign is an ellipse in most cases. The shape change of the image will affect the feature extraction and recognition of the prohibition traffic sign. The image size should be resized. The aspect ratio of an ellipse circumscribed rectangle is not 1 : 1, while that of a circle circumscribed rectangle is 1 : 1. The method of image size adjustment is as follows:Taking the circumscribed rectangle of the intercepted image as the benchmark, the aspect ratio of the circumscribed rectangle is adjusted to 1 : 1 to realize the transformation from rectangle to square. Considering the subsequent HOG feature extraction, the size of the image also needs to be enlarged or reduced. The final image size of this paper is24×24. The schematic diagram of image adjustment is shown in Figure 6.Figure 6
The schematic diagram of image adjustment.Gamma correction is mainly used to process the brightness of the image and weaken the influence of light and shadow on the image.


## 4.2. HOG Feature Extraction

As shown in Figure7, the extraction of HOG feature can be generally divided into 5 steps. And it is important to set the following parameters: spatial/orientation bins, cell, block, and sliding step size. These parameters are related to the comprehensiveness of hog features to global and local features and the dimension of hog features. While extracting HOG features, the corresponding spatial/orientation bins, cell, block, and sliding step size are shown in Table 2. The image size and the corresponding HOG feature dimension are shown in Table 3. The image size used in this paper is 24×24. Therefore, the dimension of HOG feature is 144.Figure 7
The chain of HOG feature extraction.Table 2
Parameter table of HOG feature extraction.
Spatial/orientation bins0°~360°/9 binsCell8×8Block2×2Sliding step1Table 3
Image size and dimensions of HOG features.
Image sizeDimensions of HOG features16×163624×2414432×32324


## 4.3. Image Classification Based on SVM Model

In this part, firstly, based on the training data set, support vector machine is used to generate the initial classifier of prohibition traffic signs. The initial classifier is constructed by 42 binary classifiers. Then, the initial classification result is used to get the final classification result.As shown in Figure8, the prohibition traffic sign recognition network based on SVM binary classification is mainly divided into the following two steps:
(1)
Initial classification based on SVM binary classifierFigure 8
Schematic diagram of prohibition traffic sign recognition network based on SVM binary classification.In this part, the HOG feature data extracted after image preprocessing is input into 42 trained binary classifiers one by one for prediction, and the result [label, score] is obtained. The label is the classification and prediction result of the input data image by the binary classifiers, which is used to indicate which category the image belongs to, and the score is the credit score of each category of the image classification results. In this paper, the label values are “1” and “2,” where “1” indicates that the image belongs to the corresponding prohibition traffic sign image class of the classifier and “2” indicates that the image does not belong to the corresponding prohibition traffic sign image class of the classifier.
(2)
Classification based on the predicted resultIn this part, based on the prediction result [label, score] in step (1), we can get the prediction result label data set LABEL and the prediction result score data set SCORE. The following are the steps:
(i)
Analyze the data set LABEL. If the prediction result of one binary classifierN1 is label=1, the prohibition sign image is considered as the corresponding traffic sign of the binary classifiers N1; otherwise, enter the next step and analyze the data set SCORE(ii)
Analyze the data set SCORE. If the result score of the binary classifierN2 is the maximum value of the data set SCORE, the prohibition traffic sign image is considered as the corresponding traffic sign of the binary classifier N2


## 5. Generating SVM Classifier Based on HOG Feature

In this section, the method of training every single binary classifier will be introduced. Then, the training method of the model will be presented too.


### 5.1. Training of Single Binary Classifier

A single binary classifier is a classifier that uses support vector machine to distinguish one kind of prohibition traffic sign from other prohibition traffic signs. It can be seen from Figure1 that the prohibition traffic signs contain at least 42 types of signs, so at least 42 binary classifiers are generated. Let Xi be the HOG feature vector set corresponding to the ith prohibition traffic sign and Fi be the binary classifier of Xi (i=1,2,3,⋯,42).
(4)Yi=Fix=1,∀x∈Xi,0,∀x∈Xi¯,i=1,2,3,⋯,42.42 classifiers need to be trained one by one. It should be noted that if ∀x can be accurately classified according to formula (4), then any prohibition traffic sign can be recognized only by judging all binary classifiers one by one. However, if
(5)s.t.Fix′=1,∃x′∈Xi¯,ors.t.Fix′′=0,∃x′′∈Xi.When the classifier is trained, there is(6)s.t.Fix=1,∀x∈Xi,s.t.Fix′=1,x′∈Xi¯.The purpose is to avoid any unrecognizable traffic signs.


### 5.2. Ascending Spiral Training Method of Traffic Sign Recognition Model

The PTSR model is constructed by multiple SVM binary classifiers and a classifier based on the predicted result. The key part is the training of multiple SVM binary classifiers. The training method of each SVM binary classifier has been introduced above. The final model should not be obtained at one time. And the final model can be obtained through iterative training.The number of the SVM binary classifiers is the number of prohibition traffic sign types. If there areN types of traffic signs needed to be recognized, the number of SVM binary classifiers should be N. There is a constraint parameter P for each SVM binary classifier. The default value of P is 1. The value of P is relative to the margin of SVM. The greater the value of P, the smaller margin, and the fewer points lie within the margin. The smaller the value of P, the wider margin, and the more points lie within the margin. On the basis of having selected training samples and kernel function, the setting of parameter P can affect the classification effect. In this paper, the initial kernel function is radial basis function (RBF). The process of setting the constraint parameter P is necessary and is as follows:
(1)
The training data set is divided into two parts. One part is the sample data of SVM, and the other part is used for testing the traffic sign recognition model which is called training data used for testing (TDUT)(2)
Set the value of parameterP by default initially, and there is(7)Pi=1i=1,2,3,⋯,N(3)
Train the SVM binary classifiers using the selected sample data and obtain theN SVM binary classifiers(4)
Use the SVM binary classifiers of step 3 to construct the traffic sign recognition model. Then, use the TDUT to test the model, and get the total recognition rateRa and the recognition rate of each type of traffic sign Rii=1,2,3,⋯,N(5)
Find out the minimum value ofRi from the noniterated SVM binary classifier in this round of iterative processes. If the recognition rate of the jth type of traffic sign is equal to the minimum value, then let the Pj varies from 0.1 to 10 in steps of 0.1 and the other parameter P is invariant at this time(6)
Find out the best total recognition rateRa_temp (Ra_temp≥Ra), and set the Pj to the first number which varies from 0.1 to 10 in steps of 0.1 and makes the total recognition rate best(7)
If the parameterPj is the last reset in this iteration and the total recognition rate has never been increased in this iteration, it should be the end of traffic sign recognition model training. Otherwise, go to step (3).


## 5.1. Training of Single Binary Classifier

A single binary classifier is a classifier that uses support vector machine to distinguish one kind of prohibition traffic sign from other prohibition traffic signs. It can be seen from Figure1 that the prohibition traffic signs contain at least 42 types of signs, so at least 42 binary classifiers are generated. Let Xi be the HOG feature vector set corresponding to the ith prohibition traffic sign and Fi be the binary classifier of Xi (i=1,2,3,⋯,42).
(4)Yi=Fix=1,∀x∈Xi,0,∀x∈Xi¯,i=1,2,3,⋯,42.42 classifiers need to be trained one by one. It should be noted that if ∀x can be accurately classified according to formula (4), then any prohibition traffic sign can be recognized only by judging all binary classifiers one by one. However, if
(5)s.t.Fix′=1,∃x′∈Xi¯,ors.t.Fix′′=0,∃x′′∈Xi.When the classifier is trained, there is(6)s.t.Fix=1,∀x∈Xi,s.t.Fix′=1,x′∈Xi¯.The purpose is to avoid any unrecognizable traffic signs.


## 5.2. Ascending Spiral Training Method of Traffic Sign Recognition Model

The PTSR model is constructed by multiple SVM binary classifiers and a classifier based on the predicted result. The key part is the training of multiple SVM binary classifiers. The training method of each SVM binary classifier has been introduced above. The final model should not be obtained at one time. And the final model can be obtained through iterative training.The number of the SVM binary classifiers is the number of prohibition traffic sign types. If there areN types of traffic signs needed to be recognized, the number of SVM binary classifiers should be N. There is a constraint parameter P for each SVM binary classifier. The default value of P is 1. The value of P is relative to the margin of SVM. The greater the value of P, the smaller margin, and the fewer points lie within the margin. The smaller the value of P, the wider margin, and the more points lie within the margin. On the basis of having selected training samples and kernel function, the setting of parameter P can affect the classification effect. In this paper, the initial kernel function is radial basis function (RBF). The process of setting the constraint parameter P is necessary and is as follows:
(1)
The training data set is divided into two parts. One part is the sample data of SVM, and the other part is used for testing the traffic sign recognition model which is called training data used for testing (TDUT)(2)
Set the value of parameterP by default initially, and there is(7)Pi=1i=1,2,3,⋯,N(3)
Train the SVM binary classifiers using the selected sample data and obtain theN SVM binary classifiers(4)
Use the SVM binary classifiers of step 3 to construct the traffic sign recognition model. Then, use the TDUT to test the model, and get the total recognition rateRa and the recognition rate of each type of traffic sign Rii=1,2,3,⋯,N(5)
Find out the minimum value ofRi from the noniterated SVM binary classifier in this round of iterative processes. If the recognition rate of the jth type of traffic sign is equal to the minimum value, then let the Pj varies from 0.1 to 10 in steps of 0.1 and the other parameter P is invariant at this time(6)
Find out the best total recognition rateRa_temp (Ra_temp≥Ra), and set the Pj to the first number which varies from 0.1 to 10 in steps of 0.1 and makes the total recognition rate best(7)
If the parameterPj is the last reset in this iteration and the total recognition rate has never been increased in this iteration, it should be the end of traffic sign recognition model training. Otherwise, go to step (3).


## 6. Verification and Analysis

In this section, the proposed prohibition traffic sign recognition method will be tested by using self-built data set. And the method will be verified based on GTSRB for comparative analysis in the case of using a different SVM kernel function.The experimental environment configuration is shown in Table4.Table 4
Experimental environment configuration.
Experimental environmentConfigurationOperating systemWindows 10 Home Edition (64)Software platformMatlab 2017CPU11th Gen Intel(R) Core(TM) i7-1165G7 2.80 GHzRAM16 GB


### 6.1. Source of Verification Data

Constructing a good benign data set is crucial to our model’s performance. To collect our benign data set, first, we downloaded traffic sample pictures from China traffic sign detection data set (CCTSDB) [30] and Tsinghua Tencent 100K (TT100K) data set to ensure a diversity of types of benign files. Then, we obtain the prohibition traffic sign that we need from those downloaded sample pictures by image matting. To ensure that the label of the prohibition traffic sign is sufficiently detailed, we relabelled the obtained prohibition traffic signs and classified them into 15 categories which were classified by the national standard of the People’s Republic of China (gb5768.2-2009). However, even after that, we found the data set still seemed not complete (e.g., missing import prohibition traffic sign). We further photoed those missing samples manually and labelled them as an important supplement to our data set. To improve the quality of our data set, we only accepted benign samples. In total, after filtering, we obtained 610 unique test samples. An example of test data is shown in Figure S2 in the supplemental files.


### 6.2. Test Results

As shown in Table5, the test results of 15 kinds of prohibition traffic signs show that the correct recognition rate of 8 kinds of prohibition traffic signs (traffic sign of no long parking, traffic sign of no right turn, traffic sign of height limit, traffic sign of no left turn, traffic sign of no entry, traffic sign of no pedestrian access, traffic sign of no U-turn, and traffic sign of no motor vehicles) is greater than or equal to 90%. The correct recognition rate of the other 7 kinds of prohibition traffic signs is within the range of (0.81, 0.9), and the total correct recognition rate of 15 kinds of prohibition traffic signs is 90.2%. Overall, the proposed classification model achieves the classification and recognition of traffic signs.Table 5
The data of test result.
Class IDTraffic sign (TS)Number of TSCorrect rateTS1No long parking40100.00%TS2No right turn40100.00%TS3Height limit5498.15%TS4No left turn3894.74%TS5No entry3694.44%TS6No pedestrian access3293.75%TS7No U-turn3691.67%TS8No motor vehicles4090.00%TS9No temporary or long-term parking4488.64%TS10No honking3387.88%TS11Speed limit 605086.00%TS12No overtaking5882.76%TS13No entry of trucks3381.82%TS14No entry of nonmotor vehicles3881.58%TS15Speed limit 403881.58%Total61090.20%


### 6.3. Result Analysis

By comparing the spatial detail complexity O of the traffic sign TS1~TS8 and the traffic sign TS9~TS15, there is(8)OTS1~TS8<OTS9~TS15.When the image size is reduced, the spatial detail information of the image is lost; thus, the HOG feature data of the image is lost too. Besides if the adverse factors such as image rotation and illumination are superimposed, the change of HOG feature of image exceeds the tolerance limit of SVM binary classifier, which leads to a decrease in classification accuracy. The correct rate of recognizing the prohibition traffic sign TS1~TS8 is greater than the correct rate of recognizing the prohibition traffic sign TS9~TS15.In addition, insufficient training sample is one of the reasons for the low classification accuracy. In this paper, the training samples consider the linear deformation of the image such as translation, horizontal and vertical unequal ratio deformation completely, and the nonlinear deformation caused by rotation and lens motion is not considered enough, which reduces the classification accuracy of the classifier for nonlinear deformation image.


### 6.4. Verify the HOG-SVM Model Based on the Data of GTSRB

To analyze the applicability of the SVM network, the model is trained by the data of GTSRB. Although the training data was chosen, the training data is mainly the prohibition traffic sign image. There are 17 types of prohibition traffic signs in the GTSRB. To train the HOG-SVM model, 595 sample pictures are used for the sample data of SVM, and the number of each prohibition traffic sign image used is 35. And all the pictures are chosen from the training data set randomly. There are 1239 pictures used to test the model finally. The sample training image and test image are shown in Figure9.Figure 9
Sample of training image and test image.
(a)
Training image(b)
Test image


#### 6.4.1. Use the RBF Kernel Function for the Test

In this part, the RBF kernel function for SVM is used firstly for the test. And the test result is shown in Table6.Table 6
The test result based on the data of GTSRB.
Class IDNumber of samplesNumber of samples recognizedCorrect rateFinal value of constraint parameterIndex of constraint parameter00000131184.62%0.910000113511383.70%4.12000021189782.20%3.0300003756890.67%1.040000412011091.67%8.65000051008484.00%8.3600006282692.86%0.6700007908493.33%4.3800008665481.82%5.390000910910596.33%0.8100001015614794.23%4.31100015454497.78%0.212000164141100.00%0.213000179393100.00%0.21400032151493.33%2.11500041111090.91%1.31600042242395.83%0.517Total1239112490.72%As shown in Table6, the highest correct rate is 100% and the lowest correct rate is 80.30%. The total correct rate (TCR) is 90.72%. The applicability of the recognition method is confirmed. The constraint parameter of class 0015~0017 is the lowest (0.2) and the correct rate is almost the highest. That is to say, the margin of the three SVM is wider than others and the SVM has the stronger generalization ability. The value of the constraint parameter is relative to the difference in the HOG feature of the traffic sign. The HOG feature of class 0015~0017 is more different from other classes of the prohibition traffic sign. Also, with the iterative training, the changing trend of the total recognition correct rate is shown in Figure 10.Figure 10
Schematic diagram of the change of total correct rate (TCR) with the number of iterations.From the first iteration to the 17th iteration, the total correct rate improved from 81.76% to 89.27%. Then, the second round of iteration begins. Finally, the total correct rate is 90.72%. Judging from the growth trend of the total correct rate, the first few iterations of each round of iteration make the total correct rate improve more greatly. This shows that the traffic sign classes of the lowest correct rate part provide more growth on the total correct rate and the model training method is confirmed too.As shown in Table7, the TCR is not improved while some constraint parameters are changing. This shows that some constraint parameters have little effect on TCR. To more clearly observe the process of TCR rising with iteration, the iteration data by which TCR is not changed is deleted. We can get a new correspondence table between constraint parameters and TCR during iteration.Table 7
The correspondence table between constraint parameters and TCR during iteration.
Number of iterationsConstraint parameterTCRNumber of iterationsConstraint parameterTCR1P682.00%21P290.56%2P982.49%22P190.56%3P384.42%23P490.56%4P585.96%24P1690.56%5P887.09%25P590.56%6P1687.17%26P790.56%7P288.30%27P890.56%8P188.38%28P1590.56%9P1588.46%29P1190.64%10P488.46%30P1790.64%11P1188.70%31P1090.64%12P788.78%32P1290.64%13P1088.78%33P1390.64%14P1788.78%34P1490.64%15P1288.86%35P990.72%16P1389.27%36P390.72%17P1489.27%37P290.72%18P990.23%38P690.72%19P690.56%39P190.72%20P390.56%40P490.72%As shown in Table8, the TCR is increased with the iteration process. And the increasing rate of TCR is faster at the beginning and slower in the follow-up. It can be seen that more and more test flag pictures are correctly classified with the change of constraint parameters and changing the constraint parameters is more effective at the beginning. From the data of Table 7, the 2D line chart can be obtained.Table 8
New correspondence table between constraint parameters and TCR during iteration.
Number of iterationsConstraint parameterTCR1P682.00%2P982.49%3P384.42%4P585.96%5P887.09%6P1687.17%7P288.30%8P188.38%9P1588.46%11P1188.70%12P788.78%15P1288.86%16P1389.27%18P990.23%19P690.56%29P1190.64%35P990.72%As shown in Figure11, the increasing rate is different with different constraint parameters of SVM binary classifier. And the TCR is rising alternately with the change of constraint parameter. In this way, the TCR is increasing gradually, and the unstable oscillation during TCR lifting is avoided.Figure 11
The 2D line chart of correspondence between constraint parameters and TCR during iteration.


#### 6.4.2. Effect Analysis of Parameter Granularity Refinement

In this part, the granularity of the constraint parameter will be smaller and will be changed from 0.01 to 0.001. To try to find more optimized constraint parameters for a higher classification correct rate.The search range is limited to the range of 0.1 above and below the final value which is shown in Table5. In this way, the calculation time can be saved, and there is no need to search the interval [0.001, 10] with the granularity of 0.001. As shown in Table 5, the final value of the constraint parameter for 00001 SVM binary classifier is 4.1, so the search range is in the interval [4.0, 4.2] with a granularity of 0.01. And the search order of constraint parameters is consistent with the previous method which has been elaborated in Ascending Spiral Training Method of Traffic Sign Recognition Model.As shown in Table9, the TCR is 90.80%, and it is increased little by refining the constraint parameter granularity. This shows that the change of constraint parameter granularity is less effective and the early used granularity (0.1) is satisfied the application scenario.Table 9
The result of parameter granularity refinement.
Constraint parameterFinal value of constraint parameterClassification correct rateP10.8884.62%P23.9983.70%P33.0082.20%P41.0090.67%P58.5491.67%P68.3084.00%P70.5792.86%P84.2993.33%P95.2681.82%P100.7597.25%P114.3094.23%P120.1897.78%P130.12100.00%P140.13100.00%P152.0793.33%P161.2190.91%P170.5095.83%Total90.80%


#### 6.4.3. Compare the Classification Correct Rate by Using Different Kernel Function

In this part, the Gaussian kernel function, linear kernel function, and polynomial kernel function are used for comparing the classification effect.As is shown in Figure12, the final TCR varies from different kernel functions. It is clear that the final TCR using Gaussian kernel function is equal to the final TCR using RBF kernel function, and the final TCR using polynomial kernel function is second, and the final TCR using linear kernel function is the lowest. Judging from the rising speed of TCR, the model using Gaussian kernel function is better than the other two methods which means that we can take less time to train the network. Also, it shows that the RBF kernel function and the Gaussian kernel function are more suitable for the classification method proposed in this paper. On the other hand, the final TCR shows that it performs well enough in the case of only a single-layer SVM network.Figure 12
Schematic diagram of the change of TCR with the number of iterations under different kernel functions.


#### 6.4.4. Compare with the Methods of GTSRB

We can get the results for IJCNN 2011 competition (1st stage) from the INI Benchmark Website [31]. There are 190 types of results submitted for the final GTSRB data set. For comparative analysis, we make statistics on the methods used by all participating teams.As shown in the figure, Figure13(a) shows the correct recognition rate of 67 methods including the keyword HOG. Figure 13(b) shows the correct recognition rate of 28 methods including the keyword SVM. Figure 13(c) shows the correct recognition rate of 7 methods including the keyword HOG&SVM. The red line shows the correct recognition rate of the method proposed in this paper. Although the correct recognition rate of multiple methods is better, these methods used a multilayer network model, not a single-layer network. And it will take more time to use more complex methods to train the recognition model. The PTSR model proposed in this paper which takes less time to be trained has a good performance in the subset of GTSRB data set. Especially, one method shown in Figure 13(c) is called HOG_SVM, and its correct recognition rate is 76.35% in the subset of the GTSRB data set. And the correspondence relations between numbers and methods in Figure 13 could be found in Table S1, Table S2, and Table S3 in the supplemental file.Figure 13
The correct recognition rate of methods including HOG, SVM, and HOG&SVM.


## 6.1. Source of Verification Data

Constructing a good benign data set is crucial to our model’s performance. To collect our benign data set, first, we downloaded traffic sample pictures from China traffic sign detection data set (CCTSDB) [30] and Tsinghua Tencent 100K (TT100K) data set to ensure a diversity of types of benign files. Then, we obtain the prohibition traffic sign that we need from those downloaded sample pictures by image matting. To ensure that the label of the prohibition traffic sign is sufficiently detailed, we relabelled the obtained prohibition traffic signs and classified them into 15 categories which were classified by the national standard of the People’s Republic of China (gb5768.2-2009). However, even after that, we found the data set still seemed not complete (e.g., missing import prohibition traffic sign). We further photoed those missing samples manually and labelled them as an important supplement to our data set. To improve the quality of our data set, we only accepted benign samples. In total, after filtering, we obtained 610 unique test samples. An example of test data is shown in Figure S2 in the supplemental files.


## 6.2. Test Results

As shown in Table5, the test results of 15 kinds of prohibition traffic signs show that the correct recognition rate of 8 kinds of prohibition traffic signs (traffic sign of no long parking, traffic sign of no right turn, traffic sign of height limit, traffic sign of no left turn, traffic sign of no entry, traffic sign of no pedestrian access, traffic sign of no U-turn, and traffic sign of no motor vehicles) is greater than or equal to 90%. The correct recognition rate of the other 7 kinds of prohibition traffic signs is within the range of (0.81, 0.9), and the total correct recognition rate of 15 kinds of prohibition traffic signs is 90.2%. Overall, the proposed classification model achieves the classification and recognition of traffic signs.Table 5
The data of test result.
Class IDTraffic sign (TS)Number of TSCorrect rateTS1No long parking40100.00%TS2No right turn40100.00%TS3Height limit5498.15%TS4No left turn3894.74%TS5No entry3694.44%TS6No pedestrian access3293.75%TS7No U-turn3691.67%TS8No motor vehicles4090.00%TS9No temporary or long-term parking4488.64%TS10No honking3387.88%TS11Speed limit 605086.00%TS12No overtaking5882.76%TS13No entry of trucks3381.82%TS14No entry of nonmotor vehicles3881.58%TS15Speed limit 403881.58%Total61090.20%


## 6.3. Result Analysis

By comparing the spatial detail complexity O of the traffic sign TS1~TS8 and the traffic sign TS9~TS15, there is(8)OTS1~TS8<OTS9~TS15.When the image size is reduced, the spatial detail information of the image is lost; thus, the HOG feature data of the image is lost too. Besides if the adverse factors such as image rotation and illumination are superimposed, the change of HOG feature of image exceeds the tolerance limit of SVM binary classifier, which leads to a decrease in classification accuracy. The correct rate of recognizing the prohibition traffic sign TS1~TS8 is greater than the correct rate of recognizing the prohibition traffic sign TS9~TS15.In addition, insufficient training sample is one of the reasons for the low classification accuracy. In this paper, the training samples consider the linear deformation of the image such as translation, horizontal and vertical unequal ratio deformation completely, and the nonlinear deformation caused by rotation and lens motion is not considered enough, which reduces the classification accuracy of the classifier for nonlinear deformation image.


## 6.4. Verify the HOG-SVM Model Based on the Data of GTSRB

To analyze the applicability of the SVM network, the model is trained by the data of GTSRB. Although the training data was chosen, the training data is mainly the prohibition traffic sign image. There are 17 types of prohibition traffic signs in the GTSRB. To train the HOG-SVM model, 595 sample pictures are used for the sample data of SVM, and the number of each prohibition traffic sign image used is 35. And all the pictures are chosen from the training data set randomly. There are 1239 pictures used to test the model finally. The sample training image and test image are shown in Figure9.Figure 9
Sample of training image and test image.
(a)
Training image(b)
Test image


### 6.4.1. Use the RBF Kernel Function for the Test

In this part, the RBF kernel function for SVM is used firstly for the test. And the test result is shown in Table6.Table 6
The test result based on the data of GTSRB.
Class IDNumber of samplesNumber of samples recognizedCorrect rateFinal value of constraint parameterIndex of constraint parameter00000131184.62%0.910000113511383.70%4.12000021189782.20%3.0300003756890.67%1.040000412011091.67%8.65000051008484.00%8.3600006282692.86%0.6700007908493.33%4.3800008665481.82%5.390000910910596.33%0.8100001015614794.23%4.31100015454497.78%0.212000164141100.00%0.213000179393100.00%0.21400032151493.33%2.11500041111090.91%1.31600042242395.83%0.517Total1239112490.72%As shown in Table6, the highest correct rate is 100% and the lowest correct rate is 80.30%. The total correct rate (TCR) is 90.72%. The applicability of the recognition method is confirmed. The constraint parameter of class 0015~0017 is the lowest (0.2) and the correct rate is almost the highest. That is to say, the margin of the three SVM is wider than others and the SVM has the stronger generalization ability. The value of the constraint parameter is relative to the difference in the HOG feature of the traffic sign. The HOG feature of class 0015~0017 is more different from other classes of the prohibition traffic sign. Also, with the iterative training, the changing trend of the total recognition correct rate is shown in Figure 10.Figure 10
Schematic diagram of the change of total correct rate (TCR) with the number of iterations.From the first iteration to the 17th iteration, the total correct rate improved from 81.76% to 89.27%. Then, the second round of iteration begins. Finally, the total correct rate is 90.72%. Judging from the growth trend of the total correct rate, the first few iterations of each round of iteration make the total correct rate improve more greatly. This shows that the traffic sign classes of the lowest correct rate part provide more growth on the total correct rate and the model training method is confirmed too.As shown in Table7, the TCR is not improved while some constraint parameters are changing. This shows that some constraint parameters have little effect on TCR. To more clearly observe the process of TCR rising with iteration, the iteration data by which TCR is not changed is deleted. We can get a new correspondence table between constraint parameters and TCR during iteration.Table 7
The correspondence table between constraint parameters and TCR during iteration.
Number of iterationsConstraint parameterTCRNumber of iterationsConstraint parameterTCR1P682.00%21P290.56%2P982.49%22P190.56%3P384.42%23P490.56%4P585.96%24P1690.56%5P887.09%25P590.56%6P1687.17%26P790.56%7P288.30%27P890.56%8P188.38%28P1590.56%9P1588.46%29P1190.64%10P488.46%30P1790.64%11P1188.70%31P1090.64%12P788.78%32P1290.64%13P1088.78%33P1390.64%14P1788.78%34P1490.64%15P1288.86%35P990.72%16P1389.27%36P390.72%17P1489.27%37P290.72%18P990.23%38P690.72%19P690.56%39P190.72%20P390.56%40P490.72%As shown in Table8, the TCR is increased with the iteration process. And the increasing rate of TCR is faster at the beginning and slower in the follow-up. It can be seen that more and more test flag pictures are correctly classified with the change of constraint parameters and changing the constraint parameters is more effective at the beginning. From the data of Table 7, the 2D line chart can be obtained.Table 8
New correspondence table between constraint parameters and TCR during iteration.
Number of iterationsConstraint parameterTCR1P682.00%2P982.49%3P384.42%4P585.96%5P887.09%6P1687.17%7P288.30%8P188.38%9P1588.46%11P1188.70%12P788.78%15P1288.86%16P1389.27%18P990.23%19P690.56%29P1190.64%35P990.72%As shown in Figure11, the increasing rate is different with different constraint parameters of SVM binary classifier. And the TCR is rising alternately with the change of constraint parameter. In this way, the TCR is increasing gradually, and the unstable oscillation during TCR lifting is avoided.Figure 11
The 2D line chart of correspondence between constraint parameters and TCR during iteration.


### 6.4.2. Effect Analysis of Parameter Granularity Refinement

In this part, the granularity of the constraint parameter will be smaller and will be changed from 0.01 to 0.001. To try to find more optimized constraint parameters for a higher classification correct rate.The search range is limited to the range of 0.1 above and below the final value which is shown in Table5. In this way, the calculation time can be saved, and there is no need to search the interval [0.001, 10] with the granularity of 0.001. As shown in Table 5, the final value of the constraint parameter for 00001 SVM binary classifier is 4.1, so the search range is in the interval [4.0, 4.2] with a granularity of 0.01. And the search order of constraint parameters is consistent with the previous method which has been elaborated in Ascending Spiral Training Method of Traffic Sign Recognition Model.As shown in Table9, the TCR is 90.80%, and it is increased little by refining the constraint parameter granularity. This shows that the change of constraint parameter granularity is less effective and the early used granularity (0.1) is satisfied the application scenario.Table 9
The result of parameter granularity refinement.
Constraint parameterFinal value of constraint parameterClassification correct rateP10.8884.62%P23.9983.70%P33.0082.20%P41.0090.67%P58.5491.67%P68.3084.00%P70.5792.86%P84.2993.33%P95.2681.82%P100.7597.25%P114.3094.23%P120.1897.78%P130.12100.00%P140.13100.00%P152.0793.33%P161.2190.91%P170.5095.83%Total90.80%


### 6.4.3. Compare the Classification Correct Rate by Using Different Kernel Function

In this part, the Gaussian kernel function, linear kernel function, and polynomial kernel function are used for comparing the classification effect.As is shown in Figure12, the final TCR varies from different kernel functions. It is clear that the final TCR using Gaussian kernel function is equal to the final TCR using RBF kernel function, and the final TCR using polynomial kernel function is second, and the final TCR using linear kernel function is the lowest. Judging from the rising speed of TCR, the model using Gaussian kernel function is better than the other two methods which means that we can take less time to train the network. Also, it shows that the RBF kernel function and the Gaussian kernel function are more suitable for the classification method proposed in this paper. On the other hand, the final TCR shows that it performs well enough in the case of only a single-layer SVM network.Figure 12
Schematic diagram of the change of TCR with the number of iterations under different kernel functions.


### 6.4.4. Compare with the Methods of GTSRB

We can get the results for IJCNN 2011 competition (1st stage) from the INI Benchmark Website [31]. There are 190 types of results submitted for the final GTSRB data set. For comparative analysis, we make statistics on the methods used by all participating teams.As shown in the figure, Figure13(a) shows the correct recognition rate of 67 methods including the keyword HOG. Figure 13(b) shows the correct recognition rate of 28 methods including the keyword SVM. Figure 13(c) shows the correct recognition rate of 7 methods including the keyword HOG&SVM. The red line shows the correct recognition rate of the method proposed in this paper. Although the correct recognition rate of multiple methods is better, these methods used a multilayer network model, not a single-layer network. And it will take more time to use more complex methods to train the recognition model. The PTSR model proposed in this paper which takes less time to be trained has a good performance in the subset of GTSRB data set. Especially, one method shown in Figure 13(c) is called HOG_SVM, and its correct recognition rate is 76.35% in the subset of the GTSRB data set. And the correspondence relations between numbers and methods in Figure 13 could be found in Table S1, Table S2, and Table S3 in the supplemental file.Figure 13
The correct recognition rate of methods including HOG, SVM, and HOG&SVM.


## 6.4.1. Use the RBF Kernel Function for the Test

In this part, the RBF kernel function for SVM is used firstly for the test. And the test result is shown in Table6.Table 6
The test result based on the data of GTSRB.
Class IDNumber of samplesNumber of samples recognizedCorrect rateFinal value of constraint parameterIndex of constraint parameter00000131184.62%0.910000113511383.70%4.12000021189782.20%3.0300003756890.67%1.040000412011091.67%8.65000051008484.00%8.3600006282692.86%0.6700007908493.33%4.3800008665481.82%5.390000910910596.33%0.8100001015614794.23%4.31100015454497.78%0.212000164141100.00%0.213000179393100.00%0.21400032151493.33%2.11500041111090.91%1.31600042242395.83%0.517Total1239112490.72%As shown in Table6, the highest correct rate is 100% and the lowest correct rate is 80.30%. The total correct rate (TCR) is 90.72%. The applicability of the recognition method is confirmed. The constraint parameter of class 0015~0017 is the lowest (0.2) and the correct rate is almost the highest. That is to say, the margin of the three SVM is wider than others and the SVM has the stronger generalization ability. The value of the constraint parameter is relative to the difference in the HOG feature of the traffic sign. The HOG feature of class 0015~0017 is more different from other classes of the prohibition traffic sign. Also, with the iterative training, the changing trend of the total recognition correct rate is shown in Figure 10.Figure 10
Schematic diagram of the change of total correct rate (TCR) with the number of iterations.From the first iteration to the 17th iteration, the total correct rate improved from 81.76% to 89.27%. Then, the second round of iteration begins. Finally, the total correct rate is 90.72%. Judging from the growth trend of the total correct rate, the first few iterations of each round of iteration make the total correct rate improve more greatly. This shows that the traffic sign classes of the lowest correct rate part provide more growth on the total correct rate and the model training method is confirmed too.As shown in Table7, the TCR is not improved while some constraint parameters are changing. This shows that some constraint parameters have little effect on TCR. To more clearly observe the process of TCR rising with iteration, the iteration data by which TCR is not changed is deleted. We can get a new correspondence table between constraint parameters and TCR during iteration.Table 7
The correspondence table between constraint parameters and TCR during iteration.
Number of iterationsConstraint parameterTCRNumber of iterationsConstraint parameterTCR1P682.00%21P290.56%2P982.49%22P190.56%3P384.42%23P490.56%4P585.96%24P1690.56%5P887.09%25P590.56%6P1687.17%26P790.56%7P288.30%27P890.56%8P188.38%28P1590.56%9P1588.46%29P1190.64%10P488.46%30P1790.64%11P1188.70%31P1090.64%12P788.78%32P1290.64%13P1088.78%33P1390.64%14P1788.78%34P1490.64%15P1288.86%35P990.72%16P1389.27%36P390.72%17P1489.27%37P290.72%18P990.23%38P690.72%19P690.56%39P190.72%20P390.56%40P490.72%As shown in Table8, the TCR is increased with the iteration process. And the increasing rate of TCR is faster at the beginning and slower in the follow-up. It can be seen that more and more test flag pictures are correctly classified with the change of constraint parameters and changing the constraint parameters is more effective at the beginning. From the data of Table 7, the 2D line chart can be obtained.Table 8
New correspondence table between constraint parameters and TCR during iteration.
Number of iterationsConstraint parameterTCR1P682.00%2P982.49%3P384.42%4P585.96%5P887.09%6P1687.17%7P288.30%8P188.38%9P1588.46%11P1188.70%12P788.78%15P1288.86%16P1389.27%18P990.23%19P690.56%29P1190.64%35P990.72%As shown in Figure11, the increasing rate is different with different constraint parameters of SVM binary classifier. And the TCR is rising alternately with the change of constraint parameter. In this way, the TCR is increasing gradually, and the unstable oscillation during TCR lifting is avoided.Figure 11
The 2D line chart of correspondence between constraint parameters and TCR during iteration.


## 6.4.2. Effect Analysis of Parameter Granularity Refinement

In this part, the granularity of the constraint parameter will be smaller and will be changed from 0.01 to 0.001. To try to find more optimized constraint parameters for a higher classification correct rate.The search range is limited to the range of 0.1 above and below the final value which is shown in Table5. In this way, the calculation time can be saved, and there is no need to search the interval [0.001, 10] with the granularity of 0.001. As shown in Table 5, the final value of the constraint parameter for 00001 SVM binary classifier is 4.1, so the search range is in the interval [4.0, 4.2] with a granularity of 0.01. And the search order of constraint parameters is consistent with the previous method which has been elaborated in Ascending Spiral Training Method of Traffic Sign Recognition Model.As shown in Table9, the TCR is 90.80%, and it is increased little by refining the constraint parameter granularity. This shows that the change of constraint parameter granularity is less effective and the early used granularity (0.1) is satisfied the application scenario.Table 9
The result of parameter granularity refinement.
Constraint parameterFinal value of constraint parameterClassification correct rateP10.8884.62%P23.9983.70%P33.0082.20%P41.0090.67%P58.5491.67%P68.3084.00%P70.5792.86%P84.2993.33%P95.2681.82%P100.7597.25%P114.3094.23%P120.1897.78%P130.12100.00%P140.13100.00%P152.0793.33%P161.2190.91%P170.5095.83%Total90.80%


## 6.4.3. Compare the Classification Correct Rate by Using Different Kernel Function

In this part, the Gaussian kernel function, linear kernel function, and polynomial kernel function are used for comparing the classification effect.As is shown in Figure12, the final TCR varies from different kernel functions. It is clear that the final TCR using Gaussian kernel function is equal to the final TCR using RBF kernel function, and the final TCR using polynomial kernel function is second, and the final TCR using linear kernel function is the lowest. Judging from the rising speed of TCR, the model using Gaussian kernel function is better than the other two methods which means that we can take less time to train the network. Also, it shows that the RBF kernel function and the Gaussian kernel function are more suitable for the classification method proposed in this paper. On the other hand, the final TCR shows that it performs well enough in the case of only a single-layer SVM network.Figure 12
Schematic diagram of the change of TCR with the number of iterations under different kernel functions.


## 6.4.4. Compare with the Methods of GTSRB

We can get the results for IJCNN 2011 competition (1st stage) from the INI Benchmark Website [31]. There are 190 types of results submitted for the final GTSRB data set. For comparative analysis, we make statistics on the methods used by all participating teams.As shown in the figure, Figure13(a) shows the correct recognition rate of 67 methods including the keyword HOG. Figure 13(b) shows the correct recognition rate of 28 methods including the keyword SVM. Figure 13(c) shows the correct recognition rate of 7 methods including the keyword HOG&SVM. The red line shows the correct recognition rate of the method proposed in this paper. Although the correct recognition rate of multiple methods is better, these methods used a multilayer network model, not a single-layer network. And it will take more time to use more complex methods to train the recognition model. The PTSR model proposed in this paper which takes less time to be trained has a good performance in the subset of GTSRB data set. Especially, one method shown in Figure 13(c) is called HOG_SVM, and its correct recognition rate is 76.35% in the subset of the GTSRB data set. And the correspondence relations between numbers and methods in Figure 13 could be found in Table S1, Table S2, and Table S3 in the supplemental file.Figure 13
The correct recognition rate of methods including HOG, SVM, and HOG&SVM.


## 7. Conclusion and Future Work

In conclusion, for recognizing prohibition traffic signs, a classification model based on HOG feature and SVM network is proposed. The classification model consists of three parts, which are the image preprocessing part, the initial binary classification part, and the final classification part based on the predicted result. The classification model is validated. Analyzing the test result data, the validity of the model is confirmed.In future work, on the one hand, we will pay attention to the completeness of training samples. Let the training samples cover the changes of prohibition traffic sign image in deformation, illumination, and occlusion as much as possible, and improve the classification performance of SVM binary classifiers, and enhance the accuracy of a single SVM binary classifier. On the other hand, focusing on the appropriateness of image size and the optimal image size will be considered, so that the HOG features can fully describe the details of the image and will not greatly increase the dimension of HOG features because the image size is larger, so as to improve the training efficiency of SVM classifier as much as possible. Also, the granularity of constraint parameters can be smaller (such as 0.01) which is mainly 0.1 in this paper, and the search range of constraint parameters can be wider which is in the interval [0,10] in this paper. Also, the kernel function of SVM binary classifier should not be limited to the RBF, Gaussian, linear, and polynomial kernel function, and other kernel functions can be chosen, and a different kernel function could be used for each SVM binary classifier that has different types of kernel functions. Of course, fusing other traffic sign classification and recognition methods to improve the accuracy of classification is also an important aspect of future research work.



---

*Source: 6942940-2022-07-20.xml*