You are on page 1of 28

Department of

Computer Science

Final Year Project


Crime Free Pakistan
Presented by
Raja Ahmed Session 2018-2022 Supervised by
{CSC-18F-081 } Mam Syeda Wajiha
Warda Kaleem Naim
{CSC-18F-114 } Lecturer SMIU
Contents
 Project Overview  Implementation
 Motivation  Step Included In Face Recognition
 Objective  Coding
 Hardware Requirements  Screenshots
 Software Requirements  Future Working
 Use Case Diagrams
 Data Flow Diagram
 Physical Design
Project Overview

The title of the Project is “Crime Free Pakistan”. The application that would be developed
automates the existing criminal records that contains personal information about a particular
person along with photograph and past crime events. Criminals can easily be identifiable, to
identify the criminals even if they change their appearance as application will maintain their
record. Application will exploit face detection algorithms.
 Human can recognize a face with any background condition
Motivation even afteryears of not seeing the face. Therefore, it is the
motivation to mimic such a system, However, it is very
challenging task to recognize the face with stuffs like beard,
makeup, covered faces, scars etc.
 Numeros studies exploiting various concepts and problems in
the face recognition process.
 Artificial neural networks have been researched heavily in the
recent past because of its similarity to the human brain.
 Our Facial recognition algorithm compares a captured image
against a database of stored faces and tries to match them in
extreme conditions.
 Background, illumination, angle and other factors make it
difficult.
 System designed to accurately classify images subject to a
variety of unpredictable conditions.
Objective

This application is aimed to identify the criminals in any investigation department. This
application, storing the images of criminals in database along with their details and then
these images are segmented into four slices- forehead, eyes, nose, and lips. These images are
again stored in another database record to make the identification process easier.
The computer must have the following minimum
capabilities.
 32-bit (x86) or 64-bit (x64) processors
 Dual-core, 2.66
Hardware  GHz or faster processor
Requirements  USB 2.0 bus dedicated to the Kinect
 2 GB of RAM
 Graphics card that supports DirectX 9.0c
Following minimum software requirements need for
implementation of the solution
 Visual Studio Code
Software  TensorFlow
Requirements  MySQL
 Windows XP or windows 7/windows 10
USE CASE
DIAGRAM
DATA FLOW DIAGRAM
Physical Design

Acquisition by camera
Collection of Faces
Detection

Feature Extraction

Pre-processing

Face Database Feature Extraction

Template Matching

End
Id Matched
No Matched
Face detection went mainstream in the early
2000’s when Paul viola and Michael Jones invented
a way to detect faces that was fast enough to run a
cheap cameras. However, much more reliable

Implementation
solution exist now. We are going to use a method
invented in 2005 called Histogram of Oriented
Gradient – or just HOG for short.
To find a faces in an image, we will start making
our image black and white because we do not need
color data to find faces.
Step Included In Face Recognition

 Encode a picture using the HOG algorithm to create a


simplified version of the image. Using this simplified
image, Find the part of the image that most looks like a
generic HOG encoding of a face.
 Figure out the pose of the face by finding the main
landmarks in the face. Once we find those landmarks, use
them to wrap the image so that the eye and mouth are
centered.
 Pass the centered face image through a neural network that
knows how to measure features of the face. Save those 128
measurements.
Continue …..  Looking at all the face we have measured in the past, see
which person has the closest measurements to our face’s
measurements. That is matched!
CODING
 entry_data = {}
     for i, entry in
enumerate(entries):
         val = entry[1].get()

        if (len(val) == 0 and
Fetching Data required[i] == 1):

From Entries            

messagebox.showerror("Field Error",
"Required field missing :\n\n%s" %
(entry[0]))
             return
         else:
             entry_data[entry[0]] = val
 path = os.path.join('face_samples',
"temp_criminal")

Setting     if not os.path.isdir(path):


         os.mkdir(path)
Directory 
    no_face = []
     for i, img in enumerate(img_list
Storing  id = registerCriminal(img, path, i +
1)
Images In          if(id != None):

Directory              no_face.append(id
 if(len(no_face) > 0):
         no_face_st = ""
         for i in no_face:
             no_face_st += "Image " +

Check If Any 
str(i) + ", "
       
Image Doesn't messagebox.showerror("Registration
Error", "Registration failed!\n\
nFollowing images doesn't contain"
Contain Face                          " face or Face
is too small:\n\n%s"%(no_face_st))
         shutil.rmtree(path,
ignore_errors=True)
     else
 rowId = insertData(entry_data)

        if(rowId > 0):
Storing Data             
messagebox.showinfo("Success",
In Database "Criminal Registered Successfully.")
             shutil.move(path,
os.path.join('face_samples',
entry_data["Name"]))
 profile_img_num = int(menu_var.get().split('
')[1]) - 1
             if not
os.path.isdir("profile_pics"):
                 os.mkdir("profile_pics")
            

Save Profile cv2.imwrite("profile_pics/criminal


%d.png"%rowId, img_list[profile_img_num])

Pic

            goBack()
         else:
             shutil.rmtree(path,
ignore_errors=True)
             messagebox.showerror("Database
Error", "Some error occured while storing
data."
SCREENSHOTS
Main Page
Registration Page
Detecting Criminal Page
Profile Page
Surveillance Page
Future Working
This Project is on the university FYP
level in which we gave some sort of
implementation of a hypothesis we
made. Still there are many constraints
applied on our project like budget. In
future this project will move towards the
institute plan that it enhances the
security. We can use the night vision
camera, or the eagle eye is also in
account to be use for the recognition
purpose in night.
THANK YOU

You might also like