A Project Report
A Project Report
A Project Report
on
AUTOMATIC ATTENDENCE TAKING SYSYTEM
USING PYTHON AND ML
Submitted in partial fulfillment of the
requirement for the award of the degree of
Submitted By
ANKIT GANGWAR 21SCSE1011704
Title Page
No.
Abstract 2
Chapter 1 Introduction 4
1.1 Project Objective 4
1.2 Background 5
1.3 Problem Statement
1.4 Aims and Objective
1.5 Flow chart
1.6 Scope of the project
Chapter 2 Literature Survey/Project Design 10
2.1 Student Attendance System
2.2 Digital Image Processing
Conclusion 22
Reference 23
CHAPTER-1
Introduction
1.1 Project Objective:
1.2 Background:
The work on face recognition began in 1960. Woody Bledsoe, Helen Chan
Wolf and Charles Bisson had introduced a system which required the
administrator to locate eyes, ears, nose and mouth from images. The distance and
ratios between the located features and the common reference points are then
calculated and compared. The studies are further enhanced by Goldstein,
Harmon, and Lesk in 1970 by using other features such as hair colour and lip
thickness to automate the recognition. In 1988, Kirby and Sirovich first
suggested principle component analysis (PCA) to solve face recognition
problem. Many studies on face recognition were then conducted continuously
until today (Ashley DuVal, 2012).
The paper proposed by Zhao, W et al. (2003) has listed the difficulties of facial
identification. One of the difficulties of facial identification is the identification
between known and unknown images. In addition, paper proposed by Pooja G.R et al.
(2010) found out that the training process for face recognition student attendance
system is slow and time-consuming. In addition, the paper proposed by Priyanka Wagh
et al. (2015) mentioned that different lighting and head poses are often the problems
that could degrade the performance of face recognition based student attendance
system.
Hence, there is a need to develop a real time operating student attendance system
which means the identification process must be done within defined time constraints
to prevent omission. The extracted features from facial images which represent the
identity of the students have to be consistent towards a change in background,
illumination, pose and expression. High accuracy and fast computation time will be
the evaluation points of the performance.
LITERATURE REVIEW
Face Detection
Face detection is the process of identifying and locating all the
present facesin a single image or video regardless of their position, scale,
orientation, age and expression. Furthermore, the detection should be
irrespective of extraneous illumination conditions and the image and video
content.
Face Detection
3.1 INTRODUCTION:
We used some tools to build the system. Without the help of these tools
it would not be possible to make it done. Here we will discuss about the
most important one.
2. Python IDE: There are lots of IDEs for python. Some of them are
PyCharm, Thonny, Ninja, Spyder etc. Ninja and Spyder both are very
excellent and free but weused Spyder as it feature- rich than ninja.
Spyder is a little bit heavier than ninja but still much lighter than
PyCharm.
Chapter-4
CODE IMPLEMENTATION
4.1 Code Implementation:
4.1.1 main.py
All the work will be done here, Detect the face ,recognize the faces
and takeattendance.
import face_recognition
import cv2
import numpy as np
import csv
from datetime import datetime
video_capture = cv2.VideoCapture(0)
Shikhar_image = face_recognition.load_image_file("photos/Shikhar.jpg")
Shikhar_encoding = face_recognition.face_encodings(Shikhar_image)[0]
Aamir_image = face_recognition.load_image_file("photos/Aamir_Khan.jpg")
Aamir_encoding = face_recognition.face_encodings(Aamir_image)[0]
Abhishek_image = face_recognition.load_image_file("photos/Abhishek_Bachchan.jpg")
Abhishek_encoding = face_recognition.face_encodings(Abhishek_image)[0]
Aishwarya_image = face_recognition.load_image_file("photos/Aishwarya_Rai.jpg")
Aishwarya_encoding = face_recognition.face_encodings(Aishwarya_image)[0]
Ajay_image = face_recognition.load_image_file("photos/Ajay_Devgn.jpg")
Ajay_encoding = face_recognition.face_encodings(Ajay_image)[0]
Akshay_image = face_recognition.load_image_file("photos/Akshay_Kumar.jpg")
Akshay_encoding = face_recognition.face_encodings(Akshay_image)[0]
Amitabh_image = face_recognition.load_image_file("photos/Amitabh_Bachchan.jpg")
Amitabh_encoding = face_recognition.face_encodings(Amitabh_image)[0]
students = known_face_names.copy()
face_locations = []
face_encodings = []
now = datetime.now()
current_date = now.strftime("%Y-%m-%d")
while True:
_, frame = video_capture.read()
small_frame = cv2.resize(frame ,(0,0) , fx=0.25 , fy=0.25)
rgb_small_frame = cv2.cvtColor(small_frame , cv2.COLOR_BGR2RGB)
# Recognise faces
face_locations = face_recognition.face_locations(rgb_small_frame)
face_encodings = face_recognition.face_encodings(rgb_small_frame ,
face_locations)
if(matches[best_match_index]):
name = known_face_names[best_match_index]
if name in students:
students.remove(name)
current_time = now.strftime("%H:%M:%S")
lnwriter.writerow([name,current_time])
cv2.imshow("Camera" , frame)
if cv2.waitKey(1) & 0xFF == ord("q"):
break
video_capture.release()
cv2.destroyAllWindows()
f.close()
4.1.2 Photos:
Chapter-5
PERFORMANCE ANALYSIS
5.1 Introduction:
CONCLUSION
Face recognition systems are part of facial image processing applications and their
significance as a research area are increasing recently. Implementations of system
are crimeprevention, video surveillance, person verification, and similar security
activities. The facerecognition system implementation can be part of Universities.
Face Recognition Based Attendance System has been envisioned for the purpose
of reducing the errors that occur in the traditional (manual) attendance taking
system. The aim is to automate and make a system that is useful to the organization
such as an institute. The efficient and accurate method of attendance in the office
environment that can replace the old manual methods. This method is secure
enough, reliable and available for use. Proposed algorithm is capable of detect
multiple faces, and performance of system has acceptable good results.
REFERENCE
[1]. A brief history of Facial Recognition, NEC, New Zealand,26 May 2020.[Online].
Available:https://www.nec.co.nz/market-leadership/publications-media/a-brief-history-
of-facial- recognition/
[2]. Face detection,TechTarget Network, Corinne Bernstein, Feb, 2020.[Online].
Available:https://searchenterpriseai.techtarget.com/definition/face-detection
[3]. Paul Viola and Michael Jones, Rapid Object Detection using a Boosted Cascade of
SimpleFeatures. Accepted Conference on Computer Vision and Pattern Re cognition,
2001.
[4]. Face Detection with Haar Cascade,Towards Data Science-727f68dafd08,Girija
ShankarBehera, India, Dec 24, 2020.[Online].
Available:https://towardsdatascience.com/face-detection-with-haar-cascade-
727f68dafd08
[5]. Face Recognition: Understanding LBPH Algorithm,Towards Data Science-
90ec258c3d6b,Kelvin Salton do Prado, Nov 11, 2017.[Online]. Available
:https://towardsdatascience.com/face-recognition-how-lbph-works-90ec258c3d6b
[6]. What is Facial Recognition and how sinister is it, Theguardian, IanSample, July, 2019.
[Online]. Available: https://www.theguardian.com/technology/2019/jul/29/what-is-facial-
recognition-and-how-sinister-is-it
[7].Kushsairy Kadir , Mohd Khairi Kamaruddin, Haidawati Nasir, Sairul I Safie, Zulkifli
Abdul Kadir Bakti,"A comparative study between LBP and Haar-like features for Face
Detection using OpenCV", 4th International Conference on Engineering Technology and
Technopreneuship (ICE2T), DOI:10.1109/ICE2T.2014.7006273, 12 January 2015.
[8].Senthamizh Selvi.R,D.Sivakumar, Sandhya.J.S , Siva Sowmiya.S, Ramya.S ,
Kanaga SubaRaja.S,"Face Recognition Using Haar - Cascade Classifier for Criminal
Identification", International Journal of Recent Technology and Engineering(IJRTE),
vol.7, issn:2277-3878, ,issue-6S5, April 2019.
….
…………