Group 6-Micro Project Documentation
Group 6-Micro Project Documentation
Project Report on
Submitted for partial fulfilment of the requirements for the award of the degree of
BACHELOR OF TECHNOLOGY
in
INFORMATION TECHNOLOGY
Submitted by
GUMMERLA NIKHIL 21K81A1286
Mr. M. HARIKUMAR
ASSISTANT PROFESSOR
UGC Autonomous
2
St. MARTIN'SENGINEERING COLLEGE
UGC Autonomous
Affiliated to JNTUH, Approved by AICTE
NBA & NAAC A+ Accredited
Dhulapally,Secunderabad-500 100
www.smec.ac.in
CERTIFICATE
This is to certify that the project entitled “Crime Prevention Using Machine
Learning” is being submitted G.Nikhil (21K81A1286), G.Harshith (21K81A1287),
J.Vikas (21K81A1288), K.Tarun (21K81A1289) in fulfilment of the requirement for
the award of degree of BACHELOR OF TECHNOLOGY IN INFORMATION
TECHNOLOGY is recorded of bonafide work carried out by them. The result embodied
in this report have been verified and found satisfactory.
Place:
Date:
2
St. MARTIN'S ENGINEERING COLLEGE
UGC Autonomous
NBA & NAAC A+ Accredited
Dhulapally, Secunderabad - 500 100
www.smec.ac.in
DECLARATION
3
ACKNOWLEDGEMENT
i
ABSTRACT
There is an abnormal increase in the crime rate and also the number of
criminals is increasing, this leads towards a great concern about the security issues.
Crime preventions and criminal identification are the primary issues before the
Police personnel. Because of the processes that law enforcement officials follow like
thumbprint verification, there is a chance of mis planting the thumbprints or being
careful about the thumbprints on the scene area by the criminals that to not to leave
them. These activities will make the officials not to move ahead in the case. With
the advancement in technology, we are placed CCTV at many public places to
capture the criminal’s crime, So by using these images and videos we can identify
the criminals very easily.so in these above scenarios our application will be helpful
i.e., Facial Recognition and Detection technique.
ii
LIST OF FIGURES
iii
LIST OF SCREENS
iv
CONTENTS
Acknowledgement i
Abstract ii
List of Screens iv
Contents
1. INTRODUCTION
1.1 Motivation 2
2. LITERATURE SURVEY
2.1 Introduction 4
3. ANALYSIS
3.1 Introduction 7
v
3.4.1 Face Recognition 10
3.4.2. Open CV 11
4. DESIGN
4.1 Introduction 12
5.1 Introduction 20
5.2.1 Installation 20
6.1 Introduction 30
6.3 Validation 31
7.1 Conclusion 33
8. REFERENCES 34
vi
Chapter 1
INTRODUCTION
Criminal identification is the most important task for the Police who are finding the
criminals, but it is the difficult and most time-consuming task as they have to check
everywhere. It will be more difficult in cities or public places with high people
density. In some cases, manual type of identification gives chance for getting more
information related to criminals. Hence this project proposes an automatic criminal
identification system by detecting the face of criminals. This will help Police to
identify and catch the criminals in public places.
Criminal identification can be done in two ways, which is shown in figure 1. In
Manual Identification System (MIS), identification is done by the Police officers
searching them at public places. It takes a lot of time to give the proper attention and
it also has the chances of skipping criminals as they will be alerted by seeing cops
easily gets escape from there. Since the MIS is in the process of taking more time
and we will not properly focus on everyone. But when it comes to an automated
identification system (AIS) there is no need for observation going in a public place.
Here all the process involved in this system is automated.
1
Automated Criminal identification monitoring system’s some important things shown below:
1. Criminal Enrolment: Criminal images with their name to photos are added to
the criminal database so that we can compare the captured images with database
one.
2. Criminal Confirmation: If a person is found from a public place by using this
system, then check who was the criminal using a special folder available on the
desktop.
1.1 Motivation
The primary motivation for this project is to build a model to identify the criminals
using the facial recognition. Further, this project is used to detect the criminals with the details
that present in the database i.e., criminal records. Usually, to identify and detect the criminals,
officials will check with their fingerprints or the manual checking of the criminals, But with a
growing crimes and criminals these ways are not that efficient, there are several techniques
like mis planting of the thumbprints, not leaving any thumbprints, and many more, which
makes it difficult to catch the criminals. In these times building a model that easily identify
and detect the criminals by the images and video footages is very useful.
2
1.3 Objective of Project
The main objective of criminal identification based on face recognition
Application is to help police personnel to identify criminals by providing the
information about them. Police personnel can use this application anytime, anywhere
to find a criminal. We can also find criminals from live CCTV surveillance cameras.
This application is fast, robust, reasonably simple, and accurate with a
relatively simple and easy to understand.
3
Chapter 2
LITERATURE SURVEY
2.1 Introduction
Open-CV: Open-CV is Open-Source Computer Vision Library.
The library contains 2500+ algorithms that are optimized which include
a comprehensive set of both classic and state of-the-art computer vision
and machine learning techniques. Also, it has C++, PYTHON, JAVA,
and MATLAB interfaces which support Windows, Linux, Android, and
Mac-OS. For commercial and noncommercial, Open-CV is free for
use. OpenCV is used for capturing the images and videos in public-
place.
Face Detection: The primary function of this step is to capture
the faces of the people who are available in front of the camera. The
outputs from this step are patches that contain each face in the input
image. To design a perfect and preferable face recognition system.
Face alignment is performed to rationalize the scales and orientation of
these patches. Further Next step after the face detection step is human
face patches are extracted.
Face Recognition: Face recognition is a method of identifying
or verifying the identity of an individual using their face. The step after
the representation of faces is to identify them. In this comparison of the
detected face image with the images, we have in our database based on
face encodings. A facial recognition system maps facial expressions
from an image or video using biometrics. To find known faces match
from the database, it compares the details to a database. Facial
recognition may aid in the identification of personal identity, but it also
introduces privacy concerns. Commercial applications use facial
recognition as well as it is used for a variety of purposes ranging from
security to promotions.
[1] In this paper, the authors are taking help of the CCTV footage and comparing the
images from the footage with criminal database if they didn’t find any fingerprint
from the crime scene. This system consists of five stages. For criminal identification,
authors had used PCA Technique for finding similar features of images available in
the database with captured images of footage. The machine will use a database that
contains the person's personal information so that if FRCI identifies a face, it can
display the person's information. The system interface is implemented using Visual
Studio Code and database and coding using MATLAB R2013b. They achieved 60%
accuracy using the proposed model.
[2] In this paper Using the Passport database, they are identifying whether the traveler
is an authorized passport holder or not. In this, they are using image processing
techniques as well as LBPH mathematical model. This method consists of six steps
for airport security purpose that are:
a) Capture image using webcam.
b) Captured image is sent to the Django server
c) Using LBPH feature set is taken from image
d) Image is compared with database image by applying different classifiers
e) If matching is done user details are fetched from database
f) The predicted detail of user is sent to the admin via mail. This
will also help to catch the criminals who travel from one country to
another and detect if the traveler having a loan from the bank, then
traveler's detailed information will be sent for verification to the police
station.
[3] In this paper, the authors had discussed that an attendance monitoring system is
very important in the teaching and learning process. The student who is entering in
classroom his/her image is captured. Preprocessing and Face region extraction take
place using that captured image for further process. They are using a face recognition
algorithm for marking present if the student came to school or absent if the student is
not coming to school. They are capturing the student’s image using a camera and after
preprocessing comparing with their student database and marking attendance.
5
[4] This paper consists of four steps, the first one is real-time image training and the
second one is Harr-classifier using for face detection. The third step is the comparison
of Surveillance camera captured images with real-time images and last, is the result
part based on the comparison. The authors are using the Haar-classifier on Open-CV
for face detection; Haar-cascading is one of the algorithms for face detection. On the
OpenCV platform, face tracking is taken with help of Harr-like classifiers. More than
one person is identified in this system, and it can be used to find the suspects whom
we are finding. They also told us that we use or Aadhar database we can easily
identify the Indians and foreigners and further can investigate whether a person is a
criminal or not. We can use this system by taking the citizenship database which is
already available.
6
Chapter 3
ANALYSIS
3.1 Introduction
This section consists of information regarding the software
dependencies used to build the proposed system and the hardware
capabilities to run them. It also defines the software end user must have
for running the application to check the detection of persons. This
section also describes the architecture of the proposed system. It
explains the algorithms used to build several models and identify the
most accurate model among them to use in the web application. In
total, this chapter defines all the functional and non-functional
requirements that are included in the software requirement
specification to provide a complete description and overview of the
system requirements before the implementation is carried out.
7
found in the crime scene. Then the application will provide output
about whether the person is a criminal or not.
The difference between functional and non-functional
requirements is that the functional requirements describe what the
system should do, whereas the non-functional requirements describe
how the system works.
8
The hardware requirements specify the hardware capability
required to develop the proposed system along with support for the
above provided software:
• RAM: A minimum ram of 4GB
• Processor: Dual core processor with minimum 3.0 GHz clock speed.
• Storage Capacity (ROM): A minimum of 100GB
Figure 3.1.
System
Architecture
9
According to Figure 3.1, the first step is to create face databases
as the match template for the system. A face database is created by
acquiring collection of people photos. The photo should be half body
photo where the face is facing front. In the process of verification of id
for an image, the image which is captured using digital camera will be
processed. The image will be detected and extracted and ready for the
next stage. The next stage is pre-processing, where unnecessary
features are eliminated. This is to reduce unnecessary processing effort.
In the feature extraction, the images are collected from the crime scene,
and it has been compared with the images in the database. Then the
libraries that is OpenCV, SimpleFaceRec and Face Recognition that we
installed will be used in recognition phase where it tries to match with
the correct image in the database. If matched, the identification of the
image will be verified, else it will stop.
10
2.Unsupervised Learning:
Unsupervised learning algorithms take a set of data that
contains only inputs, and finds the patterns in the data, like grouping or
clustering points. Hence, these algorithms learn from the data that isn’t
labelled, categorized, or classified. This implies that the unsupervised
algorithms identify the commonalities between the data and react based
upon the presence or absence of such patterns in the new data.
3.Semi-supervise Learning:
Semi-supervised learning falls in between supervised and
unsupervised learning. Some of the training examples are missing
labels. It is observed by several researchers that when unlabeled data is
used simultaneously with little labeled data produce considerable
improvement in the accuracy of the models.
4.Reinforcement Learning:
Reinforcement learning is the area of machine learning
associated with taking appropriate actions to maximize the cumulative
reward. It is used by several software and machines to identify the best
behavior or path that should be followed in a specific situation.
3.4.2 OpenCV
OpenCV-Python is a library of Python bindings designed to
solve computer vision problems.
OpenCV (Open-Source Computer Vision Library) is an open-
source computer vision and machine learning software library.
11
OpenCV was built to provide a common infrastructure for computer
vision applications and to accelerate the use of machine perception in
the commercial products.
cv2 is the module import name for OpenCV-python, "Unofficial pre-built CPU-
only OpenCV packages for Python". The traditional OpenCV has many complicated
steps involving building the module from scratch, which is unnecessary.
Chapter 4
DESIGN
4.1 Introduction
The design phase of the proposed ML model consists of the
UML diagrams that were created to plan out the implementation. These
12
diagrams were useful in identifying the components and modules that
were used to build the proposed system. The proposed system consists
of a web application along with the classifier model. The design phase
also incorporates the relevant modules and UML diagrams to
implement this application.
13
Face Recognition System DFD Level 0
14
Specifically, level 1 shows the broader details of Face
Recognition System DFD Level 0. This is to clarify the paths (flow) of
data and its transformation from input to output.
16
also possible to organize use cases by specifying generalization,
include and extend relationships among them.
• An <<include>> relationship between use cases means that the base
use case explicitly incorporates the behavior of another use case at a location specified
in the base.
• An <<extend>> relationship between use cases implies that the base
use case implicitly incorporates the behavior of another use case at a location
specified indirectly by the extending use case.
18
Figure 4.6: Sequence Diagram of the
system
19
o Comparison of images is done and gives the result
• Folder Module:
o Contains the data of the Images
o Creating, Deleting, Updating, Retrieving is done in
this module only
20
Chapter 5
IMPLEMENTATION AND RESULTS
5.1 Introduction
Implementation phase determines the code that is used to build
the proposed system i.e., the supervised model and the web application
for the end user to utilize to predict the output. The implementation
phase also describes the exploratory data analysis (EDA) regarding the
dataset. EDA provides us with ample visualizations to understand the
patterns and spot anomalies and process initial investigations. The
results section of this chapter provides information about several
evaluation measures and performance analysis of the model. This
chapter also defines the end user screens and the process of interaction
between end user and the web form.
5.2.1 Installation
For convenience, we have downloaded the package with all
the codes and photos i.e., required images from google, and then we
proceed with the installation of the basic libraries.
The first library to install is OpenCV-python, as always run
the command from the terminal.
pip install opencv-python
then proceed with face_recognition, this too installs with pip
pip install face_recognition
22
import cv2
import face_recognition
# Load Camera
cap = cv2.VideoCapture(2)
while True:
24
ret, frame = cap.read()
# Detect Faces
y1, x2, y2, x1 = face_loc [0], face_loc [1], face_loc [2], face_loc [3]
25
Screen 5.4: Finding Face Locations
cv2.imshow("Frame", frame)
key = cv2.waitKey(1)
if key == 27:
break
26
Screen 5.5: To show Name and
Rectangle
#SimpleFaceRec File
import face_recognition
import cv2
import os
import glob
import numpy as np
class SimpleFacerec:
def __init__(self):
self.known_face_encodings = []
self.known_face_names = []
27
print ("{} encoding images found.".format(len(images_path)))
face_names = []
for face_encoding in face_encodings:
# See if the face is a match for the known face(s)
matches = face_recognition.compare_faces(self.known_face_encodings, face_encoding)
name = "Unknown"
# Or instead, use the known face with the smallest distance to the new face
face_distances = face_recognition.face_distance(self.known_face_encodings, face_encoding)
28
best_match_index = np.argmin(face_distances)
if matches[best_match_index]:
name = self.known_face_names[best_match_index]
face_names.append(name)
29
Screen 5.7: Output 2: Image is detected
30
Chapter 6
TESTING AND VALIDATION
6.1 Introduction
Testing is defined as a process of analyzing a software item to
detect the differences between the required conditions (i.e., defects,
errors, or bugs) and to evaluate the features of the software item. The
importance of the testing is to know the accuracy and the working
functionality of the model developed.
In machine learning, it is a common task to study and
construct models that can learn from and make predictions on data.
Such algorithms work by making data-driven predictions or decisions,
through building a mathematical model from input data. The data used
to build the final model usually comes from multiple datasets. Four
datasets are commonly used in different stages of creation of the
model.
Software testing is a critical element of software quality
assurance and represents the ultimate review of specification, design,
and code generation.
The purpose of testing is to discover errors. Testing is the
process of trying to discover every conceivable fault or weakness in a
work product. It provides a way to check the functionality of
components, subassemblies, assemblies and/or a finished product It is
the process of exercising software with the intent of ensuring that the
Software system meets its requirements and user expectations and does
not fail in an unacceptable manner. There are various types of tests.
Each test type addresses a specific testing requirement.
Testing Objectives:
The goals and objectives of software testing are numerous,
which when achieved help developers build a defect less and error free
software and application that has exceptional performance, quality,
31
effectiveness, security, among other things. Though the objective of
testing can vary from company to company and project to project, there
are some goals that are similar for all. These objectives are Verification
is the process of evaluating work-products of a development phase to
determine whether they meet the specified requirements
6.3 Validation
Validation is the process of checking whether the output of the
test cases validated with the original expected results. In this case of a
machine learning model, the validation of the model with the testing
dataset can be done by calculating the score of the model by comparing
the predicted output with the original output of the dataset. Validation
step helps in identifying the right classifier model with highest
accuracy to be used in the web application.
Usually, validation of a software is done during testing
processes like feature testing, integration testing, system testing, load
testing, compatibility testing etc., Validation step is performed at the
end of the development process and is carried out after verifications are
completed.
S A I E A
L C N X C
. T P P T
N I U E U
O O T C A
N T L
E O
D U
O T
U P
T U
P T
U
T
1 R P R G
u h e e
n o c t
n t o s
33
i o g
n s n t
g , i h
v z e
a i e
p d d N
p e ( a
l o P m
i h e
c o
a t
t o
i
o i
n s
I
d
e
n
t
i
f
i
e
d
)
2 R P N D
u h o o
n o t n
n t ’
i o R t
n s e
34
g , c g
o e
a v g t
p i n
p d i t
l e z h
i o e e
c d
a ( N
t P a
i h m
o o e
n t
o
i
s
n
o
t
i
d
e
n
t
i
f
i
e
d
)
35
3 R P R G
u h e e
n o c t
n t o s
i o g
n s n t
g , i h
z e
a v e
p i d N
p d ( a
l e P m
i o h e
c o
a t
t o
i
o i
n s
I
d
e
n
t
i
f
i
e
d
)
36
Chapter 7
CONLUSION AND FUTURE WORK
7.1 Conclusion
This upgraded version of the criminal detecting system not only
provides a huge convenience to the Police in the identification of
criminals but also saves time for them as processes are automated in
the system. The novelty of this Mini Project is face detection done by
using Face Encodings.
37
then it will be easier for the officials to catch them.
Chapter-8
REFERENCES
[1] P. Kowsalya, J. Pavithra, G. Sowmiya and C.K. Shankar’s “ATTENDANCE
MONITORING SYSTEM USING FACE DETECTION & FACE RECOGNITION”,
International Research Journal of Engineering and Technology (IRJET), Volume: 06
Issue: 03 | Mar 2021.
[2] Alireza Chevelewalla, Ajay Gurav, Sachin Desai, Prof.Sumitra Sadhukhan: “Criminal
Recognition System”, pp.47-50, vol.4, Issue.03, Month & Year of Publication: March &
2021
[3] KH Teoh, RC Ismail, SZM Naziri , R Hussin , MNM Isa and MSSM Basir ”FACE
RECOGNITION AND IDENTIFICATION USING DEEP LEARNING
APPROACH”,pp.1-10,5th International Conference on Electronic Design (ICED)
2020, IOP Publishing.
[4] Apoorva. P, Impana. H.C, Siri. S.L, Varshitha. M.R and Prof. Ramesh. B’s
“AUTOMATED CRIMINAL IDENTIFICATION BY FACE RECOGNITION USING
38
OPEN COMPUTER VISION CLASSIFIERS”, Third International Conference on Computing
Methodologies and Communication (ICCMC 2020), DOI: 10.1109/ICCMC.2019.8819850
[6] Vikram Mohanty, David Thames, Sneha Mehta, and Kurt Luther, “Photo Sleuth:
Combining Human Expertise and Face Recognition to Identify Historical Portraits”,
Conference: the 24th International Conference, March 2019,
https://doi.org/10.1145/3301275.3302301
[7].Nurul Azma Abdullah, Md. Jamri Saidi, Nurul Hidayah Ab Rahman: “Face
Recognition for Criminal Identification: An implementation of Principal Component
Analysis for face recognition”, pp.1–7, AIP Conference Proceedings 1891,020002
(2019),Published Online: 03 October 2017.
[8] Kian Raheem Qasim and Sara Salman Qasim’s, “Force Field Feature Extraction
Using Fast Algorithm for Face Recognition Performance”, Iraqi Academics Syndicate
International Conference for Pure and Applied Sciences,
https://doi.org/10.1088/1742- 6596/1818/1/012195
39
40