Analysis of Helmet Detection Using LENET
and Transfer Learning
Sreehari Ravindran
1, Roopa K
1, Sarika P R
1, Nevline Jose T
1, Jyothish Krishna P G2UG Scholar, Dept. of Electronics And Communication Engineering, NSS College of Engineering Palakkad,
Akathethara, Palakkad, Kerala, India1
Assistant Professor, Dept. of Electronics And Communication Engineering, NSS College of Engineering Palakkad,
Akathethara, Palakkad, Kerala, India2
ABSTRACT: Nowadays the most preferred means of transport is two wheelers. The main reason behind it is two wheelers are economical and flexible .This increase in usage of two wheelers has also increased the number of road accidents. This is due to traffic rule violations like over speed, not wearing helmet, drunken driving etc. Implementing an effective automatic helmet detection system helps in decreasing two wheeler accidents to an extent. This paper aims to implement a real time helmet detection system in which license plate is extracted if the bike rider is not wearing helmet. This paper also compare two approaches , LeNet and Transfer Learning, used for detecting helmet. Convolution Neural Networks are employed for implementation.
KEYWORDS:.Convolutional Neural Network,Transfer Learning, MobileNetSSD.caffe model ,LeNet
I. INTRODUCTION
ISSN(Online): 2319-8753 ISSN (Print) : 2347-6710
I
nternational
J
ournal of
I
nnovative
R
esearch in
S
cience,
E
ngineering and
T
echnology
(A High Impact Factor, Monthly, Peer Reviewed Journal)
Visit: www.ijirset.com Vol. 8, Issue 5, May 2019
II. PROPOSED METHEDOLOGY
Fig 1: Block Diagram Of proposed System
The block diagram of proposed system is shown in Fig. 1.Various steps involved are :
Step 1: Real time detection of bike riders
Step 2: Helmet Detection in the region of interest
Step 3: If no helmet, detection of number plate
1.BIKE RIDER DETECTION
First step is the real time detection of bike riders. First step is the real time detection of bike riders. There are many pre trained neural network models available that can be employed. These models can be modified for custom class detection. In this paper we use MobileNetSSD.caffe model, which is light weight object detection model that can detect objects belonging to various classes like motorbike, motorcycle, car, aero plane, chair etc. and draw bounding box over them. The only concerned class is motorbike.
Two sets of classes was defined, the first set, 'DETECT', consist of all the classes that the model can detect and the second set, 'IGNORE', consist of classes that are to be ignored. Here the 'IGNORE' set consist of all classes except 'motorbike'. So if any class other than 'motorbike' is detected, it is simply ignored and no bounding box is drawn. If 'motorbike' is detected, then bounding box is drawn over it. To this region of interest the helmet detection model is applied.
2. DETECTION OF HELMET
ISSN(Online): 2319-8753 ISSN (Print) : 2347-6710
I
nternational
J
ournal of
I
nnovative
R
esearch in
S
cience,
E
ngineering and
T
echnology
(A High Impact Factor, Monthly, Peer Reviewed Journal)
Visit: www.ijirset.com Vol. 8, Issue 5, May 2019
LeNet Model
LeNet includes three layers Convolution layer, fully connected layer and pooling layer[2]. Convolution Layer learns feature from input image. It extracts characteristics of different positions and ‘Relu’ activation function[3]. Pooling layer increases the robustness of feature extraction and reduces the feature dimension. In Max pooling highest value in the window is considered. High level characteristic features are extracted by stacking several convolution and pooling layers [4]. Fully connected layer connects all neurons of previous layer to that in the current layer. Softmax regressions which generate well performed probability distribution of output are used for classification process.
LeNet which was actually designed for handwritten digit classification can be retrained for custom image classification using custom dataset. The LeNet model employs two sets of layer blocks (Convolutional layer, Activation function, pooling layer). The first set includes 20 5*5 filters and same padding, activation function used is Rectified Linear Unit (known as ‘ReLu’). Then follows a 2*2 MaxPooling layer with stride 2[5]. The second block includes 50 filters of same configuration followed by ‘ReLu’ activation function and MaxPooling layer. Two blocks are followed by Fully Connected layer of 500 nodes with ‘ReLu’ activation function. It was followed by a softmax classifier which gives the probability of prediction and here the number of classes is two. For training 80% of the dataset was used and remaining 20% for testing. Data augmentation is improves the performance of the model. It the orientation of the images while training which helps in learning new features , even if we don’t have a large dataset. One limitation of LeNet is that, the size of the input image is limited 28x28 pixels. So our images must be resized to 28x28 pixels, but this reduces the image to a very small object. This affects the feature extraction process.
Transfer Learning Approach
The next approach used was applying transfer learning algorithm on a pretrained model, MobileNet. Transfer learning improves the accuracy and requires less training time[6]. In transfer learning, it gains some information during the initial prediction and apply this knowledge during the next prediction. We add more dense layers so that the model learns complex features. Three dense layers having 1024, 1024 and 512 nodes respectively were added, each with a ReLu activation function[7]. Finally the fourth dense layer of two nodes with softmax activation was added, which corresponds to our two classes for prediction. The epoch value was gives as 5 and batch size 32. Here we don’t have any limitation on the image size.
III. NUMBER PLATE DETECTION AND EXTRACTION
From the region of interest containing the bike rider not wearing helmet, number plate is detected using image processing techniques including contours and edge detection.
III. RESULTS
Following Results were obtained when helmet detection was done using LeNet and Transfer Learning.
ISSN(Online): 2319-8753 ISSN (Print) : 2347-6710
I
nternational
J
ournal of
I
nnovative
R
esearch in
S
cience,
E
ngineering and
T
echnology
(A High Impact Factor, Monthly, Peer Reviewed Journal)
Visit: www.ijirset.com Vol. 8, Issue 5, May 2019
Figure 6 shows the accuracy plot of Transfer Learning and Figure 7 shows the detection of helmet using Transfer Learning along with their accuracy in prediction.
V.CONCLUSION
This paper compared two methods of detecting objects(Helmet in this case).First method involved the use of CNN Model called LeNet and the other used a method called Transfer Learning. The accuracy in case of LeNet was around 88% whereas in case of Transfer Learning the accuracy was 99%.Both the models was trained on same parameters like epoch, batch size, dataset. As expected, it was observed that accuracy is more when detection is done using Transfer Learning. In future this result can be used in many systems. A system that automatically detects helmets from real time videos can be implemented. A number plate extraction system can also be added to it. Another extension that can be made is a system that issues fine to bike riders without wearing helmets. Results can be applied to a number of applications like detecting vehicles parked in No Parking areas etc. So it is clear that using Transfer Learning method gives good accuracy than CNN models in Detecting objects. It reduces effort, time and also it has that reliability of trained model.
REFERENCES
[1]https://towardsdatascience.com/transfer-learning
[2] https://www.quora.com/What-is-max-pooling-in-convolutional-neural-networks.
[3] V. Nair and G. E. Hinton, “Rectified linear units improve restricted boltzmann machines,” in ICML, 2010, pp. 807–814.
[4]https://www.researchgate.net/publication/264859599_Exploring_Convolutional_Neural_Network_Structures_and_Optimization_Techniques_for_ Speech_Recognition.
[5] http://faroit.com/keras-docs/1.2.2/layers/pooling.