Professional Documents
Culture Documents
Helmet Detection On Motorcyclists Using Image Descriptors and Classifiers
Helmet Detection On Motorcyclists Using Image Descriptors and Classifiers
AbstractMotorcycle accidents have been rapidly growing 66% of motorcyclists used the helmet according to the law [5].
throughout the years in many countries. Due to various The Centers for Disease Control and Prevention in USA
social and economic factors, this type of vehicle is becoming presented a report in 2012 where the ndings indicated that
increasingly popular. The helmet is the main safety equipment
of motorcyclists, however many drivers do not use it. The main 12% of fatally injured motorcyclists were not wearing helmets
goal of helmet is to protect the drivers head in case of accident. in states with universal helmet laws1 . In states that adopt
In case of accident, if the motorcyclist does not use can be fatal. partial helmet law2 the number increased to 64%. Finally, the
This paper aims to propose a system for detection of motorcyclist number was 79% in states without a helmet law [6]. This
without helmet. For this, we have applied the circular Hough statistics show how is important the helmet use.
transform and the Histogram of Oriented Gradients descriptor
to extract the image attributes. Then, the MultiLayer Perceptron Over the past years many works were carried out in
classier was used and the obtained results were compared with trafc analysis, including vehicle detection and classication,
others algorithms. Trafc images were captured by cameras from and helmet detection. Intelligent trafc systems was usually
public roads and constitute a database of 255 images. Indeed, the implemented using vision computer algorithms, such as:
algorithm step regarding the helmet detection accomplished an
background and foreground image detection to segment
accuracy rate of 91.37%.
moving objects in scene and image descriptors to extract
Keywords-Helmet; Feature extraction; Classication; features. Computational intelligence algorithms are used too,
like machine learning algorithms to classier the objects. Next,
I. I NTRODUCTION some related works to helmet detection are presented.
Motorcycles are one of the most mode of transport used in Wen et al. [7] suggested a circle arc detection method based
the world. It is caused by the low prices and low operation upon the circular Hough transform. They applied it to detect
cost in comparison with another vehicles. In the last decade, helmet on the surveillance system of the Automatic Teller
it was observed an increase in the number of motorcycle Machine. The weakness of this work is that they only use
accidents. In 2011, according to the National Department of geometric features to verify if any safety helmet exists in
Transport Infrastructure (DNIT), Brazil had a total of 34, 635 the scene. Geometric features are not enough to nd helmet.
motorcycles involved in accidents [1]. Based on another The head can be mistaken with a helmet because both had a
research [2], the number of deaths in the same year was circular-like form.
14.666. In another paper Chiu et al. [8] proposed a computer
According to statistics of 2012 [3], Thailand had more than vision system aims to detect and segment motorcycles partly
17 millions motorcycles ofcially registered. Due to a large occluded by another vehicle. A helmet detection system is
number of vehicles, a high number of accidents is expected. used, and the helmet presence determines that there is a
According to the World Health Organization report [4] motorcycle in a scene. In order to detect the helmet presence,
published in 2013 about road safety, the trafc-related death the image edges are computed in the possible helmet region.
rate in Thailand was 38.1 per 100 thousand peoples, and 118.8 The Canny edge detector [9] is used. The quantities of edge
per 100 thousand motor vehicles. The same report said that points which are similar to a circle dene a helmet region.
Thailand has the third higher trafc-related mortality rate. In The method needs so much information (helmet radius, camera
Brazil, the average rate was 22.5, and in USA this value was angle and height) that must be provided by user.
11.4. In addition, the report said that around 25% of deaths in In another paper Chiverton [10] described and tested a
trafc-related accidents in Brazil envolved motorcyclists. system for tracking and automatic classication of riders with
The main safety equipment of motorcyclist is the helmet. and without helmet. The system uses the SVM classier,
The helmet protects the motorcyclist against accidents. which is trained with the attribute vectors of the Histogram
Although the helmet use is mandatory in many countries, there
are motorcyclists that do not use it or use incorrectly. The 1 The helmet use is mandatory for all motorcyclists.
Department of Transportation in USA said that, in 2011, only 2 Only required specic groups, usually young riders, to wear helmet.
142
required, all this preprocessing was made in the RoI. At rst,
it is computed the grayscale image.
After the grayscale image be calculated, a average lter
5 5 is applied to reduce the noise. At next, the Otsu [17]
threshold is computed. It is applied in grayscale image to get a
binary image (black and white). Figure 2c shows the result of (a)
this processing. In the binary image is applied the Sobel [12]
algorithm, that returns the image edges, see Figure 2d.
The next step is the CHT (Circular Hough Transform)
calculation to nd circle-like regions. It was used because the
motorcyclist head region has a circle-like shape. The CHT
computation with edges is computationally faster and has a (b)
better precision. The CHT was set with the computed edges
and get the possible circles. One of the parameters required by
the CHT is the circle size fetched. The radius size was half of
the RoI height. That value was chosen because a helmet has
not a size larger than the RoI.
From the found circles a search is made to return the best
circle (circle with more points in the CHT computation). (c)
Figure 2e shows the best circle found in a RoI image. A
strategy that use only geometric information, like CHT, do
not returns good results because the head and the helmet
have similar shape. Therefore, other features are necessary to
separate the problem class. For this, a sub-window from RoI
is computed, that will correspond to the square circumscribed
(d)
in the circle found (see Figure 2f). Figure 2 shows the steps
of the sub-window calculation.
V. F EATURE E XTRACTION
In order to extract image features, Histogram of Oriented
Gradients (HOG) [11], Local Binary Pattern (LBP) [18] and
Wavelet Transform (WT) [19], [20] were used as descriptor. (e)
A. Histogram of Oriented Gradients
The Histogram of Oriented Gradients (HOG) algorithm [11]
is a feature descriptor that calculates an image histogram of
oriented gradients. The nal descriptor is an one-dimensional
array of histograms extracted from the image. The algorithm
is based on the local object shape and appearance, which in (f)
an image can be represented by intensity gradients or edge
Fig. 2: Sub-window calculation. (a) RoI. (b) Grayscale. (c)
directions. The feature extraction can be done without an edge
Binary image. (d) Edge image. (e) Image with the best circle.
position foreknowledge.
(f) Sub-window image.
B. Local Binary Pattern
The Local Binary Pattern (LBP) has a good performance in
many applications, including classication and texture, image
1 tb
recovery and surface inspection. The original LBP [18] labels a,b (t) = ( ), (1)
the image pixels for a threshold neighborhood of 3 3. Each a a
pixel is compared with the central pixel and the result is the were a = 0 is the scale factor, that represents a contraction or
binary number. Figure 3 shows how the LBP is computed. a dilatation in the signal; b is the translation.
C. Wavelet Transform In a digital image the wavelet coefcients was computed
considering the lines and columns as unidimensional images.
The Wavelet Transform (WT) is an alternative approach in Figure 4 show an image and the four result images after apply
relation to Fourier transform for image processing. The WT the WT.
allows that both frequency and time information are presented.
All pixels correspondent to compress image(Figure 4b,
WT was formally proposed by Deubechies and Mallat [19],
top left image) were used as descriptor in the work. The
[20]. Equation 1 dene the WT,
tree others decompositions was tested too, but they do not
143
amount of motorcyclists with helmet. A CCD video camera
was used. The image database is distributed as follows:
151 images of motorcyclists with helmet; and
104 images of motorcyclists without helmet.
The Figure 5 shows examples of images.
144
We use the K-fold cross-validation statistic method with HOG and LBP descriptors. At end, Figure 12 show the ROC
K = 10 to generate the results. In 10-fold cross-validation, curves to WT, HOG and LBP combination.
the original sample is randomly partitioned into 10 equal
size subsamples. Of the 10 subsamples, a single subsample
is retained as the validation data for testing the model, and
the remaining 9 subsamples are used as training data. The
cross-validation process is then repeated 10 times (the folds),
with each of the 10 subsamples used exactly once as the
validation data. The advantage of this method over repeated
random sub-sampling is that all observations are used for
both training and validation, and each observation is used for
validation exactly once. In stratied 10-fold cross-validation,
the folds are selected so that the mean response value is
approximately equal in all the folds.
Table I shows the best result obtained, that was performed
using the HOG descriptor and the MLP classier, was obtained !"
an accuracy rate of 0.9137. From 255 images, 22 were #
$%
incorrectly classied. Therefore, according the Kappa index
the result was Excellent (K 0.8). The FM rate was !&
'(
0.9281, that summarizes the P (0.9161) and R (0.9404) rates.
'$
TABLE I: The best result for the helmet detection. )""
E VPN P R FM K A
0.8750 0.9100 0.9161 0.9404 0.9281 0.8203 0.9137
Fig. 6: ROC curve using the WT.
Table II shows the obtained results for the SVM classier. It
is observed that the best results was obtained using the hybrid
composition HOG and LBP (accuracy rate of 0.8784).
The results from the RBFN classier are show in Table III.
The best result was obtained with WT+HOG+LBP (accuracy
rate of 0.8863). In some cases the hybrid descriptors can
improve the results of the individual descriptors.
Table IV show, besides the best result, the results of
another combinations. The Naive Bayes results are presented
145
TABLE II: Helmet detection using the SVM classier.
Descritor VP FP VN FN E VPN P R FM K A
WT-[1] 137 19 85 14 0.8173 0.8586 0.8782 0.9073 0.8925 0.7301 0.8706
HOG-[2] 139 19 85 12 0.81731 0.8763 0.8797 0.9205 0.8997 0.7456 0.8784
LBP-[3] 133 30 74 18 0.7115 0.8043 0.8159 0.8808 0.8471 0.6032 0.8118
[1]+[3] 137 19 85 14 0.8173 0.8586 0.8782 0.9073 0.8925 0.7301 0.8706
[1]+[2] 137 19 85 14 0.8173 0.8586 0.8782 0.9073 0.8925 0.7301 0.8706
[2]+[3] 139 19 85 12 0.81731 0.8763 0.8797 0.9205 0.8997 0.7456 0.8784
[1]+[2]+[3] 137 19 85 14 0.8173 0.8586 0.8782 0.9073 0.8925 0.7301 0.8706
146
!"
!
"
##
#
$
! $
%&' "!%
$&&
()*
& '()
*
+!!
+""
*
Fig. 8: ROC curve using the LBP. Fig. 10: ROC curve using the WT+HOG.
!"
# !
"#
$
%% $
%
"!&
## ! &
""
'()
*# '()
*
+""
% +!!
""
Fig. 9: ROC curve using the WT+LBP. Fig. 11: ROC curve using the HOG+LBP.
147
R EFERENCES
[1] DNIT, Numero de veculos envolvidos por nalidade do veculo,
Departamento Nacional de Infraestrutura de Transportes, Ministerio dos
Transportes, Tech. Rep., 2011.
[2] J. J. Waiselsz, Mapa da violencia 2013: Acidentes de transito e
motocicleta, Centro Brasileiro de Estudos Latino-Americanos, Tech.
Rep., 2013.
[3] S. F. Bureau, Key statistics of thailand, National Statistical Ofce,
Ministry of Information and Communication Technology, Bangkok,
148