SURVEILLANCE CAMERA WITH IMAGE RECOGNITION AND NOTIFICATION
NOR SALWANI BINTI JA’AFAR
BACHELOR OF COMPUTER SCIENCE (COMPUTER NETWORK SECURITY) WITH
HONOURS
UNIVERSITI SULTAN ZAINAL ABIDIN
2021
NOR SALWANI BINTI JA’AFAR BACHELOR OF COMPUTER SCIENCE(COMPUTER NETWORK SECURITY) WITHHONOURS 2021
SURVEILLANCECAMERA WITH IMAGE RECOGNITION AND NOTIFICATION
NOR SALWANI BINTI JA’AFAR
BACHELOR OF COMPUTER SCIENCE (COMPUTER NETWORK SECURITY) WITH HONOURS
UNIVERSITI SULTAN ZAINAL ABIDIN 2021
i
DECLARATION
I hereby declare that the report is based on my original work except for quotations and citations, which have been duly acknowledged. I also declare that it has not been previously or concurrently submitted for any other degree at Universiti Sultan Zainal Abidin or other institutions.
__________Salwanij_Ja’afar_____
Name: Nor Salwani Binti Ja’afar
Date: 22/06/2021
ii
CONFIRMATION
This is to confirm that:
The research conducted and the writing of this report were under my supervision.
_______________________________
Name: DR. Wan Nur Shuhadah Binti Wan Nik
Date: 22/06/2021
iii DEDIKASI
I would like to express my special thanks of gratitude to my supervisor, Dr. Wan Nor Shuhadah Binti Wan Nik who gave me this golden opportunity to do this project and also support me in completing this project.
I would also like to thanks my family, for their moral and financial support during development of this project. Thank you for your love, encouragement and support. Last but not least, I would like to thank my friends and lectures for helping and give me the best experience during my degree life.
iv ABSTRACT
This project is about a surveillance camera using image recognition based on Raspberry pi. The security camera has been developed and launched for many years but most of them are just a CCTV and IP camera and any other camera that have a high price tag.
These type of security cameras may useful in gather information if something happen but it is cannot, however, stop a crime when it is in progress as they did not give any notification to the owner. Thus, a motion detector camera could be more efficient with uses of image recognition. It will verify any movement that goes near to the camera within certain distance. The mobile applications telegram has been involved in this system. An ultrasonic sensor is used to detect the motion of any object. Camera will capture the image of the object and will be save in the SD card that will act as a database.
The image recognition starts to function and image will be compare to the databased.
The algorithm for image recognition used is Convolutional Neural Network (CNN) An alert message and photo taken will send to owner’s mobile phone via telegram through WIFI when the image recognition finish. This will alert owner to know who went to their properties, either a person or an animal.
v ABSTRAK
Projek ini adalah mengenai kamera keselamatan yang menggunakan pengecaman gambar berasaskan Raspberry pi. Kamera keselamatan telah dibangunkan dan digunakan secara meluas selama bertahun-tahunnya tetapi kebanyakannya hanyalah kamera CCTV dan IP dan kamera lain yang mempunyai label harga tinggi. Jenis kamera keselamatan ini mungkin berguna dalam mengumpulkan maklumat sekiranya sesuatu berlaku tetapi tidak dapat menghentikan kejadian jenayah yang berlaku kerana mereka tidak memberikan pemberitahuan apa pun kepada pemiliknya. Oleh itu, kamera pengesan gerakan boleh menjadi lebih cekap dengan penggunaan pengecaman gambar. Telegram aplikasi mudah alih telah terlibat dalam sistem ini. Sensor ultrasonik digunakan untuk mengesan pergerakan objek apa pun. Kamera akan menangkap gambar objek bergerak tersebut dan akan disimpan dalam SD kad yang akan berfungsi sebagai pangkalan data. Pengecaman gambar mula berfungsi dan gambar akan dibandingkan dengan pangkalan data. Algoritma untuk pengecaman gambar yang digunakan adalah Convolutional Neural Network (CNN). Mesej amaran dan foto yang diambil akan dihantar ke telefon bimbit pemilik melalui telegram menggunakan WIFI apabila pengecaman gambar selesai. Ini akan memberi tahu pemilik untuk mengetahui siapa yang berada di kawasan mereka, baik orang atau haiwan.
vi
TABLE OF CONTENTS
DECLARATION ... i
CONFIRMATION ...ii
DEDIKASI ... iii
ABSTRACT ... iv
ABSTRAK ... v
TABLE OF CONTENTS ... vi
LIST OF FIGURES ... viii
LIST OF TABLE ... x
LIST OF ABBREVIATIONS/ TERMS/ SYMBOLS ... xi
LIST OF APPENDICES ... xii
Chapter 1 ... 1
INTRODUCTION ... 1
1.1 Background ... 1
1.2 Problem Statement ... 2
1.3 Project Objective ... 3
1.4 Scope ... 4
1.5 Limitation of work ... 4
1.6 Expected result ... 5
1.7 Thesis structure ... 5
Chapter 2 ... 6
LITERATURE REVIEW ... 6
2.1 Introduction ... 6
2.2 Table of Literature Review ... 6
2.3 Summary ... 11
Chapter 3 ... 12
METHODOLOGY ... 12
3.1 Introduction ... 12
3.2 Waterfall Model ... 12
3.3 Framework ... 17
3.4 Flowchart ... 18
3.5 Sequence Diagram ... 20
3.6 Algorithm for Image Recognition ... 21
3.7 Proof of Concept (POC) ... 25
vii
3.8 Summary ... 28
Chapter 4 ... 29
IMPLEMENTATION AND RESULT ... 29
4.1 Introduction ... 29
4.2 Implementation of system ... 29
4.3 Testing and Result ... 32
4.4 Summary ... 36
Chapter 5 ... 37
CONCLUSION ... 37
5.1 Introduction ... 37
5.2 Project Contribution ... 37
5.3 Project Discussion ... 37
5.4 Limitation and Recommendation ... 38
5.5 Future work ... 39
5.6 Summary ... 39
REFERENCES ... 40
Appendix 1 ... 43
Appendix 2 ... 45
viii
LIST OF FIGURES
Figures Title Page
3.1 Stage of Waterfall Model 12
3.2 System block design for this project 13
3.3 Framework this project 16
3.4 Flowchart for this project 18
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
2016
Smart Motion Detection: Security System Using Raspberry Pi [9]
Zakaria Rada
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.
Tools:
• The Raspberry Pi 3, Model B+, 1GB RAM.
• The camera module V2.
• PIR sensor board.
• Raspberry Pi 7”
Touchscreen Display (Optional).
• SD Card 32Gb.
• Supply power adapter
• Software: Wife and Raspbian
• can snap pictures or records video when the burglary happens and send out an alert signal at the same time
• all motions will be record without any verification
Similarities:
• Notification will be send to the owner.
Differences:
• Does not have any image recognition
• Can capture video
8 2015
Home Security Alarm System Using Arduino [4]
Suman Pandit, Shakyanand Kamble, Vinit Vasudevan
Basic motion-sensing alarm that detects when someone enters the area.
When an intruder is detected, it activates a siren.
Tools:
• Arduino Uno
• P.I.R Sensor Module
• L.C.D(16 X 2)
• 9V Battery
• L.E.D
• Piezo Buzzer
• Breadboard
• Some Jumper Wires
Software:
• Arduino IDE
• Siren will break if any motion detected
• False alarm can be cause by a pet or an animal
Similarities:
• Using motion detector Differences:
• Does not have any image recognition
• Do not send any notification
9 2018
Design Smart home security system using Object
Recognition and PIR Sensor [6]
Nico Suranthaa, Wingky R.
Wicaksonob
This research aims to design and implement a home security system with the capability for human detection
Tools:
• PIR Sensor
• Arduino Uno
• webcam camera
• Raspberry Pi 3
• Buzzer
Software:
• (OpenCV)
• Alarm the owner if any unknown object detected by ring the siren
• Only suitable if owner is near the camera
• The alarm also may be cause by the owner itself
Similarities:
• Using recognition method Differences:
• Do not send the owner any notification
2017 Design of a
Completely Wireless Security Camera System [10]
The main goal of our design was to develop a network that allowed for the transmitting and receiving of images
Tools:
• the solar panel
• charge controller, battery
• MSP430
• SD memory card
• All devices are connected wireless
• Image that capture can be
• High cost to install
System not working if any power failure occurred.
Similarities:
• Wireless connection Differences:
10 Table 2.1: Literature Review
Joseph A Bosman, Ipek Ozil, Steven Olivieri, Brandon C.
Steacy
from camera nodes to a base station.
• PIR sensor
• the camera module
• EM 260 RCM
viewing at any time
• Does not have any image recognition
• Do not send any notification 2013
Human detection in surveillance videos and its applications - a review [7]
Manoranjan Paul, Shah
MEHaque & Subrata Chakraborty
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 - Motion-based method - Texture-based method
• The technique can be used to improve human detection process in security camera.
• hard to implement in a real project.
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 the output, we have an activation function such as Softmax or Sigmoid. [15]
25 3.7 Proof of Concept (POC)
3.7.1 Introduction
Proof of concept (POC) is an exercise in which work focuses on deciding whether it is possible to transform an idea into a reality. [15] The objective of proof of concept is to evaluate the feasibility of the idea or to test that the idea will function as envisioned.
3.7.2 Proof with existing project
Smart Motion Detection: Security System Using Raspberry PI by Zakaria Rada [9] is the example of function and real project that used notification to alert the owner in his project.
Other than that, Design Smart Home Security System Using Object Recognition and PIR Sensor written by Nico Suranthaa, Wingky R. Wicaksonob [6] show that the object recognition can be implement into security system successfully.
Thus, Security Camera with Image Recognition and Notification can be practically do as there are other projects that used notification and object detection method into their security system project.
26
Figure 3.9: Output expected for this project
Motion detected Camera capture
image
Image recognition engine
Notification to user by telegram Database
27
3.7.3 Installation of software. That will be used in this project.
1. PyCharm for programming language in Python and Raspberry Pi operating system.
Figure 3.10 Installation of PyCharm
Figure 3.11 Installation of Raspberry Pi
28 2. Telegram bot
Figure 3.12 Getting Telegram Bot Token
3.8 Summary
This chapter clarifies the methodology used for Surveillance Camera with Image Recognition and Notification, waterfall methodology. This iterative model is the most suitable methodology for this project as the next step are related to the previous step. The algorithms used in image recognition also stated in this chapter.
This chapter are very precious to the next chapter, Implementation and Design.
29 Chapter 4
IMPLEMENTATION AND RESULT
4.1 Introduction
This chapter will cover the implementation and the result of surveillance camera with image recognition and notification to guarantee that the product is developing
according to the main objective and meet the expectation.
4.2 Implementation of system
The implementation of this project start after the design phase finish. The programming and physical implementation will take place to create a well function product. The hardware first being setup according to the design and then the programming will take place. This surveillance camera with image recognition and notification was developed using python language.
30 4.2.1 Hardware setup
The main piece in this project is raspberry Pi 3 model B+ with the installation of Raspberry Pi operating system or before this being call Raspbian. The operating system has been installed in the SD card and put in the SD card slot in the side of the Raspberry Pi 3. The Raspberry pi also have build-in wireless LAN connectivity which enable this hardware to connect with WIFI. Raspberry Pi Camera v2, a high quality 8 megapixel need to be insert to the camera slot on the raspberry board. The PIR sensor then need to be connected to the bread board and attach to GPIO pin on the raspberry pi. The connection can be done using the jumper wired. To power on the hardware, connect the power bank to the mini USB power input in the raspberry pi 3.
Figure 4.1 Hardware setup based on the design.
31 4.2.2 Programming
To anable all the hardware and send notification via telegram, the
programming took place. This code allow the telegram to start the sensor to detect motion and trigger the camera to snap picture. The picture that will be store in a file and go through the image recognition algorithm. The picture snapped and the name of the object detected will be send to the telegram. In this project, the dataset for image recognition is very simple which is animal and human. Any other object will not be recognize and will be name as unidentifying object.
Figure 4.2 Raspberry Pi desktop
32
Figure 4.3 Code for this Project
4.3 Testing and Result
Figure 4.4 Telegram ‘on’ command to switch on the sensor.
33
The ‘on’ command will enable the sensor to detect any motion, if any motion detected, the camera will start capture picture.
Figure 4.5 Telegram Massage when Animal Detected
Figure 4.6 Telegram Massage when Human Detected
34
Figure 4.7 Telegram Massage when Unidentified Object Detected
Figure 4.8 All image will be save in a file
35
Figure 4.9 imagenew.jpg
Figure 4.10 image1new.jpg
36
All the image capture by the camera will be save in a folder name fyp. To display this folder, connect the raspberry pi 3 to a monitor via the HDMI port. The image captured will be save as image.png and the image after image recognition will be save as imagenew.png. If the image does not contain any human or animal, the image recognition algorithms will not create the new image file.
4.4 Summary
In this chapter, all the implementation process of the Surveillance Camera with Image Recognition and Notification were state clearly. The testing process and the result also can be viewed. The phase of implementation and testing, able to show the achievement of this project.
37 Chapter 5
CONCLUSION
5.1 Introduction
This chapter will discuss about the project contribution, project discussion, limitation and recommendation of Surveillance Camera with Image Recognition and
Notification.
5.2 Project Contribution
This project, Surveillance Camera with Image Recognition and Notification developed to improve the existing surveillance camera in the marker with the implementation of image recognition and notification. These two features are very useful in order to help user to be aware of the existing of intruder in their properties.
5.3 Project Discussion
The idea of this project is from the arising issues of the existing security camera that cannot prevent the threat or attack. This implementation of the image recognition and notification into security camera will help to solve this problem. The rapid growth of technology nowadays had made the IOT not anymore an expensive stuff. This project
38
is designed with low cost material but still can compete with overpriced security camera that exist in the market.
This project use a few hardware and software to function perfectly. The main hardware is Raspberry Pi 3 power by Raspberry PI operating system that being install in the SD card and connected with camera, PIR sensor, and power bank and also associated to Telegram via Internet. This project also used Python as the programming language and OpenCV and Tensor Flow to implement the CNN into the Raspberry PI.
Other than that, the methodology that be used to develop Security Camera with Image Recognition and Notification is Waterfall model. The step in each stage are specifically stated and will not overlap with the next or previous steps. The algorithm that be used in image recognition is Convolutional Neural Network, 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.
5.4 Limitation and Recommendation
This project is developed to help user to felt more secure and peace in mind. The image recognition and notification are very helpful to this project. However, this project has its own drawback which is the web camera will not capture the best image especially when the light is dim. The improvement can be done such as use more high resolution or Megapixel camera [18]. Other than that, the coverage for the sensor to detect motion is quite small, 5 meter. This can be improved by using a much more sensitive PIR sensor. Furthermore, the surveillance can be upgrade by adding more features to it such
39
as allow telegram command to record video and off the alarm when human detected near the camera.
5.5 Future work
The high demand of CCTV system for public spaces, business and homes today’s, drive the security companies to develop and adopt more advance features into the CCTV that more suitable and fulfil the requirement need by the users. These advancements such as camera with facial recognition software, door-screening process including biometrical authentication like fingerprints and retina scans will make the security system more secure and cannot be breach. Installing these unique trends into surveillance system will give the new era for security system.
5.6 Summary
As the conclusion, Surveillance Camera with Image Recognition and Notification is the best project to improve the existing security camera. This project will be a successfully function only if when all the step and requirement are followed. The existing project related to this project can be a good guidance in order to proof that this project can physically build.
40
REFERENCES
1. Gretchen Ruethling. (2006, June 3). 7 in a Family Are Killed; Police See a Robbery Link, New York Times, p. 1. Retrieved from https://www.nytimes.com/2006/06/03/us/03indianapolis.html
2. Simran Bansaru. (2019, FEB). CCTV Boom Has Failed To Slash Crime, Say Police, The Guardian, p.1. Introduction to how CNNs Work. Retrieved from https://medium.com/datadriveninvestor/introduction-to-how-cnns-work-
77e0e4cde99b
3. Sameerchand Pudaruth, Faugoo Indiwarsingh and Nandrakant Bhugun (2013). A Unified Intrusion Alert System Using Motion Detection and Face Recognition.
2nd International Conference On Machine Learning and Computer Science(imlcs'2013).
4. Suman Pandit, Shakyanand Kamble, Vinit Vasudevan (2015). Home Security Alarm System Using Arduino. Vidyalankar Institute of Technology Wadala (E), Mumbai - 400 037.
5. ] Danny Thakkar, 2015. Problems with Current Security Systems That You Should Know. https://www.bayometric.com/problems-current-security-systems/.
Accessed on 11 November 2020.
6. Nico Suranthaa, Wingky R. Wicaksonob (2018). Design Smart Home Security System Using Object Recognition and PIR Sensor. Procedia Computer Science 135 (2018) 465–472
41
7. Manoranjan Paul, Shah M E Haque & Subrata Chakraborty (2013). Human Detection in Surveillance Videos and Its Applications. EURASIP Journal On Advances in Signal Processing Volume 2013, Article Number: 176 (2013) 8. R F Rahman and I D Sumitra (2020). Realtime Notifications On Visitor Tracking
Systems Using Android and Arduino. IOP Conf. Ser.: Mater. Sci. Eng. 879 012062.
9. Zakaria Rada (2016). Smart Motion Detection: Security System Using Raspberry Pi. Journal Of The Engineering Research Institute Vol. 30. 1.
10. Joseph A Bosman, Ipek Ozil, Steven Olivieri, Brandon C. Steacy (2017). Design Of A Completely Wireless Security Camera System. University Of Limerick Limerick, Ireland
11. https://www.computerworld.com/article/2576450/app-development-system- development-life-cycle.html
12. OpenCV team. (2021, JANUARY) About OpenCV. Retrieved from https://opencv.org/about/. Accessed on 1 January 2021.
13. Tristan Greene. (2016, FEB). A beginner’s guide to AI: Computer vision and image
recognition, p.1. Retrieved from
https://medium.com/datadriveninvestor/introduction-to-how-cnns-work- 77e0e4cde99b. Accessed on 11 November 2020.
14. Mingyuan Xin and Yong Wang. (2019, FEBRUARY). Research on image classification model based on deep convolution neural network. Springer Open.
15. Nicola Basta (2020, April) The Differences between Sigmoid and Softmax Activation Functions. Retrieved from https://medium.com/arteos-ai/the-differences- between-sigmoid-and-softmax-activation-function-
42
12adee8cf322#:~:text=Softmax%20is%20used%20for%20multi,in%20the%20Log istic%20Regression%20model. Accessed on 1 January 2021.
16. Tech Target Contributor. (2018, November). Proof of Concept (POC). Retrieved from https://searchcio.techtarget.com/definition/proof-of-concept-POC. Accessed on 1 January 2021.
17. Lisa Johnston. (2020, June). What You Need to Know Before You Buy a Webcam Retrieved from https://www.lifewire.com/before-you-buy-a-webcam-2640480.
Accessed on 12 January 2021.
43 Appendix 1
Gantt chart
Semester 1 2020/2021
1 2 3 4 5 6 7 8 9 10 11 12 13 14 Final Year Project I
Briefing
Topic Discussion and Determination Discuss with supervisor
Submission of abstract and title
Proposal Writing and Discussion with supervisor
Preparation for Proposal Progress Presentation and Panel’s Evaluation Proposal Progress Presentation and Panel’s Evaluation
Workshop - Proof of Concept (POC) Methodology
44 Workshop- Final Year
Project Format Writing Drafting Report of Proposal
Submit Draft of Report to Supervisor
Preparation for Final Presentation and Final Report Submission Final Presentation and Panel’s Evaluation Final Report Submission and Supervisor’s
Evaluation
45 Appendix 2
Gantt chart
Semester 2 2020/2021
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Draft Report and
Documentation of the Project Project Meeting with
Supervisor
Project Development Preparation for Progress
Presentation and Panel’s Evaluation
Progress Presentation and Panel’s Evaluation
Project Testing
Final Year Project Format Writing Workshop
Submit Draft Report and Documentation of the Project
Submit Poster and Preparation for Final Presentation
46
Seminar/Final Presentation and Panel’s Evaluation
Final Thesis Submission and Supervisor’s Evaluation