KEMBAR78
A Project Report ON IOT and AI Based Automatic Lightning System | PDF | Internet Of Things
0% found this document useful (0 votes)
214 views57 pages

A Project Report ON IOT and AI Based Automatic Lightning System

This document is a project report on an IOT and AI based automatic lighting system submitted by four students - Qasim Ali, Mirza Abdul Basit Baig, Syeda Tahira Saleem, and Syeda Kashaf Zehra. The project aims to develop a smart lighting system for a university campus that uses sensors and image recognition to automatically control lights based on human presence without manual switching. The system will utilize solar power, ultrasonic sensors, a Raspberry Pi camera module, and a Node MCU microcontroller. This smart automation system will improve energy efficiency on campus by turning lights on only when needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
214 views57 pages

A Project Report ON IOT and AI Based Automatic Lightning System

This document is a project report on an IOT and AI based automatic lighting system submitted by four students - Qasim Ali, Mirza Abdul Basit Baig, Syeda Tahira Saleem, and Syeda Kashaf Zehra. The project aims to develop a smart lighting system for a university campus that uses sensors and image recognition to automatically control lights based on human presence without manual switching. The system will utilize solar power, ultrasonic sensors, a Raspberry Pi camera module, and a Node MCU microcontroller. This smart automation system will improve energy efficiency on campus by turning lights on only when needed.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 57

A PROJECT REPORT

ON

IOT and AI Based Automatic Lightning System.


SUBMITTED IN PARTIAL FULFILLMENT FOR AWARD OF
DEGREE OF BACHELOR OF SCIENCE IN COMPUTER SCIENCE
SUBMITTED TO
DEPARTMENT OF COMPUTER SCIENCE
ILMA UNIVERSITY
BY

QASIM ALI (BB-28094)


MIRZA ABDUL BASIT BAIG (BB-28099)
SYEDA KASHAF ZEHRA (BB-28285)
SYEDA TAHIRA SALEEM (BB-28293)

UNDER SUPERVSION OF

MR. AWAIS KHAN JUMANI

April 2021
Number of Group Members: 04

Student Name Student ID E-mail Mobile No:


Qasim Ali(Leader) BB-28094 syedqaa@gmail.com 03158541518
Syeda Kashaf Zehra BB-28285 kashaf032@gmail.com 03323554299
Syeda Tahira Saleem BB-28293 tahirasaleem428@gmail.com 03323329878
Mirza Abdul Basit Baig BB-28099 basitbaig1996@gmail.com 03111080852

i
Supervisor Allocation Certificate (SAC)
Department of Computer Sciences /

Software Engineering

Supervisor’s Name: Awais Khan Jumani Session: Spring 2021

Project Code & Title:CS499 / Final Year Project 02 (Implementation)

Credit hrs:03

Project Title: IOT and AI Based Automatic Lightning System

Project Duration:15th February – 10th April 2021

Group Member’s Name Student ID

Qasim Ali (Leader) BB-28094


Syeda Kashaf Zehra BB-28285
Syeda Tahira Saleem BB-28293
Mirza Abdul Basit Baig BB-28099

Recommendation by Supervisor:

Recommended: Not Recommended:

Signatures:

SUPERVISOR H.O.D

Date: __________________

ii
ILMA UNIVERSITY

STATEMENT OF PROJRCT APPROVAL

The Final Year Project of_ Qasim Ali, Syeda Kashaf Zehra, Syeda Tahira
Saleem , Mirza Abdul Basit Baig_____________________

Has been approved by the following supervisory committee members:

_______________Dr. Waheed uddin Hyder_____________, HoD

Mr. Waqas Ahmed Siddiqui, Mr. Awais Khan Jumani, Member

And by Prof. Dr. Asad Ali Shaikh_______________________, Dean of

The Department of__________Computer Science___________________

iii
ACKNOWLEDGEMENT

First of All, I would like to thank Our Supervisor MR. AWAIS KHAN JUMANI,
whose valuable guidance and sincerity has been helped us to make successful patch
and his instruction served as major contribution for completion of this project. Then
we wish to express thanks to Prof. Dr. Asad Ali Shaikh, Dean of faculty of
Computer Science and Mr.Waheed uddin Hyder head of teaching department
Computer Science, for providing us all necessary facilities for research.

We also want to thank all of the department's faculty members for their assistance and
encouragement. We also want to express our gratitude to our parents for their
encouragement and guidance. We also thanks to those people who directly or
indirectly involve in this venture.

Last But Not Least we also grateful to our Team members who took responsibilities
throughout this venture.

iv
Declaration of Originality

We, (Qasim Ali, Mirza Abdul Basit Baig, Syeda Tahira Saleem, Syeda Kashaf
Zehra),hereby declare that the material presented in the project represents original work
carried out by us and we certify that,

a) We haven't tampered with any of the data or outcomes.


b) We haven't plagiarized any intellectual property.
c) Others' efforts have been explicitly acknowledged and cited.
d) Both joint studies and debates have been expressly recognised.
e) Any false allegation will result in serious disciplinary action, we understand.
f) We recognize that the study should be screened for academic misconduct of some
sort.

1) Member Name: Qasim Ali


Student ID: BB-28094
Signature: ______________________________________
Date: __________________________________________

2) Member Name: Mirza Abdul Basit Baig


Student ID: BB-28099
Signature: ______________________________________
Date: __________________________________________

3) Member Name: Syeda Tahira Saleem


Student ID: BB-28293
Signature: ______________________________________
Date: __________________________________________

4) Member Name: Syeda Kashaf Zehra


Student ID: BB-28285
Signature: ______________________________________
Date: __________________________________________

v
Abstract

In this computerized age human existence is getting more straightforward as nearly


everything is programmed changing old methods of energy. These days the web has
become a basic piece of one's every day existence without them being vulnerable. In
this venture (IOT) gives a stage where gadgets can be associated, sounded and
distantly controlled from infrastructure. The (IOT) gadgets controls and screens the
electronic, electrical and the mechanical frameworks that are to work in a grounds. At
colleges around the world making a shrewd ground is picking up importance. This is a
reaction to the inexorably powerful utilization of the grounds and the tension on assets:
energy, monetary and HR. The college network has gotten more portable understudy
numbers more capricious and financing more dubious. This examination is led in
shrewd cards keen study hall computerization. Perception and writing considers were
applied as the examination technique with the connected topic for framework plan of
brilliant grounds. The task includes a card which contains a standardized tag which is
only an exceptional card that is appointed to the understudy. This card is valuable for
the understudy in spots like library, section entryway and labs. The sharp guidance will
allow understudy to use ICT later on to work suitably. The significant aptitudes are
transforming into the collaboration through Internet the ability to work with a colossal
game plan of data. The basic effect is the ability to unite the undertakings of numerous
people to make new data. The keen mechanization framework will control lighting
specifically region of study hall dependent on the presence of human utilizing transfer
control contrasted with the one put in roof which would turn on or off dependent on
presence of human in room independent of position.
The University perspective is changing from the standard model through the e-sorting
out some way to the Smart Education. The capacity of universities is changing from
the data dealer or guide through the data generator to the facilitator for understudies
self-learning. The splendid preparing can give another school where the course of
action of ICT and labor force prompts a totally new nature of the cycles and
aftereffects of the educational, investigation, business and other school exercises.

vi
Table of Contents

CHAPTER1.....................................................................................................................1

1.1 Overview...........................................................................................................1

1.2 Introduction.......................................................................................................2

1.3 Smart Devices:..................................................................................................7

1.4 Problem Statement:-..........................................................................................7

1.5 Project Scope:-..................................................................................................8

1.6 Aims & Objectives:...........................................................................................9

1.7 Summary of Introduction:...................................................................................10

CHAPTER2...................................................................................................................11

LITERATURE REVIEW..........................................................................................11

2.1 Summary of Literature Review:..........................................................................16

CHAPTER3...................................................................................................................17

METHODOLOGY........................................................................................................17

3.1 SOLAR SYSTEM LIGHT CONTROLLING:-..............................................18

3.2 ULTRASONIC SENSOR:..............................................................................18

3.3 FACE RECOGNITION THROUGH PICAM:...............................................18

3.4 RASPBERRY PICAM MODULE:................................................................19

3.5 NODE MCU:..................................................................................................19

3.6 Raspberry Pi:...................................................................................................20

3.7 Summary of Methodology:.............................................................................21

CHAPTER4...................................................................................................................22

RESULT........................................................................................................................22

4.1 Summary of Result:........................................................................................22

Result of Face Recognition:........................................................................................24

CHAPTER5...................................................................................................................26

vii
CONCLUSION..........................................................................................................26

5.1 FUTURE RECOMMENDATION:................................................................26

5.2 LIMITATION:................................................................................................27

REFERENCES..........................................................................................................44

List of Figures: Pages

Figure 2.1 Shows Block Diagram of Solar Battery Charger------------------------17

Figure 3.1 Shows Use Case Diagram of Smart Campus ----------------------------18

Figure 3.2 Shows Ultrasonic Sensor----------------------------------------------------19

Figure 3.3 Shows Raspberry Pi Cam---------------------------------------------------20

Figure 3.4 Shows Node MCU-----------------------------------------------------------21

Figure 3.5 Shows Raspberry Pi---------------------------------------------------------22

Figure 4.1 Shows Camera----------------------------------------------------------------24

Figure 4.2 (a) Shows Face Identification-----------------------------------------------25

Figure 4.2 (b) Shows Face Identification-----------------------------------------------25

Figure 4.3 MySQL Database ------------------------------------------------------------26

Figure 4.4 Back-End Interface-----------------------------------------------------------26

viii
Figure 4.5 Shows Flowchart of Facial Recognition Attendance System-----------31

Figure 4.6 Shows Flow chart of Automatic Street Light------------------------------32

ix
CHAPTER1
INTRODUCTION

1.1Overview
The state of higher education lies at crossroads of amazing digital roads. With its
focus on academic research, higher education often produces graduates with little to
no practical skills, leaving them vulnerable to exploitation. This is where a digital
campus, also known as a smart campus, will help to change people's lives.
Innovative organizations understand the value of achieving real progress through
technology that allows for a non-conflict, non-impact, and accurate experience
fueled by a digitally connected culture. Students are consumers and customers
empowered to choose. Armed with public awareness today's student selection is
based on purpose, value, and knowledge. For this reason institutions need to rethink
their goals and rebuild how they move forward using development that other
sectors have become accustomed to Colleges and universities must promote
effective partnerships and promote positive outcomes built on new practices that
use emerging technologies to improve consumer knowledge. Position and staff also
anticipate a digital workplace that allows them to focus on activities that have a
purpose that works for a real purpose and encourages campus deployment. Both of
these changes may require institutions to be digitally connected. We recognize that
higher education campuses are workplace and for this reason using smart
campus techniques can improve knowledge of students, faculty, administrators,
researchers, practitioners, and communities.

1
1.2 Introduction
Colleges have assumed a vital part during time spent financial development, as both a
wellspring of new information and a coach of researchers and architects who work in
mechanical labs. Colleges are viewed as main strength of Pakistan. Public
development framework inquiry surveyed in this paper is whether monetary impacts of
college research are excessively neighborhood. Are nearby economies more
Prosperous in event that they have an exploration college how significant is having an
exploration college to financial development and advancement in a city or area [2]?
Shrewd Campus is aftereffect of quick progression of GIS advancement PC network
development and web of things advancement. It has three focus characteristics:
tweaked organizations, information organizations, atmosphere stages. Considerations
of building shrewd grounds relied upon Internet of Things and utilized advanced
information development to execute application structure, which relied upon electronic
atmosphere. It draws maintain from coordination and blend of utilization organizations
to comprehend grounds information acquirement, sharing and organizations to propel
information pattern of instructing, consistent investigation and organizations [9].
With improvement of shrewd colleges in Pakistan, establishment advancement and
consolidated organization of grounds are defied with extraordinary challenges. For
example, establishments are going up against improvement issues and expansions.
Nevertheless, fundamental data of school establishments exist various issues for
instance long time length non-appearance of intelligent organization and so forth .All
of these issues for school system improvement and upkeep experience brought various
difficulties. Therefore, a more reasonable, natural, and careful current organization
advancement is required to improve school chief’s level sharp grounds advancement
can meet need of information heads in schools and universities [10].
IoT “Internet of Things” change has allowed that any device can be related through
web; for instance cameras, sensors, development locaters, wearable etc. This produces
tremendous volumes of information that must be gotten, coordinated and taken care of.
Assessment adventures in establishment produces gigantic volumes of data that in
wake of being readied make important information to serve school and overall
population when in doubt. Each school requires an all-around valuable system
designing that can unite vaults with heterogeneous data, as it is circumstance of this

2
investigation venture [11]. Structure must be of generally helpful in which information
or assessment results can be 2 gotten to allowing maltreatment of information by
organizations and new specialists. Feature that information won't simply be available
to school's area “people” regardless, when it is taken care of it will follow Open Data
thinking and it will in general be gotten to thusly “machines”. Each school requires an
all-around helpful system plan that can solidify stores with heterogeneous data, as it is
circumstance of this assessment adventures. Structure must be of comprehensively
valuable in which information or investigation results can be 2 gotten to allowing
maltreatment of information by organizations and new specialists. Feature that
information won't simply be available to school's area “people” regardless when it is
readied it will follow Open Data hypothesis and it might be gotten to therefore
“machines”[12].
Over latest twenty years, "keen college" has gotten progressively more popular in
legitimate composition and worldwide courses of action. To fathom this thought it is
basic to see why metropolitan networks are seen as key segments for what's to come.
Metropolitan people group expect a prime part in social and monetary points of view
far and wide, and huge influence atmosphere “Mori and Christodoulou, 2012”[15, 16].
Educational grounds, fundamentally for people who are depended upon to be busy
with insightful headway data creation and coordinating social requests for better living
could in like manner typify guidelines of a keen ground. A normal keen ground would
have three segments: establishment, errands and, clearly people. All of these sections
would be saturated with knowledge yet more fundamentally they would work in an
interconnected and composed way to utilize resources viably. Such a ground could
combine 'Inevitable destiny of Internet' including Internet of Things and sensor propels
as guideline facilitators of sharp establishment [19].
To some degree, grounds can be seen as scaled down model of "Colleges" raising
similar issues and stresses of a more unobtrusive organic framework. This is an
outstanding event to set up one Campus as reference model for improving nature of
organization living yet likewise maintain innovativeness and interdisciplinary
collaboration in examination. It may ascend as show off and replicable model across
other enlightening grounds in country.

3
1. Grounds Life: How to make grounds ensured, secure, green, decrease uproar
and air pollution, ensure upkeep of grounds and its structures, make it
weakened all around arranged etc. In this development dynamic participation
of understudies would be useful and appealing. It very well may be ideal if a
SOP can be shown up for action and upkeep of grounds establishment and
organizations. Mechanized cleaning should be introduced expeditiously in all
open zones to reduce buildup tainting.
2. Water and Power Audits: This will help us with recognizing potential zones
where venture assets can be made in these inadequate resources inside
Campuses.
3. Review/Modify information stream: Procedures should be changed to reduce
time taken in seeking after supports etc. All correspondences ought to finally
be in electronic mode to get a good deal on paper, work, and space and to make
information recuperation speedier. Another issue of concern is portraying “in
open space” all emergency techniques. Emergency issues could be related to
security and thefts, fire, well being related emergency, water logging or
extraordinary blockages etc.
4. Waste Treatment and Management: Sewerage treatment is an out and out need
both to address issue of waste water board and to make treated water usable for
development “and if useful for toilets” available. This would help with keeping
up green patches in Institute. Solid waste organization needs also to be
explored.
5. Rearranging where required: Engagement of a specialist firm to address issue
of restrooms and drinking water.

Types of progress in field of splendid grounds are not a disengaged case. In particular
enhancements occur inside overall population and are affected by designs inside that
society. Additionally to make added regard consideration should be on insightful
school atmosphere instead of simply on used advancement. Thirdly setting up sharp
conditions to help more established and weakened individuals has immense potential.
To live up totally to longings is at any rate a staggering measure which incorporates
various accomplices. Keen ground is blend of advancement and organizations through
home frameworks organization for a

4
predominant nature of living. An incredible arrangement head ways related to
Smart universities are creating.
Savvy University similarly gives some energy capability speculation reserves.
Since systems like Z-Wave and ZigBee put a couple of devices at a reduced level
of value they can go to "rest" and stir when requests are given. Electric bills go
down when lights are normally killed when an individual leaves investigation
lobby and homerooms can be warmed or cooled reliant on who's there at some
irregular second.
The use of face recognition for attendance marking is a clever way of
implementing an attendance management scheme. Face recognition, among other
methods, is more reliable and quicker, and it decreases the risk of proxy
attendance. Face recognition allows for passive identification, which ensures that
the person being recognised does not have to take any action in order to be
identified. Face recognition consists of two steps: the first is the detection of faces,
and the second is the identification of those identified face images against a
database. Face detection and recognition techniques have been introduced in a
variety of ways. Face recognition can be either appearance-based (covering all
aspects of the entire face) or feature-based (covering geometric features) to identify
the face, such as the eyes, nose, eye brows, and cheeks. [42]
Visual recognition methods using facial recognition can also see a person remotely,
without contact or contact. Face recognition techniques are currently used on social
networking websites such as Facebook, airports, train stations. The in criminal
investigation. Face recognition may be used in criminal records, with the recorded
image being retained in a database and used to recognize an individual. Face
recognition is used by Facebook to build a tagging scheme. To identify a person in
all contexts, such as changes in lighting, age, posture, and so on, we need a broad
database and complex features. Recent research suggests that there is an
improvement in face recognition systems. Over the past decade there have been
major advances in recognition strategies. But at present most face recognition
techniques can only work effectively if the population in a single frame is very
small and under a controlled light, facial expressions and vivid images. Large data
sets and complex features are needed for face recognition in order to distinguish
different subjects by regulating various barriers such as lighting, posture, and

5
ageing. Face recognition technologies have seen major advancements in the last
few years.. Compared to the last decade, one can see the world's greatest advances
in facial recognition. Currently, most face recognition systems work well with
face-mounted frames. In addition, these methods have been tested under controlled
lighting conditions, proper facial expressions a nd blurred images. The proposed
face recognition system in this viewing paper can detect multiple faces in a frame
without the control of light, facial expressions. [43]
Face recognition is among the foremost productive photographic applications and
plays a very important role within the field of technology. Face recognition could
be a sensible drawback for verification functions particularly within the context of
student attending. The Attended system uses face recognition method through
student recognition through face bio statistics supported high-
definition observation and alternative pc technologies. The event of this
method aims to implement a standard pc capture system by taking computers by
name and keeping records in a very pen. Existing artistic techniques ar tedious
and long. Travel records are simply utilized by hand recording. The
standard method of creating it attainable and current biometric systems is at stake
in proxies. This paper is thus projected to deal with all of those problems.
The projected system uses Haar classifiers, KNN, CNN, SVM, Generative
adversarial network, and physicist filters. Once face recognition
the attending reports are going to be generated and keep in an impressive format.
The system is tested below numerous conditions like lighting, head movement,
distance variation between the scholar and also the cameras. Once the calculation
of the hardness of the hardness and accuracy. The projected Program has
become an efficient and sturdy tool for schoolroom participation while
not trifling and workmanship. The designed system is
expensive and needs marginal installation [51].

6
1.3Smart Devices:

The transcendence of sharp University devices, which can be tweaked to do nearly


anything, is with ultimate objective that purchasers purchase and use them without
smallest delay. Starting at now, there are essentially no machines in home that are not
open with some degree of robotization. Mix of motorization and programmability with
mechanized thinking is ensuing stage in progression of home robotization structure.
People who are more seasoned or impeded preferred position most from a home
computerization structure that uses man-made mental ability. These systems offer
people who are less convenient or in delicate prosperity event to be free instead of
staying in a helped living office. Arranging a Smart school is also incredibly
significant. This can be extraordinary; amassing a school plan that reflects your taste
yet in like manner meets your prerequisites and spending plan is a troublesome
exercise that takes organizing.
A capability is described between school research that transforms as really merged into
new present day things/cycles and advances in crucial sensible arrangement that may
unavoidably effect sly influence development anyway do as such in wake of
convergence various disciplinary and industry limits. School research that is of an
essential sort and requires broad time intervals before totally adding to advancement is
likely going to have diffuse financial impacts, most of which will accumulate outside
of area.[22]

1.4Problem Statement:-
Universities are developing and packing in understudies. Obviously that messes up
particularly in arising Colleges. Simultaneously, business likewise amasses in colleges.
Understudies of colleges face numerous issues understudies as well as organization
staff, scientists and educators anyway they don't think that it’s solid without carefully
associated.
Shrewd grounds consistently assume a significant part in building eventual fate of
nation just as understudies. A keen ground is in excess of a framework or assortment
of uses stages or foundations that are being utilized in a soloed way around grounds.
Around globe there are about 5% of colleges which are changing themselves into keen
grounds. Without shrewd grounds one cannot have option to give results viably.

7
The proceeded with development in college populace is constraining extension of
college grounds. Both genuinely and expansion ally as assets need to cover
requirements of their individuals To address these issues, it is essential to set up a
framework that permits understudies to live with a climate in which issues of
worldwide concern are being raised, for example, manageability. College grounds that
you don't have a characterized plan, which incorporates rules and strategies that take
into consideration appropriate administration monetary, social and natural variables,
influence learning advancement. To take care of these issues, college grounds take a
gander at gadgets of IOT. Contemplation's made are that University grounds normally
have their own PC foundation that permits them to create and store a lot of
information, which are utilized by and large. Having a valuable speaker for all
frameworks that oversee information securing and investigation in a private cloud
climate is useful learning board and coordinated effort between college individuals and
ICT. This cycle, notwithstanding guaranteeing progression in training frameworks, it
takes into account a college populace interfacing with climate and improving
conditions for solace, security and dynamic. Test for information researchers is to
coordinate all information produced into instructive frameworks, monetary
frameworks, business assets arranging, learning board frameworks, security
frameworks, tactile frameworks and actuators, among others. A bit of basic features of
quite an insightful grounds are: Smart development engaged automation ,Integrated
organizations by methods for dashboards , Energy and water capability “Smart
scattering structures, sharp meters, etc.” , Foster creative mind and headway by
methods for participation.
Keen University in like manner gives some energy capability speculation reserves.
Since structures like Z-Wave and ZigBee put a couple of contraptions at a reduced
level of value, they can go to "rest" and stir when requests are given. Electric bills go
down when lights are normally killed when an individual leaves examination corridor,
and homerooms can be warmed or cooled reliant on who's there at some arbitrary
second.

1.5Project Scope:-
The main aim of this project is to develop a framework that uses face recognition
technology to simplify and automate the process of documenting and monitoring

8
students' movements. Biometrics is a technique for identifying or verifying an
individual based on a digital image. We want to make an electronic attendance
mechanism which can obsolete the manual attendance mechanism, we will place the
Face recognition device on the main entrance by which student can mark their
attendance and their attendance will be saved in database, if someone would be absent
then the text message will be generated by the device to send their parents so that we
can notify the guardians if their child is absent, moreover we will use automatic
lighting system for which we will place censor, the censor will detect the presence of
human in the classroom, if someone will enter in the classroom the lights and fan will
be turned on and when they leave the classroom the lights and fans will be turned off,
the purpose behind this is to save the consumption of electricity and reduce the cost of
electric bills. This project can play a vital role for saving the electricity while
electronic attendance system can be helpful to provide relief to the teachers for not
maintaining the attendance file. After successful completion of this project we can
implement this in schools, colleges, and offices and as well as everyone wants to save
the electricity and reduce the cost of electric bills.

1.6 Aims & Objectives:


1. Discovering a unique facial image among other natural objects such as walls,
Background etc.
2. The removal of different facial features that is useful in facial recognition.
Automatic update to database without human intervention.
3. Design an information base that supports such a framework that has been
referenced before.
4. Build an energy sparing savvy lighting framework with coordinated sensors
and regulators.
5. Design a shrewd lighting framework with particular methodology plan, which
makes framework versatility and expand ability.
6. Solar boards are anything but difficult to introduce, for most part requiring a
couple of jolts to keep them make sure about and have a fundamental rope. Sun
powered energy frameworks can accuse less of straightforward establishment.
However, low-voltage direct flow is a lot more secure to use than ordinary
power.

9
7. Most current galaxies utilize a reinforcement battery that can hold over three
days of intensity expected to keep framework running. Thu sly, when sun rises,
you will in any cases has power for a couple of days.

1.7 Summary of Introduction:

This project can play a vital role for saving the electricity while electronic attendance
system can be helpful to provide relief to the teachers for not maintaining the
attendance file. After successful completion of this project we can implement this in
schools, colleges, and offices and as well as everyone wants to save the electricity and
reduce the cost of electric bills.

10
CHAPTER2
LITERATURE REVIEW
Binyam Tesfahun Liyew [45] was discovered that they an automated monitoring
system for face recognition in the real-world real-time with a database of student
information using the Personal Component Analysis (PCA) algorithm. This task is
very difficult as removing the background image from the image is still a challenge.
Also, managing a student database with a lot of information is also a challenge for the
system. The implementation of the program by involving three main phases, which
includes the discovery of the facial region, the removal of the image, and the
identification of the face. Before the feature removal process, everything input images
are extracted and converted from RGB to gray images. After that, the program starts
histogram matching to enhance the image and then the image is re-sized so that all
images are the same size. One of the operations of the system will send an SMS to
some parents when the number of students became lower mandatory rate. The
Euclidean distance is used to calculate the distance between two images at the same
time the process by which an extracted image is compared to an image in the database.
After that the system shows the result accepted or rejected based on threshold.

Samridhi Dev [46] was discovered that a convolutional neural network-based


automated framework the produced attendance report was sent to an approved
individual using the GSM module by the author. By applying two normalization
operations to two of the layers, the author proposes an updated convolution neural
network. The network's batch normalization is accelerated with this process. The SIFT
algorithm was used to construct the face recognition system. MATLAB will be used to
take attendance in this system. The picture will be taken and compared to the database,
after which an SMS will be sent to the approved number. Scale-space extreme
detection, key-point localization, orientation assignment, and key-point descriptor are
the major steps in this method for generating features. The Arduino board's LED will
begin blinking as soon as the machine recognizes the face. The probability-based Face
Mask Pre-Filtering (PFMPF) and the pixel-based hierarchical Feature Ad boosting
(PBHFA) methods were used in the author's two-stage hybrid face detection scheme.
The aim of this approach is to solve the Haar cascade problem. A framework was
proposed by the author there are two phases to this project: preparation and research.

11
They presented two key steps during the training process. The first is face recognition,
which they accomplished with the aid of the viola Jones algorithm. After detecting
faces from a video, the second stage, feature extraction, is performed using the PCA
algorithm. The data set is divided into two sections during the testing phase: training
data set and test data set.

Samuel Lukas [47] was discovered that the quantity of highlights in any facial
understudy picture is rendered to be consistent, for example 16 DCT coefficient, in the
Student Attendance System in Classroom Using Face Recognition Technique.
Grayscale standardization, histogram balance, Discrete Wavelet Transform (DWT),
and Discrete Cosine Transform are all completed as part of the process (DCT). A
closer look at the dissatisfaction in perceiving the rest of the facial images reveals that
an understudy may be the culprit by considering the all-out degree of recognition as a
consequence of the inquiry that does not meet exclusive criteria, students are viewed as
other students.

Daljit Kaur Rahsi [48] A variety of face recognition algorithms have been proposed in
the last decade, but the majority of these works only deal with a single face picture at a
time. Our method solves the problem of face detection and improves the accuracy of
face recognition by continuously observing face information.
The various face recognition methods are as follows: A tool based on knowledge that
identifies the relationship between facial features. The aim of the feature invariant
method is to discover structural features of a face. The template matching method
defines many common patterns, while the appearance-based method captures the facial
appearance.
Face recognition methods include a holistic method that uses Principal Component
Analysis and Linear Discriminate Analysis to recognize the whole face, as well as a
feature-based approach that detects local features on the face such as the nose and
eyes.

Chiagozie [8] was discovered that there are six degrees of "briskness" showed through
method of methods for Smart Universities: adaptation, sensing “care”, determining
“legitimate reasoning”, self-mastering, anticipation, and self-connection and
restructuring that's portrayed as a canny school's "capability to positively modify its
endeavor limits, training/dominating procedures, administrative, prosperity, physical,

12
social and uncommon attributes to entirety of substantially more likely compositions
and play out its basic venture capacities".
Correspondingly Vinod Kumar[1] was discovered that E-Governance for Smart Cities
expresses that idea of sharp colleges isn't new; be that since it might, beginning and
joining of ongoing enhancements make it earnestly inventive. Eventual outcomes of
examination of related works found that with inside Sustainability.
Correspondingly Khem Puthea [44] The program has a simple construction that uses
only two cameras installed the wall of the section. The first camera is a shooting
camera used to take a picture of a student in class and second camera sensor used to
locate a student seat inside the classroom with an attractive camera will drive the
student picture. The program then compares the image from the file to includes
camera and photos in the database. This process it is done over and over again to
complete the process of marking those present.
Correspondingly Ahmed V. [2] was discovered that Characteristic Features of
University Campuses By considering a school grounds as a little city, it fills in as a
check sleeping cushion for blending of techniques that make up a shrewd grounds.
This thought licenses personality of capacity elements of a ground essentially
dependent on ones of a city. For instance:
Correspondingly Kassim M [9] was discovered that one of basic issues going up
against University grounds is certificate of unconventionality of cycles that happen
inside their cutoff focuses, and of their well-known area of closest effect. Implied
"complexity science" is seen in general part of psyche concerning self-various leveled
limit and adaptable idea of a couple of erratic systems. Complex structures contain air,
work natural systems economy, and for this circumstance, University grounds.
A. Kuncan [19] was discovered that the University range among themselves because
of their land territory, their academic occupations, or their financial structure. At same
time, out and out unprecedented territories exist by and large inside every University
more noteworthy fragile and different elements of a ground more prominent
unprecedented administrators drew in with them will be. On off risk that measurement
issue is conveyed to this condition, at that factor more prominent extraordinary
measurements and useful complexity more prominent vital measure of specialists that
must be checked while characterizing procedures.

13
K. Ding [20] was discovered that IoT permits records to be situated away at web,
because of network that various gadgets and sensors have. This record is taken care of,
and outcomes permit assessments or control of various conditions. Inside a shrewd
ground this idea is set aside however from a more noteworthy minor viewpoint. This
issue has alternatives with respect to taking care of and control of records. In this work,
current realities of conspicuous huge number of noticeable sections of schools is basic
for an inside company and are situated away in a worker ranch system in which top
notch substantial qualities for capacity and preparing of records are given colleges has
facilitated a few structures mulled over as a trait of IoT, and those structures get
records on games and exercises which are a day by day a piece of college life. Among
those are: Literature covers various implications of a Smart Campus, which by and
large help 3 explicit features as center characteristics those being specially crafted
organizations, records organizations, and natural reaches. Likewise, a Smart Campus is
an unavoidable example with inside improvement of muddled colleges and requires
coordination of those highlights.
Nainan S [3] has found that Classroom Automation System transforming into
celebrated lately with inside worldwide and its stop clients are especially impaired and
matured anyway due to their unpredictability and expense it isn't in every case
continually acknowledged. Populace getting more seasoned is taking area in practically
entirety of countries of worldwide. Maturing outcomes from bringing down mortality,
and greatest critically, declining richness. This technique brings about a general rebate
in portion of children and to a blast in level of people with inside overwhelming
running ages.
P. Robbins [30] A digital computer, an Arduino UNO board, light detecting resistors, a
temperature sensor light, fans, and an air conditioner control system make up the
majority of the hardware.
Downloaded from Google [21] An Arduino board comprises of an Atmel 8-, 16-or 32-
bit AVR micro controller with integral segments which helps in programming and
other circuit consolidation. This board has a 5 volt straight controller and a 16 MHz
gem oscillator. Motion sensor is a special type of sensors which detect human
movement and after detecting human presence it switch on/off lights and fans.
Downloaded from Google [22] it is an exceptional kind of resistor that has a “variable”
obstruction that changes with light power that falls upon it. This permits them to be

14
utilized in light detecting circuits. A Temperature Sensor is instrumentation gear which
is utilized to gauge temperature or warmth on working machine part. Temperature
detecting is performed by hardware called Thermocouple. A thermocouple is a
temperature-estimating gadget comprising of two disparate conductors that reach each
other at least one focuses.
Downloaded from Google [31] the despite reality that we cannot utilize profundity of
sun based round evening or on tempestuous obscure days etc. We will rely on sunlight
based being there resulting day coordinated to offer us more noteworthy power and
light. Anyway protracted we have sunlight based we will have sun oriented controlled
power “and at day that we at this factor don't have sun based, you could get that we can
right now don't have ourselves all things considered”. Of course overall population
cross section which utilizes oil isn't reasonable. At whatever point it miles gone miles
no more prominent. In fact we can likewise moreover discover some other flexibly to
tap, yet that gracefully can likewise also run out too.
Downloaded from Google [29] Daylight based power has for quite a while been used
in conditions where electrical power from public organization is distant, for instance,
in faraway district power age. Obviously furthermore invigorating, from numerous
perspectives, is use of sun situated power in natural shock tries over globe. As per the
Solar Electric Light Fund “SELF” two billion people are starting at now living without
permission to control, by far most of who rely upon light fuel to light night. Whether
or not it were serviceable for these people to pay immense totals fundamental for
system expansion, two billion more prominent force buyers would affect sly influence
overall fuel costs, and would aggravate regular crisis sadly. One essential, viable plan
is being examined by various affiliations wherever on world and this is sun based
power. For public organization, running of electrical wires over a critical distance to
far away zones and besides foundation of power plants is irksome. One of most critical
and away from of sun based power has reliably been that it can give power where
public structure can't reach.

15
Figure 2.1 Block Diagram of Solar Battery Charger

In fig 2.1 Sunlight principally based absolutely cells require ensuing to no upkeep
“they haven't any moving parts that should be fixed”, they're whatever anyway difficult
to safeguard strolling and that they keep up going pretty some time. Daylight
essentially based thoroughly power “sunlight based orientated cells” is intense, that it
is presently not, at this point absurd to disappear an untended load up with inside
relinquish and expect that it should artworks for pretty an extended time. Sun basically
based absolutely can works of art long take with without a doubt NO establishment –
no roads, no specialists, no contraptions, and incredibly no grid [32].

2.1 Summary of Literature Review:


In this chapter we discussed different authors contribution so some author did a
RFID based attendance system.Some authors worked on Iris based attendance
system.Some used PIR for sense motion(human has moved in or out).Some used
LDR for street light.Every author did a great work by utilizing different
techniques..

16
CHAPTER3
METHODOLOGY
This endeavor uses various sensors, a couple of sensors like soil moistness sensor,
ultrasonic sensor and cameras are related with an essential processor which is Arduino
and remaining application sensors like IR sensors mic and others are related with
Arduino processor, sensors will establish a connection with rule processor for its fitting
working at impetus stage and processor will perceive its present. Each sensor sends
information to crucial module which either saves information into a data base or it
essentially proceeds with vital movement, information to be saved is dispatched off
Cloud/Local worker what's more, reasonable action or limit that is done is also saved
depending upon sort of data. For limits like Smart cup and Smart library which can be
gotten to by understudies will be worked using PDA application. Device that relates
android application and cloud will Arduino ability known as FLASK. Each time
understudies sales will be taken care of and invigorated in data base

Figure 3.1 Use case diagram of smart campus

17
3.1 SOLAR SYSTEM LIGHT CONTROLLING:-
Energy is an extraordinary variable that its security is of essential excitement to
draftsmen inside flow memory. As we no doubt on mindful, guideline of upkeep of
solidarity communicates that strength can now be made nor crushed, yet it tends to be
changed start with one shape then onto following. An assistant in reasonable use and
inclusion of customary resources. This test goes after power age from sunlight
fundamentally based thoroughly flexibly is a structure that guides this strength
substitute and ability to gracefully power [33].

3.2 ULTRASONIC SENSOR:


Associate in nursing device that measures the space of a target object by emitting
unbearable sound waves and converting the reflected sound into an electrical signal is
known as an unbearable sensing feature. Unheard waves propagate at a faster rate than
audible sound (i.e. the sound that humans will hear).

Figure 3.2 Ultrasonic Sensor

3.3 FACE RECOGNITION THROUGH PICAM:


This project calls for a Raspberry Pi B+, a Raspberry Pi camera, a push button switch,
a relay, and a few other bits and pieces.

Face images are taken with the Raspberry Pi camera and stored in an incredibly large
database on the Raspberry Pi. Place yourself in front of the Pi camera and press the
pushbutton switch to capture your face picture. S1 the picture of your face can be
stored in the data. The next time you face the Pi camera and click S1, your face will be
remembered, relay RL1 will be energized, and your electrical load/solenoid will be
turned on.

18
3.4RASPBERRY PICAM MODULE:
In the Gregorian calendar month of 2016, the Raspberry Pi Camera Module v2
replaced the original Camera Module. A Sony IMX219 8-megapixel sensing element is
used in the v2 Camera Module (compared to the 5-megapixel Omni Vision OV5647
sensing element of the first camera).
The Camera Module can be used to capture both high-definition video and still images.
It is easy to use for beginners, but it has a lot to offer experienced users who want to
extend their knowledge. On the internet, there are several reports of people using it for
time-lapse, slow-motion, and other video tricks. To build results, you can also use the
libraries that come bundled with the camera.

Figure 3.3 Raspberry Pi Cam

3.5NODE MCU:
The Node MCU (Node Micro Controller Unit) is an ASCII text file programme and
hardware development environment built around the ESP8266, an inexpensive Device
on a Chip (SoC). The ESP8266, developed and manufactured by Express if Systems,
includes all of the necessary computer parts, including a CPU, RAM, networking
(WiFi), and even a modern kit and SDK. As a result, it's an excellent choice for
Internet of Things (IoT) devices of all kinds.
The ESP8266, however, is also difficult to access and use as a chip. For the best
functions, such as turning it on or sending a keystroke to the chip's "machine," you'll
need to solder wires with the required analogue voltage to its pins. You will also need
to program it in low-level system directions that the chip hardware may obey. The

19
ESP8266 as an embedded controller contributes factory-made physical science, so this
degree of integration isn't feasible. It's a significant burden for hobbyists, hackers, or
students who want to play with it in their own IoT devices.

Figure 3.4 Node MCU

3.6Raspberry Pi:
In comparison to the previous-generation Raspberry Pi three B+, the Raspberry Pi four
B offers ground-breaking improvements in processor speed, multimedia device
efficiency, memory, and property while maintaining backwards compatibility and
comparable power consumption. The Raspberry Pi four B offers desktop output
comparable to entry-level x86 computer systems for the most demanding users.
A superior 64-bit quad-core processor, dual-display support at resolutions up to 4K via
a combination of micro-HDMI ports, hardware video decryption at up to 4Kp60, up to
eight GB of RAM, dual-band two.4/5.0 rate wireless LAN, Bluetooth five.0, Gigabit
local area network, USB 3.0, and writer capability are among the main features of this
product (via a separate writer HAT add-on).

20
Figure 3.5 Raspberry Pi

3.7Summary of Methodology:
In this chapter, different components are used to make project efficient. Different
sensor, moto drivers , raspberry have been used. Ultrasonic sensor used for object
detection. NodeMcu used for check the current passing process.Raspberry Pi is used or
image processing. Picam used for capturing images.

21
CHAPTER4
RESULT
This paper gives a different way of the approaching problem when compared with
other papers. The results are as shown below.

 For the attendance management, our system is first detecting the human face
VIA Raspberry pie camera and when the different points of face are detected,
the system will than compare it with pre existing image in the database and
based on that the system will mark the attendance.
 For the solar control, our system is switching on and off the lights of the
university with the day and night light.
 Delay of Attendance system is in milliseconds.
 Delay of solar light system is in milliseconds.

For the Face detection, we have considered 3 phases:

1. Face detection and data gathering.


2. Train the Recognizer.
3. Face detection.

"Face Detecting" is, obviously, the most principal job of Face Recognition. Until you
accomplish something different, you would "catch" a face in Phase 1 to recall it rather
than an alternate face looked in an up some other time Phase 3.

The "Haar Cascade classifier" is the most usually utilized technique for identifying a
face or any element.

Paul Viola and Michael Jones suggested an efficient item discovery method in their
paper "Quick Object Detection Using a Boosted Cascade of Simple Features" in 2001."
It is an AI strategy where a course calculation is prepared utilizing an enormous
number of positive and negative pictures. It is then added to different pictures to follow
relics...

4.1Summary of Result:
There are extensive varieties of methods for example, biometric, RFID based and so on
which are tedious and non-productive. So to defeat this above framework is the better
and solid arrangement from each keen of time and security. Hence we have

22
accomplished to build up a solid and productive participation framework to actualize
an image handling algorithm to identify faces in classroom and to perceive the
confronts precisely to check the attendance and to save power consumption of
electricity and reduce the cost of electric bills and to control the lighting system
automatically not manually.

Figure 4.1 Camera

Adam Geitgey has been running the facial acknowledgment library we're utilizing for
quite a while. It incorporates a plenty of tests, just as Python 3 ties, to deliver making
your own facial acknowledgment applications a breeze. What is more troublesome is
the huge number of conditions that should be constructed first.

The facial acknowledgment stage utilizes the component vectors as contribution to


perceive faces. To achieve this, a face information base with different photographs of
individuals was created. These photos are utilized to gather data about the client. The
separated highlights are contrasted with each face class in the information base, and a
fit is depicted. Facial distinguishing proof has been widely investigated in the course of
the most recent twenty years. Eigen faces, Fisher countenances, and nearby paired
examples histograms are the most mainstream of the numerous calculations made.

On the off chance that the dataset with the component vectors is created and the
preparation cycle is done, the identifiers are resolved to designate the substance in a
characterized test picture to a satisfactory class, and these identifiers are contrasted
independently and every one of the identifiers contained in the dataset. Subsequent to
ascertaining the matches underneath the decided edge esteem and grouping the

23
substance in the test picture, the item class that has a place with the article picture with
the most coordinating is controlled by deciding the littlest distinction between the
coordinated with identifiers. In the wake of ordering the article, the confounded spots
are arranged by homographic assessment to choose the most dependable matches
between the thing with the most coordinating and the test picture, and the perceived
item is named. Software Code:

Result of Face Recognition:

Figure 4.2(a) Face Identification

Figure 4.2(b) Face Identification

24
Figure 4.3 MySQL Database

In Figure 4.3 MySQL Database has been shown for the marking of student attendance.

Figure 4.4 Back-End Interface

In Figure 4.4 the back-end interface has been shown for the module training of face
detection.

25
CHAPTER5
CONCLUSION
These sorts of Systems are needed in the college grounds as the territory is
exceptionally enormous and number of rooms is likewise huge. Also, human can
commit errors and neglect to turn off the apparatuses when in no utilization and for this
situation these frameworks are valuable to build the force productivity. The framework
can be seen as a fate of computerized reasoning. This is an incredible and trustworthy
framework. It satisfies the objective of energy sparing and helps in accomplishing the
proficient utilization of energy assets. Investigation of different papers gives a superior
alternative of Wi-Fi empowered processor rather than Bluetooth and ZigBee for
correspondence and furthermore to deal with the sensor information. Henceforth,
because of overview it got conceivable to make power effective, cost proficient,
completely mechanized framework. This framework is stepping forward towards the
objective of expanding the mechanical headway and Smart Campus.

5.1 FUTURE RECOMMENDATION:


Facial Recognition can be used to identify guilty parties that engage in unauthorized
business. The face recognition algorithm can be developed in relation to the use of
resources so that the project can detect the volume of the face at a time which can
make the system much better. Many types of project can be built and used for home
security as well as for personal or organizational benefits. Solar street lights can be
operated and controlled by telephone or computer anywhere. This feature helps to
adjust the light settings or dim light or increase the brightness from a remote location
without physical presence in the area. It also provides information in real time and
helps determine if there are any problems or if the light does not go well even before
the complaint is received from the public.

26
5.2 LIMITATION:
Reference image quality plays an important role in the identification process. If the
editing of this image is not accurate enough, it can cause the cameras to be deceived
into believing that the person being scanned does not look like the picture. Depending
on the quality of the input data, the system will need the right amount of storage. This
can be a problem if the data collected is of high quality and requires a lot of storage
space especially for high-profile events. Automatic re-charging batteries on system
routes need to be replaced several times.Snow, dust or moisture can accumulate in PV
panels that can inhibit energy production.

27
28
APPENDIX A: Glossary

LIST OF ABBREVIATIONS

IOT Internet of Things

AI Artificial Intelligence

ICT Information Communication Technology

IR Infrared

PIR Passive Infrared Sensor

LDR Light Dependent Resistor

MicroController Unit
MCU

SoC System on-a-Chip

OpenCV Open Source Computer Vision Library

SDK Software Development Kit

IDE Integrated Development Environment

29
APPENDIX B: Model

Figure 5.1 Flow chart of Facial Recognition Attendance System

30
Figure 5.2 Flow chart of Automatic Street Light

31
APPENDIX C: Coding

import numpy as np

import cv2

from PIL import Image

import os

import mysql.connector

recognizer = cv2.face.LBPHFaceRecognizer_create()

face_cascade = cv2.CascadeClassifier("haarcascade_frontalface_default.xml")

class SQL:

def connect(self, ip ,u_id, u_pass,db):

self.host = ip

self.user = u_id

self.password = u_pass

self.database = db

self.DB = mysql.connector.connect(host =
self.host,user=self.user,passwd=self.password,database=self.database)

def update(self, eid, status):

self.mydb = self.DB.cursor()

self.sql = "INSERT INTO `Attendance`.`Attendance_"+status+"` VALUES


("+eid+",NOW())"

self.mydb.execute(self.sql)

32
self.DB.commit()

def new_id(self, eid, ename, edesg):

self.mydb = self.DB.cursor()

self.sql = "INSERT INTO `Attendance`.`Users` VALUES (" + eid + ",\""+


ename+ "\","+ "\""+ edesg +"\",NOW())"

self.mydb.execute(self.sql)

self.DB.commit()

class Train(SQL):

name = ""

user_list = []

def __init__(self, im_source, usr, ref,cam,st):

self.max = 0.0

self.image_source = im_source

self.user_path = usr

self.reference = ref

self.cam_index = cam

self.status = st

self.flag = True

def check_user(self, dirname):

if (dirname in os.listdir(self.image_source)):

op = input("ID already Exists.\nDo you want to overwrite (y/n): ")

33
if (op == 'n'):

self.emp_id = input("Enter Your ID : ")

self.check_user(self.emp_id)

if (op == 'y'):

self.flag = False

def update_list(self, new):

user_file = open(self.user_path, 'a+')

user_file.write(new + "\n")

user_file.close()

def get_list(self):

user_file = open(self.user_path, 'r')

self.user_list = (user_file.read()).split("\n")

user_file.close()

def train(self):

print("\nYour Image is being Processed")

print("Please wait...........")

self.get_list()

sampling = []

id = []

for dir in os.listdir(self.image_source):

for i in range(10):

34
face =
np.array(Image.open(self.image_source+dir+"/"+str(i+1)+".jpg").convert('L'), 'uint8')

index = self.user_list.index(dir)

output = face_cascade.detectMultiScale(face)

for x, y, w, h in output:

sampling.append(face[y:y+h, x:x+w])

id.append(index)

recognizer.train(sampling, np.array(id))

recognizer.save(self.reference)

print("\nTraining Complete.")

print("Total Person Trained is {}".format(len(os.listdir(self.image_source))))

def enroll(self):

self.name = input("Enter the Name : ")

self.desg = input("Enter Designation Name : ")

self.emp_id = input("Enter the ID : ")

self.check_user(self.emp_id)

os.system("mkdir Images/"+self.emp_id)

if self.flag:

self.update_list(self.emp_id)

SQL.new_id(self,self.emp_id,self.name,self.desg)

no = 1

35
camera = cv2.VideoCapture(self.cam_index)

check, frame = camera.read()

cv2.imwrite("Images/" + self.emp_id + "/Sample.jpg", frame)

while 1:

check, frame = camera.read()

gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

output = face_cascade.detectMultiScale(gray, 1.3, 5)

for x, y, w, h in output:

cv2.imwrite("Images/" + self.emp_id + "/" + str(no) + ".jpg", gray[y:y+h,


x:x+w])

no += 1

cv2.rectangle(frame, (x, y), (x+w, y+h), (255, 0, 0), 1)

cv2.imshow("Video Feed", frame)

k = cv2.waitKey(100) & 0xff

if (k == 27) or (no > 10):

camera.release()

cv2.destroyAllWindows()

self.train()

break

36
class Recognise(Train):

def run(self):

self.get_list()

camera = cv2.VideoCapture(self.cam_index)

recognizer.read(self.reference)

prev = 0

while (1):

check, frame = camera.read()

gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)

output = face_cascade.detectMultiScale(gray, 1.3, 5)

for x, y, w, h in output:

id, confidence = recognizer.predict(gray[y:y + h, x:x + w])

cv2.rectangle(frame, (x, y), (x + w, y + h), (255, 0, 0), 1)

if (confidence > 100):

id = 0

if (100 - confidence) > self.max:

self.max = 100 - confidence

if (id != 0) and (prev != id):

SQL.update(self, self.user_list[id], self.status)

prev = id

37
cv2.putText(frame, str(self.user_list[id]), (x + 5, y -
5),cv2.FONT_HERSHEY_PLAIN, 1, (255, 255, 255),2)

cv2.putText(frame, str("{:.2f}".format(100 - confidence)) + '%', (x + 5, y + h


- 5),

cv2.FONT_HERSHEY_PLAIN, 1, (255, 255, 0), 1)

cv2.imshow("Video Feed", frame)

k = cv2.waitKey(100) & 0xff

if (k == 27):

camera.release()

cv2.destroyAllWindows()

break

import FR

import sys

if(len(sys.argv) != 3 ):

print("Argument Error.")

print("""use python 0 IN/OUT

where 0 is the camera index

IN/OUT is the camera in which it is placed.""")

quit(0)

38
if sys.argv[1].isdigit():

camera_index = int(sys.argv[1])

else:

camera_index = sys.argv[1]

type_IO = str(sys.argv[2])

image_source = 'Images/'

user_path = 'Data/user_list.txt'

reference = "Data/reference.yml"

sql_ip = "127.0.0.1" #localhost

sql_user = "root"

sql_password = "root"

sql_database = "Attendance"

obj = FR.Recognise(image_source, user_path, reference,camera_index,type_IO)

obj.connect(sql_ip,sql_user,sql_password,sql_database)

while(1):

opt = input("\n1.Enroll New User\n2.Track & Mark \n3.Exit\nEnter your option:")

if(opt == '1'):

obj.enroll()

39
if(opt == '2'):

obj.run()

if(opt == '3' or opt == 'e'):

quit(0)

mysql-connector-python

numpy

opencv-contrib-python

Pillow

CREATE DATABASE Attendance;

CREATE TABLE `Attendance`.`Users` ( `EMP_ID` INT NOT NULL , `EMP_Name`


VARCHAR(50) NOT NULL , `Designation` VARCHAR(20) NOT NULL , `Joined`
TIMESTAMP NOT NULL ) ENGINE = InnoDB;

CREATE TABLE `Attendance`.`Attendance_IN` ( `EMP_ID` INT NOT NULL,


`IN_Time` TIMESTAMP NOT NULL ) ENGINE = InnoDB;

CREATE TABLE `Attendance`.`Attendance_OUT` ( `EMP_ID` INT NOT NULL,


`OUT_Time` TIMESTAMP NOT NULL ) ENGINE = InnoDB;

###ULTRASONIC SENSOR###

// defines pins numbers

const int trigPin = 2; //D4

40
const int echoPin = 0; //D3

const int led = D0;

const int motorpin1 = D6;

const int motorpin2 = D7;

int currentsensor = 0;

// defines variables

long duration;

int distance;

void setup() {

pinMode(motorpin1, OUTPUT);

pinMode(motorpin2, OUTPUT);

pinMode(led, OUTPUT);

pinMode(trigPin, OUTPUT); // Sets the trigPin as an Output

pinMode(D2, OUTPUT); // Sets the trigPin as an Output

pinMode(echoPin, INPUT); // Sets the echoPin as an Input

Serial.begin(9600); // Starts the serial communication

41
void loop() {

currentsensor = analogRead(A0);

if(currentsensor > 900)

digitalWrite(led, LOW);

else

digitalWrite(led, HIGH);

// Clears the trigPin

digitalWrite(trigPin, LOW);

delayMicroseconds(2);

// Sets the trigPin on HIGH state for 10 micro seconds

digitalWrite(trigPin, HIGH);

delayMicroseconds(10);

digitalWrite(trigPin, LOW);

// Reads the echoPin, returns the sound wave travel time in microseconds

duration = pulseIn(echoPin, HIGH);

42
// Calculating the distance

distance= duration*0.034/2;

// Prints the distance on the Serial Monitor

Serial.print("Distance: ");

Serial.println(distance);

if (distance < 20)

digitalWrite(D2, HIGH);

digitalWrite(D6, HIGH);

digitalWrite(D7, LOW);

else

digitalWrite(D2, LOW);

digitalWrite(D6, LOW);

digitalWrite(D7, LOW);

43
REFERENCES

[1] Kumar, T. V. (2015). E-governance for smart cities. In E-governance for smart
cities (pp. 1-43). Springer, Singapore.

[2] Ahmed, V., Abu Alnaaj, K., & Saboor, S. (2020). An investigation into
stakeholders’ perception of smart campus criteria: the American university of
Sharjah as a case study. Sustainability,(12), 5187.

[3] Nainan, S., Parekh, R., & Shah, T. (2013). RFID technology based attendance
management system. https://arxiv.org/abs/1306.5381

[4] Ding, K., & Jiang, P. (2017). RFID-based production data analysis in an IoT
enabled smart job-shop. IEEE/CAA Journal of AutomaticaSinica, 5(1),
128138..http://ieeexplore.ieee.org/document/7833265/.

[5] Singh, A., Meshram, S., Gujar, T., & Wankhede, P. R. (2016, December).Baggage
tracing and handling system using RFID and IoT for airports. In 2016
International Conference on Computing, Analytics and Security Trends (CAST)
(pp. 466-470). IEEE. http://ieeexplore.ieee.org/document/7915014/.

[6] Sharma, T., &Aarthy, S. L. (2016, November). An automatic attendance


monitoring system using RFID and IOT using Cloud. In 2016 Online International
Conference on Green Engineering and Technologies (IC-

[7] GET) (pp. 1-4). IEEE. http://ieeexplore.ieee.org/document/7916851/

[8] DedyIrawan, J., Adriantantri, E., &Farid, A. (2018). RFID and IOT for attendance
monitoring system. In MATEC Web of Conferences.

[9] Chiagozie, O. G., &Nwaji, O. G. (2012). Radio frequency identification (RFID)


based attendance system with automatic door unit. Academic Research

[10] International, 2(2), 168. https://www.researchgate.net/publication/280558358


[11] Kassim, M., Mazlan, H., Zaini, N., &Salleh, M. K. (2012, July). Web-based
student attendance system using RFID technology. In 2012 IEEE Control and
System Graduate Research Colloquium (pp. 213-218).
IEEE.http://ieeexplore.ieee.org/document/6287164/

[12] DedyIrawan, J., Adriantantri, E., &Farid, A. (2018). RFID and IOT for attendance
monitoring system. In MATEC Web of Conferences.
[13] Irawan, J. D., Prasetio, S., &Wibowo, S. A. (2016). IP based module for building
automation system. In Proceedings of second international conference on
electrical systems, technology and information 2015 (ICESTI 2015) (pp. 337-343).
Springer, Singapore. https://link.springer.com/chapter/10.1007/978-981-287-988-
2_36

[14] Nguyen, H. M., Kim, S. H., Le, D. T., Heo, S., Im, J., & Kim, D. (2015, October).
Optimizations for RFID-based IoT applications on the Cloud. In 2015 5th

44
International Conference on the Internet of Things (IOT) (pp. 8087).
IEEE.http://ieeexplore.ieee.org/document/7356551/

[15] Singhal, Z., &Gujral, R. K. (2012). Anytime anywhere-remote monitoring of


attendance system based on RFID using GSM network. International Journal of
Computer Applications, 39(3), 37-41.

[16] “World Population Ageing” Department of Economic and Social Affairs


Population Division, United Nations, New York, 2013.

[17] Nunes, R. J., & Delgado, J. C. (2000, May). An Internet application for home
automation. In 2000 10th Mediterranean Electro technical Conference.
Information Technology and Electro technology for the Mediterranean Countries.
Proceedings. MeleCon 2000 (Cat. No. 00CH37099) (Vol. 1, pp. 298-301). IEEE.

[18] Shepherd, R. (2001). Bluetooth wireless technology in the home. Electronics &
Communication Engineering Journal, 13(5), 195-203.

[19] Sriskanthan, N., Tan, F., &Karande, A. (2002). Bluetooth based home
automation system. Microprocessors and microsystems, 26(6), 281-289. 18)
Maqsood, J. (2014, November). Artificial Intelligence, Modelling and
Simulation (AIMS). In 2014 2nd International Conference, Madrid (pp.
109114).

[20] Çubukçu, A., Kuncan, M., Kaplan, K., &Ertunc, H. M. (2015, May).

[21] Development of a voice-controlled home automation using ZigBee module. In


2015 23nd Signal Processing and Communications Applications Conference
(SIU) (pp. 1801-1804). IEEE.
[22] Adriansyah, A., &Dani, A. W. (2014, August). Design of small smart home
system based on Arduino. In 2014 Electrical Power, Electronics,
Communications, Control and Informatics Seminar (EECCIS) (pp. 121-125).
IEEE.
[23] Arduino [Online] Available: https://en.wikipedia.org/wiki/Arduino.
[24] Texas Instruments- LM35 [Online] Available: http://www.ti.com/product/lm35

[25] Grove - Gas Sensor (MQ2) [Online] Available


https://wiki.seeedstudio.com/Grove-Gas_Sensor-MQ2

[26] DHT11 basic temperature-humidity sensor, Adafruit [Online] Available


http://www.adafruit.com/product/386.

[27] Balcomb, J. D. (Ed.). (1992). Passive solar buildings (Vol. 7). MIT press.

[28] Downloaded From: J. Bolton, Solar Power and Fuels, Academic Press Inc., 1977.

[29] Download from: https://mitpress.mit.edu/books/solar-revolution

45
[30] L. A. Kristoferson and V. Bokalders, Renewable Energy Technologies - their
application in developing countries, ITDG Publishing, 1991.

[31] Renewable Energy Technologies - their application in developing countries, ITDG


Publishing, 1991.

[32] Download From: Power Supply Quality Improvement With An Extended Range
Domestic Voltage Regulators.

[33] Downloaded from: P. Robbins, "Hydropower," Encyclopedia of Environment and


Society, vol. 3, 2007.

[34] Staff, "Caroni River Watershed Management Plan," Inter-America Development


Bank, 2004. [Online]. Available: http://idbgroup.org/exr/doc98/pro/pvel1003-
06eng.pdf. [Accessed 25 10 2008].

[35] S. N. Bhadra, Wind Electrical Systems, Oxford: Oxford University Press, 2005.

[36] Golding, E. W., & Harris, R. I. (1976). The generation of electricity by wind
power (pp. 153-154). London: E. & FN Spon.

[37] [Online].Available: http://www.1uptravel.com/frd/cs/nigeria/ng_glos.html#Sudan.

[38] Microsoft Corporation, Encarta Encyclopedia, Washington: Microsoft, 2006.

[39] 2006. [Online]. Available:


http://www.si.edu/harcourt/h_si/powering/generate/thermal1.htm.
[40] Kaneez Laila Bhatti1,* , Laraib Mughal1 , Faheem Yar Khuhawar1 , Sheeraz
Ahmed Memon (2008) Dept. of Telecommunication Engineering, MUET,
Jamshoro, PK . Available https://eudl.eu/pdf/10.4108/eai.13-7-2018.159713.
[41]  Neha Kumari Dubey , Pooja M. R. , K Vishal , Dhanush Gowda H. L, Keertiraj
B. R(2020) Available:https://www.ijert.org/face-recognition-based-attendance-
system.
[42] Puthea, K., Hartanto, R., & Hidayat, R. (2017, November). A review paper on
attendance marking system based on face recognition. In 2017 2nd International
conferences on Information Technology, Information Systems and Electrical
Engineering (ICITISEE) (pp. 304-309). IEEE.
[43] Liyew, M. B. T. Applying a Deep Learning Convolutional Neural Network (CNN)
Approach for Building a Face Recognition System: A.
[44] Dev, S., & Patnaik, T. (2020, September). Student Attendance System using Face
Recognition. In 2020 International Conference on Smart Electronics and
Communication (ICOSEC) (pp. 90-96). IEEE.
[45] HL, D. G., Vishal, K., Dubey, N. K., & Pooja, M. R. Face Recognition based
Attendance System.
[46] Dhanasekaran, S. AN INTELLIGENT AUTOMATIC ATTENDANCE
MANAGEMENT SYSTEM FOR STUDENTS USING FACE RECOGNITION.

46
[47] Downloaded from https://www.make-it.ca/nodemcu-arduino/nodemcu-details-
specifications/.
[48] Downloaded from https://www.electronicsforu.com/electronics-projects/face-
recognition-using-raspberry-pi.
[49] Downloaded from https://www.elektor.com/raspberry-pi-4-b-8-gb-ram.
[50] Downloaded from https://www.fierceelectronics.com/sensors/what-ultrasonic-
sensor#:~:text=An%20ultrasonic%20sensor%20is%20an,sound%20that
%20humans%20can%20hear).
[51] Hartanto, R., & Adji, M. N. (2018, July). Face recognition for attendance system
detection. In 2018 10th International Conference on Information Technology and
Electrical Engineering (ICITEE) (pp. 376-381). IEEE.

47

You might also like