0% found this document useful (0 votes)
105 views5 pages

Mask R CNN Based Vehicle Detection Model For Traffic Management System

The document describes a vehicle detection model called Mask R CNN that can detect vehicles in images and video captured by cameras at traffic signals. The model counts the vehicles and helps allocate green light time more efficiently between lanes based on traffic volume. It also has potential to reduce traffic violations and identify crime vehicles if trained to recognize license plates. The system uses a Raspberry Pi with camera to capture footage and runs algorithms like R-CNN, Fast R-CNN, Faster R-CNN, and Mask R-CNN to detect vehicles in real-time with high accuracy. The authors conducted a comparative study of these algorithms to evaluate model performance.

Uploaded by

Vedant Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
105 views5 pages

Mask R CNN Based Vehicle Detection Model For Traffic Management System

The document describes a vehicle detection model called Mask R CNN that can detect vehicles in images and video captured by cameras at traffic signals. The model counts the vehicles and helps allocate green light time more efficiently between lanes based on traffic volume. It also has potential to reduce traffic violations and identify crime vehicles if trained to recognize license plates. The system uses a Raspberry Pi with camera to capture footage and runs algorithms like R-CNN, Fast R-CNN, Faster R-CNN, and Mask R-CNN to detect vehicles in real-time with high accuracy. The authors conducted a comparative study of these algorithms to evaluate model performance.

Uploaded by

Vedant Agrawal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Mask R CNN based vehicle detection model for

traffic management system.

Prakhar Verma Vedant Agrawal Sushmita Kaviraj Diksha Pal


Professor, Electronics Student, Electronics and Student, Electronics and Student, Electronics and
and Communication Communication Communication Communication
Engineering Department Engineering Department Engineering Department Engineering Department
Prestige institute of Prestige institute of Prestige institute of Prestige institute of
Engineering Engineering Engineering Engineering
Management and Management and Management and Management and
Research (PIEMR) Research (PIEMR) Research (PIEMR) Research (PIEMR)
Indore, Madhya Indore, Madhya Indore, Madhya Indore, Madhya
Pradesh, India Pradesh, India Pradesh, India Pradesh, India
[email protected] [email protected] sushmitakaviraj768@ dikshapal8591@gmail
gmail.com .com

Abstract — In the current era of technology every I. INTRODUCTION


continuous or discontinuous work is going to be converted
into automation. We all knew that the next revolution is The Project is entitled as a Mask R CNN based vehicle
industry 4.0 which is going to replace all such types of detection model for traffic management system. It is a
activities. On a bigger note, automation is going to achieve working application of vehicle detection or object
by replacing human resources i.e. 5 major senses of human detection model in other words we can say that the
sight, sound, smell, touch, and taste, and all depends upon above project is the application part of the trained
the type of work. The prescribed project also works with one
model.
of the senses for automation ie VISION. We developed a
device that detects the object and works accordingly. The The model replaces the heavy implementation of
main objective of the paper is to provide a system that works electronic sensors in terms of cost and maintenance by
efficiently with industries to work faster and effectively. In
using pre-installed cameras at the signals. The model is
our paper, we have focused comparative study on vehicle
used to detect the vehicle and count it using the number
detection model which can detect the vehicle and also show
of counter box draw around it, this will help in the time
the accuracy percentage on the block, for that, we collect
data, then pre-process the data, model building, and most
allocation algorithm and pass more time to heavily

importantly, compare models and evaluate to get better trafficked lanes in comparison to other lanes. The
results. project results in some crucial or indirect savings like it
reduces the time for a vehicle to wait which leads to
Keywords----- R-CNN , Fast R-CNN , Faster R-CNN, Mask
saving in fuel, time, environment, and money.
R-CNN .

The system is fully automated and also able to detect


the number plates if trained the model for that too,
which helps in reducing traffic violation by challan or a
voice note on speaker for such, and also helps to detect
III. ALGORITHMS & MODEL
crime vehicle easily as the system automatically detects
DESCRIPTION
the vehicle and also provides the list of number plates
make easy to track.
Algorithms & Models used to compare the model are:
II. HARDWARE DESCRIBED
 Region-based Convolutional Networks (R-CNN).
Hardware required for this device are:  Faster R-CNN.
 Fast R-CNN.
 Raspberry Pi 3 Model B+  Mask R-CNN.
 Raspberry Pi LCD 3.5
 Raspberry Pi Camera Module V2 3.1 Fast R-CNN

Fast R-CNN abbreviated as Fast Region-Based


2.1 Raspberry Pi 3 Model B + Convolutional Neural Network, is one of the top
machine learning algorithms used for object detection.
Raspberry Pi is an innovative series of a computer on a
It trains data in a single stage using multi-task loss and
single board. Initially, the Raspberry Pi project focused
can update all network layers without any external
on promoting primary computer science teaching. We
memory requirement for the cache. [6]
use it in areas, such as climate monitoring, because of
its low cost, orderliness, and open construction.
Provides a growing global speed with processor speed,
multimedia functionality, memory, and connectivity
while maintaining backward compatibility with the
same power consumption[9].
Figure 1 Fast RCNN[6]

2.2 Raspberry Pi LCD 3.5

3.2 Faster R-CNN:


The LCD screen can be used to display output and take
input. With the help of connectors, we can interface the Faster R-CNN is a similar algorithm to R-CNN. It uses
LCD with the help of a GPIO pin[8]. RPN (Region Proposal Network) that shares detected
network with full features of the image leads to a cost-
2.3 Raspberry Pi Camera Module V2
effective solution for R-CNN. It trained end-to-end to
To take video and still photos we can use Camera generate high-quality region proposals.[6]
Module V2. The chosen camera compatible with all the
versions of the raspberry pi[10]. We can access it with
some third-party libraries like adafruit, arducam,
etc[11].

Figure 2 Faster RCNN[6]


3.3 Region-based Convolutional Neural Networks IV. PROJECT FLOW CHART AND
(R-CNN): DESCRIPTION

The Region-based Convolutional Neural Network


method (RCNN) is a Convolution Neural Network with
combination of region proposals. R-CNN algorithm is a
highly upgraded tool for machine learning as it helps in
localizing objects using a deep neural network and
training a high-capacity model with only a small
quantity of annotated detection data. It achieves
excellent object detection accuracy by using a deep
Convolution network to classify object proposals[6].

Figure 3 RCNN[6]

3.4 Mask R-CNN:

Mask R-CNN (regional convolutional neural network)


is a upgraded version of faster RCNN where it divided
into two steps scans the image and generates
proposals(ROI). And secondly, classifies the proposals
and generates bounding boxes and masks.[4]

Figure 5 Project Flow chart

Figure 4 Mask RCNN[6]


The process flow inside the model can be described as

At each time instance (after 10 sec) a image frame is


captured stated as input frame now checking of the lane
number i.e. the input frame is from which lane after
which the input frame is processed under Mask RCNN
algorithm by finding Region Of Interest (ROI) and
detecting vehicle simultaneously for making mask it
proceed by extracting new corner points and assigning
them to detected segment then tracking old and new
Figure 6 Training graphs
corner points and by deleting points out of ROI then
We did a comparative study of machine learning
proceed to final vehicle counting.
algorithms R-CNN, Fast R-CNN, Faster R-CNN, and
V. WORKING PROCEDURE Mask R-CNN for the comparative analysis. We
collected the data and pre-process it; after that, we build
The Proposed system work with both video and images,
the models to compare the accuracy and then evolution.
The system first takes the video input from all four of
the lanes (here we assumed that we have 4 lanes in For collecting data, we combine all data into one place
comparison) then divide them into timestamps, the with the same attributes. We Pre-process the data to
parallel system detects the vehicle using the input video improve it before building a machine learning model.
and count each one of the. It updates the count after For this, we split the data into two stages training and
every 10 sec to get more accurate results. testing. Then we create the model and train it. Then the
models are tested to know the accuracy and to compare
Let us suppose if there is a predefined time slot of
the models.
30sec to each lane then in every 10 sec, it updates the
count and also compares the crowd in all of the lanes VI. EXPERIMENTAL RESULTS
and arranges it in a prediction array using which it
The given approach is trained and tested against
predicts which of the next lane is green.
different datasets and videos captured by us or provided
We also include a deadlock prevention condition and a by. The results are compared by other 3 results on
parallel comparison algorithm for lanes having the various parameters like test time per image, mAP
minimum number of vehicles than the other three accuracy, the loss against similar dataset provided as
always and if two or three of lanes having the same coco
number of vehicles respectively.
Fig. 6 The Loss V/S Epoch and Accuracy V/S Epoch
It helps the government to maintain better traffic graph is shown above of the trained model using the
conditions and also avoiding wastage of fuel and time proposed system algorithm i.e. Mask RCNN. The
which affects everyone directly or indirectly. model is trained using 131 training and 21 test images
and evaluated against a different dataset

Figure 7. Train Test results


TABLE 1 Experimental results and comparison VII. FUTURE SCOPE
The Future scope of the proposed project is in
R- Fast R- Faster Mask
various applications as the model can be trained
CNN CNN R- R-CNN
CNN for any type of dataset and can be used
accordingly. The current system can be enhanced
Test time 50 20 0.9 0.2
by number plate detection, traffic violation,
per image
tracking of vehicles, and many more aspects.
(in sec)

mAP 34.0% 21.1% 11.4% 1.1% VIII. CONCLUSION

Accuracy 66% 78.8% 88.6% 98.9% On a conclusive note, we can say that there are
many ways to train a convolution neural network
Accuracy 66[5] 66.9[5] 66.9[5] 97.72[1]
Comparision
model, along with making some aspects constant
like dataset and other training parameters then to it
all differs because of the algorithm used to train

The above table is the result comparison of the the model. On other hand, the comparative study

different algorithms. And below are some on of algorithms of regional convolutional neural

working screenshots of the model. network or RCNN comes out as in between RCNN,
Fast RCNN, Faster RCNN, Mask RCNN the Mask
RCNN comes out the best way among all of them
with an accuracy of 98.9%.

IX. REFRENCES
1. https://www.researchgate.net/publication/341075968_A_Simple_Vehic
le_Counting_System_Using_Deep_Learning_with_YOLOv3_Model
2. https://ieeexplore.ieee.org/abstract/document/9074280
3. https://journals.sagepub.com/doi/abs/10.1177/0361198120912742
4. https://engineering.matterport.com/splash-of-color-instance-
segmentation-with-mask-r-cnn-and-tensorflow-7c761e238b46
5. https://towardsdatascience.com/object-detection-using-deep-learning-
approaches-an-end-to-end-theoretical-perspective-4ca27eee8a9a
6. https://analyticsindiamag.com/top-8-algorithms-for-object-detection/
7. https://machinelearningmastery.com/how-to-train-an-object-
detection-model-with-keras/
8. https://www.raspberrypi.org/
9. https://en.wikipedia.org/wiki/Raspberry_Pi
10. https://projects.raspberrypi.org/en/projects/getting-started-with-
picamera
11. https://www.raspberrypi.org/products/camera-module-v2/

Figure 8 Test results

You might also like