You are on page 1of 92

A PROJECT REPORT ON

Blockchain Based Decentralized Monitoring A.I System: Making Vigilance Intelligent

SUBMITTED BY

Piyush S. Kshirsagar (B150024355)


Abhiyendra Gahlot (B150024346)
Abhishek Gupte (B150024345)
Prajasattak Gajbhiye (B150024351)

UNDER THE GUIDANCE OF


Prof. B.S. Tiple

Department Of Computer Engineering


MAEER’s MAHARASHTRA INSTITUTE OF TECHNOLOGY
Kothrud, Pune 411 038
2018-2019
MAHARASHTRA ACADEMY OF ENGINEERING AND EDUCATIONAL RESEARCH

MAHARASHTRA INSTITUTE OF TECHNOLOGY


PUNE

DEPARTMENT OF COMPUTER ENGINEERING

CERTIFICATE

This is to certify that

Abhiyendra Gahlot

Piyush Kshirsagar

Abhishek Gupte

Prajasattak Gajbhiye

of B.E. Computer successfully completed a project in

Blockchain Based Decentralized Monitoring A.I System: Making Vigilance Intelligent

to my satisfaction and submitted the same during the academic year 2018-2019 towards
the partial fulfillment of degree of Bachelor of Engineering in Computer Engineering of
Pune University under the Department of Computer Engineering , Maharashtra Institute of
Technology, Pune.

Prof. B.S.Tiple Dr. V.Y.Kulkarni


(Project Guide) ((Head of Computer Engineering Department)

Place: Pune Date:


ACKNOWLEDGEMENT

We take this opportunity to express our sincere appreciation for the cooperation given by Dr.
V.Y.Kulkarni, HOD (Department of Computer Engineering) who needs a special mention for all the
motivation and support.

We are deeply indebted to our project guide Prof. B.S.Tiple for completion of this project for which
she has guided and helped us in going out of the way.

For all efforts behind the project report, we would also like to express our sincere appreciation to staff
of department of Computer Engineering, Maharashtra Institute of Technology Pune, for their extended
help and suggestions at every stage.

Abhiyendra Gahlot
Piyush Kshirsagar
Abhishek Gupte
Prajasattak Gajbhiye
ABSTRACT

Traditional systems involve a third party to constantly monitor the CCTV feed for suspicious
behavior, and is often inefficient. Our system involves no human involvement and the zone
is constantly monitored by the A.I. The system is also efficient in detecting weapons.Proof of
existence of person is provided.Traditional systems do not store behaviour associated with person.
Our system identifies person by face, identifies gender and emotion, and stores in an immutable
block-chain. This data can be used for behavior analysis and identifying patterns.Since the
data is stored in a block-chain it cannot be tampered with and even if the camera feed is lost or
tampered , the data in the block-chain can still be used for analysis.Our system provides real
time alerts and alarms on detecting suspicion.Attendance is automatically marked.Live statistics
are provided through chat-bot..
Keywords: Deep Learning, Deep Neural Network, Artificial Intelligence, Facial Recognition
CONTENTS BLOCK-AI

Contents

Contents i

List of Figures iv

1 Introduction 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3 Problem Definition and Objectives . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
1.3.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4 Project Scope and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4.1 Project Scope: . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.4.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.5 Methodologies of Problem Solving . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Literature Survey 7

3 Software Requirements Specification 9


3.1 Assumptions and Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2 Functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.1 Facial Recognition using a system called FACE-NET . . . . . . . . . . . 9
3.2.2 Object Detection Using SSD: Single Shot MultiBoxDetector . . . . . . . 11
3.2.3 More on SSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12
3.2.4 Deep Coupled RES-NET for Low-Resolution Face Recognition . . . . . 13
3.2.5 Chat-bot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.2.6 Block-Chain . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.3 External Interface Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.1 User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.2 Hardware Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.3 Software Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17

Department of Computer Engineering, MIT, Pune i


CONTENTS BLOCK-AI

3.3.4 Communication Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 17


3.4 Non-functional Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4.1 Performance Requirements . . . . . . . . . . . . . . . . . . . . . . . . 17
3.4.2 Safety Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4.3 Security Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
3.4.4 Software Quality Attributes . . . . . . . . . . . . . . . . . . . . . . . . 19
3.5 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.1 Database Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.2 Software Requirements(Platform Choice) . . . . . . . . . . . . . . . . . 20
3.5.3 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.6 Analysis Models(SDLC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21

4 System Design 23
4.1 Architecture with System Flow . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2 Mathematical Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.2.1 Main Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
4.3 UML Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5 Project Planning 25
5.1 Project Estimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1.1 Reconciled Estimates . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.1.2 Project Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
5.2 Risk Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.1 Risk Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
5.2.3 Risk Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5.2.4 Overview of Risk Mitigation, Monitoring and Management . . . . . . . 29
5.3 Project Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.1 Project Task Set . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.3.2 Timeline Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.4 Team Organisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.4.1 Team Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.4.2 Workload Divison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

6 Project Implementation 35
6.1 Overview of Project Modules . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.2 Tools and Technologies used . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.2.1 Software Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.2.2 Hardware Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3 Algorithm Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.3.1 Algorithm FaceNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37

Department of Computer Engineering, MIT, Pune ii


CONTENTS BLOCK-AI

6.3.2 Algorithm SSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37


6.3.3 Algorithm Chatterbot . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
6.3.4 Algorithm for Stats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38
6.3.5 Algorithm for Block-Chain . . . . . . . . . . . . . . . . . . . . . . . . 38

7 System Testing and Result 39


7.1 Type of Testing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2 Test Cases and Test Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39
7.2.1 Test Case 1(System testing) and results: . . . . . . . . . . . . . . . . . . 39
7.2.2 Test Case 2(System testing) and results: . . . . . . . . . . . . . . . . . . 40
7.3 Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40
7.3.1 Outcomes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40

8 Screenshots of Project 41
8.1 SECTION NAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

9 Conclusion and Future Scope 45


9.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.2 Future Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45
9.3 Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46

A Problem Statement and Feasibility Assessment 47

B Research Paper and Comments 52

C Plagiarism Report 55

References 83

Bibliography 83

Department of Computer Engineering, MIT, Pune iii


List of Figures

3.1 Illumination and Pose in-variance. Pose and illumination have been a long

Illumination and Pose in-variance. Pose and illumination have been a long

standing problem in face recognition. This figure shows the output distances of

Face-Net between pairs of faces of the same and a different person in different

pose and illumination combinations. A distance of 0.0 means the faces are iden-

tical, 4.0 corresponds to the opposite spectrum, two different identities. You

can see that a threshold of 1.1 would classify every pair correctly. . . . . . . . . 11

3.2 A comparison between two single shot detection models: SSD and YOLO.Our

SSD model adds several feature layers to the end of a base network, which pre-

dict the offsets to default boxes of different scales and aspect ratios and their

associated confidences.SSD with a 300x300 input size significantly outperforms

its 448x448 YOLO counterpart in accuracy on VOC2007 test while also im-

proving the speed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12

3.3 Architecture of the proposed Deep Coupled Res-Net (DCR) model. . . . . . . . 13

3.4 Distributed Ledgers. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16

4.1 System Architecture . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23

4.2 UML Diagram For Application . . . . . . . . . . . . . . . . . . . . . . . . . . . 24

5.1 Task Network . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31


List of Figures BLOCK-AI

5.2 Timeline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32

5.3 Division Of Tasks . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33

8.1 Home Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41

8.2 Stats Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42

8.3 Testing Of Face-net Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43

A.1 Facial Recognition Module Explained . . . . . . . . . . . . . . . . . . . . . . . 48

A.2 Object Detection Module Explained . . . . . . . . . . . . . . . . . . . . . . . . 48

A.3 Block-Chain Module Explained . . . . . . . . . . . . . . . . . . . . . . . . . . . 49

B.1 Research Paper Catalogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52

B.2 Research Paper Catalogue . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

Department of Computer Engineering, MIT, Pune v


CHAPTER 1. INTRODUCTION BLOCK-AI

Chapter 1

Introduction

Department of Computer Engineering, MIT, Pune 1


1.1. OVERVIEW BLOCK-AI

1.1 Overview

Surveillance systems have always been useful since their invention as they are devices that

records people’s activities in order to detect and prevent crime. Their utility comes into play

as the culprit is most culpable when he’s got red-handed committing a crime on camera. Since

they are associated with security within close proximity of the place where the crime is being

committed, prompt action can be taken, by either taking the matter into the hands of the security

themselves or by alerting the authorities. Also the best form of action we can take against

criminals is to deter and prevent their crime, in order to prevent loss of life and property. It is

thus most pragmatic, to design algorithms and utilize AI to better our security systems.

1.2 Motivation

Deep Learning is a sub-field of machine learning concerned with algorithms inspired by the

structure and function of the brain called artificial neural networks.Learning can be supervised,

semi-supervised or unsupervised.It has been applied to fields including computer vision, speech

recognition, natural language processing,audio recognition social network filtering machine

translation, bio-informatics, drug design and board game programs, where they have produced

results comparable to and in some cases superior to human experts.

1.3 Problem Definition and Objectives

1.3.1 Problem Statement

To create a Artificial Intelligence that takes live CCTV camera video feed as input, analyses

it according to various high level attributes like Facial Detection, Object Detection, Proof Of

Existence and gives output statistics in form of various means of data analysis such as bar graphs,

and an interactive chat-bot.

Department of Computer Engineering, MIT, Pune 2


CHAPTER 1. INTRODUCTION BLOCK-AI

1.3.2 Objectives

• To be able to detect faces of people after they have registered into the system

• To be able to detect weapons if any

• To record the timestamp of the person as they enter and exit a room

• To be able to analyze a person’s proof of existence in various rooms with the form of data

analysis means such as bar graphs and data plots

• To be able to ask questions to a chat-bot related to the proof of existence of a person such

as if they’re in room 1 or other attributes such as if they are happy or sad and receive

responses

• To implement a block-chain module in order to securely store the data feeds after they have

been received

1.4 Project Scope and Limitations

1.4.1 Project Scope:

This project will deliver an autonomous system to monitor a perimeter and provide real-time

alerts. The information such as entry and exit from perimeter (Proof of existence in a certain

perimeter) is maintained in an immutable blockchain and the specific statistics are provided in

the form of bar graphs etc and the administrator can conveniently query the proof of existence

and other information about the person with the help of a chatbot. The system basically tracks

the activities or movement of a person in real-time. It also detects the presence of any weapons in

the vicinity of the workplace .The system shows a decent performance even in a lower resolution

and detailed feed.

1.4.2 Limitations

The few limitations that the project has are:

Department of Computer Engineering, MIT, Pune 3


1.5. METHODOLOGIES OF PROBLEM SOLVING BLOCK-AI

• The camera is not able to assess the distance between itself and the person and hence an

exact estimate of the location of the person , other than being in a room or it’s vicinity

cannot be provided

• The attributes that have been chosen are limited and they are to identify the gender of the

person and whether that person is happy or not

• The number of cameras chosen are only 2 and hence information can be documented about

only 2 rooms

1.5 Methodologies of Problem Solving

Engineers generally think of themselves as problem solvers. Unlike scientists, who examine the

world around them to obtain an understanding of things as they are and have been, engineers

are concerned with creating something new, something which is currently not in existence and

which never has been. Just as Computer Science focuses on understanding, designing, and

developing programs and computers, and at its core, Computer Science concentrates on data,

data transformation, and algorithms, Software Engineering focuses on building and maintaining

software systems. It is more software-oriented and has a greater emphasis on large software

applications than Computer Science. It is more applied than Computer Science, placing greater

emphasis on the entire software development process, from idea to final product. Keeping the

above in mind , there are several approaches towards solving a problem in software engineering

but for the sake of simplicity of the scope of this project, let us consider the 4 step approach that

has been deployed for doing this project:

1. Identify the problem:

The problem here is to design an AI system that automatically detects faces, weapons,

saves attendance, outputs the statistics of the person and saves the information in an

immutable Block-chain.

Department of Computer Engineering, MIT, Pune 4


CHAPTER 1. INTRODUCTION BLOCK-AI

2. Gather information:

Gather information relating to algorithms, in this case algorithms related to designing

neural networks that identify faces and weaponry, gather information on the algorithms

and designs related to block-chains and gather information related to string parsing for the

chat-bot and see if all these modules can be integrated together.

3. Iterate potential solutions:

Possible different versions are created, integrated and the best one is selected.

4. Test your solution:

Upon selecting the best version, we look for further flaws and test out the whole integrated

project after fixing those flaws. If more issues arise, or if more ideas are thought of to

better the project, then the whole 4-step flow is iteratively repeated on the new problems

that arise, and this is done from step 1.

Department of Computer Engineering, MIT, Pune 5


1.5. METHODOLOGIES OF PROBLEM SOLVING BLOCK-AI

Department of Computer Engineering, MIT, Pune 6


CHAPTER 2. LITERATURE SURVEY BLOCK-AI

Chapter 2

Literature Survey

Department of Computer Engineering, MIT, Pune 7


BLOCK-AI

Department of Computer Engineering, MIT, Pune 8


CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI

Chapter 3

Software Requirements Specification

3.1 Assumptions and Dependencies

• It is assumed that the user using this deployed project knows that they are aware that the

camera is panned on them and are looking at the camera, during the time of registration of

the user in the database.

• It is also assumed that the person knows how to read bar graphs/map plots.

• Even though the security officer need not view the camera feed at all times, the project

is dependent on the condition that the security officer is alert enough to notice or hear a

notification on the browser when a weapon is detected.

• Since the interface is quite user-friendly, it is fundamentally assumed that the person is

aware that they are using a web application and know how to use a mouse and keyboard.

• The project depends on the fact that the either the one of the two cameras is used simulta-

neously for registration and detection in the room, or the user registering needs to input his

photographs into the database for the algorithm to train and identify him later on.

3.2 Functional Requirements


3.2.1 Facial Recognition using a system called FACE-NET

Despite significant recent advances in the field of face recognition , implementing face verification

and recognition efficiently at scale presents serious challenges to current approaches. In this

Department of Computer Engineering, MIT, Pune 9


3.2. FUNCTIONAL REQUIREMENTS BLOCK-AI

project we present a system, called Face-Net,that directly learns a mapping from face images to

a compact Euclidean space where distances directly correspond to a measure of face similarity.

Once this space has been produced, tasks such as face recognition, verification and clustering can

be easily implemented using standard techniques with Face-Net embeddings as feature vectors.

In this project, the task we’ve used is facial recognition. Our method uses a deep convolutional

network trained to directly optimize the embedding itself, rather than an intermediate bottleneck

layer as in previous deep learning approaches. To train, we use triplets of roughly aligned

matching / non-matching face patches generated using a novel online triplet mining method. The

benefit of our approach is much greater representational efficiency: we achieve state-of-the-art

face recognition performance using only 128-bytes per face. On the widely used Labeled Faces

in the Wild (LFW) data-set, our system achieves a new record accuracy of 99.63%. On YouTube

Faces DB it achieves 95.12%. We also introduce the concept of harmonic embeddings, and

a harmonic triplet loss, which describe different versions of face embeddings (produced by

different networks) that are compatible to each other and allow for direct comparison between

each other. Similarly to other recent works which employ deep networks, our approach is a

purely data driven method which learns its representation directly from the pixels of the face.

Rather than using engineered features, we use a large data set of labelled faces to attain the

appropriate in-variances to pose, illumination, and other variational conditions.

Department of Computer Engineering, MIT, Pune 10


CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI

Figure 3.1: Illumination and Pose in-variance. Pose and illumination have been a long Illumination and
Pose in-variance. Pose and illumination have been a long standing problem in face recognition. This figure
shows the output distances of Face-Net between pairs of faces of the same and a different person in different
pose and illumination combinations. A distance of 0.0 means the faces are identical, 4.0 corresponds to the
opposite spectrum, two different identities. You can see that a threshold of 1.1 would classify every pair
correctly.

Hence, the state of the art FACE-NET system has been deployed to recognize faces accurately.

3.2.2 Object Detection Using SSD: Single Shot MultiBoxDetector

We use a method for detecting objects in images using a single deep neural network. The

approach, named SSD, discretizes the output space of bounding boxes into a set of default boxes

over different aspect ratios and scales per feature map location. At prediction time, the network

generates scores for the presence of each object category in each default box and produces

Department of Computer Engineering, MIT, Pune 11


3.2. FUNCTIONAL REQUIREMENTS BLOCK-AI

adjustments to the box to better match the object shape. Additionally, the network combines

predictions from multiple feature maps with different resolutions to naturally handle objects

of various sizes. SSD is simple relative to methods that require object proposals because it

completely eliminates proposal generation and subsequent pixel or feature re-sampling stages

and encapsulates all computation in a single network. This makes SSD easy to train and

straightforward to integrate into systems that require a detection component.In this case, SSD

has been used in the detection of weapons.

Figure 3.2: A comparison between two single shot detection models: SSD and YOLO.Our SSD model adds
several feature layers to the end of a base network, which predict the offsets to default boxes of different
scales and aspect ratios and their associated confidences.SSD with a 300x300 input size significantly outper-
forms its 448x448 YOLO counterpart in accuracy on VOC2007 test while also improving the speed.

3.2.3 More on SSD

The SSD approach is based on a feed-forward convolutional network that produces a collection

of bounding boxes and scores for the presence of object class instances in those boxes, followed

by a non-maximum suppression step to produce the detections. The early network layers are

based on a standard architecture used for high quality image classification (truncated before any

Department of Computer Engineering, MIT, Pune 12


CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI

classification layers).

3.2.4 Deep Coupled RES-NET for Low-Resolution Face Recognition

In this project, we’ve used a novel CNN-based approach named as the Deep Coupled Res-Net

model for the task of low resolution face recognition. It first extracts discriminatory features

shared by face images of different resolutions by a Res-Net-like network, the trunk network.

After that, coupled mappings are learned by branch networks to project features of HR images

and corresponding LR images of a specific resolution into a common subspace where their

distance is minimized. Experiments on LFW and SC-face data-sets show that the proposed

DCR model achieves consistently and considerably better performance than the state-of-the-arts.

Once the training is finished, both HR gallery images and LR probe images can be fed into

DCR to obtain their feature representations. In real applications, probe images captured by

surveillance cameras can be of many different low resolutions. Thus multiple pairs of branch

networks are trained in DCR to deal with different resolutions of LR probe images. Hence,

multiple branch networks greatly increase the effectiveness and efficiency of the DCR model to

match HR images to different resolutions of probe face images. RES-NET is used for identifying

faces in low-resolution feeds.

Figure 3.3: Architecture of the proposed Deep Coupled Res-Net (DCR) model.

The trunk network learns discriminant features (indicated by v) shared by different resolutions

Department of Computer Engineering, MIT, Pune 13


3.2. FUNCTIONAL REQUIREMENTS BLOCK-AI

of images, and the branch networks are trained as coupled mappings (indicated by x for HR

features and z for LR features, respectively). C, P and F indicate convolutional layer, max-

pooling layer and fully-connected layer, respectively. The number of output feature maps in

convolutional layers and the number of outputs in fully connected layers are indicated by those

on top of each layer. ‘xh’ represents a residual module that repeats for h times. k indicates the

resolution of LR training images and Beta is a scaling parameter for center loss.

3.2.5 Chat-bot

Social, conversational bots can be used to provide benefits to companies, who use them to

reduce time-to-response, provide enhanced customer service, increase satisfaction, and increase

engagement. Unfortunately, some chat-bots are specifically designed to be harmful. For example,

networks of fake users (called sibyls on Twitter) have been implemented to artificially inflate

follower counts to increase social status for users who purchase them, to spread fake news

or rumors, and even to intimidate users who express certain political beliefs. In the 2016 US

Presidential election, up to a fifth of the comments and responses on Twitter were driven by fully

or partially autonomous Twitter accounts. Due to their flexibility and ease of use (compared

to web-based or mobile applications), some have speculated that conversational agents may be

a universal user interface and may replace apps - a democratization of the versatile command

line. In addition, chat-bots and conversational agents are anticipated to be important interfaces

in Virtual Reality (VR) environments. As a result, it is important to understand the issues

and quality attributes associated with developing and implementing high-quality chat-bots and

conversational agents, and identify a mechanism for quality assurance across these factors.

Chat-bot in our system

Our AI System monitors the live video feed. It produces various statistics. These statistics

are communicated to the administrator with help of Chat-Bot. It is a interactive way for

communication. User can directly write the query in a simple human language like for ex. “How

Department of Computer Engineering, MIT, Pune 14


CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI

many people are in the room?”,” is particular person in the room?” ,”At what time did he come

in the room?” etc. Chat-Bot is like the secondary voice of our system(along with providing stats

with the help of statistical measures such as bar graphs etc). It keeps the users updated about the

area that is being monitored

3.2.6 Block-Chain

Block-Chain is like a distributed ledger. In Block-Chain Technology each node in a distributed

system keeps a copy of ledger. Any Changes to the ledger must be accompanied by Block-

Chain consensus protocol. In Our System , There are multiple are records getting generated.

Block-Chain is used to store important records. When some irregularity is detected, it is stored

on Block-Chain with its description and its timestamp. Now Every node i.e CCTV camera in

our system maintains the Block-Chain for recording events. We use Block-Chain because it

is robustness. It is very secure system for storing records for security purpose. Block-Chain

provides proof of existence and non-repudiation for some irregular event detected by our AI

system.

Department of Computer Engineering, MIT, Pune 15


3.3. EXTERNAL INTERFACE REQUIREMENTS BLOCK-AI

Figure 3.4: Distributed Ledgers.

3.3 External Interface Requirements

3.3.1 User Interfaces

• The server which is deployed on a computer can be connected to using a web interface

from a mobile phone, tablet or just about any device that is connected to the network.

• The web application is deployed on a server on the computer and that is accessed via the

screen of the computer.

3.3.2 Hardware Interfaces

• A Raspberry Pi is used as a hardware device to which the 2 cameras are connected.

• The Raspberry Pi is connected to the computer and the interface to access it is available

through the web application.

• The Raspberry Pi is also used to store the block-chains.

Department of Computer Engineering, MIT, Pune 16


CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI

3.3.3 Software Interfaces

• The Main web application is available to the administrator via a computer on which the

server is deployed.

• The software resources related to the application such as the database and the algorithms

are stored on the computer.

• The Raspberry Pi is accessible only through the server of the web application

• The software interfaces such as the bar graphs, attendance plots and chat-bot etc are

accessible through the computer

3.3.4 Communication Interfaces

• Cables are used to connect the cameras to the Raspberry Pi.

• The Raspberry Pi is interfaced to the computer with the help of a Wi-Fi network to which

the server is connected to.

• The tablets/cell phones etc which are used by the users operating the software are also

interfaced with the server on the computer with the help of Wi-fi.

3.4 Non-functional Requirements


3.4.1 Performance Requirements

• The throughput should be such that it should be quicker than 3 seconds for storing objects

into the database and retrieving them where the number of users already present in the

database is greater than 10.

• The response time should be such that when the chat-bot button is clicked, the chat-bot

should get trained from the retrieved data and be able to answer the questions that’s been

asked to it , all in less than 2 seconds(i.e. excluding the time it takes for the administrator

to type the question).

Department of Computer Engineering, MIT, Pune 17


3.4. NON-FUNCTIONAL REQUIREMENTS BLOCK-AI

• The throughput and response time of the chat-bot are expected to increase with every

iteration, as the execution memory gets stored as cache

• The utilization of RAM is expected to be optimal and careful

3.4.2 Safety Requirements

• Software safety is achieved through ensuring the correct functioning of the algorithms and

functions defined, such that there are no exceptions or traps that would result in the failure

of the system.

• It is taken care that the server and the Raspberry Pi is free from the infiltration of viruses or

other security breaches.

• If the user while registering submits images for training by the FACE-NET algorithms,

then it is to be made sure that those images are free from any kind of viruses and Trojan

horses or spy-wares which could damage the system.

• It is also taken care that through the use of Block-chains, the data is rest assured safe from

any privacy related breaches or theft related breaches of the people whose images are saved

in the pickle files.

• For the end-users using this software, care should be taken that a minimum yet alert number

of security monitoring people are deployed, and a maximum number of security personnel

are deployed as the system alerts the administrators even if a single weapon is detected.

3.4.3 Security Requirements

• Prior to the execution of the software, virus scans are done on the computer to ensure that

there are no viruses or threats to the system, so an anti-virus software is very much needed

to be present on the system.

• The confidentiality of the data in the database is maintained and protected through the use

of a password which only the administrator knows

Department of Computer Engineering, MIT, Pune 18


CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI

• The WiFi network is secured through the use of a password only accessible to the adminis-

trators and other concerned authorities.

3.4.4 Software Quality Attributes

1. Correctness and Reliability:

The program code agrees and is able to execute according to the requirements and

specifications mentioned about 90% of the time. Since the correctness and reliability

become apparent when the software is subjected to more complexity, it is able to survive

and sustain itself however it can slow slight disparity in terms of performance if there are

more number of sessions of users at a given time

2. Learn-ability:

The software overall is user-friendly and readily engages a user to the web application.

The interfaces designed are obvious and easy to use and operate, even though they subjec-

tively may or may not be 100% fun-filled. The software however pays careful attention to

delivering credibility value as it provides timely information of employees

3. Robustness:

The software is generally robust but in cases such as when the input provided by the

user is a fake image file or a non-image file, then it generally can cause critical errors that

are hard to recover from easily, unless the application is restarted. If the Raspberry Pi

suffers a critical hardware error, then the software responds by alerting the users of the web

application that the hardware has failed and needs to shut down.

4. Efficiency and Scalability:

Department of Computer Engineering, MIT, Pune 19


3.5. SYSTEM REQUIREMENTS BLOCK-AI

The software is scalable when the number of users operating at the same time is greater

than 10 and its efficiency is thus maximized. However it may not deliver to it’s full potential

if there are too many users utilizing the application using the Wi-Fi network.

5. Maintainability:

The program is easily readable as the style of coding is simple and comments have been

provided at every possible corner. The testability conditions are such that it should be

operated in a given environment where all the dependencies are installed and a python3

runtime environment. It’s best testable when all the other applications are closed.

6. Portability:

The main server can be adapted to run on another computer if it either runs windows

or Mac-OS and only in a python3 runtime environment and a python environment that

contains all the dependencies and libraries. It should also contain a browser that supports

web-based local applications, also mongoDB is required to be installed and running for

deploying the server on that computer. The computer chosen also has to have drivers for

Raspberry Pi installed on it.

3.5 System Requirements


3.5.1 Database Requirements

• The software requires that the latest version of MongoDB/MySQL be installed on the

system.

3.5.2 Software Requirements(Platform Choice)

• The latest version of Mac-OS operating system running on a Mac-Book Air/Pro.

3.5.3 Hardware Requirements

• Atleast 4 GB of RAM.

Department of Computer Engineering, MIT, Pune 20


CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI

• Intel core i5/i7 processor.

• Atleast a 100 MB of free space on the SSD or Hard-Drive.

3.6 Analysis Models(SDLC)

The project execution was done using the Software Development Life Cycle in the following

phases :

1. Requirement Gathering:

The idea behind the project was to make life easier for the security monitoring men by

recording attendances of employees in a room or area, alerting the system for weapons

and determining who is happy or sad. These requirements were gathered from aspiring

companies that want to save costs for their companies by automating the whole tracking

and detection process.

2. Design:

The project was designed keeping in mind the above requirements. This was done by

deploying Deep Learning algorithms such as the FACE-NET system which is basically

a Convolutional Neural Network(s) that identify faces and store their information in the

form of a pickle file on the computer and on a Raspberry pi(as a block-chain). SSD was

used for detecting weapons and all these algorithms were put together in a web application.

The modules were coded separately and later on integrated in the web application.

3. Development or Coding:

The entire project was coded in python using simple functions and complex libraries

such as tensor-flow, keras etc and the block-chain end was stored in json formats. The

database deployed was MongoDB and the web application developed using JavaScript.

4. Testing:

Department of Computer Engineering, MIT, Pune 21


3.6. ANALYSIS MODELS(SDLC) BLOCK-AI

Alpha testing was carried out on the separate modules of the project before integration.

Positive tests such as checking if the person was able to get identified after training of

the model, seeing if the gender of the person and emotions were correctly identified and

if the stats were able to be retrieved from the database were carried out, with successful

results. Negative tests such as identification of a person with more than 1 person being in

the room, checking if more than one user session at a time on the server is plausible and if

the database entry is made if a person exits a room and enters another room was done, also

with successful results.

5. Deployment:

Once the above steps are done, the end-product is executed on the platform of choice,

after ensuring that the dependencies and libraries are installed and shown to the concerned

party. Any further improvements that can be done to the system, besides the already

existing ones done after testing, are mentioned as future scope.

Department of Computer Engineering, MIT, Pune 22


CHAPTER 4. SYSTEM DESIGN BLOCK-AI

Chapter 4

System Design

4.1 Architecture with System Flow

Figure 4.1: System Architecture

4.2 Mathematical Model

4.2.1 Main Model

Input set:I1] I1: Live Video Feed

Output set: O1,O2 O1: People’s Faces O2: Objects

Failure set: F1,F2 F1: Faces classified as objects F2: Objects classified as faces

Department of Computer Engineering, MIT, Pune 23


4.3. UML DIAGRAM BLOCK-AI

4.3 UML Diagram

Figure 4.2: UML Diagram For Application

Department of Computer Engineering, MIT, Pune 24


CHAPTER 5. PROJECT PLANNING BLOCK-AI

Chapter 5

Project Planning

5.1 Project Estimate

Estimating is a critical part of project planning, involving a quantitative estimate of project costs,

resources or duration. Cost estimation in software engineering is typically concerned with the

financial spend on the effort to develop and test the software, this can also include training,

managing and buying extra equipment, servers and software.

5.1.1 Reconciled Estimates

Considering that the efforts are measured in terms of person-days(amount of the total percentage

of each module coded by 1 person in 1 day), the estimates corresponding to each mentioned

functions(assuming that each module was coded by a separate team member)are as follows:

1. Coding the FACENET functions, was approximately 0.1 person days.

2. Training and supervising the FACENET neural network functions took approximately 0.2

person days.

3. Coding,training and executing the chatbot functions took 0.3 person days.

4. Coding the SSD functions was approximately equal to 0.1 person days.

5. Training and supervising the SSD neural network functions took approximately 0.3 person

days.

Department of Computer Engineering, MIT, Pune 25


5.1. PROJECT ESTIMATE BLOCK-AI

6. Designing and coding the web application took approximately 0.06 person days.

7. Integrating all the separate modules into one whole project was the work of 0.15 person

days.

8. Creating the database took 0.5 person days.

9. Creating the blockchain codes took 0.2 person days.

Converting each person day into number of days(getting the number of days for each set of

functions where person days = 1),

1. Chatbot = 4 days.

2. SSD(function + training) = 10 days + 3 days = 13 days.

3. Database = 2 days.

4. Web Application = 16 days.

5. Integration of project = 7 days.

6. Blockchain = 2 days.

Hence the estimated duration of the whole project = 15 + 4 + 16 + 2 + 16 + 7+ 2 = 59

days(considered to be done in serial; non-ideal) and approximately 25 days when done in parallel

by all the team members ideally contributing in equal parts.

So the total duration lies somewhere between 25 days and 59 days Since this was an unfunded

project, the cost per effort ie amount of remuneration per effort of the project was basically 0

5.1.2 Project Resources

The estimates for the cost of the resources(equipment purchased(incl of taxes) )for the execution

of the project are as follows:

• Raspberry Pi 3 + Camera Board + Charger + Case = Rs 2500 +2200+ 400 + 250 Rs 5350

Department of Computer Engineering, MIT, Pune 26


CHAPTER 5. PROJECT PLANNING BLOCK-AI

• Raspberry Pi Accessories (Night Vision Sensitive Infrared Light + Black Aluminium

Heatsink + Adjustable Camera Mount ) Rs 620

• 2 Web Cameras total cost Rs 2200

Hence net estimated costs = 5350 + 620 + 2200 = Rs 8170(approx.) As for the human

resources(people) required, there were 4 active participants for this project and they are the

people whose names have been given as in the title of this project. All of us have done an equal

amount of contribution.

5.2 Risk Management

Project risk management is the process of identifying, analyzing and then responding to any risk

that arises over the life cycle of a project to help the project remain on track and meet its goal.

Risk management isn’t reactive only; it should be part of the planning process to figure out risk

that might happen in the project and how to control that risk if it in fact occurs.

A risk is anything that could potentially impact your project’s timeline, performance or

budget. Risks are potentialities, and in a project management context, if they become realities,

they then become classified as “issues” that must be addressed. So risk management, then, is

the process of identifying, categorizing, prioritizing and planning for risks before they become

issues.

5.2.1 Risk Identification

The possible identified risks that could throw a wrench in the efficient functioning of the project

are:

5.2.2 Objectives

• Viruses

• Denial of service attack

• Malfunctioning of server of other hardware

Department of Computer Engineering, MIT, Pune 27


5.2. RISK MANAGEMENT BLOCK-AI

• Lack of presence of security personnel at the premises

• Presence of twin

• image files or non-image files inputted during registration

5.2.3 Risk Analysis

1. Viruses or other malicious software can impede or completely disrupt the functioning of

the program. This isn’t very likely as there are antivirus software solutions installed on the

PC but can make a high to very high impact on the program. Let us classify such a risk as

Level 2 risk.

2. If someone gains unauthorized access to the wifi network and gains access to the PC,

they can do anything from eavesdropping to Denial-of-service by injecting and executing

programs on the PC and interfering with the functioning of the program. Such risks are

unlikely as the Wi-fi network is password secured and can have a high to very high impact

on the program. Let us classify such a risk as Level 2 risk.

3. If the computer malfunctions or the raspberry pi or either of the cameras malfunction, then

the program could either partially or completely be affected depending on the extent of the

malfunction. Since all the parts are genuine, this is unlikely however it can have a very big

impact on the program and hence the risk classified is Level 1.

4. If a weapon is detected and a flag is raised on the web browser along with a beeping alert,

and if the security personnel isn’t paying attention at all or is not present then tragedy in

the form of loss of human life or property can occur in the premises. If the facility is an

important one and the area is prone to attacks, it is moderately likely to happen and is very

disastrous as outcome. This risk is classified as Level 0(highest).

5. If there are twins present in the vicinity and they get registered into the system, then the

algorithm will have a tough time properly identifying them from each other. Such an even

Department of Computer Engineering, MIT, Pune 28


CHAPTER 5. PROJECT PLANNING BLOCK-AI

is moderately likely to happen and has a moderate effect on the functioning of the program

and hence the classification of risk here is Level 3(lowest).

6. If the files inputted during registration are false or do not have an image(.png,.jpg etc)

extension, then the program would fail in identification of the person. Such an event is

likely to happen, can quite largely effect the functioning of the program and this risk is

classified as Level 1.

5.2.4 Overview of Risk Mitigation, Monitoring and Management

Effective RMMM strategy must consider 3 issues:

• Risk Avoidance

• Risk monitoring

• Risk Management and planning

The risk is avoided by ensuring that the firewalls and anti-virus softwares are installed on the

system, and the PC parts and related accessories are genuine, the end-users using the software

have to make sure that security personnel are trustworthy and reliable by conducting background

checks before employing. In case of twins, an audio module could be included as a better

means of identification into the project under future scope. The monitoring part is taken care

of by a third party besides the user and the administrator who ensures that the employee inputs

a correct image file while registering. The end-user company must also ensure that security

personnel are always present at the premises by conducting routine coordinating with the security

company every now and then. The anti-virus scanners and firewalls have to be enabled during

the execution of the program. In case of hardware malfunction or virus attack, the program is

to be restarted or a back-up workstation has to be kept ready. If an intruder enters the premises

and there are no security personnel to take prompt action, every employee must be educated

and trained beforehand about how to evacuate in such a situation. In case of non-image files

being inputted into the database, an alert is sent to the user asking them to re-input the file as an

Department of Computer Engineering, MIT, Pune 29


5.3. PROJECT SCHEDULE BLOCK-AI

image file. If a virus or security breach is detected and the security measures fail, the program

execution is aborted.

5.3 Project Schedule

In project management, a schedule is a listing of a project’s milestones, activities, and deliv-

erables, usually with intended start and finish dates. Those items are often estimated by other

information included in the project schedule of resource allocation, budget, task duration, and

linkages of dependencies and scheduled events.

5.3.1 Project Task Set

{Coding the FACE-NET module, Training the FACE-NET neural network, Coding the chat-bot

module, training the chat-bot network, coding the SSD module, training the SSD neural network,

creating the database, writing the web application code, integration of all the separate modules

into one , Creation of the stats bar graphs/charts, creating the block-chain module}

Department of Computer Engineering, MIT, Pune 30


CHAPTER 5. PROJECT PLANNING BLOCK-AI

Figure 5.1: Task Network

Department of Computer Engineering, MIT, Pune 31


5.4. TEAM ORGANISATION BLOCK-AI

5.3.2 Timeline Chart

Figure 5.2: Timeline

5.4 Team Organisation

5.4.1 Team Structure

Team Consists of 4 memebers

1. Prajasattak Gajbhiye

2. Abhiyendra Gahlot

3. Piyush Kshirsagar

4. Abhishek Gupte

Team Manager And Co-ordinator - Piyush Kshirsagar

Project Development and Technical Guidance - Abhiyendra Gahlot

Department of Computer Engineering, MIT, Pune 32


CHAPTER 5. PROJECT PLANNING BLOCK-AI

5.4.2 Workload Divison

Figure 5.3: Division Of Tasks

Department of Computer Engineering, MIT, Pune 33


CHAPTER 6. PROJECT IMPLEMENTATION BLOCK-AI

Chapter 6

Project Implementation

Department of Computer Engineering, MIT, Pune 35


6.1. OVERVIEW OF PROJECT MODULES BLOCK-AI

6.1 Overview of Project Modules

• Module 1 : FACENET – This module is supposed to train and identify faces in the vicinities

as scanned by the camera

• Module 2 : SSD – This module is supposed to train and identify weapons spotted in the

vicinities

• Module 3 : Chatbot – This module communicates with the administrator and provides him

relevant statistics in the form of strings on data such as presence in a room, timestamp,

happiness index etc.

• Module 4 : Stats bar graphs/charts – This module provides stats information to the users

and administrator in the form of bar graphs/plots etc. on data such as happiness index,

attendance etc

• Module 5 : Web Interface – This module involved coding the main web interface through

which the parties such as users and administrator will view the stats/ register themselves/

communicate with chatbot etc

• Module 6 : Blockchain – This module involves coding the blockchain using python

6.2 Tools and Technologies used

6.2.1 Software Tools

• Raspberry Pi 3 Model B for interfacing the cameras with the PC

• 2 Cameras each representing 1 room or view

• Raspberry Pi 8MP Camera Board

6.2.2 Hardware Tools

• Sklearn library for displaying the bar graphs, plots of data

Department of Computer Engineering, MIT, Pune 36


CHAPTER 6. PROJECT IMPLEMENTATION BLOCK-AI

• Tensorflow, Keras libraries for creation, training and executing the SSD and FACENET

neural networks

• Chatterbot library for creating and training the chatbot

• Mongodb/MySQL database management system for storing the json file that comes from

the nn’s that process the camera feed

• JavaScript(JQuery), html, css for creating the web interface

• Python language as the universal language for the entire project and the Blockchain

• Flask for creating the web server

6.3 Algorithm Details

6.3.1 Algorithm FaceNet

This module uses the Stochastic Gradient Descent NN algorithm and uses the Triplet Loss for

selecting the embeddings. This whole module has been coded in python and is used for the

identification of faces in a video feed

6.3.2 Algorithm SSD

Here the default boxes are created around the weapons, which are considered as positive

information while the rest negative. The convolutional layers use the hole algorithm instead

of conventional convolutional layers. This whole module is coded in python and is used for

detecting weapons in the region

6.3.3 Algorithm Chatterbot

Here an algorithm is developed that uses a chatbot library called chatterbot which uses sequence

to sequence algorithm and generates a model which is later used for training on question-answer

pairs for the chatbot for every user during the time of execution

Department of Computer Engineering, MIT, Pune 37


6.3. ALGORITHM DETAILS BLOCK-AI

6.3.4 Algorithm for Stats

An algorithm is created that fetches data from the database and using sklearn libraries converts

them into bar graphs/plots

6.3.5 Algorithm for Block-Chain

Here an algorithm is created that encodes the .json file using the blockchain technology in the

python programming language and stores it both on the PC and the Raspberry Pi device

Department of Computer Engineering, MIT, Pune 38


CHAPTER 7. SYSTEM TESTING AND RESULT BLOCK-AI

Chapter 7

System Testing and Result

7.1 Type of Testing

Manual testing has been done, under Alpha Testing and the following tests have been conducted

with the correspondingly specified modules:

• Unit testing: The modules of Facenet ,Chatbot, SSD and blockchain have been subjected

to unit tests separately in jupyter notebook environments for the facenet , chatbot and SSD

and the Terminal for the blockchain

• Integration testing: Some of the modules such as Facenet and SSD have been brought

together in the web interface using a flask server and tested to see if they work and store

.json objects in the database. Along with that, the chatbot has been separately deployed on

a flask server on a separate unconnected webpage to check if it works and gives desired

output

• System testing: The entire system was tested as a whole after having put in all the modules

together

7.2 Test Cases and Test Results


7.2.1 Test Case 1(System testing) and results:

1. User creates an account.

2. User stands in front of Camera 1 in Room 1 and then Camera 2 in Room 2.

Department of Computer Engineering, MIT, Pune 39


7.3. RESULTS BLOCK-AI

3. User checks his stats to read successfully how many times he was in Room 1 and how

many times he was in Room 2 from the bar graph.

7.2.2 Test Case 2(System testing) and results:

1. Administrator logs in while the Cameras are running and the users are using the interfaces

of the webpage.

2. Administrator checks the stats to see successfully how many people are happy and sad of

each individual separately.

3. Administrator then queries the chatbot to ask questions such as “How many people are

in Room 1?” or “Is Piyush in room 1 ?” or “When was Piyush in room 1?” and received

successful and responses within an accuracy of 2-3 seconds.

7.3 Results
7.3.1 Outcomes

• Chatbot responses in string Answer format

• Stats by means of bar graphs/histogram plots for the administrator as well as the user

• Json files stored in database which can be queried through the chatbot and hence knowledge

of who is/was in what room

Department of Computer Engineering, MIT, Pune 40


CHAPTER 8. SCREENSHOTS OF PROJECT BLOCK-AI

Chapter 8

Screenshots of Project

8.1 SECTION NAME

Figure 8.1: Home Screen

Department of Computer Engineering, MIT, Pune 41


8.1. SECTION NAME BLOCK-AI

Figure 8.2: Stats Page

Department of Computer Engineering, MIT, Pune 42


CHAPTER 8. SCREENSHOTS OF PROJECT BLOCK-AI

Figure 8.3: Testing Of Face-net Module

Department of Computer Engineering, MIT, Pune 43


CHAPTER 9. CONCLUSION AND FUTURE SCOPE BLOCK-AI

Chapter 9

Conclusion and Future Scope

9.1 Conclusion

We have thus presented an Artificial Intelligence System for Monitoring and Securing the

area under the CCTV camera coverage. It not only recognizes human faces but also provides

behavioral analysis. It also provides object detection such as harmful objects like gun, knife

etc which are prohibited in the workplace. It is an advanced security system for the future.This

AI system interacts with the users with help of chatbot. It provides live statistics , video feed

and gives answer to queries posed in a human language and bar graph/histogram plots. The

companies have to invest less on people monitoring live systems and life is made a lot easier

for the person who is responsible for monitoring the live system and take prompt action upon

noticing something unusual such as a weapon. Since the attendance and tracking system is

automated, he need not constantly keep an eye on someone he’s interested in tracking. He

need not worry about how many people are happy and frustrated. He can also gain additional

insight into a person such as whether they’re bound to withdraw a weapon if they are unhappy or

frustrated etc as such.

9.2 Future Scope

In case twins or even triplets are present in the workplace, then an audio module can be included

into the project for better identification of the person as 2 people can’t have the same voice and

face.

Department of Computer Engineering, MIT, Pune 45


9.3. APPLICATIONS BLOCK-AI

9.3 Applications

• It can be deployed in an important facility such as a Ministry of Defense building to keep

an eye on the workers to look out for weapons, track on whose frustrated and is bound to

cause trouble, whose in what room and when did they enter that room etc.

• It can also be deployed at a convenience store or a small shopping market to keep track

of how many customers are happy or sad and whose about to rob a store if they have a

weapon withdrawn.

• It can also be used in jails to keep track of inmates and to notice if anybody has a secret

weapon hidden so the jailers can take prompt action, check whose happy and whose sad

and is having a bad day.

Department of Computer Engineering, MIT, Pune 46


APPENDIX A. PROBLEM STATEMENT AND FEASIBILITY ASSESSMENT BLOCK-AI

Appendix A

Problem Statement and Feasibility


Assessment

Recent developments in computer vision are certainly pushing security systems to a new

level. Existing systems do not perform well in a low-resolution feed, they do not provide a

workable efficiency and accuracy of detecting objects and recognizing people by face , they

don’t provide analytics and mostly require someone to constantly monitor the feed. Current

systems struggle with identifying face from different perspective and detecting weapons in real

time. Our system contains state of art technology like FaceNet and SSD for the low light ,low

resolution, multangular facial detection . The project is feasible in areas where there aren’t any

controversies created when the camera is mounted in a workplace, such as jails or convenience

stores/supermarkets. It is particularly feasible in situations where the number of people in

the room is less than 10, otherwise the algorithms get overloaded and the problem becomes

NP-hard, however otherwise it’s a P-type problem. It’s also most plausible in a situation where

the number of users logged into the wifi network is less than 10 otherwise it would result in a

Denial-of-service type situation.

Department of Computer Engineering, MIT, Pune 47


BLOCK-AI

Figure A.1: Facial Recognition Module Explained

Figure A.2: Object Detection Module Explained

Department of Computer Engineering, MIT, Pune 48


APPENDIX A. PROBLEM STATEMENT AND FEASIBILITY ASSESSMENT BLOCK-AI

Figure A.3: Block-Chain Module Explained

In the above given models, the algorithms which are in use in the project are depicted. These

algorithms all execute in polynomial time and are hence of the P type.

Department of Computer Engineering, MIT, Pune 49


APPENDIX B. RESEARCH PAPER AND COMMENTS BLOCK-AI

Appendix B

Research Paper and Comments

Department of Computer Engineering, MIT, Pune 51


BLOCK-AI

Figure B.1: Research Paper Catalogue

Department of Computer Engineering, MIT, Pune 52


APPENDIX B. RESEARCH PAPER AND COMMENTS BLOCK-AI

Figure B.2: Research Paper Catalogue

Department of Computer Engineering, MIT, Pune 53


APPENDIX C. PLAGIARISM REPORT BLOCK-AI

Appendix C

Plagiarism Report

Department of Computer Engineering, MIT, Pune 55


Plagiarism Checker X Originality Report
Similarity Found: 11%

Date: Sunday, May 19, 2019


Statistics: 1236 words Plagiarized / 11231 Total words
Remarks: Low Plagiarism Detected - Your Document needs Optional Improvement.
-------------------------------------------------------------------------------------------

A PROJECT REPORT ON Blockchain Based Decentralized Monitoring A.I System: Making


Vigilance Intelligent SUBMITTED BY Piyush S. Kshirsagar (B150024355) Abhiyendra
Gahlot (B150024346) Abhishek Gupte (B150024345) Prajasattak Gajbhiye (B150024351)
UNDER THE GUIDANCE OF Prof. B.S. Tiple Department Of Computer Engineering
MAEER’s MAHARASHTRA INSTITUTE OF TECHNOLOGY Kothrud, Pune 411 038
2018-2019 MAHARASHTRA ACADEMY OF ENGINEERING AND EDUCATIONAL
RESEARCH MAHARASHTRA INSTITUTE OF TECHNOLOGY PUNE DEPARTMENT OF
COMPUTER ENGINEERING C E R T I F I C A T E This is to certify that Abhiyendra Gahlot
Piyush Kshirsagar Abhishek Gupte Prajasattak Gajbhiye of B.E. Computer successfully
completed a project in Blockchain Based Decentralized Monitoring A.I

System: Making Vigilance Intelligent to my satisfaction and submitted the same during
the academic year 2018-2019 towards the partial fulfillment of degree of Bachelor of
Engineering in Computer Engineering of Pune University under the Department of
Computer Engineering , Maharashtra Institute of Technology, Pune. Prof. B.S.Tiple Dr.
V.Y.Kulkarni (Project Guide) ((Head of Computer Engineering Department) Place: Pune
Date: ACKNOWLEDGEMENT We take this opportunity to express our sincere
appreciation for the cooperation given by Dr. V.Y.Kulkarni, HOD (Department of
Computer Engineering) who needs a special mention for all the motivation and support.

We are deeply indebted to our project guide Prof. B.S.Tiple for completion of this
project for which she has guided and helped us in going out of the way. For all efforts
behind the project report, we would also like to express our sincere appreciation to staff
of department of Computer Engineering, Maharashtra Institute of Technology Pune, for
their extended help and suggestions at every stage.

Abhiyendra Gahlot Piyush Kshirsagar Abhishek Gupte Prajasattak Gajbhiye ABSTRACT


Traditional systems involve a third party to constantly monitor the CCTV feed for
suspicious behavior, and is often inefficient. Our system involves no human involvement
and the zone is constantly monitored by the A.I. The system is also efficient in detecting
weapons.Proof of existence of person is provided.Traditional systems do not store
behaviour associated with person.

Our system identifies person by face, identifies gender and emotion, and stores in an
immutable block-chain. This data can be used for behavior analysis and identifying
patterns.Since the data is stored in a block-chain it cannot be tampered with and even if
the camera feed is lost or tampered , the data in the block-chain can still be used for
analysis.Our system provides real time alerts and alarms on detecting
suspicion.Attendance is automatically marked.Live statistics are provided through
chat-bot..

Keywords: Deep Learning, Deep Neural Network, Artificial Intelligence, Facial


Recognition CONTENTS BLOCK-AI Contents Contents i List of Figures iv 1 Introduction 1
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Motivation . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 2 1.3 Problem Definition and Objectives . . . . . . . . . . . . . . . . . . . .
. . . . 2 1.3.1 Problem Statement . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . 2 1.3.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4 Project


Scope and Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.4.1 Project Scope: . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . 3 1.4.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 1.5
Methodologies of Problem Solving . . . . . . . . . . . . . . . . . . . . . . . .

4 2 Literature Survey 7 3 Software Requirements Specification 9 3.1 Assumptions and


Dependencies . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Functional Requirements . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . 9 3.2.1 Facial Recognition using a system called FACE-NET . . . . . . . . . . .
9 3.2.2 Object Detection Using SSD: Single Shot MultiBoxDetector . . . . . . . 11 3.2.3 More
on SSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. 12 3.2.4 Deep Coupled RES-NET for Low-Resolution Face Recognition . . . . . 13 3.2.5


Chat-bot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.2.6 Block-Chain . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 15 3.3 External Interface Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 16
3.3.1 User Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.3.2 Hardware Interfaces . . . .
...........

. . . . . . . . . . . . . 16 3.3.3 Software Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17


Department of Computer Engineering, MIT, Pune i CONTENTS BLOCK-AI 3.3.4
Communication Interfaces . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4 Non-functional
Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.4.1 Performance Requirements . . . . . . .
................

. 17 3.4.2 Safety Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.4.3 Security


Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.4.4 Software Quality Attributes . . . . . . .
. . . . . . . . . . . . . . . . . 19 3.5 System Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
3.5.1 Database Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.5.2 Software
Requirements(Platform Choice) . . . .

. . . . . . . . . . . . . 20 3.5.3 Hardware Requirements . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.6


Analysis Models(SDLC) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4 System Design 23 4.1
SECTION NAME . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2 Mathematical Model . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . 23 4.2.1 Main Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . 23 4.3 UML Diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 5 Project Planning 25


5.1 Project Estimate . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1.1 Reconciled Estimates
. . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5.1.2 Project Resources . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
26 5.2 Risk Management . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2.1

Risk Identification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2.2 Objectives . . . . . . . . . . . . . . . . .


. . . . . . . . . . . . . . . . 27 5.2.3 Risk Analysis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 5.2.4
Overview of Risk Mitigation, Monitoring and Management . . . . . . . 28 5.3 Project
Schedule . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3.1 Project Task Set . . . . . . . . . . . . . . .
....

. . . . . . . . . . . 29 5.3.2 Timeline Chart . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.4 Team


Organisation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.4.1 Team Structure . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . 31 5.4.2 Workload Divison . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 6
Project Implementation 33 6.1 Overview of Project Modules . . . . . . . . . . . . . . . . . . . . . . . . . .

. 34 6.2 Tools and Technologies used . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2.1 Software


Tools . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 6.2.2 Hardware Tools . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . 34 6.3 Algorithm Details . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.3.1
Algorithm FaceNet . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

35 Department of Computer Engineering, MIT, Pune ii CONTENTS BLOCK-AI 6.3.2


Algorithm SSD . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6.3.3 Algorithm Chatterbot . . . . . . . .
. . . . . . . . . . . . . . . . . . . 35 6.3.4 Algorithm for Stats . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
6.3.5 Algorithm for Block-Chain . . . . . . . . . . . . . . . . . . . . . . . . 36 7 System Testing and
Result 37 7.1 Type of Testing . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . 37 7.2 Test Cases and Test Results . . . . . . . . . . . . . . . . . . . . . . . . . .
. . 37 7.2.1 Test Case 1(System testing) and results: . . . . . . . . . . . . . . . . . . 37 7.2.2 Test Case
2(System testing) and results: . . . . . . . . . . . . . . . . . . 38 7.3 Results . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . 38 7.3.1 Outcomes . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . 38 8 Screenshots of Project 39 8.1 SECTION NAME . . . . . . . . . . . . . . . . . . . . . . . .


. . . . . . . . . 39 9 Conclusion and Future Scope 43 9.1 Conclusion . . . . . . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . 43 9.2 Future Scope . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 9.3
Applications . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

44 A Appendix A 45 A.1 Problem Statement Feasibility Asessment . . . . . . . . . . . . . . . . . . . .


. 45 A Appendix B 50 A.1 Research Papers and comments . . . . . . . . . . . . . . . . . . . . . . . . . .
50 A Appendix C 53 A.1 Plagiarism Report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53
References 53 Bibliography 55 Department of Computer Engineering, MIT, Pune iii List
of Figures 3.1 Illumination and Pose in-variance.

Pose and illumination have been a long Illumination and Pose in-variance. Pose and
illumination have been a long standing problem in face recognition. This figure shows
the output distances of Face-Net between pairs of faces of the same and a different
person in different pose and illumination combinations. A distance of 0.0 means the
faces are identical, 4.0 corresponds to the opposite spectrum, two different identities.
You can see that a threshold of 1.1

would classify every pair correctly. . . . . . . . . 11 3.2 A comparison between two single
shot detection models: SSD and YOLO.Our SSD model adds several feature layers to the
end of a base network, which predict the offsets to default boxes of different scales and
aspect ratios and their associated confidences.SSD with a 300x300 input size
significantly outperforms its 448x448 YOLO counterpart in accuracy on VOC2007 test
while also improving the speed. . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 Architecture of the proposed Deep Coupled


Res-Net (DCR) model. . . . . . . . 13 3.4 Distributed Ledgers. . . . . . . . . . . . . . . . . . . . . . . . . . . . .
. . . . . 16 5.1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.2 . . . . . . . . . . . . . . . . . .
. . . . . . . . . . . . . . . . . . . . . . . . . . . 30 5.3 . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
32 List of Figures BLOCK-AI 8.1 Home Screen . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
39 8.2 Stats Page . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 40 8.3 Testing Of Face-net
Module . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 41 A.1 . . . . .
.. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 A.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.. ... . . . . . . . 46 A.3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47 A.1 . . . . . . . . . .
.. ... . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 A.2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .
.. ... ..

51 Department of Computer Engineering, MIT, Pune v CHAPTER 1. INTRODUCTION


BLOCK-AI Chapter 1 Introduction Department of Computer Engineering, MIT, Pune 1
1.1. OVERVIEW BLOCK-AI 1.1 Overview Surveillance systems have always been useful
since their invention as they are devices that records people’s activities in order to
detect and prevent crime.

Their utility comes into play as the culprit is most culpable when he’s got red-handed
committing a crime on camera. Since they are associated with security within close
proximity of the place where the crime is being committed, prompt action can be taken,
by either taking the matter into the hands of the security themselves or by alerting the
authorities.

Also the best form of action we can take against criminals is to deter and prevent their
crime, in order to prevent loss of life and property. It is thus most pragmatic, to design
algorithms and utilize AI to better our security systems. 1.2 Motivation Deep Learning is
a sub-field of machine learning concerned with algorithms inspired by the structure and
function of the brain called artificial neural networks.Learning can be supervised,
semi-supervised or unsupervised.It has been applied to fields including computer vision,
speech recognition, natural language processing,audio recognition social network
filtering machine translation, bio-informatics, drug design and board game programs,
where they have produced results comparable to and in some cases superior to human
experts. 1.3

Problem Definition and Objectives 1.3.1 Problem Statement To create a Artificial


Intelligence that takes live CCTV camera video feed as input, analyses it according to
various high level attributes like Facial Detection, Object Detection, Proof Of Existence
and gives output statistics in form of various means of data analysis such as bar graphs,
and an interactive chat-bot. Department of Computer Engineering, MIT, Pune 2
CHAPTER 1. INTRODUCTION BLOCK-AI 1.3.2

Objectives • To be able to detect faces of people after they have registered into the
system • To be able to detect weapons if any • To record the timestamp of the person as
they enter and exit a room • To be able to analyze a person’s proof of existence in
various rooms with the form of data analysis means such as bar graphs and data plots •
To be able to ask questions to a chat-bot related to the proof of existence of a person
such as if they’re in room 1 or other attributes such as if they are happy or sad and
receive responses • To implement a block-chain module in order to securely store the
data feeds after they have been received 1.4

Project Scope and Limitations 1.4.1 Project Scope: This project will deliver an
autonomous system to monitor a perimeter and provide real-time alerts. The
information such as entry and exit from perimeter (Proof of existence in a certain
perimeter) is maintained in an immutable blockchain and the specific statistics are
provided in the form of bar graphs etc and the administrator can conveniently query the
proof of existence and other information about the person with the help of a chatbot.
The system basically tracks the activities or movement of a person in real-time.

It also detects the presence of any weapons in the vicinity of the workplace .The system
shows a decent performance even in a lower resolution and detai led feed. 1.4.2
Limitations The few limitations that the project has are: Department of Computer
Engineering, MIT, Pune 3 1.5. METHODOLOGIES OF PROBLEM SOLVING BLOCK-AI • The
camera is not able to assess the distance between itself and the person and hence an
exact estimate of the location of the person , other than being in a room or it’s vicinity
cannot be provided • The attributes that have been chosen are limited and they are to
identify the gender of the person and whether that person is happy or not • The number
of cameras chosen are only 2 and hence information can be documented about only 2
rooms 1.5

Methodologies of Problem Solving Engineers generally think of themselves as problem


solvers. Unlike scientists, who examine the world around them to obtain an
understanding of things as they are and have been, engineers are concerned with
creating something new, something which is currently not in existence and which never
has been.

Just as Computer Science focuses on understanding, designing, and developing


programs and computers, and at its core, Computer Science concentrates on data, data
transformation, and algorithms, Software Engineering focuses on building and
maintaining software systems. It is more software-oriented and has a greater emphasis
on large software applications than Computer Science.

It is more applied than Computer Science, placing greater emphasis on the entire
software development process, from idea to final product. Keeping the above in mind ,
there are several approaches towards solving a problem in software engineering but for
the sake of simplicity of the scope of this project, let us consider the 4 step approach
that has been deployed for doing this project: 1.

Identify the problem: The problem here is to design an AI system that automatically
detects faces, weapons, saves attendance, outputs the statistics of the person and saves
the information in an immutable Block-chain. Department of Computer Engineering,
MIT, Pune 4 CHAPTER 1. INTRODUCTION BLOCK-AI 2. Gather information: Gather
information relating to algorithms, in this case algorithms related to designing neural
networks that identify faces and weaponry, gather information on the algorithms and
designs related to block-chains and gather information related to string parsing for the
chat-bot and see if all these modules can be integrated together. 3. Iterate potential
solutions: Possible different versions are created, integrated and the best one is
selected. 4.

Test your solution: Upon selecting the best version, we look for further flaws and test
out the whole integrated project after fixing those flaws. If more issues arise, or if more
ideas are thought of to better the project, then the whole 4-step flow is iteratively
repeated on the new problems that arise, and this is done from step 1. Department of
Computer Engineering, MIT, Pune 5 1.5.

METHODOLOGIES OF PROBLEM SOLVING BLOCK-AI Department of Computer


Engineering, MIT, Pune 6 CHAPTER 2. LITERATURE SURVEY BLOCK-AI Chapter 2
Literature Survey Department of Computer Engineering, MIT, Pune 7 BLOCK-AI
Department of Computer Engineering, MIT, Pune 8 CHAPTER 3. SOFTWARE
REQUIREMENTS SPECIFICATION BLOCK-AI Chapter 3 Software Requirements
Specification 3.1

Assumptions and Dependencies • It is assumed that the user using this deployed project
knows that they are aware that the camera is panned on them and are looking at the
camera, during the time of registration of the user in the database. • It is also assumed
that the person knows how to read bar graphs/map plots. • Even though the security
officer need not view the camera feed at all times, the project is dependent on the
condition that the security officer is alert enough to notice or hear a notification on the
browser when a weapon is detected.

• Since the interface is quite user-friendly, it is fundamentally assumed that the person is
aware that they are using a web application and know how to use a mouse and
keyboard. • The project depends on the fact that the either the one of the two cameras
is used simultaneously for registration and detection in the room, or the user registering
needs to input his photographs into the database for the algorithm to train and identify
him later on. 3.2 Functional Requirements 3.2.1
Facial Recognition using a system called FACE-NET Despite significant recent advances
in the field of face recognition , implementing face verification and recognition
efficiently at scale presents serious challenges to current approaches. In this Department
of Computer Engineering, MIT, Pune 9 3.2. FUNCTIONAL REQUIREMENTS BLOCK-AI
project we present a system, called Face-Net,that directly learns a mapping from face
images to a compact Euclidean space where distances directly correspond to a measure
of face similarity.

Once this space has been produced, tasks such as face recognition, verification and
clustering can be easily implemented using standard techniques with Face-Net
embeddings as feature vectors. In this project, the task we’ve used is facial recognition.
Our method uses a deep convolutional network trained to directly optimize the
embedding itself, rather than an intermediate bottleneck layer as in previous deep
learning approaches. To train, we use triplets of roughly aligned matching /
non-matching face patches generated using a novel online triplet mining method.

The benefit of our approach is much greater representational efficiency: we achieve


state-of-the-art face recognition performance using only 128-bytes per face. On the
widely used Labeled Faces in the Wild (LFW) data-set, our system achieves a new record
accuracy of 99.63%. On YouTube Faces DB it achieves 95.12%. We also introduce the
concept of harmonic embeddings, and a harmonic triplet loss, which describe different
versions of face embeddings (produced by different networks) that are compatible to
each other and allow for direct comparison between each other.

Similarly to other recent works which employ deep networks, our approach is a purely
data driven method which learns its representation directly from the pixels of the face.
Rather than using engineered features, we use a large data set of labelled faces to attain
the appropriate in-variances to pose, illumination, and other variational conditions.
Department of Computer Engineering, MIT, Pune 10 CHAPTER 3. SOFTWARE
REQUIREMENTS SPECIFICATION BLOCK-AI Figure 3.1: Illumination and Pose in-variance.

Pose and illumination have been a long Illumination and Pose in-variance. Pose and
illumination have been a long standing problem in face recognition. This figure shows
the output distances of Face-Net between pairs of faces of the same and a different
person in different pose and illumination combinations. A distance of 0.0 means the
faces are identical, 4.0 corresponds to the opposite spectrum, two different identities.
You can see that a threshold of 1.1

would classify every pair correctly. Hence, the state of the art FACE -NET system has been
deployed to recognize faces accurately. 3.2.2 Object Detection Using SSD: Single Shot
MultiBoxDetector We use a method for detecting objects in images using a single deep
neural network. The approach, named SSD, discretizes the output space of bounding
boxes into a set of default boxes over different aspect ratios and scales per feature map
location.

At prediction time, the network generates scores for the presence of each object
category in each default box and produces Department of Computer Engineering, MIT,
Pune 11 3.2. FUNCTIONAL REQUIREMENTS BLOCK-AI adjustments to the box to better
match the object shape. Additionally, the network combines predictions from multiple
feature maps with different resolutions to naturally handle objects of various sizes.

SSD is simple relative to methods that require object proposals because it completely
eliminates proposal generation and subsequent pixel or feature re-sampling stages and
encapsulates all computation in a single network. This makes SSD easy to train and
straightforward to integrate into systems that require a detection component.In this
case, SSD has been used in the detection of weapons. Figure 3.2: A comparison between
two single shot detection models: SSD and YOLO.Our SSD model adds several feature
layers to the end of a base network, which predict the offsets to default boxes of
different scales and aspect ratios and their associated confidences.SSD with a 300x300
input size significantly outperforms its 448x448 YOLO counterpart in accuracy on
VOC2007 test while also improving the speed. 3.2.3

More on SSD The SSD approach is based on a feed-forward convolutional network that
produces a collection of bounding boxes and scores for the presence of object class
instances in those boxes, followed by a non-maximum suppression step to produce the
detections. The early network layers are based on a standard architecture used for high
quality image classification (truncated before any Department of Computer Engineering,
MIT, Pune 12 CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI
classification layers). 3.2.4

Deep Coupled RES-NET for Low-Resolution Face Recognition In this project, we’ve used
a novel CNN-based approach named as the Deep Coupled Res-Net model for the task
of low resolution face recognition. It first extracts discriminatory features shared by face
images of different resolutions by a Res-Net-like network, the trunk network.

After that, coupled mappings are learned by branch networks to project features of HR
images and corresponding LR images of a specific resolution into a common subspace
where their distance is minimized. Experiments on LFW and SC-face data-sets show that
the proposed DCR model achieves consistently and considerably better performance
than the state-of-the-arts.

Once the training is finished, both HR gallery images and LR probe images can be fed
into DCR to obtain their feature representations. In real applications, probe images
captured by surveillance cameras can be of many different low resolutions. Thus
multiple pairs of branch networks are trained in DCR to deal with different resolutions of
LR probe images.

Hence, multiple branch networks greatly increase the effectiveness and efficiency of the
DCR model to match HR images to different resolutions of probe face images. RES-NET
is used for identifying faces in low-resolution feeds. Figure 3.3: Architecture of the
proposed Deep Coupled Res-Net (DCR) model. The trunk network learns discriminant
features (indicated by v) shared by different resolutions Department of Computer
Engineering, MIT, Pune 13 3.2.

FUNCTIONAL REQUIREMENTS BLOCK-AI of images, and the branch networks are


trained as coupled mappings (indicated by x for HR features and z for LR features,
respectively). C, P and F indicate convolutional layer, maxpooling layer and
fully-connected layer, respectively. The number of output feature maps in convolutional
layers and the number of outputs in fully connected layers are indicated by those on top
of each layer.

‘xh’ represents a residual module that repeats for h times. k indicates the resolution of
LR training images and Beta is a scaling parameter for center loss. 3.2.5 Chat-bot Social,
conversational bots can be used to provide benefits to companies, who use them to
reduce time-to-response, provide enhanced customer service, increase satisfaction, and
increase engagement. Unfortunately, some chat-bots are specifically designed to be
harmful.

For example, networks of fake users (called sibyls on Twitter) have been implemented to
artificially inflate follower counts to increase social status for users who purchase them,
to spread fake news or rumors, and even to intimidate users who express certain
political beliefs. In the 2016 US Presidential election, up to a fifth of the comments and
responses on Twitter were driven by fully or partially autonomous Twitter accounts.

Due to their flexibility and ease of use (compared to web-based or mobile applications),
some have speculated that conversational agents may be a universal user interface and
may replace apps - a democratization of the versatile command line. In addition,
chat-bots and conversational agents are anticipated to be important interfaces in Virtual
Reality (VR) environments.
As a result, it is important to understand the issues and quality attributes associated with
developing and implementing high-quality chat-bots and conversational agents, and
identify a mechanism for quality assurance across these factors. Chat-bot in our system
Our AI System monitors the live video feed. It produces various statistics. These statistics
are communicated to the administrator with help of Chat-Bot. It is a interactive way for
communication.

User can directly write the query in a simple human language like for ex. “How
Department of Computer Engineering, MIT, Pune 14 CHAPTER 3. SOFTWARE
REQUIREMENTS SPECIFICATION BLOCK-AI many people are in the room?”,” is particular
person in the room?” ,”At what time did he come in the room?” etc. Chat-Bot is like the
secondary voice of our system(along with providing stats with the help of statistical
measures such as bar graphs etc).

It keeps the users updated about the area that is being monitored 3.2.6 Block-Chain
Block-Chain is like a distributed ledger. In Block-Chain Technology each node in a
distributed system keeps a copy of ledger. Any Changes to the ledger must be
accompanied by Block- Chain consensus protocol. In Our System , There are multiple
are records getting generated. Block-Chain is used to store important records.

When some irregularity is detected, it is stored on Block-Chain with its description and
its timestamp. Now Every node i.e CCTV camera in our system maintains the
Block-Chain for recording events. We use Block-Chain because it is robustness. It is very
secure system for storing records for security purpose.

Block-Chain provides proof of existence and non-repudiation for some irregular event
detected by our AI system. Department of Computer Engineering, MIT, Pune 15 3.3.
EXTERNAL INTERFACE REQUIREMENTS BLOCK-AI Figure 3.4: Distributed Ledgers. 3.3
External Interface Requirements 3.3.1

User Interfaces • The server which is deployed on a computer can be connected to using
a web interface from a mobile phone, tablet or just about any device that is connected
to the network. • The web application is deployed on a server on the computer and that
is accessed via the screen of the computer. 3.3.2 Hardware Interfaces • A Raspberry Pi is
used as a hardware device to which the 2 cameras are connected.

• The Raspberry Pi is connected to the computer and the interface to access it is


available through the web application. • The Raspberry Pi is also used to store the
block-chains. Department of Computer Engineering, MIT, Pune 16 CHAPTER 3.
SOFTWARE REQUIREMENTS SPECIFICATION BLOCK-AI 3.3.3

Software Interfaces • The Main web application is available to the administrator via a
computer on which the server is deployed. • The software resources related to the
application such as the database and the algorithms are stored on the computer. • The
Raspberry Pi is accessible only through the server of the web application • The software
interfaces such as the bar graphs, attendance plots and chat-bot etc are accessible
through the computer 3.3.4 Communication Interfaces • Cables are used to connect the
cameras to the Raspberry Pi.

• The Raspberry Pi is interfaced to the computer with the help of a Wi-Fi network to
which the server is connected to. • The tablets/cell phones etc which are used by the
users operating the software are also interfaced with the server on the computer with
the help of Wi-fi. 3.4 Non-functional Requirements 3.4.1

Performance Requirements • The throughput should be such that it should be quicker


than 3 seconds for storing objects into the database and retrieving them where the
number of users already present in the database is greater than 10. • The response time
should be such that when the chat-bot button is clicked, the chat-bot should get trained
from the retrieved data and be able to answer the questions that’s been asked to it , all
in less than 2 seconds(i.e. excluding the time it takes for the administrator to type the
question).

Department of Computer Engineering, MIT, Pune 17 3.4. NON-FUNCTIONAL


REQUIREMENTS BLOCK-AI • The throughput and response time of the chat-bot are
expected to increase with every iteration, as the execution memory gets stored as cache
• The utilization of RAM is expected to be optimal and careful 3.4.2

Safety Requirements • Software safety is achieved through ensuring the correct


functioning of the algorithms and functions defined, such that there are no exceptions
or traps that would result in the failure of the system. • It is taken care that the server
and the Raspberry Pi is free from the infiltration of viruses or other security breaches.

• If the user while registering submits images for training by the FACE -NET algorithms,
then it is to be made sure that those images are free from any kind of viruses and Trojan
horses or spy-wares which could damage the system. • It is also taken care that through
the use of Block-chains, the data is rest assured safe from any privacy related breaches
or theft related breaches of the people whose images are saved in the pickle files.

• For the end-users using this software, care should be taken that a minimum yet alert
number of security monitoring people are deployed, and a maximum number of security
personnel are deployed as the system alerts the administrators even if a single weapon
is detected. 3.4.3 Security Requirements • Prior to the execution of the software, virus
scans are done on the computer to ensure that there are no viruses or threats to the
system, so an anti-virus software is very much needed to be present on the system.

• The confidentiality of the data in the database is maintained and protected through
the use of a password which only the administrator knows Department of Computer
Engineering, MIT, Pune 18 CHAPTER 3. SOFTWARE REQUIREMENTS SPECIFICATION
BLOCK-AI • The WiFi network is secured through the use of a password only accessible
to the administrators and other concerned authorities. 3.4.4 Software Quality Attributes
1.

Correctness and Reliability: The program code agrees and is able to execute according
to the requirements and specifications mentioned about 90% of the time. Since the
correctness and reliability become apparent when the software is subjected to more
complexity, it is able to survive and sustain itself however it can slow slight disparity in
terms of performance if there are more number of sessions of users at a given time 2.

Learn-ability: The software overall is user-friendly and readily engages a user to the web
application. The interfaces designed are obvious and easy to use and operate, even
though they subjectively may or may not be 100% fun-filled. The software however pays
careful attention to delivering credibility value as it provides timely information of
employees 3.

Robustness: The software is generally robust but in cases such as when the input
provided by the user is a fake image file or a non-image file, then it generally can cause
critical errors that are hard to recover from easily, unless the application is restarted. If
the Raspberry Pi suffers a critical hardware error, then the software responds by alerting
the users of the web application that the hardware has failed and needs to shut down. 4.
Efficiency and Scalability: Department of Computer Engineering, MIT, Pune 19 3.5.

SYSTEM REQUIREMENTS BLOCK-AI The software is scalable when the number of users
operating at the same time is greater than 10 and its efficiency is thus maximized.
However it may not deliver to it’s full potential if there are too many users utilizing the
application using the Wi-Fi network. 5. Maintainability: The program is easily readable as
the style of coding is simple and comments have been provided at every possible
corner.

The testability conditions are such that it should be operated in a given environment
where all the dependencies are installed and a python3 runtime environment. It’s best
testable when all the other applications are closed. 6. Portability: The main server can be
adapted to run on another computer if it either runs windows or Mac-OS and only in a
python3 runtime environment and a python environment that contains all the
dependencies and libraries.

It should also contain a browser that supports web-based local applications, also
mongoDB is required to be installed and running for deploying the server on that
computer. The computer chosen also has to have drivers for Raspberry Pi installed on it.
3.5 System Requirements 3.5.1 Database Requirements • The software requires that the
latest version of MongoDB/MySQL be installed on the system. 3.5.2

Software Requirements(Platform Choice) • The latest version of Mac-OS operating


system running on a Mac-Book Air/Pro. 3.5.3 Hardware Requirements • Atleast 4 GB of
RAM. Department of Computer Engineering, MIT, Pune 20 CHAPTER 3. SOFTWARE
REQUIREMENTS SPECIFICATION BLOCK-AI • Intel core i5/i7 processor. • Atleast a 100
MB of free space on the SSD or Hard-Drive. 3.6

Analysis Models(SDLC) The project execution was done using the Software Development
Life Cycle in the following phases : 1. Requirement Gathering: The idea behind the
project was to make life easier for the security monitoring men by recording
attendances of employees in a room or area, alerting the system for weapons and
determining who is happy or sad.

These requirements were gathered from aspiring companies that want to save costs for
their companies by automating the whole tracking and detection process. 2. Design: The
project was designed keeping in mind the above requirements. This was done by
deploying Deep Learning algorithms such as the FACE-NET system which is basically a
Convolutional Neural Network(s) that identify faces and store their information in the
form of a pickle file on the computer and on a Raspberry pi(as a block-chain).

SSD was used for detecting weapons and all these algorithms were put together in a
web application. The modules were coded separately and later on integrated in the web
application. 3. Development or Coding: The entire project was coded in python using
simple functions and complex libraries such as tensor-flow, keras etc and the
block-chain end was stored in json formats. The database deployed was MongoDB and
the web application developed using JavaScript. 4.

Testing: Department of Computer Engineering, MIT, Pune 21 3.6. ANALYSIS


MODELS(SDLC) BLOCK-AI Alpha testing was carried out on the separate modules of the
project before integration. Positive tests such as checking if the person was able to get
identified after training of the model, seeing if the gender of the person and emotions
were correctly identified and if the stats were able to be retrieved from the database
were carried out, with successful results.

Negative tests such as identification of a person with more than 1 person being in the
room, checking if more than one user session at a time on the server is plausible and if
the database entry is made if a person exits a room and enters another room was done,
also with successful results. 5. Deployment: Once the above steps are done, the
end-product is executed on the platform of choice, after ensuring that the dependencies
and libraries are installed and shown to the concerned party.

Any further improvements that can be done to the system, besides the alrea dy existing
ones done after testing, are mentioned as future scope. Department of Computer
Engineering, MIT, Pune 22 CHAPTER 4. SYSTEM DESIGN BLOCK-AI Chapter 4 System
Design 4.1 SECTION NAME 4.2 Mathematical Model 4.2.1 Main Model Input set:I1] I1:
Live Video Feed Output set: O1,O2 O1: People’s Faces O2: Objects Failure set: F1,F2 F1:
Faces classified as objects F2: Objects classified as faces Department of Computer
Engineering, MIT, Pune 23 4.3. UML DIAGRAM BLOCK-AI 4.3 UML Diagram Department
of Computer Engineering, MIT, Pune 24 CHAPTER 5.

PROJECT PLANNING BLOCK-AI Chapter 5 Project Planning 5.1 Project Estimate 5.1.1
Reconciled Estimates Considering that the efforts are measured in terms of
person-days(amount of the total percentage of each module coded by 1 person in 1
day), the estimates corresponding to each mentioned functions(assuming that each
module was coded by a separate team member)are as follows: 1.

Coding the FACENET functions, was approximately 0.1 person days. 2. Training and
supervising the FACENET neural network functions took approximately 0.2 person days.
3. Coding,training and executing the chatbot functions took 0.3 person days. 4. Coding
the SSD functions was approximately equal to 0.1 person days. 5. Training and
supervising the SSD neural network functions took approximately 0.3 person days. 6.
Designing and coding the web application took approximately 0.06 person days. 7.
Integrating all the separate modules into one whole project was the work of 0.15 person
days. 8. Creating the database took 0.5 person days.

Department of Computer Engineering, MIT, Pune 25 5.1. PROJECT ESTIMATE BLOCK-AI


9. Creating the blockchain codes took 0.2 person days. Converting each person day into
number of days(getting the number of days for each set of functions where person days
= 1), 1. Chatbot = 4 days. 2. SSD(function + training) = 10 days + 3 days = 13 days. 3.
Database = 2 days. 4. Web Application = 16 days. 5. Integration of project = 7 days. 6.

Blockchain = 2 days. Hence the estimated duration of the whole project = 15 + 4 + 16 +


2 + 16 + 7+ 2 = 59 days(considered to be done in serial; non-ideal) and approximately
25 days when done in parallel by all the team members ideally contributing in equal
parts.

So the total duration lies somewhere between 25 days and 59 days Since this was an
unfunded project, the cost per effort ie amount of remuneration per effort of the project
was basically 0 5.1.2 Project Resources The estimates for the cost of the
resources(equipment purchased(incl of taxes) )for the execution of the project are as
follows: • Raspberry Pi 3 + Camera Board + Charger + Case = Rs 2500 +2200+ 400 +
250 Rs 5350 • Raspberry Pi Accessories (Night Vision Sensitive Infrared Light + Black
Aluminium Heatsink + Adjustable Camera Mount ) Rs 620 • 2 Web Cameras total cost Rs
2200 Department of Computer Engineering, MIT, Pune 26 CHAPTER 5.

PROJECT PLANNING BLOCK-AI Hence net estimated costs = 5350 + 620 + 2200 = Rs
8170(approx.) As for the human resources(people) required, there were 4 acti ve
participants for this project and they are the people whose names have been given as in
the title of this project. All of us have done an equal amount of contribution. 5.2 Risk
Management 5.2.1

Risk Identification The possible identified risks that could throw a wrench in the efficient
functioning of the project are: 5.2.2 Objectives • Viruses • Denial of service attack •
Malfunctioning of server of other hardware • Lack of presence of security personnel at
the premises • Presence of twin • image files or non-image files inputted during
registration 5.2.3 Risk Analysis 1.

Viruses or other malicious software can impede or completely disrupt the functioning of
the program. This isn’t very likely as there are antivirus software solutions installed on
the PC but can make a high to very high impact on the program. Let us classify such a
risk as Level 2 risk. 2.

If someone gains unauthorized access to the wifi network and gains access to the PC,
they can do anything from eavesdropping to Denial-of-service by injecting and
executing programs on the PC and interfering with the functioning of the program. Such
risks are Department of Computer Engineering, MIT, Pune 27 5.2. RISK MANAGEMENT
BLOCK-AI unlikely as the Wi-fi network is password secured and can have a high to very
high impact on the program.
Let us classify such a risk as Level 2 risk. 3. If the computer malfunctions or the raspberry
pi or either of the cameras malfunction, then the program could either partially or
completely be affected depending on the extent of the malfunction.

Since all the parts are genuine, this is unlikely however it can have a very big impact on
the program and hence the risk classified is Level 1. 4. If a weapon is detected and a flag
is raised on the web browser along with a beeping alert, and if the security personnel
isn’t paying attention at all or is not present then tragedy in the form of loss of human
life or property can occur in the premises.

If the facility is an important one and the area is prone to attacks, it is moderately likely
to happen and is very disastrous as outcome. This risk is classified as Level 0(highest). 5.
If there are twins present in the vicinity and they get registered into the system, then the
algorithm will have a tough time properly identifying them from each other.

Such an even is moderately likely to happen and has a moderate effect on the
functioning of the program and hence the classification of risk here is Level 3(lowest). 6.
If the files inputted during registration are false or do not have an image(.png,.jpg etc)
extension, then the program would fail in identification of the person. Such an event is
likely to happen, can quite largely effect the functioning of the program and this risk is
classified as Level 1. 5.2.4

Overview of Risk Mitigation, Monitoring and Management Effective RMMM strategy


must consider 3 issues: • Risk Avoidance • Risk monitoring • Risk Management and
planning Department of Computer Engineering, MIT, Pune 28 CHAPTER 5. PROJECT
PLANNING BLOCK-AI The risk is avoided by ensuring that the firewalls and anti-virus
softwares are installed on the system, and the PC parts and related accessories are
genuine, the end-users using the software have to make sure that security personnel are
trustworthy and reliable by conducting background checks before employing.

In case of twins, an audio module could be included as a better means of identification


into the project under future scope. The monitoring part is taken care of by a third party
besides the user and the administrator who ensures that the employee inputs a correct
image file while registering. The end-user company must also ensure that security
personnel are always present at the premises by conducting routine coordinating with
the security company every now and then. The anti-virus scanners and firewalls have to
be enabled during the execution of the program.

In case of hardware malfunction or virus attack, the program is to be restarted or a


back-up workstation has to be kept ready. If an intruder enters the premises and there
are no security personnel to take prompt action, every employee must be educated and
trained beforehand about how to evacuate in such a situation.

In case of non-image files being inputted into the database, an alert is sent to the user
asking them to re-input the file as an image file. If a virus or security breach is detected
and the security measures fail, the program execution is aborted. 5.3 Project Schedule
5.3.1 Project Task Set {Coding the FACENET module, Training the FACENET neural
network, Coding the chatbot module, training the chatbot network, coding the SSD
module, training the SSD neural network, creating the database, writing the web
application code, integration of all the separate modules into one , Creation of the stats
bar graphs/charts, creating the blockchain module} Department of Computer
Engineering, MIT, Pune 29 5.3. PROJECT SCHEDULE BLOCK-AI Figure 5.1: Figure 5.2:
Department of Computer Engineering, MIT, Pune 30 CHAPTER 5. PROJECT PLANNING
BLOCK-AI 5.3.2 Timeline Chart Figure 5.3: 5.4 Team Organisation 5.4.1

Team Structure Team Consists of 4 memebers 1. Prajasattak Gajbhiye 2. Abhiyendra


Gahlot 3. Piyush Kshirsagar 4. Abhishek Gupte Team Manager And Co-ordinator - Piyush
Kshirsagar Project Development and Technical Guidance - Abhiyendra Gahlot
Department of Computer Engineering, MIT, Pune 31 5.4. TEAM ORGANISATION
BLOCK-AI 5.4.2 Workload Divison Figure 5.4: Department of Computer Engineering, MIT,
Pune 32 CHAPTER 6.

PROJECT IMPLEMENTATION BLOCK-AI Chapter 6 Project Implementation Department


of Computer Engineering, MIT, Pune 33 6.1. OVERVIEW OF PROJECT MODULES
BLOCK-AI 6.1 Overview of Project Modules • Module 1 : FACENET – This module is
supposed to train and identify faces in the vicinities as scanned by the camera • Module
2 : SSD – This module is supposed to train and identify weapons spotted in the vicinities
• Module 3 : Chatbot – This module communicates with the administrator and provides
him relevant statistics in the form of strings on data such as presence in a room,
timestamp, happiness index etc.

• Module 4 : Stats bar graphs/charts – This module provides stats information to the
users and administrator in the form of bar graphs/plots etc. on data such as happiness
index, attendance etc • Module 5 : Web Interface – This module involved coding the
main web interface through which the parties such as users and administrator will view
the stats/ register themselves/ communicate with chatbot etc • Module 6 : Blockchain –
This module involves coding the blockchain using python 6.2 Tools and Technologies
used 6.2.1

Software Tools • Raspberry Pi 3 Model B for interfacing the cameras with the PC • 2
Cameras each representing 1 room or view • Raspberry Pi 8MP Camera Board 6.2.2
Hardware Tools • Sklearn library for displaying the bar graphs, plots of data Department
of Computer Engineering, MIT, Pune 34 CHAPTER 6. PROJECT IMPLEMENTATION
BLOCK-AI • Tensorflow, Keras libraries for creation, training and executing the SSD and
FACENET neural networks • Chatterbot library for creating and training the chatbot •
Mongodb/MySQL database management system for storing the json file that comes
from the nn’s that process the camera feed • JavaScript(JQuery), html, css for creating
the web interface • Python language as the universal language for the entire project and
the Blockchain • Flask for creating the web server 6.3 Algorithm Details 6.3.1 Algorithm
FaceNet This module uses the Stochastic Gradient Descent NN algorithm and uses the
Triplet Loss for selecting the embeddings.

This whole module has been coded in python and is used for the identification of faces
in a video feed 6.3.2 Algorithm SSD Here the default boxes are created around the
weapons, which are considered as positive information while the rest negative. The
convolutional layers use the hole algorithm instead of conventional convolutional layers.

This whole module is coded in python and is used for detecting weapons in the region
6.3.3 Algorithm Chatterbot Here an algorithm is developed that uses a chatbot library
called chatterbot which uses sequence to sequence algorithm and generates a model
which is later used for training on question-answer pairs for the chatbot for every user
during the time of execution Department of Computer Engineering, MIT, Pune 35 6.3.
ALGORITHM DETAILS BLOCK-AI 6.3.4

Algorithm for Stats An algorithm is created that fetches data from the database and
using sklearn libraries converts them into bar graphs/plots 6.3.5 Algorithm for
Block-Chain Here an algorithm is created that encodes the .json file using the blockchain
technology in the python programming language and stores it both on the PC and the
Raspberry Pi device Department of Computer Engineering, MIT, Pune 36 CHAPTER 7.
SYSTEM TESTING AND RESULT BLOCK-AI Chapter 7 System Testing and Result 7.1

Type of Testing Manual testing has been done, under Alpha Testing and the following
tests have been conducted with the correspondingly specified modules: • Unit testing:
The modules of Facenet ,Chatbot, SSD and blockchain have been subjected to unit tests
separately in jupyter notebook environments for the facenet , chatbot and SSD and the
Terminal for the blockchain • Integration testing: Some of the modules such as Facenet
and SSD have been brought together in the web interface using a flask server and
tested to see if they work and store .json objects in the database.

Along with that, the chatbot has been separately deployed on a flask server on a
separate unconnected webpage to check if it works and gives desired output • System
testing: The entire system was tested as a whole after having put in all the modules
together 7.2 Test Cases and Test Results 7.2.1 Test Case 1(System testing) and results: 1.
User creates an account. 2. User stands in front of Camera 1 in Room 1 and then Camera
2 in Room 2.

Department of Computer Engineering, MIT, Pune 37 7.3. RESULTS BLOCK-AI 3. User


checks his stats to read successfully how many times he was in Room 1 and how many
times he was in Room 2 from the bar graph. 7.2.2 Test Case 2(System testing) and
results: 1. Administrator logs in while the Cameras are running and the users are using
the interfaces of the webpage. 2.

Administrator checks the stats to see successfully how many people are happy and sad
of each individual separately. 3. Administrator then queries the chatbot to ask questions
such as “How many people are in Room 1?” or “Is Piyush in room 1 ?” or “When was
Piyush in room 1?” and received successful and responses within an accuracy of 2-3
seconds. 7.3 Results 7.3.1

Outcomes • Chatbot responses in string Answer format • Stats by means of bar


graphs/histogram plots for the administrator as well as the user • Json files stored in
database which can be queried through the chatbot and hence knowledge of who
is/was in what room Department of Computer Engineering, MIT, Pune 38 CHAPTER 8.
SCREENSHOTS OF PROJECT BLOCK-AI Chapter 8 Screenshots of Project 8.1 SECTION
NAME Figure 8.1: Home Screen Department of Computer Engineering, MIT, Pune 39 8.1.

SECTION NAME BLOCK-AI Figure 8.2: Stats Page Department of Computer Engineering,
MIT, Pune 40 CHAPTER 8. SCREENSHOTS OF PROJECT BLOCK-AI Figure 8.3: Testing Of
Face-net Module Department of Computer Engineering, MIT, Pune 41 CHAPTER 9.
CONCLUSION AND FUTURE SCOPE BLOCK-AI Chapter 9 Conclusion and Future Scope
9.1

Conclusion We have thus presented an Artificial Intelligence System for Monitoring and
Securing the area under the CCTV camera coverage. It not only recognizes human faces
but also provides behavioral analysis. It also provides object detection such as harmful
objects like gun, knife etc which are prohibited in the workplace. It is an advanced
security system for the future.This AI system interacts with the users with help of
chatbot.

It provides live statistics , video feed and gives answer to queries posed in a human
language and bar graph/histogram plots. The companies have to invest less on people
monitoring live systems and life is made a lot easier for the person who is responsible
for monitoring the live system and take prompt action upon noticing something
unusual such as a weapon.

Since the attendance and tracking system is automated, he need not constantly keep an
eye on someone he’s interested in tracking. He need not worry about how many people
are happy and frustrated. He can also gain additional insight into a person such as
whether they’re bound to withdraw a weapon if they are unhappy or frustrated etc as
such. 9.2

Future Scope In case twins or even triplets are present in the workplace, then an audio
module can be included into the project for better identification of the person as 2
people can’t have the same voice and face. Department of Computer Engineering, MIT,
Pune 43 9.3. APPLICATIONS BLOCK-AI 9.3 Applications • It can be deployed in an
important facility such as a Ministry of Defense building to keep an eye on the workers
to look out for weapons, track on whose frustrated and is bound to cause trouble,
whose in what room and when did they enter that room etc.

• It can also be deployed at a convenience store or a small shopping market to keep


track of how many customers are happy or sad and whose about to rob a store if they
have a weapon withdrawn. • It can also be used in jails to keep track of inmates and to
notice if anybody has a secret weapon hidden so the jailers can take prompt action,
check whose happy and whose sad and is having a bad day. Department of Computer
Engineering, MIT, Pune 44 APPENDIX A. APPENDIX A BLOCK-AI Appendix A Appendix A
A.1

Problem Statement Feasibility Asessment Recent developments in computer vision are


certainly pushing security systems to a new level. Existing systems do not perform well
in a low-resolution feed, they do not provide a workable efficiency and accuracy of
detecting objects and recognizing people by face , they don’t provide analytics and
mostly require someone to constantly monitor the feed.

Current systems struggle with identifying face from different perspective and detecting
weapons in real time. Our system contains state of art technology like FaceNet and SSD
for the low light ,low resolution, multangular facial detection . The project is feasible in
areas where there aren’t any controversies created when the camera is mounted in a
workplace, such as jails or convenience stores/supermarkets.

It is particularly feasible in situations where the number of people in the room is less
than 10, otherwise the algorithms get overloaded and the problem becomes NP-hard,
however otherwise it’s a P-type problem. It’s also most plausible in a situation where the
number of users logged into the wifi network is less than 10 otherwise it would result in
a Denial-of-service type situation. Department of Computer Engineering, MIT, Pune 45
A.1. PROBLEM STATEMENT FEASIBILITY ASESSMENT BLOCK-AI Figure A.1: Figure A.2:
Department of Computer Engineering, MIT, Pune 46 APPENDIX A. APPENDIX A
BLOCK-AI Figure A.3: In the above given models, the algorithms which are in use in the
project are depicted. These algorithms all execute in polynomial time and are hence of
the P type.

Department of Computer Engineering, MIT, Pune 47 APPENDIX A. APPENDIX B


BLOCK-AI Appendix A Appendix B Department of Computer Engineering, MIT, Pune 49
A.1. RESEARCH PAPERS AND COMMENTS BLOCK-AI A.1 Research Papers and comments
Figure A.1: Department of Computer Engineering, MIT, Pune 50 APPENDIX A. APPENDIX
B BLOCK-AI Figure A.2: Department of Computer Engineering, MIT, Pune 51 APPENDIX
A. APPENDIX C BLOCK-AI Appendix A Appendix C A.1

Plagiarism Report Department of Computer Engineering, MIT, Pune 53 BIBLIOGRAPHY


BLOCK-AI Bibliography [1] FaceNet: A Unified Embedding for Face Recognition and
Clustering; Florian Schroff, Dmitry Kalenichenko, James Philbin. [2] Bitcoin: A
Peer-to-Peer Electronic Cash System,2008.; Satoshi Nakamoto. [3] Berg.SSD: Single Shot
MultiBox Detector, 2016; Wei Liu , Dragomir Anguelov , Dumitru Erhan , Christian
Szegedy , Scott Reed , Cheng-Yang Fu1 , Alexander C. Berg.

[4] Deep Coupled ResNet for Low- Resolution Face Recognition, 2017; Ze Lu, Xudong
Jiang, Alex Kot. [5] Sequence to Sequence Learning with Neural Networks,2014.; Ilya
Sutskever,Oriol Vinyas,Quoc V.Le. [6] Evaluating Quality of Chatbots and Intelligent
Conversational Agents,2017.; Nicole Ratziwill, Morgan Benton. Department of Computer
Engineering, MIT, Pune 55

INTERNET SOURCES:
-------------------------------------------------------------------------------------------
<1% - http://www.mitpune.com/dept-comp/Journal-dept-comp.aspx
<1% -
https://india.swe.org/inaugurating-the-swe-india-mit-wpu-affiliate-a-photo-diary/
<1% - https://www.academia.edu/32503476/ATTRITION_MANAGEMENT
<1% -
https://www.slideshare.net/ManishSingh48/summer-internship-project-report-14297371
<1% - https://www.academia.edu/30274911/DIGITAL_BUS_PASS_FOR_LOCAL_BUSES
<1% - http://www.engjournal.org/Special-Issues/ICASCT/ICASCT1823.pdf
<1% - https://news.ycombinator.com/item?id=14891266
<1% -
https://d37djvu3ytnwxt.cloudfront.net/assets/courseware/v1/9434e9979f74dee0d171cd
8c7e6cc45e/asset-v1:PennX+ROBO4x+3T2017+type@asset+block/WEEK_1_FULL.pdf
<1% -
http://uir.unisa.ac.za/bitstream/handle/10500/5791/thesis_ramaloko_m.pdf?sequence=1
<1% -
https://www.cedengineering.com/userfiles/Intro%20to%20Recycling%20Construction%2
0and%20Demolition%20Waste.pdf
<1% - http://www.m5zn.com/newuploads/2014/09/29/pdf/b4ca9d2a3b11a1a.pdf
<1% -
https://www.eurocontrol.int/sites/default/files/field_tabs/content/documents/nm/asterix
/asterix-format-analysis-and-monitoring-tool.pdf
<1% - https://www.gemini.edu/documentation/webdocs/spe/spe-c-g0014.pdf
<1% -
https://www.ecb.europa.eu/paym/initiatives/shared/docs/4070a-t2-t2s-2018-10-09-csld
-0002-urd-t2-t2s-consolidation-user-requirements-document-common-components-v1
.1.2.pdf
<1% - https://faaco.faa.gov/index.cfm/attachment/download/91645
<1% - https://www.nrcs.usda.gov/Internet/FSE_DOCUMENTS/nrcs143_013173.pdf
<1% - https://www.slideshare.net/noumanashrafawan/chapter-3-is-audit
<1% -
http://www.regie-energie.qc.ca/audiences/3640-07/VA3640/C-6-2-OC_HQT-8doc1-VA_
3640_14aout07.pdf
<1% - https://nvlpubs.nist.gov/nistpubs/specialpublications/nist.sp.800-12r1.pdf
<1% -
http://shop.bsigroup.com/upload/Standards%20&%20Publications/publications/BIP007
6-Chapter1.pdf
<1% -
https://www.dhs.gov/sites/default/files/publications/ISC_Risk-Management-Process_Aug
_2013.pdf
<1% -
https://www.researchgate.net/profile/Aditya_Gupta25/publication/307628924_Design_a
nd_Implementation_of_Electronic_Differential_for_Electric_Vehicle_Employing_BLDC_Mot
ors/links/57cd911e08aed67896ffba07.pdf?origin=publication_list
<1% - http://www.diva-portal.org/smash/get/diva2:624038/FULLTEXT01.pdf
<1% - https://ftp.isc.org/isc/dnssec-guide/dnssec-guide.pdf
<1% -
https://www.etsi.org/deliver/etsi_en/300300_300399/30039401/02.03.01_60/en_3003940
1v020301p.pdf
<1% -
https://www.etsi.org/deliver/etsi_tr/101500_101599/101577/01.01.01_60/tr_101577v010
101p.pdf
<1% - https://www.surgeons.org/media/12482/LDLTreview1004.pdf
<1% - http://publications.lib.chalmers.se/records/fulltext/252784/252784.pdf
<1% - http://www.pianshen.com/article/5605299811/
<1% - https://wiki.tum.de/display/lfdv/Face+Recognition
<1% - http://homepages.cae.wisc.edu/~ece539/project/f18/palani_pro.pdf
<1% - https://www.scribd.com/document/409521725/v5i1-pdf
<1% -
https://www.mercon.pl/files/attachments/Magnetrol_Eclipse_706_Instrukcja_Foundation_
Fieldbus_EN.pdf
<1% - https://www.sourcesecurity.com/gates.html
<1% - https://www.zeolearn.com/magazine/blog/8
<1% - https://www.researchgate.net/profile/Vaclav_Snasel
<1% - https://doi.acm.org/10.1145/3098954.3107011
<1% -
https://www.researchgate.net/publication/228854881_People_Tracking_and_Posture_Rec
ognition_for_Human-Robot_Interaction
<1% - http://www.ytmfurniture.com/civil_engineering_problems_and_solutions_book.pdf
<1% - https://www.tandfonline.com/doi/pdf/10.1080/10408347308003631
<1% -
https://www.reddit.com/r/CarletonU/comments/b7u2xh/you_thought_it_was_over/
1% - https://uthink.com/question/cs-vs-se-waterloo/
<1% - https://www.hindawi.com/journals/ahci/2010/602570/
<1% - https://www.ncbi.nlm.nih.gov/pmc/articles/PMC4435108/
<1% - https://news.ycombinator.com/item?id=18278510
<1% - https://www.sciencedirect.com/science/article/pii/S0092867418307876
<1% - https://www.sciencedirect.com/science/article/pii/S1474034611000565
<1% -
https://www.semanticscholar.org/paper/FaceNet%3A-A-unified-embedding-for-face-rec
ognition-Schroff-Kalenichenko/19d583bf8c5533d1261ccdc068fdc3ef53b9ffb9
<1% - https://issuu.com/www.garph.org/docs/international_journal_of_research_i
<1% - https://www.sciencedirect.com/science/article/pii/S0969476515300527
<1% -
https://www.researchgate.net/publication/329314454_Convolutional_Discriminant_Analy
sis
1% -
https://www.groundai.com/project/facenet-a-unified-embedding-for-face-recognition-a
nd-clustering/3
<1% -
https://slidelegend.com/facenet-a-unified-embedding-for-face-recognition-and-clusteri
ng_5a169db51723dd67b7d5207c.html
<1% - https://arxiv.org/abs/1503.03832
<1% -
https://www.slideshare.net/WillyDevNET/facenet-a-unified-embedding-for-face-recogni
tion-and-clustering-87986667
<1% - https://www.cs.unc.edu/~wliu/papers/ssd.pdf
<1% - https://www.bibsonomy.org/bibtex/217e9dc47586f63397871307f74f51453/roaur
<1% -
https://www.researchgate.net/publication/317920692_Real-Time_Illegal_Parking_Detecti
on_System_Based_on_Deep_Learning
<1% -
https://builders.intel.com/docs/aibuilders/object-detection-on-drone-videos-using-neo
n-framework.pdf
<1% -
https://www.researchgate.net/publication/328251645_Object_tracking_with_particles_we
ighted_by_region_proposal_network
<1% -
https://www.researchgate.net/publication/327881592_Object_Detection_from_Scratch_w
ith_Deep_Supervision
<1% -
https://www.ijert.org/research/detection-and-classification-of-plant-leaf-diseases-by-usi
ng-deep-learning-algorithm-IJERTCONV6IS07082.pdf
<1% -
https://www.microsoft.com/en-us/research/wp-content/uploads/2008/06/simultaneous_
cvpr_08.pdf
<1% - https://www.sciencedirect.com/science/article/pii/S0262885616301524
<1% - https://www.sciencedirect.com/science/article/pii/S0165168417301834
<1% - http://human.ait.kyushu-u.ac.jp/publications/ACCV2018-hayashi.pdf
<1% - http://www.nada.kth.se/~ann/exjobb/linnea_grip.pdf
1% - https://arxiv.org/pdf/1704.04579
<1% - http://www.j-asc.com/gallery/41-sp3-jan-2019.pdf
<1% -
https://currencyjournals.com/blockchain/blockchain-in-journalism-columbia-journalism-
review/
<1% - http://user.ceng.metu.edu.tr/~e1679216/documents/SRS.pdf
<1% - https://patents.google.com/patent/US20070220494A1/en
<1% - https://msdn.microsoft.com/en-us/magazine/mt808503.aspx
<1% - https://patents.google.com/patent/US20120297179A1/en
<1% -
https://www.computerscijournal.org/vol12no1/implementation-of-digital-notice-board-
using-raspberry-pi-and-iot/
<1% - http://www.se.rit.edu/~sis-io/documents/RequirementsDocument.pdf
<1% - http://www.mitpune.com/dept-comp/Doc/academic-calendar/SE.pdf
<1% - https://royalsocietypublishing.org/doi/full/10.1098/rsif.2010.0112
<1% - https://serviceteamit.co.uk/news/eud-security-guidance-windows-10/
<1% -
https://www.av-comparatives.org/tests/business-security-test-2018-august-november/
<1% - https://www.quora.com/Is-antivirus-software-really-useful
<1% - https://www.nap.edu/read/10206/chapter/10
<1% - https://www.idrc.ca/sites/default/files/openebooks/998-4/index.html
<1% - https://issuu.com/iasir/docs/ijebea_vol2_print--1
<1% - https://www.scribd.com/document/371445550/JPM
<1% - http://portablecontacts.net/wiki/development/openwrt/
<1% - https://studio.uipath.com/docs/about-libraries
<1% - https://www.projectmanager.com/software/use-cases/sdlc
<1% -
https://eige.europa.eu/gender-mainstreaming/good-practices/csv/about-eige/about-ei
ge/
<1% - http://www.buildgap.com/
<1% - https://gfycat.com/CarelessBlankAngelfish
<1% - https://www.nrcan.gc.ca/energy/alternative-fuels/programs/mdip/3653
<1% -
https://quizlet.com/301465393/comptia-sy0-401-topic-3-threats-and-vulnerabilities-flas
h-cards/
<1% - https://republic.co/coinvest
<1% -
https://quizlet.com/141147066/combo-with-strategic-management-chapter-1-and-26-o
thers-flash-cards/
<1% - https://profiles.uonbi.ac.ke/gwango/files/curbing_violence_in_schools.pdf
<1% -
https://www.brighthubpm.com/risk-management/88381-using-excel-to-make-a-risk-ass
essment-template/
<1% - https://www.brainkart.com/article/Identification--Projection--RMMM_9098/
<1% - http://www.viit.ac.in/index.php
<1% - https://blog-generous.blogspot.com/2014/
<1% - https://www.sciencedirect.com/science/article/pii/S0957417418304354
<1% - https://gmcsecurity.weebly.com/blog/category/gmc-securities
<1% - https://issuu.com/itziarfdezoyarzabal/docs/libro-2016
<1% - https://www.sciencedirect.com/science/article/pii/S1084804517302928
<1% - https://www.sciencedirect.com/science/article/pii/S0957417408007859
<1% - https://arxiv.org/abs/1512.02325
<1% -
https://groups.google.com/d/msg/computer-bos-2010/E8-S6xfp88M/0kT2ZmwrAAAJ
BIBLIOGRAPHY BLOCK-AI

Bibliography

[1] FaceNet: A Unified Embedding for Face Recognition and Clustering; Florian Schroff,

Dmitry Kalenichenko, James Philbin.

[2] Bitcoin: A Peer-to-Peer Electronic Cash System,2008.; Satoshi Nakamoto.

[3] Berg.SSD: Single Shot MultiBox Detector, 2016; Wei Liu , Dragomir Anguelov , Dumitru

Erhan , Christian Szegedy , Scott Reed , Cheng-Yang Fu1 , Alexander C. Berg.

[4] Deep Coupled ResNet for Low- Resolution Face Recognition, 2017; Ze Lu, Xudong Jiang,

Alex Kot.

[5] Sequence to Sequence Learning with Neural Networks,2014.; Ilya Sutskever,Oriol

Vinyas,Quoc V.Le.

[6] Evaluating Quality of Chatbots and Intelligent Conversational Agents,2017.; Nicole Ratzi-

will,Morgan Benton.

Department of Computer Engineering, MIT, Pune 83

You might also like