Object_Detection_using_OpenCV_and_Python
Object_Detection_using_OpenCV_and_Python
J N Singh
Galgotias University
Greater Noida, India
[email protected]
I. INTRODUCTION
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on December 29,2024 at 13:28:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICACCCN)
computer vision toolbox One of the uses is to build a custom IV. COMPARATIVE STUDY
classifier to detect categories of objects which are fixed, for
A. INTRODUCTION:
instance face, human body, cars, etc. A group of classifiers
arranged in stages is known as Cascade object detector. For To acknowledge individuals in a real video surveillance
instance, classification output from every expert E n for input system, we spot humans automatically. Pedestrian detection
xi is given as En(xi). To distinguish amongst training, En(xi) detects areas where a human is present.
only two results expected that are written as +1 or −1, i.e., Person detection is the process of predicting and localizing
En(xi) ∈ [−1, +1]. The joint opinion of experts is written as each person in the image, represented in a rectangular box
L(xi). It shows the combination as below: that is made around the image.
B. METHOD OF PEDESTRIAN TRACING:
L(xi) = w1E1(xi) + w2E2(xi) + · · · + wnEn(xi)
It mainly has 2 models:
where E1(xi), E2(xi), . . ., En(xi) represents the decisions from 1. Hand-crafted model which is based on hand-crafted
n experts and w1, w2, . . ., wn are weights specified. The steps features and is widely used for object detection.
of for classifier training are: 2. Deep learning model uses convolutional neural
networks to focus on improved performance.
1. Provided a set to train data with a pair of images (x i, yi),
where xi is a true /false picture, and yi is the tag assigned to C. PROBLEM FORMULATION:
each image. The value for true pictures is 1, and that of false
pictures is 0. Safety standards and accident prevention system in cars have
gained notable development. Advanced driver assistance
systems are commercially available now and mostly found
2. Setting up weights w1, i= 1/2p, 1/2n for true and false
pre-installed by car manufactures. The aim of these systems
pictures, where p and n are the count of true and false
is to provide automobiles with sensors capable of detecting
pictures, correspondingly.
and acting when threatening situations are faced, so that the
driver would be able to avoid a collision. Detecting
3. For f = 1, . . ., F, where F is the number of levels of training pedestrians, launches an alert and then acts upon their
and n sets of images. unpredictable behavior.
4. Upgrade weight wf+1, i = wf, iβ 1−fi y, when ei = 0 then xi is Thus, the full potential of ADAS systems can be achieved by
sorted in a correct manner, ei = 1 otherwise and βy = ef/ (1 – including AI car and pedestrian tracing. To utilize such
ef). strong ML with computer vision methods, we employ
a cascade of classifiers. Each classifier is trained to model a
III. IMAGE RECOGNITION pedestrian. The targets are detected Haar features. This
process is done to be able to operate in real-time and will help
Image identification makes use of techniques like detection in future, especially in self-driving cars.
of an object, its recognition, and segmentation.
The use of artificial intelligence and machine learning
MERITS:
enhances the rate of processing the data and maintaining the
standard of the outcome. Example, by using artificial While driving if you take your eyes off of the road to reach
intelligence, we can very easily complete difficult tasks. for your coffee turn to tell your kids to quiet down, and then
suddenly you see a pedestrian is crossing the road right in
The more conventional computer vision and ML approach as front of you. You push the brakes—but it might be late.
opposed to deep learning, the following have been useful:
• determining the most appropriate features (HAAR It is a very scary yet usual scenario. One out of three crashes
features, image color histogram, etc.) involve a vehicle going straight as a pedestrian crosses the
• inspecting and learning about various techniques road. To prevent these mis-happenings, automakers now
provided by OpenCV provide a “pedestrian detection” system in some of their
• applying grid search to search the suitable classifier models. The ability to reliably detect vehicles provides huge
advantage to everyone.
Also, the following problems could arise:
• To decide correct position of our sliding windows Haar Cascade Classifiers:
• To make sure that they don’t overlap
• Recognizing the threshold for overlapping detection Object Detection using Haar cascade classifiers is a useful
• Using appropriate frame sampling rate detection method. It is a ML method in which a cascade
• Keeping min detection count over multiple frames function is taught by providing a lot of true and false images.
• Collecting combined window dimensions for avoiding
overlapping detections For example, when we discuss about face identification.
Initially, the algorithm needs lots of true (pictures of
502
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on December 29,2024 at 13:28:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICACCCN)
appearances) and false (pictures without faces) to train the go. It also finds objects that it might have been lost in the
classifier. middle of the frames
OBJECT IDENTIFICATION:
It is defined as procedure:
- Using the primary group of object detection
- Creating a distinctive identity for every primary detection
- Subsequently, tracing all objects when they shift throughout
the frames in clip, while preserving the distinctive identities.
503
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on December 29,2024 at 13:28:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICACCCN)
Module 2(Figure 5,6):
504
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on December 29,2024 at 13:28:33 UTC from IEEE Xplore. Restrictions apply.
2021 3rd International Conference on Advances in Computing, Communication Control and Networking (ICACCCN)
and IoT. Using machine learning and computer vision for
detection and classification of different activities is very
important. Like observing which direction, the driver is
looking when he operates the vehicle, how fast he’s driving,
which direction he’s driving, locating the people that
surround him, etc. Therefore, main goal is to prevent
accidents by increasing efficiency.
REFERENCES:
[1]. [1] Viola, P & Jones, M. (2001). Rapid object detection using a
boosted cascade of simple features. Proceedings of the 2001 IEEE
Computer Society Conference on Computer Vision and Pattern
Recognition (CVPR, 2001), December 8-14, 2001, Kauai, HI, USA.
[2]. [2] Liao, S., Jain, A.K., Li, S. Z. (2016). A fast and accurate
unconstrained face detector. IEEE Transaction of Pattern Analysis
Figure 11: Code Snippet and Machine Intelligence, Vol 38, No 2.
[3]. [3] Luo, D., Wen, G., Li, D., Hu, Y., and Huna, E. (2018). Deep
learning-based face detection using iterative bounding-box
regression. Multimedia Tools Applications.
[4]. [4] Zhang, Y., Wang, X., and Qu, B. (2012). Three-frame difference
algorithm research based on mathematical morphology. Proceedings
of 2012 International Workshop on Information and Electronics
Engineering (IWIEE), pp. 2705 – 2709.
[5]. [5] Canny, J. (1986). A computational approach to edge detection.
IEEE Transactions on Pattern Analysis and Machine Intelligence,
Volume: PAMI-8, No: 6, pp. 679-698, November 1986.
[6]. [6] Li, J. and Ding, S. (2011). A research on improved Canny edge
detection algorithm. Proceedings of the International Conference on
Applied Informatics and Communication, pp. 102 – 108,
Communications in Computer and Information Science (CCIS), Vol
228, Springer-Verlag.
[7]. [7] Lucas, B. D. & Kanade, T. (1981). An iterative image registration
technique with an application to stereo vision.
[8]. [8] Ren, Z., Yang, S., Zou, F., Yang, F., Luan, C., and Li, K. (2017).
Figure 12: Running output A face tracking framework based on convolutional neural networks
and Kalman filter. Proceedings of the 8th IEEE International
VII. ARCHITECTURE DIAGRAM FOR PROPOSED METHOD: Conference on Software Engineering and Services Science, pp. 410-
413.
[9]. [9] Mingxing, J., Junqiang, D., Tao, C., Ning, Y., Yi, J., and Zhen, Z.
(2013). An improved detection algorithm of face with combining
AdaBoost and SVM. Proceedings of the 25th Chinese Control and
Decision Conference, pp. 2459-2463.
[10]. [10] Altun, H., Sinekli, R., Tekbas, U., Karakaya, F. and Peker, M.
(2011). An efficient color detection in RGB space using hierarchical
neural network structure. Proceedings of 2011 International
Symposium on Innovations in Intelligent Systems and Applications,
pp. 154-158, Istanbul, Turkey.
VIII. CONCLUSION:
SO, artificial intelligence effects the future of each and every
single industry and humans as a whole. It also acts as the main
operator of emerging technologies such as big data, robotics
505
Authorized licensed use limited to: INDIAN INSTITUTE OF TECHNOLOGY DELHI. Downloaded on December 29,2024 at 13:28:33 UTC from IEEE Xplore. Restrictions apply.