• Tidak ada hasil yang ditemukan

3.5 Sequences Diagram 20

3.6 CNN Algorithm 21

3.7 Convolutional Layer 22

3.8 Pooling layer 24

3.9 Expected Output for this project 26

3.10 Installation of PyCharm 22

3.11 Installation of Raspberry Pi operating system 27

3.12 Getting Telegram Bot Token 28

ix

Figures Title Page

4.1 Hardware setup based on the design 30

4.2 Raspberry Pi desktop 31

4.3 Code 32

4.4 Telegram ‘on’ command to switch on the sensor 32 4.5 Telegram Massage when Animal Detected 33

4.6 Telegram Massage when Human Detected 33

4.7 Telegram Massage when Unidentified Object Detected

34

4.8 All image will be save in a file 34

4.9 imagenew.jpg 35

4.10 image1new.jpg 35

x

LIST OF TABLE

Table Title Pages

2.1 Literature Review 7, 8, 9, 10

3.1 List of Hardware and Software 13

xi

LIST OF ABBREVIATIONS/ TERMS/ SYMBOLS

FYP Final Year Project

CNN Convolutional Neural Network

IT Information Technology

IoT Internet of Thing

CCTV Closed-Circuit Television

PIR Pyroelectric ("Passive") Infrared

ReLu (Rectified Linear Unit)

POC Proof of concept

xii

LIST OF APPENDICES

Appendix Title Page

A Gantt Chart FYP 1 43

B Gantt Chart FYP 2 46

1 Chapter 1

INTRODUCTION

1.1 Background

Nowadays, the increasing number of crime and illegal activities around the world has bring more concerns toward people safety. This sense will make a lot of individuals and business to do everything in their reach to feel more secure and make sure the threats never happen to them.

Sometimes, the security attacks can be merciless, they not only embedded a long term trauma to the victims but also cost a fortune and even human lives. The most tragic incident that still remains is people heart is a robbery case in 2006 where 7 family members, three children ages 5 to 11 and four adults shot to death. The incident happened in a house at Indiana. The incident implanted a depth emotion in the people live in the neighbourhood where they said "We think we're safe, but I will look twice at everybody that walks down the street now." [1]

The rapid growth of Information Technology (IT) has led the express change in human lifestyle. The Internet of Things (IoT), is about extending the power of the internet beyond computers and smartphones and also means taking all the things in the world and connecting them to the internet. Estimates are that by 2020 there will be about +20 Billion connected devices around the globe. The IoT promises to connect everything including the security system.

2

The installation of security system to their properties will be consider as a first layer of defend again the threats. Security cameras such as Closed-Circuit Television (CCTV), Surveillance Camera and any many others will guard over user building either from both inside and outside, acting as an extra pair of eyes and ears to monitor their possessions as it will thwart the activities of even the most knowledgeable and expert thieves and criminals. There are a lot cases being solved as the evident of the event are recorded by the CCTV.

1.2 Problem Statement

Even though the widespread adoption and growing numbers of installations across the world, current security systems do have some common lacks associated with them. Based on a news articles, a senior police officer claim that only 3% of street robberies in London were solved using CCTV images, despite the fact that Britain spend billions of pounds in new technology and has more security cameras than any other country in Europe. [2] These problem show there is a lots of shortcomings range from price to installation and from performance to maintenance of these systems.

Prices of security systems are still not very affordable for most people [3]. If we included the cost of maintenance, battery replacement and any other cost, the charge of ownership will again be way higher than purchase price.

Other than that, sometimes, security systems who use of technologies like sensors to detect motions and sense surroundings, at one time or another faced the problem of alarms going off for no reason [4]. It can lead to a panic situation at home where wakes entire family and fear at the midnight to find out it was a false alarm that caused by a cute animal or owner’s pet that will not harm any human. Installing a

3

security camera that promise of ‘peace of mind’ is not a warranty of protection from the possible threats or attack as security systems like CCTV will only record the misfortune event and cannot do anything in other to prevent it. [5]

Security camera with image recognition and notification will provide a best solution with the improvement of embedded system to protect the family. This project will help owner to recognised their intruder either a human or an animal by given them a notification if the camera detected any motion by. For the issues with the price to install and maintenance this security camera used the raspberry pi, this project definitely way cheaper than the any price of security camera in market with high resolution and low power consumption feature.

1.3 Project Objective

With extensive implementation of security systems, it has become vital that these systems to work as predictable. The objective of this project are:

1. To design and develop a security camera that cheaper compared to security systems in the market by using raspberry pi and web camera. [6]

2. To develop a security camera that will reduce the false alarm by using image recognition method to verify any motion object detected by motion sensor. [4]

3. To develop security camera that will give owner notification when any motion detected and verified. This will help owner to any intruder detected in their properties. [7]

4 1.4 Scope

• Developing an embedded system with the implement of image recognition algorithm.

• The design architecture, the structure of the embedded system and the programming skill are included in this project.

• The detection by sensors to detect motions and sense surroundings and the camera will capture the image.

• When the image captured, (image will be store offline) the phase of image recognition works.

• Notification will be send to the owner via telegram, when the image recognition finish. The notification will verify either the image is an animal or human.

1.5 Limitation of work

Even the security camera with image recognition and notification is the precise solution, this project still has its own limits.

The first limitation is this camera is not suitable for large area as the motion detector only can detect an intruder in a certain distant. The image of criminal off the range will not be capture and no notification will be send thus this camera are limited for a small area.

The next drawback is the notification will only be send and received if only the devices and camera are connected to internet. If the internet connection has problem, the notification will not be send by the camera.

Besides, the web camera than be used will produce a low image quality. The image will not be clear especially when the lighting is dim.

5 1.6 Expected result

A product that can function according to the requirement which is a security camera that give notification via telegram when the PIR sensor detect any movement.

The camera can capture picture of the moving object and the image can be verifying by using image recognition method that use Convolutional Neural Network Algorithm.

1.7 Thesis structure

This report contained 4 chapter which is Chapter 1, Introduction. This chapter will discuss about the background of this project, the problem statement, objective and scope that involved in developing this project. Chapter 2 is literature review. It is an assessment of previous study that related to this project, showing that there are gaps that this project will attempt to fill. Chapter 3 is about the methodology used in developing this project. Waterfall model is used to develop this project in a sequential order. Chapter 4 is conclusion. This chapter will state the expected result of the final result, the improvement that need to be done to this project.

6 Chapter 2

LITERATURE REVIEW

2.1 Introduction

Nowadays, most of current security video surveillance systems depend on human observer for detecting any suspicious activities or event in a real time video scene.

However, everybody knows that human capability is limited than machines [8]. Thus, there will be mistake in monitoring simultaneous events in surveillance displays. The suspicious event may not be notice and then the use of security camera will be useless in preventing crime. Hence, there are a lot of research made to improve the existing security system in order to meet the expected result by the users.

2.2 Table of Literature Review

7 Year

Title Author

Objective Methodology Advantage

Disadvantages Comparison with this Project

The goal of this project is to develop a low-cost remote surveillance system using the Raspberry Pi platform.

Additional features such as monitoring the video feed and controlling the angle of the camera for developed and increase the capabilities of the surveillance system.

• Supply power adapter

• Software: Wife and

8 alarm that detects when someone enters the area.

When an intruder is detected, it activates a siren.

9

This research aims to design and implement a home security system with the capability for human detection design was to develop a network that allowed for the transmitting and

10 Table 2.1: Literature Review

Joseph A Bosman, Ipek Ozil, Steven Olivieri, Brandon C.

Steacy

from camera nodes to a base station. and its applications - a review [7]

To present the detection technique that can be used in security camera

Techniques:

 Object detection - Background subtraction - Optical flow

- Spatio-temporal filter

 Object classification - Shape-based method

11 2.3 Summary

There are plenty of reports on making CCTV for security reason. Each of the product had its own benefits and disadvantages. This successful project need to be study to developed a Surveillance camera with image recognition and notification that can meet the expectation of user.

12 Chapter 3

METHODOLOGY

3.1 Introduction

SDLC, or Software Development Lifecycle, is used to plan project activities in a sequential order to achieve the end product. Each phase is associated with subsequent phases where output from one phase of SDLC acts as input to the next phase. The main phases of SDLC are: requirement, design, coding, testing, and maintenance. [11]

3.2 Waterfall Model

There are a few of famous SDLC model such as waterfall, agile, prototype and spiral model. In this project, the model that been used is waterfall. Waterfall is a sequential model that divides software development into pre-defined phases where each phase must be completed before the next phase can begin with no overlap between the phases. 5 steps required in this method is requirement gathering, design, implementation, verification or testing and maintenance.

The end goal is defined early with the Waterfall model and the entire process i s laid out from beginning to end. This makes the project appear clearer and more orga nized on the surface.

13

Figure 3.1: Stage of Waterfall Model

3.2.1 Requirement

In step requirement, the wide information about what this project requires will be gather. A variety of ways used to gather this information, from mind mapping to interactive brainstorming and analysing the existing project. Reviewing the present project in the market can help to understand the system and its current state. By the end of this phase, the project requirements should be clear.

14 3.2.2 Design

Next in design, the system will be design by using the information gathering.

The software and hardware that will be use are listed. No coding takes place but the programming language decided.

Programming language: Java

Software list Hardware List

Open CV Raspberry pi 3

Telegram Pi camera

PyCharm PIR motion sensor

TensorFlow Power Bank – power supply

Raspberry Pi Operating System SD card - temporary database Table 3.1: List of hardware and Software

Figure 3.2: System Block Design for this project Raspberry PI 3

Power bank

SD Card Pi Camera

PIR motion sensor Internet

Telegram

15

Security Camera with Image Recognition and Notification are consist of software and hardware to function.

The software will be used in this project is Telegram, a mobile application. The system will capture image and start image recognition when motion detected. The system will send the owner massage via Telegram to notify him after the image recognition finish.

OpenCV (Open Source Computer Vision Library) are used in this project to code the image recognition algorithm. It is an open source computer vision and machine learning software library. [12]

Hardware that used in this project are Raspberry PI 3, power bank, SD card, Web Camera and PIR motion sensor. Raspberry PI 3 will be responsible to process all the workload. PIR will detect the motion and web camera will capture the image when motion detected. The image will be save offline into the SD Card that will act as a database. The image recognition will start and the result will be send to the owner via Telegram.

3.2.3 Implementation

The third stage is implementation. This phases required information from the previous stage and create a functional product. The programming and physical implementation will take place in this stage.

16 3.2.4 Verification

Stage 4, verification is a phases where the testing begins when implementation done. The testing is crucial to find issues and problem arises. This stage will be a benchmarking in order to continue next phases or return to phase one for re-evaluation.

The project work need to work as the stated by the expectation of the final project. All the hardware will be test to make sure its work. If any problem found, the hardware will be check.

3.2.5 Maintenance

Maintenance is the last but not least phase, the product has been delivered and is being used. If any problems occur, the project need to be fixed and updated may be required.

17 3.3 Framework

Project Environment or System Design

Figure 3.3: Framework of this project

All the hardware such as SD card, Web Camera, PIR motion sensor and power bank will be connected to Raspberry PI 3 in its own place. The notification will be send to user by Telegram via Internet.

18 3.4 Flowchart

Figure 3.4 Flowchart of this project PIR sensor detect motion

start

Motion detected

Capture image

Save into the SD card

Send Notification

stop

NO

YES

Image recognition method

19

Start. PIR sensor will detect motion in a specific range. If the is no motion detect, the system will go back to detect motion. Web Camera will capture the image.

The image will be save offline in SD card. The image recognition algorithms start.

When image recognition finish, the system will send notification to user via Telegram.

The notification will define the object in the image. System Stop.

20 3.5 Sequence Diagram

Figure 3.5: Sequence diagram for this project

user Raspberry PI 3 camera database

Start system

Notify user

PIR sensor

Motion detected

Captured picture

Start image recognition

Compare image

Image Recognition Finish

21

User will start the system with connecting the power bank as a power supply to Raspberry PI 3 that connected with any other hardwares. The PIR sensor will detect any motion that will trigger the web camera to capture image. The image then will be save offline in the database (SD card) and image recognition algorithms will start at Raspberry PI 3. Image will be compare to databased to identify the object in the image. When image recognition finish, user will got notification by Telegram.

3.6 Algorithm for Image Recognition

Image recognition refers to technologies that identify places, logos, people, object, buildings and several other variables in digital images. Recognition may be very simple for human but not for a computer. [13]

CNN refer to Convolutional Neural Network is a Deep Learning Algorithm that can take in an input image, assign importance (learnable weights and biases) to various aspects/objects in the image and be able to differentiate one from the other. In CNN, the pre-processing required is much lower as matched to other classification algorithms. [14]

Figure 3.6: CNN Algorithm

22 3.6.1 Convolution Layer — The Kernel [14]

The convolutional layer or the Kernel is a fundamental building block of CNN.

This is where the majority of the computational heavy lifting occur. Using filters or kernels, the data or image is convolved. Filters are small units that we apply through a sliding window across the data. The depth of the image is the similar as the input, but a filter of depth 4 can also be applied to a colour image with an RGB depth value of 4. For any sliding action, this approach involves taking the element-wise product of filters in the picture and then summing those particular values. A 2d matrix will be the output of a convolution having a 3d filter with colour.

Figure 3.7: Convolutional Layer

Each output value in the feature map does not have to be related to each pixel value in the input image, as you can see in the picture above. It only needs to bind to the area of reception where the filter is being applied. Convolutional (and pooling) layers are generally referred to as "partially connected" layers or described as local connectivity since the output array does not need to map directly to of input value.

23

Notice that as it travels around the image, which is also known as parameter sharing, the weights in the feature detector remain fixed. Some parameters, such as weight values, are modified via the backpropagation and gradient descent phase during preparation. There are, however, three hyperparameters must be set before neural network training begins as it can influence the volume size of the output They include:

1. The number of filter pretentious the depth of the output.

2. Stride, the distance or number of pixels that the kernel travels over the input matrix. A larger stride produces a smaller output while stride values of two or higher are uncommon.

3. Zero-padding is frequently used when the filters do not suitable for the input image.

After each convolution operation, the ReLu (Rectified Linear Unit) is used to increase non-linearity in the CNN by applying the rectifier function. Image are made of multiple object which are not linear to one another.

Eventually, the convolutional layer transforms the image into numerical values, enabling related patterns to be interpreted and extracted by the neural network.

3.6.2 Pooling Layer

Pooling layers, also referred to as downsampling, eliminates dimensionality reduction, minimizing the number of input parameters. The pooling procedure sweeps a filter over the entire input, similar to the convolutional layer, but the difference is that there are no weights in this filter. Inside the receptive field, the kernel applies an

24

aggregation function to the values, populating the output array. Two key ways of pooling exist:

1. Max pooling: It selects the pixel with the highest value to send to the output array as the filter travels over the input. Aside from this, relative to average pooling, this strategy appears to be used more frequently.

2. Average pooling: As the filter travels over the input, it calculates the average value to be sent to the output array within the receptive region.

Figure 3.8: Pooling Layer

3.6.3 Classification Layer

This includes converting the entire pooled feature map matrix into a single column that is then fed for processing to the neural network. To build a model, we combined these features together with the completely linked layers. Finally, to define

This includes converting the entire pooled feature map matrix into a single column that is then fed for processing to the neural network. To build a model, we combined these features together with the completely linked layers. Finally, to define

Dokumen terkait