Traffic Sign Recognition and Detection Using SVM and CNN
Traffic Sign Recognition and Detection Using SVM and CNN
net/publication/374629435
CITATIONS
3 authors, including:
Singathala Harshith
Societe generale global solutions center
5 PUBLICATIONS 1 CITATION
SEE PROFILE
All content following this page was uploaded by Singathala Harshith on 12 October 2023.
1Sai Jayanth Gollapudi, School of Computer Science and Engineering, Vellore Institute of Technology, Vellore –
632014, Tamil Nadu, India
2Harshith Singathala, School of Computer Science and Engineering, Vellore Institute of Technology, Vellore –
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 842
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
step recognizes traffic signs by handling the blobs from the proposed model includes road signs from six European
ROI. The last step perceives the data included in the identified countries: Belgium, Croatia, France, Germany, the Nether-
traffic signs. They utilized blend of (HOG) histogram of lands, and Sweden. The classes belong to 4 main categories
oriented gradients processed from the HSI shading/color and subcategories: Danger/warning, regulatory, informative,
space with LSS features to frame new descriptor. They others. A comparative study of 5 CNNs architectures trained
utilized arbitrary forest classifier to perform with our proposed European dataset and the German Traffic
acknowledgment. They performed this on German traffic sign Sign Recognition Benchmark (GTSRB). They described the 5
dataset and Swedish traffic sign dataset. They achieved CNNs that achieve the best performances in the state of the
94.21percent AUC on the GTSDB data set and 92.11percent in art regarding Traffic Sign Classification as: Le-Net 5, IDISA
STS data set. In the future work, they are planning to use model, URV model, CNN with asymmetric kernels, CNN 8
adaptive thresholding to overcome the colour segmentation layered. Their proposed European traffic sign dataset proved
problems. to be more robust than the GTSRB dataset with the 5 CNN
architectures trained on, making it reliable and more
[4] Despite the fact that traffic sign complete for traffic sign recognition. Their future work
acknowledgment/recognition has been read for a long time, includes intent to take into account the class imbalance
most existing works are centered around the image-based problem to improve recognition accuracy.
traffic signs. This paper bargains about acknowledgment of
both image-based and text based signs. The framework [7] Lately, the consequence of traffic sign recognition
comprises of three phases, (ROIs) traffic sign regions of (TSR) has been maintained, and TSR is additionally advancing
interest extraction, ROIs refinement and grouping, and post- quickly in deep learning. The TSR consists of essentially a
processing. Traffic sign ROIs from each casing are first couple of ways namely, traffic sign classification (TSC) and
extricated utilizing maximally stable extremal areas on grey traffic sign detection (TSD). In this paper, they introduce a
and standardized RGB channels. At that point, they are new efficient TSC network called Ent (efficient network) and
refined and allocated to their definite classes through the a TSD network called EmdNet, which can achieve an accuracy
proposed multi tasks Convolutional neural networks, which of 98.6percent on the GTSRB. In this paper, An innovative
is prepared with a huge measure of information, including network construction method is proposed for both TSC and
manufactured traffic signs and pictures marked from road TSD net- works. Their future work includes: improved
sees. The post handling finally consolidates the outcomes in performance of TSD network, inclusion of video instead of
all frames to settle on an recognition choice. Here they used images for input to networks and research multitask learning
German traffic sign detection dataset. Their model gets the and improve the generalization ability and commercialization
great result on a challenging new data set also. They achieved of the network.
87percent recognition rate. Improving the speed of system is
also included in future work. [8] This paper expresses the real-world application of
intelligent deep learning techniques in TSR (traffic sign
[5] In this paper, Yingying Zhu et al are proposing an- recognition). These include application in intelligent
other framework for traffic sign location utilizing two deep transportation surveillance and analysis. Difficulty during the
learning segments. They applied a fully Convolutional deployment of deep neural networks toward embedded
organization to section candidate traffic sign regions showing traffic sign recognition comprises huge computational and
applicant regions of interest (RoI), trailed by a quick neural memory demands concerning such networks. To approach
network to recognize messages on the extricated RoI. The this prob- lem they have performed MicronNet, a deeply
proposed strategy utilizes the attributes of traffic signs to im- dense deep convolutional neural network for real-time
prove the proficiency and exactness of text recognition. The embedded traffic sign recognition designed based on macro-
proposed two-stage detection technique lessens the pursuit architecture de- sign principles. Their algorithm includes
space of text identification and eliminates messages outside Numerical Micro- architecture Optimization, Spectral Macro
traffic signs and FCN is utilized to accomplish this. It solves architecture Aug- mentation, Parameter Precision
the problem of multi-scales for the text detection part to a Optimization and Activation Function Selection and Training.
large extent. They used Text-based Traffic Sign Dataset in Later citing its correctness they examined it with other state-
Chinese and English (TTSDCE) and the Traffic guide panel of-the-art traffic sign recognition networks: STDNN, HLSGD,
dataset (approximately 3900 images). The experimental MCDNN, CDNN; Data set used for testing is The German
results show that the proposed method is not only efficient traffic sign recognition benchmark (GTSRB). The resulting
and effective but also can be easily applied to text-based MicronNet network pro- duces a good balance amid accuracy
traffic signs in other languages. In future, they are planning to and model size as well as inference speed. Their future work
improve the accuracy by using information in the videos with includes: exploring additions upon MicronNet over a more
text traffic signs. comprehensive range of traffic datasets to enhance
generalizability in diverse situations.
[6] Road signs from one country to another may look
very different, which makes it difficult for the classification
system to work successfully. The training data set for the
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 843
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
Architectures like multi-scale training etc, are very useful As we discussed in methodology, we used four
for image detection. By training NN (Neural network), they preprocessing techniques before training the dataset. We will
can recognize patterns which can certain colors. For reducing discuss the results for each preprocessing technique here.
the color resolution of image, color segmentation neural
networks are very useful. By this we can say that neural 1) Shuffling:
networks are very powerful in classify things. We are using
LeNet and VGGNet to recognize traffic signs’ features within a Its aim is to shuffle data to avoid element bias and it helps
region of interest by training them. in increasing the predictive performance and improving
model quality. We use sklearn for this technique.
There are a total of 7 modules in our proposed
Architecture. In this we discuss the results at every module. 2) Gray scaling:
The modules are: Its aim is to convert the images in dataset to gray scale
images which helps in increasing the accuracy of ConvNet.
A. LOAD THE DATA We use OpenCV for this technique.
Initially we download the dataset from the Kaggle web- 3) Local Histogram Equalization:
site which consists of more than 50,000 images. Link:
http://benchmark.ini.rub.de/?section=gtsrb&subsection=dat Its aim is to enhance the contrast of the image. After
aset applying this technique, the results are the images enhancing
with low contrast. We use skimage for this technique.
4) Normalization:
Its aim is to normalize the image data so that the data has
zero mean and equal variance. It rescale the range of pixel
intensity values to 0-1 range.
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 844
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
1) LeNet-5:
In this module, we use normalized images (which are In fig 3, “Conv” references to Convolution process, “Fully”
done by normalization preprocessing technique) for training. references to FullyConnected process.
At test time, it is not difficult to surmised the impact of
averaging the expectations of all these diminished networks 4.2. VGGNet
by basically utilizing a solitary unthinned network that has
VGG Net Convolutional network depth is toward its effi-
more modest weights. These altogether can help to reduce
ciency in a significant large-scale image recognition envi-
over-fitting problems and gives great upgrades compared to
ronment. The main contribution is a thorough evaluation of
other strategies that are used for regualrization.
networks of increasing depth using an architecture with very
F. TESTING THE MODEL WITH TESTING DATASET small (3x3) convolution filters, which proves that a notable
development on the prior-art arrangements can be
In this part, by using random unknown examples, we are accomplished by pushing the depth to 16-19 weight layers.
going to measure the performance and accuracy by using the
testing model. And we are plotting confusion matrix. By 1) VGGNet architecture:
plotting it, we can figure out whether the model is failed or
The original VGGNet architecture will be having 16-19
succeeded by testing it on random unknown test samples.
lay- ers, but we have excluded some of them to reduce
And for further improvement, we use hierarchal CNN’s.
complexity and implemented a modified version of only 12
G. TESTING THE MODEL ON NEW IMAGES layers to save computational resources.
4. PROPOSED MODEL
4.1. LeNet
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 845
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
A. LOAD THE DATA Chart-3: Image count in each folder in testing examples
Initially we download the dataset from the Kaggle website
which consists of more than 50,000 images.
Link: We load all the images from the dataset which are
resized to 32x32 and we do pickling for every image using
python pickle module which results all the images as a
matrix with each image[i,j] represents as pixel data of the
image.
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 846
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
B. ABOUT THE DATASET AND EXPLORATION OF The final step of preprocessing is Normalization. The output
THESE PICKLED FILES GENERATED BY US after this step
‘labels’: It is a vector having assigned class ids/labels of D. DESIGNING MODEL ARCHITECTURE (I E CODING
traffic sign images for later processing. There is sign- THE CNN MODELS FOR TRAINING
names.csv file this file contains the id and it maps to the
desired the traffic sign image. In this module we write the code for our Models and run
them. They are After coding the LeNet -5 Model. We also
‘sizes’: It is a list containing tuples with each tuple as the used another model called VGGNET for comparison of both
(width ,height) of every image from the dataset. to see which predicts outputs correctly with maximum
‘coords : It is also a list containing tuples of which has efficiency.
(x1,y1,x2,y2) representing coordinates of a bounding field
across the signal withinside the image. After coding and executing theses model class now our data
set is ready for training.
C. DATA PREPROCESSING
6. MODEL TRAINING AND EVALUATION
As we discussed in methodology we used four preprocessing
techniques before training the dataset. We will discuss the
In the module we do training and evaluation.
results for each preprocessing technique here .
In this we are going to train our models from the obtained
1) Shuffling normalized images from the module 2. Now we are going to
train our model using a pipeline and run the training data.
From the sklearn we have libraries to shuffle the data set.
Here is the sample code shown below for shuffling. To
increase the randomness
2) Gray scaling
Using OpenCV we can grayscale the images
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 847
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
After VGGNet training using VGGNet sample code: Chart-5: Confusion Matrix Graph
From this Model we are able to achieve the maximum
From the above graph we have a look at a few clusters
accuracy of 99.3%. So, we are going to use this model for
withinside the confusion matrix above. It seems that the
predicting testing dataset.
speed limits traffic sign images are every now and then are
Pipeline architecture for VGGNet : mis-labelled. Similarly, The Traffic signals with triangular
form are misclassified amongst themselves. We can similarly
Figure13 is the pipeline architecture of the VGGNet run- enhance at the version using hierarchical CNNs to first
ning 30 epochs with validation accuracy as 99.3 % and become aware of broader groups (like speed limit images)
testing accuracy as 97.6 % after which have CNNs to classify finer features (including the
real speed limit).
7. TESTING THE MODEL WITH TESTING DATASET
8. TESTING THE MODEL ON NEW IMAGES
Now we use the training set which was divided in the module
1 we use that to predict the accuracy of our model. We are We have Final module in our project testing the model using
been able to achieve the test accuracy around 97.6%. which 5 random set of images.
means the signs are almost predicted correctly.
Plotting new images:
As From the testing accuracy we noticed that our model fails
in some cases we will represent the confusion matrix for
which images our model is failing. Confusion matrix graph is
shown in figure 12.
This line of code will preprocess the data images and gives
the output as normalized images. We pass this images to the
Fig -10: Pipeline Architecture Diagram for VGGNet model for predicting the label.
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 848
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
Output of Predicting Model code: colab allows us to download it that particular notebook each
time we run them.
9. CONCLUSIONS
We have discussed how the deep learning can be utilized to
order traffic signs with high precision, utilizing an
assortment of pre-processing and regularization methods
(for example dropout), and attempting distinctive model
designs. We have fabricated profoundly configurable code
and fostered an adaptable method of assessing numerous
architecture. The model we designed arrived at near 97%
precision on the test set, accomplishing 98% on the
validation set.
REFERENCES
[1] Bangquan, X., Xiong, W. X. (2019). Real-time embedded
Fig -12: Predicting images traffic sign recognition using an efficient convolutional
neural network. IEEE Access, 7, 53330-53346.
As we will note from the top five softmax probabilities, the
model which we have created has very good [2] Wong, A., Shafiee, M. J., Jules, M. S. (2018). Micronet: A
accuracy(100%) while we input the simple test image traffic highly compact deep convolutional neural network
signs, like the "Stop" and the "No entry" signal, and even architecture for real-time embedded traffic sign
excessive predic- tion accuracy while predicting easy classification. IEEE Access, 6, 59803-59810.
triangular symbol signs in a completely clean image, like the
[3] Zhu, Z., Lu, J., Martin, R. R., Hu, S. (2017). An
"Yield" signal.
optimization approach for localization refinement of
Also, we have to notice that our model accuracy is slightly candidate traffic signs. IEEE Transactions on Intelligent
low while detecting the more complicated triangular signal Transportation Systems, 18(11), 3006-3016.
in a "quite noisy" image, in the "Pedestrian" signal image, we
[4] Liu, C., Li, S., Chang, F., Wang, Y. (2019). Machine vision
have got a triangular signal with a form internal it and the
based traffic sign detection methods: Review, analyses
copyrights of the photographs provides a few noises to the
and perspectives. IEEE Access, 7, 86578-86596.
image, the trained model became able to expect the accurate
class, however with 100% self-assurance. But it may be [5] Liu, Z., Du, J., Tian, F., Wen, J. (2019). MR-CNN: A multi-
sometimes less when the image is very blur and noisier it scale region- based convolutional neural network for
may expect the actual class may be between (60,100). small traffic sign recognition. IEEE Access, 7, 57120-
57128.
And in the "Speed limit" signal, we will look at that the
version appropriately expected that it a [6] Changzhen, X., Cong, W., Weixin, M., Yanmei, S.
(2016, August). A traffic sign detection algorithm based
"Speed limit" signal, however, became one way or the other
on deep convolutional neural network. In 2016 IEEE
burdened among the specific pace limits. However, it was
International Conference on Signal and Image
able to assign the image to the correct id/label at the end.
Processing (ICSIP) (pp. 676-679). IEEE.
The VGGNet model version became capable of expecting the
accuracy results for every of the five new take a look [7] C. Wang, "Research and Application of Traffic Sign
atimages. Detection and Recog- nition Based on Deep Learning,"
2018 International Conference on Robots Intelligent
Test Accuracy = 100.0%
System (ICRIS), Changsha, 2018, pp. 150-152.
After Pickling file using picking code, it results in three files
[8] Ravindran, R., Santora, M. J., Faied, M., Fanaei, M. (2019,
as
December). Traffic Sign Identification Using Deep
train.p Learning. In 2019 International Conference on
valid.p Computational Science and Computational Intelligence
test.p (CSCI) (pp. 318-323). IEEE.
These files are uploaded in aws bucket and got the cdns(i.e [9] Han, Y., Oruklu, E. (2017, August). Traffic sign
cloud front urls ) to use them in google colab.the google recognition based on the nvidia jetson tx1 embedded
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 849
International Research Journal of Engineering and Technology (IRJET) e-ISSN: 2395-0056
Volume: 10 Issue: 07 | July 2023 www.irjet.net p-ISSN: 2395-0072
system using convolutional neural networks. In 2017 [20] Chou, L. D., Tseng, C. W., Lai, M. S., Chen, W. Y., Chen, K.
IEEE 60th International Midwest Symposium on Circuits C., Yen, C. K., ... Chiu, Y. H. (2018, October). Classification
and Systems (MWSCAS) (pp. 184-187). IEEE. of malicious traffic using tensorflow machine learning.
In 2018 International Conference on Information and
[10] Stallkamp, J., Schlipsing, M., Salmen, J., Igel, C. (2011, Communication Technology Convergence (ICTC) (pp.
July). The German traffic sign recognition benchmark: a 186-190). IEEE.
multi-class classification competition. In The 2011
international joint conference on neural networks (pp. [21] Choi, S. Y., Jeong, H. J., Park, K. S., Ha, Y. G. (2019,
1453-1460). IEEE. February). Efficient driving scene image creation using
deep neural network. In 2019 IEEE international
[11] Houben, S., Stallkamp, J., Salmen, J., Schlipsing, M., Igel, C. conference on big data and smart computing (BigComp)
(2013, Au- gust). Detection of traffic signs in real-world (pp. 1-4). IEEE.
images: The German Traffic Sign Detection Benchmark.
In The 2013 international joint conference on neural [22] Paclík, P., Novovicová, J., Duin, R. P. (2011). Building
networks (IJCNN) (pp. 1-8). Ieee. road-sign classi- fiers using a trainable similarity
measure. IEEE Transactions on Intelligent
[12] Yang, Y., Luo, H., Xu, H., Wu, F. (2015). Towards real-time Transportation Systems, 7(3), 309-321.
traffic sign de- tection and classification. IEEE
Transactions on Intelligent transportation systems, [23] Supreeth, H. S. G., Patil, C. M. (2016, March). An approach
17(7), 2022-2031. towards efficient detection and recognition of traffic
signs in videos using neural networks. In 2016
[13] Li, K., Lan, W. (2011, August). Traffic indication symbols International Conference on Wireless Communications,
recognition with shape context. In 2011 6th Signal Processing and Networking (WiSPNET) (pp. 456-
International Conference on Computer Science 459). IEEE.
Education (ICCSE) (pp. 852-855). IEEE.
[24] Ohara, H., Nishikawa, I., Miki, S., Yabuki, N. (2012,
[14] Sugiharto, A., Harjoko, A. (2016, October). Traffic sign November). Detec- tion and recognition of road signs
detection based on HOG and PHOG using binary SVM using simple layered neural networks. In Proceedings of
and k-NN. In 2016 3rd Interna- tional Conference on the 9th International Conference on Neural Information
Information Technology, Computer, and Electrical Processing, 2002. ICONIP’02. (Vol. 2, pp. 626-630). IEEE.
Engineering (ICITACEE) (pp. 317-321). IEEE..
[25] Biswas, R., Fleyeh, H., Mostakim, M. (2014, January).
[15] Kamal, U., Tonmoy, T. I., Das, S., Hasan, M. K. (2019). Detection and classification of speed limit traffic signs.
Automatic traffic sign detection and recognition using In 2014 World Congress on Computer Applications and
SegU-net and a modified tversky loss function with L1- Information Systems (WCCAIS) (pp. 1-6). IEEE.
constraint. IEEE Transactions on Intelligent
Transportation Systems, 21(4), 1467-1479.
[17] Luo, H., Yang, Y., Tong, B., Wu, F., Fan, B. (2017). Traffic
sign recog- nition using a multi-task convolutional
neural network. IEEE Transactions on Intelligent
Transportation Systems, 19(4), 1100-1111.
© 2023, IRJET | Impact Factor value: 8.226 | ISO 9001:2008 Certified Journal | Page 850