HOG Descriptors for Traffic Sign Classification
HOG Descriptors for Traffic Sign Classification
net/publication/259481902
Article in International Journal for Traffic and Transport Engineering (IJTTE) · December 2013
DOI: 10.7708/ijtte.2013.3(4).08
CITATIONS READS
16 2,132
2 authors, including:
Hasan Fleyeh
Dalarna University
81 PUBLICATIONS 1,113 CITATIONS
SEE PROFILE
Some of the authors of this publication are also working on these related projects:
All content following this page was uploaded by Hasan Fleyeh on 30 December 2013.
Abstract: The purpose of this paper is to analyze the performance of the Histograms of Oriented
Gradients (HOG) as descriptors for traffic signs recognition. The test dataset consists of speed
limit traffic signs because of their high inter-class similarities. HOG features of speed limit signs,
which were extracted from different traffic scenes, were computed and a Gentle AdaBoost classifier
was invoked to evaluate the different features. The performance of HOG was tested with a dataset
consisting of 1727 Swedish speed signs images. Different numbers of HOG features per descriptor,
ranging from 36 features up 396 features, were computed for each traffic sign in the benchmark
testing. The results show that HOG features perform high classification rate as the Gentle AdaBoost
classification rate was 99.42%, and they are suitable to real time traffic sign recognition. However,
it is found that changing the number of orientation bins has insignificant effect on the classification
rate. In addition to this, HOG descriptors are not robust with respect to sign orientation.
1
Corresponding author: hfl@[Link]
448
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
Fig. 1.
Speed Limit Traffic Signs
Source: Wikipedia (2010)
Although speed signs are located in good change the perception of the color of parts or
visible spots on the side of the road where they the entire speed sign. Bad weather conditions
can be expected by the drivers (Fleyeh, 2006), such as snow, rain or fog can affect the color
they can be found in different conditions. or sharpness of the sign. Images of traffic sign
They could be damaged or mounted on a can be blurry when they are collected from a
damaged pole. Sign colors fade by aging of moving vehicle. The signs can be rotated or
the traffic sign because of environmental occluded by paint, trees or other obstacles.
effects. In the dusk or dawn the colors are A number of examples of problematic speed
perceived to be much darker. Shadows can sign images are shown in Fig. 2.
Fig. 2.
Examples for Critical Images of Speed Signs Included in the Dataset
Furthermore, speed signs are not the only which are very similar to speed limit signs.
signs with a red border, yellow fill and black Some examples of similar looking signs are
pictogram. There are a number of signs shown in Fig. 3.
Fig. 3.
Examples of Critical Images which Look Similar to Speed Sign Images
449
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
Classifying this group of traffic signs, i.e. the HOG descriptors were invoked in different
speed limit traffic signs, which is characterized applications other than human detection
by high inter-class similarity and low intra- which it was originally designed for.
class variability needs highly sophisticated
feature descriptors. Among these descriptors Dong et al. (2010) developed a HOG-based
is the Histograms of Oriented Gradients multistage approach for object detection and
(HOG) which was introduced by Dalal and object pose recognition for service robots.
Triggs (2005) as features for pedestrian This approach made use of the merits of
recognition. However, it has shown that it both multi-class and bi-class HOG-based
is capable of describing other objects than detectors to form a three-stage algorithm
pedestrians (Dong et al., 2010; Zhang et al., at low computing cost.
2007; Zhang, 2010; Bertozzi et al., 2007;
Zaharescu et al., 2009; Rybski et al., 2010). Zhang et al. (2007) proposed a multi-
resolution framework which was based
The main contribution of this paper is to on HOG descriptors for general object
investigate the suitability of this descriptor to detection. Different resolutions were
achieve traffic sign recognition. Performance represented using a coarse-to-fine feature
manifestation conducted by this paper hierarchy. During detection, the lower
include high recognition rates, real-time resolution features were initially used to
implementation, many traffic sign categories reject the majority of negative windows at
as recognition objects, robustness for variant relatively low cost, leaving a relatively small
environments, and feasibility under poor number of windows to be processed in higher
visibility conditions. A benchmark test was resolutions. The lowest resolution classifier
conducted by training a Gentle AdaBoost was able to reject almost 80% of the windows
(Friedman et al., 2000) as a multiclass with a detection rate of 98.6%. W hen
classifier with a set of HOG features computed combined, the first three low resolutions
for this set of traffic signs. The classifier was rejected more than 99.9% of the windows,
trained and tested with different numbers of with a detection rate of almost 94%.
HOG features and the behavior of the classifier
should reflect the ability of HOG descriptors Zhang (2010) proposed an off-line signature
to represent this group of traffic signs. verification and identification method by
invoking a local shape descriptors pyramid of
The remainder of the paper is constructed so HOG. The signature image was divided into
that in Section 2 the related work is presented. a number of non-overlapped regions in each
Section 3 demonstrates the system setup and level of the pyramid. It starts by the whole
in Section 4 the experiments conducted on the signature image as one region, then 4 regions,
HOG descriptors are illustrated and discussed. and 16 regions and so on. HOG features are
Finally, the conclusions are drawn in Section 5. computed for each cell in the level and merged
together to represent the whole signature. A
2. Related Work binary SVM classifier was invoked for the
purpose of verification and multi-class SVM
In recent years, research in object recognition was invoked for identification. The system
has grown rapidly because of the real need achieved FRR of 4.0% and FAR 3.25% for
for such systems in future applications. skilled forged signatures.
450
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
Bertozzi et al. (2007) invoked HOG and proposed system was trained with a set of
SVM classifier to filter the region of interest (HOG) descriptors to recognize different
(ROI) gathered by visible and far infrared orientations of vehicles detected in imagery.
cameras for the purposes of pedestrain The HOG orientation-specific classifiers
detection. The system was able to classify achieved 88% classification accuracy on a
91% of the pedestrains in the ROI areas. test database of 284 images.
Fig. 4.
Block Diagram of the System Setup
451
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
A B C D
Fig. 5.
Steps of Object Extraction
452
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
Fig. 6.
Computing the HOG Descriptors
453
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
3.3. Gentle AdaBoost Classifier noisy data. The algorithm uses adaptive
Newton steps rather than exact optimization
Gentle AdaBoost is a boosting algorithm at each step to minimize the exponential
(Schapire, 2003) which was introduced by criterion in order to stabilize the learning
Friedman et al. (2000). It is a robust and processing.
stable version of the Real AdaBoost and
performs slightly better than the latter on Let X be a finite training set which is denoted
regular data and considerably better on by Eq. (1):
(1)
2. Repeat for
b. Update
454
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
Table 1
The Dataset used to Test the HOG
Class Speed km/h Abbreviation Number of Extracted signs
0 - NOSL 1025
1 30 SL30 98
2 50 SL50 213
3 60 SL60 114
4 70 SL70 380
5 80 SL80 104
6 90 SL90 415
7 100 SL100 198
8 110 SL110 116
9 120 SL120 72
Total 2735
Fig. 7.
The Training Dataset
In order to evaluate the effect of number of A plot of the classification error versus the
features deduced from the ROI, a 10-fold number of features indicates clearly that
455
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
Fig. 8.
Classification Error versus Number of Features
456
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
4.2. Effect of Number of Orientation Bins bins. In contrast to the variation of cells,
the var iation of the bin size did not
The effect of number of orientation bins on show major differences in the accuracy.
the classification rate was also tested. The However, a slight improvement can be
Gentle AdaBoost classifier was trained observed with 10 bins with a size of 18 o
with different numbers of HOG features each (Table 3). Fig. 9 depicts the effect
which were derived from the training set of the number of orientation bins on the
based on different numbers of orientation classification rate.
Table 3
Effect of Orientation Bins on the Classification Rate
Number of Orientation Bins Number of HOG Features Average Accuracy %
7 (6x6x7) = 252 99.34
8 (6x6x8) = 288 99.27
9 (6x6x9) = 324 99.38
10 (6x6x10) = 360 99.42
11 (6x6x11) = 396 99.23
Fig. 9.
Classification Accuracy versus Number of Orientation Bins
Deep analysis of the objects which were classifier did not generate any false positives.
misclassified showed that the classifier Common to all false negatives was the fact
committed 16 misclassifications. Among that they were blurry because of bad weather
them there was one 90 km/h speed limit sign conditions or because they were far away
which was classified as 80 km/h and all other in the background. A number of examples
errors were false negatives. However, the which were misclassified are depicted Fig. 10.
457
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
Fig. 10.
Signs Misclassified by the Classifier
4.3. Classifying Disoriented Traffic Signs The classifier was tested with HOG features
derived from speed limit images which were
Traffic signs are usually installed on poles rotated by different angles in clockwise and
which are always vertical with respect counter clockwise directions. Fig. 11 depicts
to the ground level. However, for many a plot of the classification rate versus angle
reasons such as the nature of the ground of rotation.
or environmental effects, these traffic
signs depart from the vertical situation. T he plot show s a l a rge d rop i n t he
Two of the speed limit traffic signs shown classification rate when disoriented traffic
in Fig. 2 belong to this category. In this signs were classified with the trained
experiment, the effect of disorientation classifier, which means that HOG descriptors
(rotation) of traffic signs is studied. The are rotation variant and cannot be utilized
Gentle AdaBoost classifier was trained in these situations. As this is a crucial issue
with 360 HOG features (6x6 cells and 10 as far as traffic signs are concerned, a proper
bins). All of these features were derived solution is essential in this case to avoid this
from vertically oriented speed limit signs. kind of invariance.
458
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
Fig. 11.
Classification Rate of the Gentle AdaBoost Trained with Vertically Aligned Signs versus Angle of
Rotation of Traffic Signs
This experiment was repeated by training was the same. The classification rate did not
the Gentle AdaBoost with a set of HOG drop as traffic signs rotate. Although there was
descriptors which was derived from speed limit a slight variation in the classification rate, the
sign rotated by different angles between -90o average classification rate was 92%. The plot
to 90o. These HOG descriptors were derived of the classification rate versus the angle of
in the same manner described in the first part rotation when Gentle AdaBoost was trained
of this experiment and the number of features with rotated signs is depicted in Fig. 12.
Fig. 12.
Classification Rate of the Gentle AdaBoost Trained with Rotated Signs versus Angle of Rotation of Traffic Signs
459
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
4.4. The Overall Performance of Gentle AdaBoost was trained with HOG
Classification descriptors of the training subset and
tested with the remainder of the images.
To test the effect of HOG descriptors This experiment was repeated for different
as discrimination features among speed numbers of HOG descriptors and each time
limit signs and non-speed limit signs, the rejection ratio was computed. Table 4
the set of images illustrated in Table 1 is depicts the ratio of rejection for the non-
invoked. The set was divided by 66.6% speed limit signs for different values of
for training and 33.3% for testing. The HOG descriptors.
Table 4
Performance Analysis of the Gentle AdaBoost based on Different Numbers of HOG Descriptors
HOG Features TP TN FP FN Misclassified
(2x2x9) = 36 543 328 1 16 24
(3x3x9) = 81 570 328 1 7 6
(4x4x9) = 144 574 328 1 7 2
(5x5x9) = 225 574 329 0 6 3
(6x6x7) = 252 574 329 0 6 3
(6x6x8) = 288 577 329 0 5 1
(6x6x9) = 324 575 329 0 6 2
(6x6x10) = 360 574 329 0 8 1
(6x6x11) = 396 575 329 0 5 3
460
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
Fig. 13.
Geometric Mean versus Number of HOG Descriptors
Fig. 14.
False Positives Generated by Mixed up HOG Descriptors
In order to validate this issue, the receiver is clear that the optimum features which
operating characteristic (ROC) diagram of are 225 descriptors perform as well as the
the lowest, the optimum, and the highest maximum number of features. This result
number of features was generated and is in full agreement with that obtained from
illustrated in Fig. 15. From this plot, it the geometric mean plot.
461
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
Fig. 15.
ROC Plot of the Gentle AdaBoost Trained with the Lowest Number of Features (36 HOGs ), Highest
Number of Features (396 HOGs ), and Best Number of Features (225 HOGs )
4.5. Training and Testing Time speed limit sign using different numbers of
HOG descriptors are depicted in Table 5.
This experiment is accomplished using While training time increases almost linearly,
Macbook 6.1 w it h I ntel Core 2 Duo, the testing time is almost constant regardless
2.26 GHz processor and the code was of the number of features. The increment
implemented using Matlab R2012a (maci64) in the testing time between a low number
version. Timings of training the Gentle of features and a high number of features is
AdaBoost classifier with 2735 descriptors not crucial. Fig. 16 depicts a plot of training
together with the classification time of a and testing times versus number of features.
Table 5
Time Required for Training and Testing of Different Numbers of HOG Descriptors
Number of HOG Features Time of Training (sec.) Time of classification (msec.)
36 2.67 13.8
81 5.83 15.2
144 10.16 15.4
225 21.02 16.2
324 22.77 16.8
462
International Journal for Traffic and Transport Engineering, 2013, 3(4): 448 - 464
Fig. 16.
Training and Testing Time of the Classifier with HOG Descriptors
463
Fleyeh H. et al. Benchmark Evaluation of HOG Descriptors as Features for Classification of Traffic Signs
464