Aws RP
Aws RP
Naga Rithesh N
B.Tech Computer Science with
AI and Robotics
Vellore Institute of Technology
Chennai, India
Naga Rithesh Sukesh S Roopesh Mathav
[email protected] [email protected]
[email protected]
Abstract-Determining the optimal object detection algo- tection there is a need to find which of the algorithms can prove to be
rithm for traffic monitoring requires balancing speed and ac- faster, has more accuracy and efficiency and lesser error for which Ross
curacy. YOLOv3 excels in this area, outperforming Faster Girshick [4] divided the solution into three modules: 1) Region propos-
R-CNN and Haar Cascade in both speed and accuracy based als were generated using a selective search algorithm, 2) Each region
on tests with custom image sets and the COCO database. proposal was
While Faster R-CNN offers higher precision for complex
scenes, YOLOv3's speed makes it more suitable for real-
time traffic management. The choice depends on the specific
environment; high-traffic areas may benefit from Faster R-
CNN's accuracy, while YOLOv3's speed is advantageous in
less congested settings. Further research involving real-time
simulations and diverse traffic conditions is recommended.
Keywords: Object Detection, Traffic Monitoring, Algo-
rithm Selection, Speed vs. Accuracy, YOLOv3, Faster R-
CNN, Haar Cascade, Real-time performance, COCO
database, SURF algorithm
I. INTRODUCTION
II. METHODOLOGY
Haar cascade method: A machine learning object detection algo-
rithm uses Haar features to detect objects in images. The algorithm
works by training a cascade of classifiers, each designed to identify
specific Haar features. These classifiers are arranged in a cascade,
ensuring that each classifier is applied only to windows that pass
the previous one.[8] This arrangement makes the algorithm very ef-
ficient, allowing it to quickly reject windows that are unlikely to
contain the object of interest. The false positive rate provides an es-
timate of how many objects fail to be identified out of a given num-
ber of datasets. This ratio usually depends on the data model, which
is either trained by the programmer or based on pre-existing pre-
trained data models.
The Haar Cascade algorithm, a machine
learning approach for object detection,
employs Haar-like features to identify ob-
jects within images. These features, repre-
sented as rectangular regions within the
image, capture contrasting pixel intensi-
ties. The algorithm's training process in-
volves creating a cascade of classifiers,
each designed to detect specific Haar fea-
tures. This cascade structure ensures effi-
ciency by quickly discarding image re-
gions unlikely to contain the target object.
YOLO: The YOLO algorithm takes an image as input and then uses
a simple deep convolutional neural network to detect objects in the
image. The architecture of the CNN model that forms the backbone
of YOLO is shown below.
YOLO divides an input image into an S × S grid. If the centre of an
object falls into a grid cell, that grid cell is responsible for detecting
that object. Each grid cell predicts B bounding boxes and confidence
scores for those boxes. These confidence scores reflect how confi-
dent the model is that the box contains an object and how accurate it
thinks the predicted box is.[7,12]
trained architecture, such as from the COCO dataset. The flowchart
accurately captures this initialization step with the "Initialize Con-
volutional Neural Network (CNN)" process box. Subsequently, the
input image is resized and normalised, aligning with the flowchart's
"Pass Image through CNN" process box, indicating the processing
of the image through the neural network. The forward pass through
the network, as mentioned in the algorithm's third step, is reflected
in the "Objectness Score and Class Prediction" process box. Fur-
thermore, the steps involving filtering overlapping boxes, calculat-
ing Intersection over Union (IoU), and obtaining the final set of
bounding boxes and class labels are captured by the "Non- Maxi-
mum Suppression (NMS)" and "Output Bounding Boxes and
Classes" process boxes.
Each grid cell predicts B bounding boxes,
each with five parameters: x, y, w, h, and
confidence. (x, y) represent the center of
the bounding box relative to the grid cell,
(w, h) represent the width and height of
the bounding box relative to the whole im- Figure 2: Image While Being Processed
age, and confidence represents the Inter-
section over Union between the predicted
Faster R-CNN:
box and the ground truth box.
Advantages:
It is suitable for real-time applications mainly because the image is
looked at only once.
The training of the custom model for the YOLO algorithm is com-
paratively easier, where the modules can be trained end-to-end.
.
III.
IV.RESULTS
Haar cascade method:
SURF:
YOLO:
IV.DISCUSSION
Real-time processing plays a critical role in traffic monitoring
applications, where timely detection and response are crucial.
Algorithms such as YOLO (You Only Look Once) offer sig-
nificant advantages in terms of speed. YOLO processes im-
ages faster by detecting objects in a single forward pass
through the network, allowing it to achieve real-time perfor-
mance. This speed advantage is particularly beneficial for
traffic monitoring, as vehicles and pedestrians are constantly
moving, requiring prompt identification to prevent accidents,
optimize traffic flow, and enhance safety measures.However,
the trade-off between accuracy and speed is a key considera-
tion when selecting an algorithm for traffic monitoring. In ur-
ban environments, where the density of vehicles and pedestri-
ans is higher, accuracy becomes more critical. Algorithms
like Faster R-CNN, which may process images slower than
YOLO, offer higher precision in detecting smaller or partially
occluded objects, which are common in crowded cityscapes.
The slower processing speed is often an acceptable compro-
mise in exchange for more reliable detections, especially
when accuracy is prioritized over real- time performance.In
contrast, rural environments tend to have lower traffic density
and fewer complex scenes. In such scenarios, the speed of
YOLO may outweigh its slightly lower accuracy compared to
other algorithms. The faster detection allows for more effi-
cient monitoring, with fewer vehicles or obstacles to compli-
cate the detection process. The balance of speed and accuracy
in rural areas leans more towards speed, as there are fewer
objects to detect, and slight inaccuracies are less likely to lead
to critical errors.Ultimately, the choice of algorithm depends
V.CONCLUSION
Concluding which algorithm for object detection might be the best
is not that simple; it involves comparing a set of images and
running each algorithm mentioned above. Additionally, sim-
ulating them in real-time traffic environments of all kinds is
necessary. When comparing the time complexity of all the
mentioned algorithms, YOLO proves to be faster.
VI. REFERENCES
1. h t t p s : / / w w w . r e s e a r c h g a t e . n e t / p u b l i c a t i o n /
283556334_Multiple_Object_Detection_using_OpenCV_
on_a n_Embedded_Platform
2. https://ieeexplore.ieee.org/document/10098596
3.https://www.ijitee.org/wp-content/uploads/papers/v8i8/
H6362068819.pdf
4. Girshick R, Donahue J, Darrell T, Malik J (2014) Rich fea- [18].Ross Girshick1 Jeff Donahue1,2 Trevor Darrell1,2
ture hierarchies for accurate object detection and semantic Jitendra Malik1 1UC Berkeley and 2 ICSI. Rich feature hierar-
segmentation. In: Proceedings of the IEEE conference on chies for accurate object detection and semantic segmentation
computer vision and pattern recognition, pp 580–587
5. https://proceedings.neurips.cc/paper/2015/file/
14bfa6bb14875e45bba028a21ed38046-Paper.pdf
6. https://medium.com/@deepanshut041/introduction-to-surf-
speeded-up-robust-features-c7396d6e7c4e
[ 8 ] https://www .academia.edu/38877608/
Object_detection_using_Haar_cascade_Classifier
1. https://www.researchgate.net/figure/Car-detection-flow-
diagram_fig3_347959851
2. https://www.researchgate.net/figure/Faster-RCNN-
algorithm-flow-chart_fig2_341652820
3. https://www.researchgate.net/figure/Figure-1-Flow-
chart-of-SURF-algorithm_fig1_353367737
4. https://www.researchgate.net/figure/Pseudo-Code-of-
Yolo-v3-Algorithm-Model-Evaluation-This-involves-the-
testing-and_fig3_362062548
5. https://www.researchgate.net/figure/The-Flowchart-for-
training-of-YOLO_fig2_326535574
Trans
19. github.com/bertsky/ocrd_detectron2
20. https://pyimagesearch.com/2021/04/12/opencv-haar-
cascades/
[21] https://chowdera.co
m / 2022/206/202207251843390865.html
22. https://www.researchgate.net/figure/T-raining-of-
Faster-
R-CNN-Pseudo-code-of-faster-RCNN_fig6_343438688
23. https://www.researchgate.net/figure/Faster-RCNN-
algorithm-flow-chart_fig2_341652820
24. https://www.researchgate.net/figure/Figure-1-Flow-
chart- of-SURF-algorithm_fig1_353367737
25. https://www.researchgate.net/figure/Speeded-Up-
Robust-
Feature-SURF-algorithm_fig1_369092276
26. https://ieeexplore-ieee-org.egateway.chennai.vit.ac.in/
stamp/stamp.jsp?tp=&arnumber=9993862