Automated Attendance System
Automated Attendance System
AUTOMATED ATTENDANCE
SYSTEM
submitted in partial fulfillment of the requirements of the Second Year of Bachelor of
Information Technology Engineering
By:
Guide
Prof. A. D. Palsodkar
CERTIFICATE
` Examiners
1.............................................
(Internal Examiner Name & Sign)
2................................................
(External Examiner name & Sign)
Date:
Place:
IV
Declaration
I/We declare that this written submission represents my/our ideas in my/our own words
and where others' ideas or words have been included, I/We have adequately cited and
referenced the original sources. I/We also declare that I/We have adhered to all principles of
academic honesty and integrity and have not misrepresented or fabricated or falsified any
idea/data/fact/source in my/our submission. I/We understand that any violation of the above
will be cause for disciplinary action by the Institute and can also evoke penal action from the
sources which have thus not been properly cited or from whom proper permission has not
been taken when needed
Date :-
V
Abstract 1
Acknowledgement 2
3
CHAPTER 1:OVERVIEW OF THE PROJECT
1.1 Introduction 4
2.3 Functionalities 10
13
CHAPTER 3 : IMPLEMENTATION
4.2 Conclusion 30
4.3 Refrences 31
1
ABSTRACT
The Automated Attendance System is a Python-based application designed to automate
the process of attendance tracking using face recognition technology. This system is a
desktop application that can be accessed within an organization to streamline
attendance management. The project has been developed with a modular architecture,
ensuring centralized storage of attendance records in an Excel file. The application
leverages Python libraries such as face_recognition, OpenCV, and pandas for real-
time face detection, recognition, and data management.
The system captures live video feed from a webcam, detects faces, and matches them
with pre-registered student images to mark attendance. Attendance records are stored
with details such as the student's name, date, and time, ensuring accuracy and
reliability. The system has been designed to prevent duplicate entries during a session
and provides a user-friendly interface for administrators.
The entire project has been developed with a focus on real-time processing and data
consistency. The system architecture ensures scalability and reliability, with the
potential for future enhancements such as database integration and multi-camera
support. High care has been taken to ensure that the system adheres to proper validation
rules and maintains data integrity. The application provides a robust and efficient
solution for automating attendance processes in educational institutions and
organizations.
2
ACKNOWLEDGEMENT
It is with immense satisfaction and a sense of accomplishment that we have
successfully completed our project, Automated Attendance System Using Face
Recognition. We take this opportunity to express our heartfelt gratitude to everyone
who contributed to the successful completion of this work.
We extend our sincere gratitude to Prof. A.S.Kunte, Head of the Department of
INFORMATION TECHNOLOGY , for their invaluable guidance and constant support
throughout the project. Their encouragement and insights have been instrumental in
shaping this project.
.
3
CHAPTER 1
1.1 Introduction:
The Automated Attendance System is a comprehensive solution designed to
automate the process of attendance tracking using advanced face recognition
technology. This system provides educational institutions and organizations with an
efficient and accurate way to manage attendance records. By leveraging real-time video
processing, the system captures live video from a webcam, detects faces, and matches
them with pre-registered student images to mark attendance.
1.3 Objective :
To allow only authorized administrators to access and manage the system.
Reduce manual effort and clerical work by automating attendance recording and
management.
Provide greater speed and efficiency in attendance tracking, reducing time consumption.
Maintain a centralized record of attendance data for easy access and analysis.
Provide a user-friendly interface so that even a beginner can operate the system and
manage attendance effortlessly.
Enable real-time face recognition and attendance marking, ensuring seamless operation
during sessions.
The project aims to modernize and automate the attendance process, making it more
efficient and accessible for educational institutions and organizations.
CHAPTER 2
SYSTEM DESIGN
8
i. SECURITY: The Automated Attendance System ensures a high level of data security.
Only authorized users can access the system, as it requires a valid username and
password to operate. This prevents unauthorized access and ensures the integrity of
attendance records
iii. EASY RETRIEVAL OF DATA: Attendance data is stored in an Excel file, making it
easy to retrieve and analyze. Administrators can quickly access attendance records
using tools like Microsoft Excel or Python-based data analysis libraries.
iv. AUTOMATION OF PROCESS: The system automates key processes such as face
detection, recognition, and attendance recording. This reduces manual effort and
ensures that attendance is recorded accurately and efficiently in real-time
10
Provides the ability to recognize and identify students based on their pre-registered
facial data.
Tracks all the information related to attendance, including the real-time detection of
faces and their recognition.
Displays the name of the recognized student on the live video feed, providing
immediate feedback to the administrator.
Ensures data consistency by preventing duplicate attendance entries during the same
session.
Manages the information of students, including their facial encodings and associated
names, for future recognition.
11
ug
Application
Page 1 (Entry)
Webcam live preview
Face detection
(OpenCV)
Image capture button
Progress bar (5
images)
Student fields Back to entry button
(Name, DOB,
Gender, etc.)
Age validation
Start button
View records
ValidateInput& CalculateAge
GenerateUniqueStudentID
CHAPTER 3
IMPLEMENTATION
14
# Global Variables
cap = None
student_name = ""
gender = ""
dob = ""
age = 0
count = 0
# Initialize Tkinter
root = tk.Tk()
root.title("Student Face Registration")
root.geometry("900x600")
# Load images
15
try:
bg_image = Image.open("BGM.jpg").resize((900, 600), Image.LANCZOS)
bg_photo = ImageTk.PhotoImage(bg_image)
except:
bg_photo = None
try:
logo_image = Image.open("logokgce.png").resize((100, 100),
Image.LANCZOS)
logo_photo = ImageTk.PhotoImage(logo_image)
except:
logo_photo = None
# Background
canvas = tk.Canvas(page1_frame, width=900, height=600)
canvas.pack(fill="both", expand=True)
if bg_photo:
canvas.create_image(0, 0, anchor="nw", image=bg_photo)
if logo_photo:
canvas.create_image(10, 10, anchor="nw", image=logo_photo)
# College Info
canvas.create_text(750, 30, text="Headmaster: Dr. VJ Pillewan",
font=("Arial", 12, "bold"), fill="black", anchor="e")
canvas.create_text(750, 50, text="Staff: Prof. Kunte, Mr. A. Palsodkar",
font=("Arial", 12), fill="black", anchor="e")
# Place widgets
canvas.create_window(450, 200, window=name_label)
canvas.create_window(450, 230, window=name_entry)
canvas.create_window(450, 270, window=gender_label)
canvas.create_window(450, 300, window=gender_menu)
canvas.create_window(450, 340, window=dob_label)
canvas.create_window(450, 370, window=dob_entry)
student_name = name_entry.get().strip().title()
gender = gender_var.get()
dob = dob_entry.get()
# Calculate Age
age = datetime.today().year - datetime.strptime(dob, "%Y-%m-%d").year
df.to_excel(excel_file, index=False)
# Proceed to face capture
show_capture_page()
# Buttons
next_button = Button(page1_frame, text="Next ➜", font=("Arial", 14),
command=open_capture_page, bg="#4CAF50", fg="white", padx=20)
canvas.create_window(450, 420, window=next_button)
def capture_faces():
global cap, count
if cap is None or not cap.isOpened():
return
ret, frame = cap.read()
if not ret:
return
if count >= 5:
status_label_capture.config(text=f"✅ {student_name} registered
successfully!", fg="green")
cap.release()
subprocess.run(["python", "n:\\project\\Mini Project\\Mini Project\\
Student_attendence Python-Project\\code\\01_facial updated.py"],
check=True)
return_to_entry_page()
return
def return_to_entry_page():
global cap
if cap:
cap.release()
page2_frame.pack_forget()
page1_frame.pack(fill="both", expand=True)
if encoding:
known_face_encodings.append(encoding[0])
name = filename.split("_")[0] # Extract student name
known_face_names.append(name)
if bg_photo:
canvas.create_image(0, 0, anchor="nw", image=bg_photo) # Background
Image
# Initialize Camera
cap = cv2.VideoCapture(0)
recorded_names = set()
greeted_names = {} # Dictionary to store greetings per session
last_detected_time = time.time() # Track the last time a face was detected
camera_active = True # Track whether the camera is currently active
return greetings_dict[name]
else:
return random.choice(default_greetings).format(name)
if existing_entry.empty:
# Add a new entry if it doesn't exist for today
new_entry = pd.DataFrame({
"Name": [name],
"Date": [current_date],
"Time": [current_time],
"Month": [current_month],
"Year": [current_year]
})
df = pd.concat([df, new_entry], ignore_index=True)
else:
repeated_df = pd.read_excel(repeated_file_path)
if not existing_repeated_entry.empty:
# Update the time for the repeated entry
repeated_df.loc[(repeated_df["Name"] == name) & (repeated_df["Date"]
== current_date), "Time"] = current_time
else:
# Add a new entry if it doesn't exist
new_repeated_entry = pd.DataFrame({
"Name": [name],
"Date": [current_date],
"Time": [current_time]
})
repeated_df = pd.concat([repeated_df, new_repeated_entry],
ignore_index=True)
# Save the updated repeated attendance DataFrame back to the Excel file
repeated_df.to_excel(repeated_file_path, index=False)
# Detect faces
25
face_locations = face_recognition.face_locations(rgb_small_frame)
face_encodings = face_recognition.face_encodings(rgb_small_frame,
face_locations)
recognized_name = "Unknown"
is_person_present = False
video_label.config(image=img)
# Repeat function
root.after(10, process_video)
if not camera_active:
# Try to detect motion (e.g., check if the camera can detect any frame)
temp_cap = cv2.VideoCapture(0)
ret, _ = temp_cap.read()
temp_cap.release()
# Repeat function
root.after(1000, monitor_motion) # Check every second
CHAPTER 4
Although significant efforts have been made to make the Automated Attendance
System efficient, user-friendly, and reliable, certain limitations cannot be overlooked.
While the system provides a wide range of functionalities, some intricate features could
not be incorporated due to logistical constraints and the lack of advanced resources. The
limited time available for development also posed a major challenge, preventing the
implementation of certain dynamic and foolproof features.
The system is designed to be easy to operate, even for users with minimal
technical expertise. However, first-time users may find it slightly challenging to
understand the workflow initially. Additionally, the system currently lacks advanced
features such as database integration for long-term storage of attendance records, multi-
camera support for larger environments, and enhanced recognition capabilities under
varying lighting conditions.
Despite these limitations, considerable efforts have been made to ensure that the
system is intuitive and provides help at each step to guide the user. Future
enhancements and additional development time can address these limitations to make
the system more robust and dynamic.
30
4.2 Conclusion
This project was successfully completed within the allotted time frame. The
Automated Attendance System has been developed using Python and incorporates
advanced face recognition technology. All the modules were tested individually and
then integrated to form the complete system. Finally, the system was tested with real
data, and all functionalities worked successfully. Thus, the system has fulfilled all the
objectives identified during the planning phase.
The system has been designed with a user-friendly interface, ensuring that even
users with minimal technical knowledge can operate it with ease. It provides seamless
interactions between administrators and the attendance management process. The
system maintains speed and accuracy in real-time face recognition and attendance
recording, ensuring reliability and efficiency. This project successfully automates the
attendance process, reducing manual effort and improving overall productivity.
31
4.3 REFERENCES
https://www.python.org/
https://opencv.org/
https://pandas.pydata.org/
https://github.com/ageitgey/face_recognition
https://www.geeksforgeeks.org/python/
https://www.w3schools.com/python/
https://en.wikipedia.org/wiki/Face_recognition