Thief Detection With Deep Learning Using Yolo Predictive Analysis
Thief Detection With Deep Learning Using Yolo Predictive Analysis
https://doi.org/10.22214/ijraset.2021.39187
International Journal for Research in Applied Science & Engineering Technology (IJRASET)
ISSN: 2321-9653; IC Value: 45.98; SJ Impact Factor: 7.429
Volume 9 Issue XI Nov 2021- Available at www.ijraset.com
Abstract: This paper discusses thief detection, which is one of the important applications of suspicious human activity detections.
Individual safety is a major concern in our busy scheduling life. The main reason for this concern is an ever-increasing number
of activities that pose a threat. A simple closed-circuit television (CCTV) installation system is not sufficient enough because it
usually requires a person to be alert and monitoring the cameras always is inefficient. The necessitates for the development of a
fully automated security system detects anomalous activities in real-time, and provides instant assistance to the victim. As a
consequence, we proposed a framework that examines and detects suspicious human activity from real-time Surveillance video
using deep learning techniques and generates an alert if abnormal activity occurs. The method was tested on a dataset with both
normal and abnormal activity and yielded better results.
Keywords: Thief detection, deep-learning, surveillance video, predictive analysis, yolo.
I. INTRODUCTION
Object detection is one of the new technologies which is related to image processing and deep learning, which deals with the
detection of an object that belongs to the particular actions (such as persons, large areas, or buses) appearing in videos and images.
Detection of faces and pedestrians is one of the well-studied areas of detecting the objects. It has lots of applications in deep
learning including autonomous driving and video surveillance, as well as finding objects in images. The term “analysis of the scene”
is usually used as a synonym for detection of each object in the scenes, classifies each of their labels, and determines their bounding
boxes more conveniently. The process of detecting objects includes many approaches including fast R-CNNs, Retina-Nets, and
Single-Shot Detectors (SSDs). It is under these approaches that data limitation and modeling challenges have been solved in the area
of object detection. However, still they are not capable of detecting all objects in a given algorithm run. In recent years, the Yolo
algorithm has gained a great deal of attention due to its superior performance when compared to other methods of object detection.
So, we are interested in “You Only Look Once” (YOLO) is a kind of Convolutional neural network. When tested, it will give accurate
results and satisfactory speed.
C. Techniques of Yolo
There are three techniques that the yolo algorithm works for:
1) Intersection Over Union (IoU)
2) Residual Blocks
3) Bounding Box Regressions
y=
Deep CNN
reduction
factor: 32
pc bx by bw bh c 80 class probabilities
Box1 …..
Box2 …..
Box3 …..
…..
Box4
…...
Box5
Figure 1. Encoding architecture for thief detection using yolo
A. Research Gap
1) Different detection techniques are implemented to find suspicious activity.
2) Some researches are carried out from scratch without considering the features of the pre-trained model.
3) There is a large number of computations that result in high computation costs.
4) Classification accuracy is low.
III. METHODOLOGY
In this paper, we propose to use the yolo model to detect suspicious theft activities and identify the thefts happening in residential
areas.
The architecture diagram of yolo can be represented with the following figure:
The description of figure 2 above diagram explanation describes that the yolo model accepts an input image with a fixed dimension.
In theory, yolo is flexible for the size of the input image. For practicing we will resize our input image to a fixed dimension of
448*448. This enables us to process the images in batches. Therefore, a batch can be processed parallelly by GPU which allows us to
train the network more quickly.
As the image is propagated through the network, multiple convolutions are applied to learn the features, shape, color, and many
other aspects of the object. In each layer, we get a convoluted image, also known as a feature map of that layer. A CNN layer
produces a 3D feature map as its output. Every depth channel represents a different aspect of the object or image.
The basic block diagram can be represented with the following figure below figure 3.
Training set
Historical data
Model Training
Preprocessing
Evaluation of model
Yolo Testing set
Import Library
Import Dataset
Handle Missing data
Encoding Categorical data
It begins with the collection of historical or raw data. The dataset for the proposed model is taken from Kaggle, a data analysis
website that provides datasets. The model procedure continues to follow a series of Data pre-processing steps.
A few very important data pre-processing steps include:
The first step is importing libraries.
After that importing the datasets.
And then the missed data is handled.
Next, Categorical data is encoded.
Then dataset is split into two train sets and a test set.
Finally feature scaling is done.
After this process historical data is structured into well-organized data and passed on to the models. The model picks up the
corresponding dataset, performs statistical building, and applies algorithms to train the model. The trained model is tested again test
data set and is then deployed.
Therefore, New tensorflow2.0 versions will not support the graph network and sessions. To use Tensorflow and Keras here we are
installing the previous versions.
! Pip install Keras == 2.2.0
! Pip install Tensorflow ==1.14
Therefore, below the following steps, the yolo object is defined for allowing us to access the image detection functions.
#You only look once
yolo_ obj = object detection ()
yolo_ obj. setmodeltypeasYOLOv5 ()
yolo_ obj. setmodelpaths (os.paths.join (exec_paths, “yoloh5”))
yolo_ obj. load model ()
The libraries used in the following step are for image handling.
# Image library
from PIL import image.
Almost everything is done. Will start begin by performing the image detection for images?
#Image
image.open(“img_jpg”)
#Image of Thief
start = time. Time ()
detections = yolo_obj.detectObjectsFromImage(input_image = os.path.joon (exec_path , “img.jpg”), output_image_path =
os.paths.join (exect_paths , “out_img.jpg”))
print (‘sec’, time. Time() – start)
Therefore, the yolo model detects the thief in the image with probabilities of 99% respectively.
V. CONCLUSIONS
In this proposed system, a deep learning approach is used to detect thieves in real-time using surveillance video. Therefore, it the
necessary to develop a security system increasing to thwart the thefts that are happening every day. This framework is used to detect
thieves if abnormal or suspicious activity has happened. In the past research, the accuracy for detecting abnormal or suspicious
activity is low. So, here yolo model is used to fetch higher accuracy for better results in identifying thieves.
VI. ACKNOWLEDGEMENT
Working on “Thief detection with deep learning using yolo predictive analysis” gives me a lot of joy and satisfaction. I am grateful
and fortunate to have Dr. B. Muruganantham is my research supervisor, who provides constant encouragement, support, and
guidance. To express my heartfelt appreciation to the esteemed guardians for providing the motivation needed to complete my work.
REFERENCES
[1] Rick siow mong goh, Xi peng, Jiawei Du, Hongyuan Zhu, Joey Tianyi, “An Anomaly Detection Network for Video Surveillance,” in 2019, IEEE Access,
pp.485-491.
[2] Tejashri S.Bora, and Monika D. Rokade, “Survey on Anomaly detection for video surveillance,” in 2021, The International research journal of engineering and
technology, pp. 222-228.
[3] S. Gao, W. Luo, W. Liu, “A revisit of sparse coding-based anomaly detection in stacked mn framework,” in 2017 October, IEEE international conference on
computer vision, pp. 2231-2240.
[4] Y.H. Tay and Y. S. Chon, “Abnormal event detection in videos using spatiotemporal autoencoder,” in 2017, International symposium on neural networks, pp.
189-196.
[5] M. Fathy, M. Hoseini, R. Klette, and M. Sabokrou, “Real-time anomaly detection and localization in crowded scenes,” in 2015 June, IEEE Conferences on
computer vision and pattern recognition, ISSN: 1196-1205.
[6] Ankith I, Akshaya HP, “Real-Time Object Detection Using Yolo,” in 2021, International Journal of research in applied science and engineering technology,
ISSN: 2322-2321.
[7] D. Anguelov, A. Toshev, C. Szegedy, and D. Erhan, “Scalable object detection using deep neural networks,” in 2014, IEEE conference, pp. 2155-2162.
[8] M. Ruzon, M. Segal, J. Shlens, S. Vijaya Narasimhan, J. Yagnik, and T. Dean, “Fast, accurate detection of 100,000 object classes on a single machine,” in
2013, IEEE Conferences on computer vision and pattern recognition, pp. 1814-1820