0% found this document useful (0 votes)
136 views

Traffic Signal Violation Detection System

This study analyzed the impact of road traffic signal violation detection on vehicle speeds in an urban setting.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
136 views

Traffic Signal Violation Detection System

This study analyzed the impact of road traffic signal violation detection on vehicle speeds in an urban setting.
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 5

Volume 8, Issue 2, February – 2023 International Journal of Innovative Science and Research Technology

ISSN No:-2456-2165

Traffic Signal Violation Detection System


1 3
Sanket S Sumptam (Author) Ritu P Dey (Author)
Computer Engineering (Final Year) Computer Engineering (Final Year)
Government Polytechnic Gadchiroli Government Polytechnic Gadchiroli,
Gadchiroli, Maharashtra Gadchiroli, Maharashtra
2 4
Hemant H Kamdi (Author) Pratik W Junghare (Author)
Computer Engineering (Final Year) Computer Engineering (Final Year)
Government Polytechnic Gadchiroli Government Polytechnic Gadchiroli
Gadchiroli, Maharashtra Gadchiroli, Maharashtra
5
M.V Lande I/C HOD
Priyanka S. Mallelwar (Lecturer)
Department of Computer Engineering
Government Polytechnic Gadchiroli, Maharashtra India

Abstract:- This study analyzed the impact of road system is designed with security and privacy in mind,
traffic signal violation detection on vehicle speeds in an ensuring that only authorized personal can access the
urban setting. Data was collected and analyzed to system.
establish a vehicle speed probability density model
before, within, and after the road traffic violation  Maintaining the Integrity of the Specifications:
detection area. Results showed that the average and  Use consistent and precise language when describing the
maximum speeds within the traffic violation detection specifications.
area were significantly lower than those before and  Ensure any changes to the code are thoroughly tested
after it. Speeding vehicles were reduced from 70.1% to and reviewed before being implemented.
15.9% when passing through the traffic signal violation  Monitor and log all changes to the code to ensure
detection had a limited effect in regulating driving accountability and traceability.
behaviors and reducing speeding, but it was effective in  Develop comprehensive unit tests to ensure the code
the vicinity of the traffic signal violation detection meets the requirements.
system.  Ensure all code is properly documented and commented.
 Use coding standards and best practices when
I. INTRODUCTION developing the system.

I will be exploring a Traffic Signal Violation The Traffic Signal Violation Detection System
Detection System using the Python language. The main (TVDS) project is to improve the accuracy and efficiency
objective of the project is to create a system that can detect of traffic signal violation enforcement. The objective of the
traffic violations using object detection algorithms and TVDS is to create a system that can detect violations of
image processing techniques. The project will start by traffic signals in real time, allowing police to respond
exploring the basics of object detection, such as the Viola- quickly to violations and increasing the chances of
Jones algorithm, and how it can be used to detect objects in apprehending the violators. Additionally, the project seeks
an image. After that, we will be exploring the image to reduce the number of false positives generated by
processing techniques that can be used to recognize and existing traffic signal enforcement systems.
identify the objects. Then, we will be looking into how the
system can be integrated with other systems, such as traffic  Abbreviations and Acronyms:
cameras and automatic number plate recognition (ANPR)  TSVD: Traffic Signal Violation Detection
systems. Finally, we will be discussing the results of the  ITS: Intelligent Transportation System
project, and how the system can be used to improve the  CV: Computer Vision
safety of drivers and pedestrians.  ML: Machine Learning
 AI: Artificial Intelligence
 Ease of Use:  SSD: Single Shot Detector
The traffic signal violation detection system project is
designed to be user-friendly and easy to use. The system  Units:
utilizes a variety of technologies such as cameras, sensors,  Previous models are not deployed
and computer vision to detect and record violations. The  Only for research purpose studies, not production.
system also has an intuitive interface that allows users to  Previous models required huge amount of VRAM for
easily monitor and manage the system. Additionally, the proper functioning.

IJISRT23FEB1003 www.ijisrt.com 1854


Volume 8, Issue 2, February – 2023 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
 Mostly implementation was in Tensor Flow, which is image, which gives the significant properties of the cars in
complex to understand and to work with, any may the picture that is needed by the GA. The genetic algorithm
require multiple training cycle for better results. is employed thereafter to know and detect whether each car
in the scene violates or not. Finally, the system outputs
 Equations: cropped pictures of the car violators similar to the shown in
V = S * T (equation 1) the latter part. The internal process of the genetic algorithm
Where, was discussed in the preceding chapter. Shown in the
V = Traffic violation proceeding discussions are the following different inputs
S = Speed of the vehicle and the output of the system was gathered and analyzed,
T = Traffic rules since not only the cropped picture of the car violated was
outputted but also the crossover performance and the best
C = I * F (equation 2) fitness plot was taken note of. The best fitness plot in shows
C = Captured image the fitness value of the chromosomes every iterations for
I = Input image the detection of swerving, the shape of the curve slowly
F = Feature extraction algorithm stabilized at the 2nd iteration at a value of between 0.01 and
0.1 as expected. This proves that the fitness value for
 Some Common Mistakes: swerving do lie between the said range, which in this case
 Ignoring the need of accuracy: Accuracy is one of the lied on 0.087. On the other hand, the crossover performance
most important elements of a successful traffic signal plot in shows a similar curve in that of blocking the
violation detection system. Without accurate data, the pedestrian lane as explained earlier but converged at the
system is unlikely to be effective. 364th generation. The early convergence for swerving was
 Not considering the environment: Traffic signal violation reasonable because of the iterations took for detecting
detection systems must be designed to work in a variety swerving was less than the blocking of pedestrian lane.
of environments. This means that the system should be
able to recognize different types of signals and adjust  Shortcomings Based On Literature Survey:
according to the conditions.  Previous models are not deployed
 Poorly designed user interface: A poorly designed user  Only for research purpose studies, not production.
interface can be a major barrier to the effective use of a  Previous models required huge amount of VRAM for
traffic signal violation detection system. The user proper functioning.
interface must be intuitive and easy to use.  Mostly implementation was in Tensor Flow, which is
 Not taking into account the cost: Cost is an important complex to understand and to work with, any may
consideration when it comes to the development of require multiple training cycle for better results.
traffic signal violation detection system. It is important
to consider the cost of the system, both in terms of  Problem Definition:
development and in terms of ongoing maintenance and Currently, traffic police and cameras are only
support. deployed at traffic signals. This limits them to report
 Inadequate testing: It is important to thoroughly test a violations only if they happen within the vicinity leaving
traffic signal violation detection system before it is room for large stretches of blind spots. Another constraint
deployed in the field. This will ensure that the system is is the capacity of this personnel to quickly capture as many
reliable and accurate. violation photographs as possible towards proof before the
vehicle rushes away. Vehicle automatically identify and
II. LITERATURE SURVEY report traffic violations on the road around them as they
move around thus acting as crowd sourced law
10 violation, for this case, swerving and blocking the enforcement.
pedestrian lane. The threshold of white is to total pixel ratio
in blocking the pedestrian lane is way more than that of the  Proposed Modules:
threshold of pedestrian lane possesses greater amount of  Data Collection
white pixels, due to the multiple white lines that correspond  Data Preparation / pre-processing
to the pedestrian lane, than in swerving violation, which  Model Implementation
only has a single white line to be detected by the system. In  Model Training
fact, it was found out to be any ratio greater than 0.1 for  Model evaluating
blocking the pedestrian lane, and ratio in the middle of 0.01
 Model Development
to 0.1 for swerving. As the 0.01 threshold mean the noise
level floor that was either created within the image due to
III. METHODOLOGY
some process made by the system, or other external effects.
experiment results When the machine vision for traffic
From the preprocessed image moving objects are
violation detection system was implemented, the process
extracted. A vehicle classification model is used to classify
relating the image processing from the gathered photo from
those moving objects into three class - Car, Moto bike and
CCTV camera up to the output of the system is described as
Non-vehicle.0020. The classifier model is built with mobile
follows: First the system captures and takes a photo from
net v1 neural network architecture. Mobile Net V1 is a
the CCTV camera, then subtract from it the reference

IJISRT23FEB1003 www.ijisrt.com 1855


Volume 8, Issue 2, February – 2023 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
variant of Mobile Net model which is specially designed any management. For example, if we need to open any
for edge devices. We have explored the Mobile Net V1 video footage, we can do it with the Open item (Figure 2).
architecture in depth. Convolutional Neural Networks
(CNN) have become very popular in computer vision.

Mobile Net is a streamlined architecture that uses


depth wise separable convolutions to construct lightweight
deep convolutional neural networks and provides an
efficient model for mobile and embedded vision
applications. Mobile Net uses depth wise separable
convolutions. It significantly reduces the number of
parameters when compared to the network with regular
convolutions with the same depth in the nets. This results in
lightweight deep neural networks. A depth wise separable
convolution is made from two operations.

Mobile Net is a simple but efficient and not very


computationally intensive convolutional neural networks
for mobile vision applications.

Mobile net is a model which does the same


convolution as done by CNN to filter images but in a Fig 1 Initial User Interface View
different way than those done by the previous CNN. It uses
the idea of Depth convolution and point convolution which Primarily, for the start of the project usage, the
is different from the normal convolution as done by normal administrator needs to open video footage using the 'Open'
CNNs. item that can be found under 'File' (Figure 2). The
administrator can open any video footage from the storage
Counting depth wise and point wise convo- lotions as files (Figure 3).
separate layers, Mobile Net has 28 layers. The Mobile Net
model has only 13 million parameters with the usual 3
million for the body and 10 million for the final layer and
0.58 Million multi-adds. Mobile Net V2 model was
developed at Google, pre-trained on the Image Net dataset
with 1.4M images and 1000 classes of web images.

 Violation Detection:

 After Detecting The Vehicles Three Violation Cases


Arises:
 Signal Violation: If a vehicle crosses a predefined line
on the road while there is red signal, it is detected as a
signal violation.
 Parking Violation: If a vehicle stands still in no parking
zone for a predefined time, it is detected as a parking
violation.
 Direction Violation: when a vehicle comes from a
wrong direction, it is detected by tracking the vehicle.
Fig 2 Opening Video Footage from Storage.
The direction of the vehicle is determined using its
current position and previous few positions.
After opening a video footage from storage, the
system will get a preview of the footage. The preview
 Implementation:
contains a frame from the given video footage. The preview
 Computer Vision:
is used to identify roads and draw a traffic line over the
Open CV is an open source computer vision and
road. The traffic line drawn by administrator will act as a
machine learning software library which is used in this
traffic signal line. To enable the line drawing feature, we
project for image processing purpose. Tensor flow is used
need to select the 'Region of interest' item from the
for implementing the vehicle classifier with darknet-53.
'Analyze' option (Figure 3). After that administrator will
need to select two points to draw a line that specifies the
 Graphical User Interface (GUI): traffic signal.
The graphical user interface has all the options needed
for the software. The software serves administration and
other debugging purposes. We don’t need to edit code for

IJISRT23FEB1003 www.ijisrt.com 1856


Volume 8, Issue 2, February – 2023 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
We express our profound thanks to our guide Ms. P.S.
Mallelwar who has guided us and helped us in the
development of this system project.

 Libraries used for Graphical User Interface:


 Tkinter:

Fig 3 Region of Interest (Drawing Signal Line)

Selecting the region of interest will start violation


detection system. The coordinates of the line drawn will be
shown on console. The violation detection system will start
immediately after the line is drawn. At first the weights will
be loaded. Then the system will detect objects and check
for violations. The output will be shown frame by frame
from the GUI (figure 6).

Fig 6 Overall Flow of Software

 Model Training:
The most optimized way for reconstruction was by
Fig 4 Line Coordinate (from Console) minimizing the voxel wise difference such as absolute
difference or mean square error. If L1 and L2 loss were not
minimized this will result in over-blurred and features at
the neighbor or patch level. For better optimization, we
used GAN based loss-function. GAN has two networks as
discussed earlier, a generator and discriminator. Hence
training of GAN has its own challenges. If either of them
becomes too strong, the training will fail, and generator will
learn nothing from discriminator. The model training would
be the difficult of all the modules, we have implemented till
now. We cannot train this model all at once, the factors
being its huge size added with the large size dataset we
used for training. We have tried different platforms
available to us for training this model but result is not
equivalent to our prior results there are various techniques
for training a model with huge model size.

Fig 5: Final Output (on Each Frame) Multi- processing, data-parallel, model-parallel,
distributed data-parallel. Multi- processing and data-parallel
can help for training model of larger size, but fails to train
ACKNOWLEDGMENT the model when there is a huge dataset. We have used
model-parallel technique for training this model at different
With immense please we, Sanket Sumptam, Ritu Dey, machines, resulting the best possible output we can attain.
Hemant Kamdi, Pratik junghare presenting a project report Model-parallel and distributed data-parallel are optimized
“Traffic Signal Violation Detection System” as part of the techniques for training model with huge datasets. For
curriculum of “CSE 3200: System Development Project”. model training using this technique, we have to create a
training script which will split the model onto different
We wish to thank for the people who gave us to GPUs, where each GPU consumes a different partitions of
unending support. input data. The high-level idea of model parallel is to place

IJISRT23FEB1003 www.ijisrt.com 1857


Volume 8, Issue 2, February – 2023 International Journal of Innovative Science and Research Technology
ISSN No:-2456-2165
different sub-networks of a model onto different devices, [8]. McCall, J.C.; Trivedi, M.M. Video-Based Lane
and implement the forward method accordingly to move Estimation and Tracking for Driver Assistance:
intermediate outputs across devices. As only part of a Survey, System, and Evaluation. IEEE INTAL.
model operates on any individual device, a set of devices Transp. Syst. 2006, 7, 20–37.
can collectively serve a larger model. The model was [9]. Manu Bhai, M.; Trivedi, T.G.; McCall, J.C.
implemented in Py Torch on a workstation with NVidia Looking-In and Looking-Out of a Vehicle:
RTX 2060. The batch size was set to 4. We followed a Computer-Vision-Based Enhanced Vehicle Safety.
similar process of patching and data augmentation as in IEEE in tell. Transp. Syst. 2007, 8, 108–120.
Chen et al. (2018), except, the patch size during training [10]. Handan, U.; Kalie, T.; C.; Werner and, M.; Snellen,
was set as 32 x 32. W.V. An Image Processing System for Driver
Assistance. Image Vis. Comput. 2000, 18, 367–376.
IV. CONCLUSION [11]. Bergama, L.M.; Nuevo, J.; Sotelo, M.A.; Berea, R.;
Lopez, M.E. Real-Time system for monitoring
The designed algorithm was effectively able to detect driver vigilance. IEEE Intell. Transp. Syst. 2006, 7,
the type of violation specified on this project which are 63–77.
denying traffic signal. The convergence of detection for the [12]. Escalera, A.; Armingol, J.M.; Mata, M. Traffic sign
traffic violation mentioned is dissimilar, since it has a recognition and analysis for intelligent vehicles.
different threshold condition. The system provides Image Vis. Comput. 2003, 12, 247–258.
detection for traffic signal violation. Further, the system is [13]. Broggi, A.; Cerri, P.; Ghidoni, S.; Grisleri, P.; Jung,
able to process one data at a time. Also, the program H.G. A New Approach to Urban Pedestrian
runtime is somewhat slow, and can be improved by using a Detection for Automatic Braking. IEEE Intell.
computer with high speed processor specifications or GPU. Transp. Syst. 2009, 10, 594–605.
Future research about the application of the designed [14]. Jiménez, F.; Naranjo, J.E.; Gómez, O. Autonomous
algorithm other advanced image processing techniques. maneuvering systems for collision avoidance on
Since, this may improve the program runtime of the system single carriageway roads. Sensors 2012, 12, 16498–
by neglecting other unnecessary steps done in a background 16521. [14] Keller, C.G.; Dang, T.; Fritz, H.; Jools,
difference method. A computer vision algorithm may be A.; Rabe, C.; Gavrila, D.M. Active pedestrian safety
done instead to provide more intelligence in the system. by automatic braking and evasive steering. IEEE
Our future plan is to implement the number plate detection Intell. Transp. Syst. 2011, 12, 1292–1304.
with OCR support to make this system more robust.

REFERENCES

[1]. Monitoring System," in 2012 IEEE/WIC/ACM,


Beijing, China 2012.
[2]. Horry, W.J.; Leach, M.F. Driver-Initiated
Distractions: Examining Strategic Adaptation for In-
Vehicle Task Initiation. Acid Anal.Prev. 2009, 41,
115–122.
[3]. Dong, Y.; Hu, Z.; Chimera, K.; Murayama, N.
Driver Inattention Monitoring System for Intelligent
Vehicles: A Review. IEEE Intel. Transp. Syst. 2011,
12, 596–614.
[4]. Horry, W.J.; Leach, M.F Garbed, A. Assessing the
Awareness of Performance Decrements in
Distracted Drivers. Acid. Anal. Prev. 2008, 41, 675–
682.
[5]. Eriksson, M.; Panicle pools, P.N. Driver Fatigue: A
Vision-Based Approach to Automatic Diagnosis.
Transp. Res. Part C Emerge. Technol. 2001, 9, 399–
413. Sensors 2014, 14 22126
[6]. Bahaman, C.; Ying, Z.; Ramesh, M.; Koehler, T. A
system for traffic sign detection, tracking, and
recognition using color, shape, and motion
information. In Proceedings of Intelligent Vehicles
Symposium, Las Vegas, NV, USA, 6–8 June 2005;
pp. 255–260.
[7]. Bergama, L.M.; Nuevo, J.; Sotelo, M.A.; Berea, R.;
Lopez, M.E. Real-Time system for monitoring
driver vigilance. IEEE Intell. Transp. Syst. 2006, 7,
63–77.

IJISRT23FEB1003 www.ijisrt.com 1858

You might also like