0% found this document useful (0 votes)
38 views116 pages

BlackBook Format

The document is a project report for a Face Detection Attendance System titled 'Face-Flex,' submitted by students from Vidyavardhini’s Bhausaheb Vartak Polytechnic as part of their Computer Engineering diploma. It outlines the project's objectives, methodology, and system design, emphasizing the use of facial recognition technology to automate attendance tracking, enhance accuracy, and improve efficiency. The report also includes acknowledgments, requirements analysis, and various diagrams to illustrate the system's design and functionality.

Uploaded by

soham.mate11
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)
38 views116 pages

BlackBook Format

The document is a project report for a Face Detection Attendance System titled 'Face-Flex,' submitted by students from Vidyavardhini’s Bhausaheb Vartak Polytechnic as part of their Computer Engineering diploma. It outlines the project's objectives, methodology, and system design, emphasizing the use of facial recognition technology to automate attendance tracking, enhance accuracy, and improve efficiency. The report also includes acknowledgments, requirements analysis, and various diagrams to illustrate the system's design and functionality.

Uploaded by

soham.mate11
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

Project Report Submitted in Partial Fulfilment for diploma

In
Computer Engineering
“Face Detection Attendance
System” Face-Flex

Sponsored by: Gallops Systems and Solution

1802- Swarnim

Bane 1854-Vedant

Raut

1855-Atharva

Sankhe 1861-Harsh

Tandel

GUIDED BY

Prof. Parvez Vaghela

DEPARTMENT OF COMPUTER ENGINEERING OF


VIDYAVARDHINI’S BHAUSAHEB VARTAK POLYTECHNIC

VASAI (W)-401202
Year 2023-2024
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer Engineering
VIDYAVARDHINI’S BHAUSAHEB VARTAK POLYTECHNIC
VASAI ROAD (W)

DEPARTMENT OF COMPUTER ENGINEERING

CERTIFICATE
This is to certify that Mr. /Ms. Swarnim Sachin Bane, Vedant Nitin Raut,
Atharva Nitin Sankhe, Harsh Satish Tandel from Vidyavardhini’s Bhausaheb
Vartak Polytechnic having Enrolments No. 2100930075, 2100930178,
2100930179 & 210930188 respectively, have satisfactorily Completed the Project
Titled “Face Detection Attendance System” during the year 2023-2024 as per
curriculum laid down by MSBTE in partial Fulfilment of the award of Diploma in
Computer Engineering.

Internal project guide Head of department

Principal

Internal Examiner External Examiner

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer


Engineering
ACKNOWLEDGEMENT

We have great pleasure and satisfaction in presenting this project report on “Face
Detection Attendance System” We take this opportunity to express our sincere
thanks to all those people who helped us to complete our project successfully.

We would like to express our special thanks of gratitude to Prof. Parvez Vaghela for
technical extend & constant encouragement. We are also thankful to the staff for
rendering their support during the Project Period.

We are also thankful to our friend and colleagues. Their worthy support made an
encouraging environment to work within. Finally, we would like to thank all the
people directly or indirectly concerned within projects.

Names:
 Swarnim Bane
 Vedant Raut
 Atharva Sankhe
 Harsh Tandel

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer


Engineering
SPONSORSHIP DETAIL

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer


Engineering
TABLE OF CONTENT
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer


Engineering
Table of contents

Sr.no Contents Pg. No

Abstract
iii
Achievements iv-v

List of Figures vi

1 LITERATURE SURVEY 1-4

1.1) Introduction 2

1.2) Face Detection Attendance System 3

1.3) Benefits of Face Detection Attendance 4


System
2 REQUIREMENT ANALYSIS 5-7
2.1) Software Requirements 6

2.2) Hardware Requirements 6

2.3) Constraint’s 6

2.4) Product features 7


3 SYSTEM DESIGN 8-21

3.1) Flowchart 9

3.2) Use Case Diagram 10


3.3) Data Flow Diagram 11

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer i


Engineering
4 IMPLEMENTATION 22-29
4.1) Download and Installation of Visual Studio 23
Code
4.2) Download and Installation of SQL 24
Workbench

5 CODE 30-69
5.1) Login.py 30
5.2) Main.py 35
5.3) Student.py 39
5.4) Train.py 54
5.5) Register.py 56
5.6) FaceRecognition.py 60
5.7) Attendence.py 63
6 ALGORITHM 70
6.1) Algorithm to train faces we use LBPH 71
algorithm

6.2) Detecting Faces 75

7 TESTING 76

7.1) Introduction 77

7.2) Testing Methodologies 77

7.3) Test Cases 79

7.4) Cost Estimation 81

7.5) Conclusion and References 82-85

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer ii


Engineering
Abstract

In the era of modern technologies emerging at rapid pace there is no reason why a
crucial event in educational sector such as attendance should be done in the old boring
traditional way.

Attendance monitoring system will save a lot of time and energy for the both parties
students as well as the class teachers. Attendance will be monitored by the face
recognition algorithm by recognizing only the face of the students from the rest of the
objects and then marking them as present. The system will be pre feed with the images
of all the students and with the help of this pre feed data the algorithm will detect them
who are present and match the features with the already saved images of them present
in the database.

Furthermore, it provides real-time monitoring and reporting functionalities, facilitating


seamless management of workforce attendance. The effectiveness and reliability of the
system are demonstrated through experimental evaluation, showcasing its potential to
revolutionize attendance management practices across diverse industries

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer iii


Engineering
Achievements

Winners of NeuroFest-2024 State Level Hackathon

3rd place at CodeVerse-2023 State level Hackathon

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer iv


Engineering
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer v
Engineering
List of Figures

Figure no. Figure Name Page no

3.1 Flowchart 9

3.2 Use Case Diagram 10

3.3 Data Flow Diagram 11

3.4 ER Diagram 12

3.5 Screenshot 13-21

4.1 V.S Installation 23-26

4.2 SQL Workbench Setup 27-29

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer vi


Engineering
CHAPTER 1

LITERATURE SURVEY
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 1


Engineering
1.1) Introduction:
Purpose: A face detection attendance system is a modern solution designed to
streamline and automate the process of recording attendance in various settings,
such as schools, universities, workplaces, and events. By leveraging advanced
facial recognition technology, this system accurately identifies individuals and
records their attendance without the need for manual input.

Functionality: The core functionality of a face detection attendance system


revolves around the following key components:

1. Face Detection: The system uses computer vision algorithms to detect and
locate human faces within a given frame, whether from images or live video
feeds.

2. Face Recognition: Once faces are detected, the system employs facial
recognition techniques to match them against a database of known individuals.
This database typically contains pre-registered faces along with associated
metadata such as names, IDs, and other relevant information.

3. Attendance Recording: Upon successful recognition of a face, the system logs


the individual's attendance automatically. This data is usually stored in a
centralized database for further analysis and record-keeping.

4. Reporting and Analysis: Administrators can access attendance records through


a user-friendly interface, allowing them to generate reports, track attendance
trends, and identify patterns over time.

Benefits: Implementing a face detection attendance system offers several benefits


compared to traditional attendance tracking methods:

1. Accuracy: The system provides highly accurate attendance records, minimizing


errors associated with manual data entry or paper-based systems.

2. Efficiency: By automating the attendance recording process, the system saves


time for both administrators and attendees, enabling smoother operations and
reducing administrative overhead.

3. Security: Facial recognition technology enhances security by verifying the


identity of individuals before recording their attendance, reducing the risk of
fraudulent or unauthorized access.

4. Insights: The system generates valuable insights into attendance patterns and
trends, enabling administrators to make data-driven decisions and optimize
resource allocation.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 2


Engineering
1.2) Face Detection Attendance System.
A face detection attendance system is a technological solution that uses computer
vision algorithms to detect and recognize human faces in images or video
streams. The system typically consists of the following components:

1. Face Detection: Initially, the system detects the presence of faces within a given
image or video frame. This is usually done using techniques like Haar cascades,
HOG (Histogram of Oriented Gradients), or deep learning-based approaches
like Convolutional Neural Networks (CNNs).

2. Face Recognition: Once faces are detected, the system identifies individuals by
comparing the detected faces with a database of known faces. This involves
extracting facial features and comparing them against pre-registered faces using
methods like Eigenfaces, Fisherfaces, Local Binary Patterns (LBP), or more
advanced deep learning techniques like FaceNet or VGGFace.

3. Attendance Logging: After identifying individuals, the system logs their


attendance, usually associating it with a timestamp. This data can then be stored
in a database for further analysis and reporting.

4. User Interface: A user-friendly interface allows administrators to interact with


the system, view attendance records, add or remove individuals from the
database, and perform other administrative tasks.

5. Integration with Access Control Systems: In some cases, face detection


attendance systems may be integrated with access control systems to grant or
deny entry based on recognized faces and attendance records.

6. Hardware Setup: This includes cameras or other image-capturing devices for


capturing images or video streams of individuals, as well as computing
hardware for processing the data and running the face detection and recognition
algorithms.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 3


Engineering
1.3) Benefits of Face Detection Attendance System.
The benefits of a face detection attendance system include:

1. Accuracy: It offers high accuracy in identifying individuals, reducing errors in


attendance records compared to manual systems.

2. Efficiency: The system automates the attendance tracking process, saving time
for both employees and administrators.

3. Convenience: Employees can clock in and out simply by showing their faces,
eliminating the need for physical cards or biometric devices.

4. Security: It enhances security by ensuring that only authorized individuals can


access the premises based on recognized faces.

5. Scalability: The system can scale to accommodate a large number of users,


making it suitable for businesses of various sizes.

6. Data Insights: It provides valuable insights into attendance patterns and trends,
facilitating better decision-making for resource planning and management.

7. Integration: It can be integrated with other systems such as payroll and HR


software, streamlining administrative processes.

8. Contactless: Especially in times of health concerns like pandemics, it offers a


contactless alternative to traditional attendance systems, reducing the risk of
disease transmission.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 4


Engineering
CHAPTER 2

REQUIRMENT ANALYSIS
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 5


Engineering
REQUIREMENT ANALYSIS

2.1 SOFTWARE REQUIREMENTS:

● Tool: Microsoft Visual Studio Code / PyCharm editor


● Server: MySql
● Database: MySql Workbench
● Language: Python

2.2 HARDWARE REQUIREMENTS:

● Processor: The PC/laptop device should have a powerful processor to


handle the application's functions.
● RAM: Minimum 8GB of RAM
● Storage: 2 GB of Storage space
2.3 CONSTRAINT’S

Some of the most common constraints to deal with are listed below.
Some of these are softconstraints meaning they only increase the cost.
Some are hard which cannot be violated.

1. Hard Constraints:
● No student must be allowed to login/register into the system without the
teacher id and password
● Each student must be registered or can register in the system by adding their
details
● Student cannot add their wrong details

2. Soft Constraints:
● The attendance report can be exported to different csv(Excel) file.

● Teacher should not have the same id and passwords

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 6


Engineering
2.4 PRODUCT FEATURES:

Some of the most important features offered by our web application are:-

● Simple wizard type user interface

● Mouse and keyboard for inputs, keyboard shortcuts are available.

● Separate database maintaining basic information’s, subjects, courses


and theirassociations and other details.
● Database for holding generated schedule and for storing required schedules.

● Features for editing student ,teachers during the runtime

● High portability, works on both mac and windows

● Highly efficient, needs only few minutes to complete whole procedure

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 7


Engineering
CHAPTER 3

SYSTEM DESIGN
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 8


Engineering
SYSTEM DESIGN
3.1FLOWCHART

Fig 3.1: Flowchart

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 9


Engineering
3.2 USE CASE DIAGRAM

Fig 3.2: Use Case Diagram

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 10


Engineering
3.3 DATA FLOW DIAGRAM

Login Login
Face detection Teacher
Student
attendance system

Response Response

Response

Database

Fig 3.3.1: 0-Level DFD: Context Level

Fig 3.3.2 Second level DFD

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 11


Engineering
3.4 ER DIAGRAM

Fig 3.4: ER Diagram

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 12


Engineering
3.5 SCREENSHOTS

INTERFACE OF OUR PROJECT

IT CONSIST OF LOGIN PAGE AT THE CENTER OF THE PAGE WHICH


CONTAINS:-

1. REGISTRATION
2. LOGIN
3. FORGET PASSWORD
4. LOGIN PAGE

Fig. 3.5.1 Login Page

This is the main login page of our application where, the user will be directed to
the application if the user enters the correct details and logs in, if the user isn’t
registered he/she can register new account and if the user forgets his her details
he/she can use the forget password to change the details and login to the
application.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 13


Engineering
RESGISTRATION PAGE

Fig.3.5.2 Registration Page

The user will register by entering the respective required details.

Fig.3.5.3 Login Page

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 14


Engineering
MAIN PAGE

After the registration, the user gets redirected to the main project.

Fig.3.5.4 Main Page


Students can add all their academic details and take pictures to get trained
and later can detect face

Fig.3.5.5 Students record

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 15


Engineering
VIEW ATTENDANCE

Fig.3.5.6 Student Details

The details of the student when added it will appear in the table section, as well as it
will get added into the database

The attendance will appear for the desired/selected class and branch.

Fig.3.5.7 DB view

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 16


Engineering
Fig.3.5.8 Training Window

The images will get trained here using the LBPH face recognition algorithm

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 17


Engineering
Fig.3.5.9 Main Page
Then click on the detect face button to detect the face to mark your attendance

Fig 3.5.10 CSV data

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 18


Engineering
After detecting the face and on clicking the M keyword the attendance will be marked
and get saved in the csv file , the attendance details will contain the class roll no name
and the time at which the attendance was marked

The main reason to store the attendance in the csv file was to improve the accesibility
of the marked attendance and make it portable and easily transfferable to another csv
file according to the user comfortness.

Fig.3.5.11 Click on the attendance button to view the attendance

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 19


Engineering
Then click on the import CSV button to import the csv file into the system
Fig.3.5.12

Select the csv file in which the attendance is stored

Fig.3.5.13 Click on Python.csv

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 20


Engineering
Fig.3.5.14 Attendance View

The CSV file data will be displayed in this table section and you can also update
the data of the csv file through the application

Fig.3.5.15 Developer Contacts

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 21


Engineering
CHAPTER 4

IMPLEMENTATION
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 22


Engineering
IMPLEMENTATION

4.1 DOWNLOAD AND INSTALLATION OF VISUAL STUDIO CODE

You can download Visual Studio code from URL


"https://code.visualstudio.com/download" byselecting the right platform:

Fig 4.1.1 Step1

You can click any of the icons mentioned above, depending on the operating system
for which you are planning to download the visual studio code editor.

Firstly, download the Visual Studio Code installer for Windows. Once it is
downloaded, run the installer (VSCodeUserSetup-{version}.exe). It will only take a
minute.

Secondly, accept the agreement and click on next.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 23


Engineering
Fig 4.1.2 Step2

Thirdly, click on "create a desktop icon" so that it can be accessed from desktop and click o

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 24


Engineering
Fig 4.1.3 Step3
After that, click on the install button.

Fig 4.1.4 Step4


Finally, after installation completes, click on the finish button, and the visual studio code will get
open.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 25


Engineering
Fig 4.1.5 Step5

By default, VS Code installs under C:\users{username}\AppData\Local\Programs\Microsoft VS


Code.

Fig 4.1.6 Step6

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 26


Engineering
4.2 DOWNLOAD AND INSALLATION OF MYSQL WORKBENCH

Fig 4.2.1 Step1

Step 1: Go to https://dev.mysql.com/downloads/mysql/

Fig 4.2.2 Step2

Select MySql workbench according to your operating system and click on


download

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 27


Engineering
Step 2 — Install the workbench exe and the start the setup and click on the
developer default and click next and it will install

Fig 4.2.3 Step3

Step 3 – Add root name and its password according to the user comfort
and accessibility

Fig 4.2.4 Step4

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 28


Engineering
Click next and once your password is correct, the application will be installed on
your device.

Fig 4.2.5 Step5

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 29


Engineering
Code
Login.py
from tkinter import *
from tkinter import
ttk
from PIL import
Image,ImageTk from tkinter
import messagebox from
register import Register
import mysql.connector
from main import Face_Recognition_System

def main_log():
win=Tk()
app=Login_Window(win)
win.mainloop()

class Login_Window:

def init (self,root):


self.root=root
self.root.geometry("1710x1150+0+0")
self.root.title("Login")

img3 =
Image.open("college_images/employee_img2.jpg")
img3 = img3.resize((1710, 1150))
self.photoimg3 = ImageTk.PhotoImage(img3)
bg_img = Label(self.root,
image=self.photoimg3) bg_img.place(x=0,
y=0, width=1710, height=1050)

frame1= Frame(self.root,bg="#002B53")
frame1.place(x=680,y=200,width=380,height
=480)

img1=Image.open("college_images/LoginIconAppl.png")
img1=img1.resize((100,100))
self.photoimage1=ImageTk.PhotoImage(img1)
lb1img1 =
Label(image=self.photoimage1,bg="#002B53")
lb1img1.place(x=820,y=210, width=100,height=100)

get_str = Label(frame1,text="Login",font=("times new


roman",20,"bold"),fg="white",bg="#002B53") get_str.place(x=160,y=110)

#label1
username =lb1= Label(frame1,text="Username:",font=("times new
roman",16,"bold"),fg="white",bg="#002B53") username.place(x=30,y=160)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 30


Engineering
#entry1
self.txtuser=ttk.Entry(frame1,font=("times new roman",16,"bold"))
self.txtuser.place(x=33,y=190,width=270)

pwd =lb1= Label(frame1,text="Password:",font=("times new roman",16,"bold"),fg="white",bg="#002B53")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 31


Engineering
pwd.place(x=30,y=230)

#entry2
self.txtpwd=ttk.Entry(frame1,font=("times new roman",16,"bold"))
self.txtpwd.place(x=33,y=260,width=270)

# Creating Button Login


loginbtn=Button(frame1,text="Login",font=("times new
roman",19,"bold"),command=self.login,bd=0,relief=RIDGE,fg="#002B53",bg="white",activeforeground
="white", activebackground="#007ACC")
loginbtn.place(x=80,y=320,width=200,height=35)

# Creating Button Registration


loginbtn=Button(frame1,text="Register",command=self.reg,font=("times new
roman",14,"bold"),bd=0,relief=RIDGE,fg="black",bg="#002B53")
loginbtn.place(x=33,y=390,width=70,height=25)

# Creating Button Forget


loginbtn=Button(frame1,text="Forget",font=("times new
roman",14,"bold"),command=self.forget_pwd,bd=0,relief=RIDGE,fg="black",bg="#
002B53")
loginbtn.place(x=110,y=390,width=70,height=25)

#==========================functions ===========================
def reg(self):
self.new_window=Toplevel(self.ro
ot)
self.app=Register(self.new_windo
w)

def login(self):
if (self.txtuser.get()=="" or self.txtpwd.get()==""):
messagebox.showerror("Error","All Field Required!")
elif(self.txtuser.get()=="admin" and self.txtpwd.get()=="admin"):
messagebox.showinfo("Sussessfully","Welcome to Attendance Managment System Using Facial
Recognition",parent=self.root)
else:

conn=mysql.connector.connect(host="localhost",user="root",password="swarnim0129",database=
"login
_schema",auth_plugin='mysql_native_passwor
d') mycursor = conn.cursor()
mycursor.execute("select * from register where email=%s and password=
%s",( self.txtuser.get(),
self.txtpwd.get()
))
row=mycursor.fetchon
e() if row==None:
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 32
Engineering
messagebox.showerror("Error","Invalid Username and
Password!") else:
open_min=messagebox.askyesno("YesNo","Access only Admin")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 33


Engineering
if open_min>0:
self.new_window=Toplevel(self.root)
self.app=Face_Recognition_System(self.new_wind
ow) else:
if not open_min:
return
conn.commit()
conn.close()

def reset_pass(self):
if self.combo_security.get()=="Select":
messagebox.showerror("Error","Select the Security Question!",parent=self.root2)
elif(self.var_sa.get()==""):
messagebox.showerror("Error","Please Enter the Answer!",parent=self.root2)
elif(self.new_pwd.get()==""):
messagebox.showerror("Error","Please Enter the New
Password!",parent=self.root2) else:

conn=mysql.connector.connect(host="localhost",user="root",password="swarnim0129",database=
"login
_schema",auth_plugin='mysql_native_passwor
d') mycursor = conn.cursor()
query=("select * from register where email=%s and securityQ=%s and
securityA=%s")
value=(self.txtuser.get(),self.combo_security.get(),self.var_sa.get())
mycursor.execute(query,value)
row=mycursor.fetchon
e() if row==None:
messagebox.showerror("Error","Please Enter the Correct
Answer!",parent=self.root2) else:
query=("update register set password=%s where email=%s")
value=(self.new_pwd.get(),self.txtuser.get())
mycursor.execute(query,value)

conn.commit()
conn.close()

messagebox.showinfo("Info","Successfully Your password has been rest, Please login with new
Password!",parent=self.root2)

def ret_login(self):
self.root.destroy
()

def forget_pwd(self):
if self.txtuser.get()=="":
messagebox.showerror("Error","Please Enter the Email ID to reset
Password!") else:

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 34


Engineering
conn=mysql.connector.connect(host="localhost",user="root",password="swarnim0129",database=
"login
_schema",auth_plugin='mysql_native_passwor
d') mycursor = conn.cursor()
query=("select * from register where
email=%s") value=(self.txtuser.get(),)
mycursor.execute(query,value)
row=mycursor.fetchone()
# print(row)

if row==None:
messagebox.showerror("Error","Please Enter the Valid Email ID!")

else:
conn.close()
self.root2=Toplevel()
self.root2.title("Forget
Password")
self.root2.geometry("380x480+680+240")
l=Label(self.root2,text="Forget Password",font=("times new
roman",30,"bold"),fg="#002B53",bg="#fff") l.place(x=0,y=10,relwidth=1)
# fields
#label1
ssq =lb1= Label(self.root2,text="Select Security Question:",font=("times new
roman",15,"bold"),fg="#002B53",bg="#F2F2F2")
ssq.place(x=70,y=80)

#Combo Box1
self.combo_security = ttk.Combobox(self.root2,font=("times new roman",15,"bold"),state="readonly")
self.combo_security["values"]=("Select","Your Date of Birth","Your Nick Name","Your Favorite Book")
self.combo_security.current(0)
self.combo_security.place(x=70,y=110,width=270)

#label2
sa =lb1= Label(self.root2,text="Security Answer:",font=("times new
roman",15,"bold"),fg="#002B53",bg="#F2F2F2")
sa.place(x=70,y=150)

#entry2
self.var_sa=ttk.Entry(self.root2,font=("times new roman",15,"bold"))
self.var_sa.place(x=70,y=180,width=270)

#label2
new_pwd =lb1= Label(self.root2,text="New Password:",font=("times new
roman",15,"bold"),fg="#002B53",bg="#F2F2F2")
new_pwd.place(x=70,y=220)

#entry2
self.new_pwd=ttk.Entry(self.root2,font=("times new roman",15,"bold"))
self.new_pwd.place(x=70,y=250,width=270)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 35


Engineering
# Creating Button New Password
loginbtn=Button(self.root2,text="Reset Password",command=self.reset_pass,font=("times new
roman",15,"bold"),bd=0,relief=RIDGE,fg="black",bg="#002B53")
loginbtn.place(x=70,y=300,width=270,height=35)

if name ==" main ":


main_log()

Main.py
from tkinter import *
from tkinter import ttk
from tkinter import messagebox
import tkinter
from PIL import
Image,ImageTk from student
import Student from train
import Train
from face_recognition import Face_Recognition

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 36


Engineering
from developer import Developer
import subprocess
import platform

#edited
class Face_Recognition_System:
def init (self,root):
self.root=root
self.root.geometry("1710x1050+0+0")
self.root.title("face recognition system")

img1 = Image.open("./college_images/Attendance
Banner.jpeg") img1 = img1.resize((1800, 395))
self.photoimg1 =
ImageTk.PhotoImage(img1) f_lbl =
Label(self.root, image=self.photoimg1)
f_lbl.place(x=0, y=0, width=1800,
height=130)

# bg img
img3 =
Image.open("./college_images/backAcademic.jpeg")
img3 = img3.resize((1710, 1050))
self.photoimg3 = ImageTk.PhotoImage(img3)
bg_img = Label(self.root,
image=self.photoimg3) bg_img.place(x=0,
y=130, width=1710, height=1050)

#white title with red text on background image


title_lbl=Label(bg_img,text="FACE-FLEX",font=("times new roman",35,"bold"),bg="white",fg="darkblue");
title_lbl.place(x=0,y=0,width=1710,height="45")

# student button
img4 =
Image.open("./college_images/studentInfoButton2.png")
img4 = img4.resize((305, 305))
self.photoimg4 = ImageTk.PhotoImage(img4)

b1 = Button(bg_img, image=self.photoimg4,command=self.student_details,
cursor="hand2") b1.place(x=310, y=140, width=220, height=220)

b1_1 = Button(bg_img, text="Student Details",command=self.student_details, cursor="hand2",


font=("times new roman", 20, "bold"), bg="darkblue", fg='black')
b1_1.place(x=310, y=350, width=220, height=40)

# detect face button


img5 = Image.open("./college_images/men-
face.png") img5 = img5.resize((245, 245))
self.photoimg5 = ImageTk.PhotoImage(img5)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 37


Engineering
b1 = Button(bg_img, image=self.photoimg5,
command=self.face_detector,cursor="hand2") b1.place(x=720, y=140, width=220,
height=220)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 38


Engineering
b1_1 = Button(bg_img, text="Detect Face", command=self.face_detector,cursor="hand2",
font=("times new roman", 20, "bold"), bg="darkblue",fg='black')

b1_1.place(x=720, y=350, width=220, height=40)

# Attendance button
img6 =
Image.open("./college_images/forbidden.png")
img6 = img6.resize((220, 220))
self.photoimg6 = ImageTk.PhotoImage(img6)

b1 = Button(bg_img, image=self.photoimg6,command=self.attendance_details,
cursor="hand2") b1.place(x=1120, y=140, width=220, height=220)

b1_1 = Button(bg_img, text="Attendance", cursor="hand2",


command=self.attendance_details,font=("times new roman", 20, "bold"), bg="darkblue",
fg='black')
b1_1.place(x=1120, y=350, width=220, height=40)

# Train Data Button


img8 = Image.open("./college_images/face-detect-
women.png") img8 = img8.resize((310, 250))
self.photoimg8 = ImageTk.PhotoImage(img8)

b1 = Button(bg_img, image=self.photoimg8,
command=self.train_details,cursor="hand2") b1.place(x=310, y=480, width=220,
height=220)

b1_1 = Button(bg_img, text="Train Data",command=self.train_details, cursor="hand2", font=("times


new roman", 20, "bold"),
bg="darkblue", fg='black')
b1_1.place(x=310, y=690, width=220,
height=40)

# Photos Button
img9 =
Image.open("./college_images/photosImg.png")
img9 = img9.resize((350, 350))
self.photoimg9 = ImageTk.PhotoImage(img9)

b1 = Button(bg_img, image=self.photoimg9, command=self.open_img,cursor="hand2")


b1.place(x=720, y=480, width=220, height=220)

b1_1 = Button(bg_img, text="Photos",command=self.open_img, cursor="hand2", font=("times new


roman", 20, "bold"), bg="darkblue",fg='black')
b1_1.place(x=720, y=690, width=220, height=40)

# Developer Button
img10 =
Image.open("./college_images/DevImg.webp")
img10 = img10.resize((237, 237))
self.photoimg10 = ImageTk.PhotoImage(img10)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 39


Engineering
b1 = Button(bg_img, image=self.photoimg10,
command=self.developer_details,cursor="hand2") b1.place(x=1120, y=480, width=220,
height=220)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 40


Engineering
b1_1 = Button(bg_img, text="Developer", cursor="hand2",
command=self.developer_details,font=("times new roman", 20, "bold"), bg="darkblue",
fg='black')

b1_1.place(x=1120, y=690, width=220, height=40)

#===========================function buttons=========================================
def student_details(self):
self.new_window=Toplevel(self.root)
self.app=Student(self.new_window)

def train_details(self):
self.new_window=Toplevel(self.root)
self.app=Train(self.new_window)

def face_detector(self):
self.new_window=Toplevel(self.root)
self.app=Face_Recognition(self.new_window)

def attendance_details(self):
self.new_window=Toplevel(self.root)
self.app=Attendance(self.new_window)

def developer_details(self):
self.new_window=Toplevel(self.root)
self.app=Developer(self.new_window)

# ================================opening photos from the pc============================


def open_img(self):
system =
platform.system().lower()
file_path="data"
if system == "windows":
subprocess.Popen(["start", " ", file_path],
shell=True) elif system == "darwin":
subprocess.Popen(["open",
file_path]) elif system == "linux":
subprocess.Popen(["xdg-open",
file_path]) else:
print("Unsupported operating system")

if name ==" main ":


root=Tk()
obj=Face_Recognition_System(root)
root.mainloop()

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 41


Engineering
Student.py

from tkinter import *


from tkinter import ttk
from PIL import
Image,ImageTk from tkinter
import messagebox import
mysql.connector
import cv2

class Student:

def init (self,root):


self.root=root
self.root.geometry("1710x1150+0+0
") self.root.title("face recognition
system")

#=====================variables=============================

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 42


Engineering
self.var_year=StringVar()
self.var_semester=StringVar()
self.var_std_id=StringVar()
self.var_std_name=StringVar()
self.var_roll=StringVar()
self.var_email=StringVar()
self.var_phone=StringVar()
self.var_div=StringVar()
self.var_gender=StringVar()
self.var_dob=StringVar()
self.var_address=StringVar()
self.var_search=StringVar()
self.var_searchTX=StringVar()

# img = Image.open("./college_images/facialrecognition.png")
# img = img.resize((1710, 130))
# self.photoimg = ImageTk.PhotoImage(img)
# f_lbl = Label(self.root,
image=self.photoimg)
# f_lbl.place(x=0, y=0, width=1710, height=130)

img=Image.open("./college_images/scanning-
banner.png") img=img.resize((600,130))
self.photoimg=ImageTk.PhotoImage(img)
f_lbl =Label(self.root,image=self.photoimg)
f_lbl.place(x=0,y=0,width=600,height=130)

img1 =
Image.open("./college_images/facialrecognition.png")
img1 = img1.resize((600, 130))
self.photoimg1 =
ImageTk.PhotoImage(img1) f_lbl =
Label(self.root, image=self.photoimg1)
f_lbl.place(x=600, y=0, width=600,
height=130)

img2 = Image.open("./college_images/facial-recognition-system-
banner.jpeg") img2 = img2.resize((600, 130))
self.photoimg2 =
ImageTk.PhotoImage(img2) f_lbl =
Label(self.root, image=self.photoimg2)
f_lbl.place(x=1200, y=0, width=600,
height=130)

# bg img
img3 =
Image.open("./college_images/gradimg2.webp")
img3 = img3.resize((1720, 1050))
self.photoimg3 = ImageTk.PhotoImage(img3)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 43


Engineering
bg_img = Label(self.root,
image=self.photoimg3) bg_img.place(x=0,
y=130, width=1720, height=1050)

title_lbl=Label(bg_img,text="STUDENT RECORDS",font=("verdana",35,"bold"),bg="white",fg="darkgreen");
title_lbl.place(x=0,y=0,width=1710,height="45")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 44


Engineering
main_frame=Frame(bg_img,bd=2,background="white")
main_frame.place(x=15,y=100,width= 1680,height=750)

# left label frame


left_frame=LabelFrame(main_frame,bd=2,relief=RIDGE,text="Student
Details",font=("verdana",20,"bold"),fg="black",bg="white")
left_frame.place(x=15,y=10,width=820,height=720)

img_left =
Image.open("./college_images/Canvastudentsbanner.webp")
img_left = img_left.resize((800, 130))
self.photoimg_left =
ImageTk.PhotoImage(img_left) f_lbl =
Label(left_frame, image=self.photoimg_left)
f_lbl.place(x=1, y=0, width=813, height=130)

# current course frame


current_course_frame=LabelFrame(left_frame,bd=2,relief=RIDGE,text="Current course
information",font=("verdana",20,"bold"),bg="white",fg="black")
current_course_frame.place(x=5,y=135,width=805,height=200)

#department
dep_label=Label(current_course_frame,text="Department",font=("verdana",16,"bold"),bg="white",fg="
navyblue") dep_label.grid(row=0,column=0,padx=10)

dep_combo=ttk.Combobox(current_course_frame,textvariable=self.var_dep,font=("verdana",16,"bold"),s
tate=" readonly",width=20)
dep_combo["values"]=("Select Department","Computer","Civil","Mechanical","BD")
dep_combo.current(0)
dep_combo.grid(row=0,column=1,padx=3,pady=10)

#year combo box


year_label=Label(current_course_frame,text="Year",font=("verdana",16,"bold"),bg="white",fg="navybl
ue") year_label.grid(row=0,column=3,padx=0)

year_combo=ttk.Combobox(current_course_frame,textvariable=self.var_year,font=("verdana",16,"bold")
,state
="readonly",width=20)
year_combo["values"]=("Select Year","First Year","Second Year","Third Year")
year_combo.current(0)
year_combo.grid(row=0,column=4,pady=10)

#semester combo box


sem_label=Label(current_course_frame,text="Semester",font=("verdana",16,"bold"),bg="white",fg="navyblu
e") sem_label.grid(row=1,column=0,padx=10)

sem_combo=ttk.Combobox(current_course_frame,textvariable=self.var_semester,font=("verdana",16,"b
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 45
Engineering
old"),s tate="readonly",width=20)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 46


Engineering
sem_combo["values"]=("Select Semester","1st Semester","2nd Semester","3rd Semester","4th
Semester","5th Semester","6th Semester")
sem_combo.current(0)
sem_combo.grid(row=1,column=1,padx=3,pa
dy=10)

#Division combo box


class_label=Label(current_course_frame,text="Class",font=("verdana",16,"bold"),bg="white",fg="navyblue")
class_label.grid(row=1,column=3,padx=10)

class_combo=ttk.Combobox(current_course_frame,textvariable=self.var_class,font=("verdana",16,"bold"
),stat e="readonly",width=20)
class_combo["values"]=("Select
Class","FYCO1","FYCO2","SYCO1","SYCO2","TYCO1","TYCO2","FYBD","SYBD","TYBD","FYCE1","FYCE2","
SYCE1","SYCE2","TYCE1","TYCE2","FYME1","FYME2","SYME1","SYME2","TYME1","TYME2")
class_combo.current(0)
class_combo.grid(row=1,column=4,pady=10)

#Class Student Information


class_Student_frame =
LabelFrame(left_frame,bd=2,bg="white",relief=RIDGE,text="Class Student
Information",font=("verdana",17,"bold"),fg="navyblue")
class_Student_frame.place(x=5,y=340,width=805,height=250)

#Student id
studentId_label = Label(class_Student_frame,text="Std-
ID:",font=("verdana",16,"bold"),fg="navyblue",bg="white")
studentId_label.grid(row=0,column=0,padx=5,pady=5,sticky=W)

studentId_entry =
ttk.Entry(class_Student_frame,textvariable=self.var_std_id,width=15,font=("verdana",16,"bold"))
studentId_entry.grid(row=0,column=1,padx=5,pady=5,sticky=W)

#Student name
student_name_label = Label(class_Student_frame,text="Std-
Name:",font=("verdana",16,"bold"),fg="navyblue",bg="white")
student_name_label.grid(row=0,column=2,padx=5,pady=5,sticky=W)

student_name_entry =
ttk.Entry(class_Student_frame,textvariable=self.var_std_name,width=15,font=("verdana",16,"bold"))
student_name_entry.grid(row=0,column=3,padx=5,pady=5,sticky=W)

#Phone Number
student_mob_label = Label(class_Student_frame,text="Mob-
No:",font=("verdana",16,"bold"),fg="navyblue",bg="white")
student_mob_label.grid(row=1,column=0,padx=5,pady=5,sticky=W)

student_mob_entry =
ttk.Entry(class_Student_frame,textvariable=self.var_phone,width=15,font=("verdana

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 47


Engineering
",16,"bold")) student_mob_entry.grid(row=1,column=1,padx=5,pady=5,sticky=W)

#Roll No

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 48


Engineering
student_roll_label = Label(class_Student_frame,text="Roll-
No:",font=("verdana",16,"bold"),fg="navyblue",bg="white")
student_roll_label.grid(row=1,column=2,padx=5,pady=5,sticky=W)

student_roll_entry =
ttk.Entry(class_Student_frame,textvariable=self.var_roll,width=15,font=("verdana",16,"bold"))
student_roll_entry.grid(row=1,column=3,padx=5,pady=5,sticky=W)

#Gender
student_gender_label =
Label(class_Student_frame,text="Gender:",font=("verdana",16,"bold"),fg="navyblue
",bg="white") student_gender_label.grid(row=2,column=0,padx=5,pady=5,sticky=W)

#combo box

gender_combo=ttk.Combobox(class_Student_frame,textvariable=self.var_gender,width=13,font=("verda
na",1 6,"bold"),state="readonly")
gender_combo["values"]=("Male","Female","Others")
gender_combo.current(0)
gender_combo.grid(row=2,column=1,padx=5,pady=5,s
ticky=W) #Date of Birth
student_dob_label =
Label(class_Student_frame,text="DOB:",font=("verdana",16,"bold"),fg="navyblue",bg="white")
student_dob_label.grid(row=2,column=2,padx=5,pady=5,sticky=W)

student_dob_entry =
ttk.Entry(class_Student_frame,width=15,textvariable=self.var_dob,font=("verdana",16,"bold"))
student_dob_entry.grid(row=2,column=3,padx=5,pady=5,sticky=W)

#Email
student_email_label =
Label(class_Student_frame,text="Email:",font=("verdana",16,"bold"),fg="navyblue",bg="white")
student_email_label.grid(row=3,column=0,padx=5,pady=5,sticky=W)

student_email_entry =
ttk.Entry(class_Student_frame,width=15,textvariable=self.var_email,font=("verdana
",16,"bold")) student_email_entry.grid(row=3,column=1,padx=5,pady=5,sticky=W)

#Address
student_address_label =
Label(class_Student_frame,text="Address:",font=("verdana",16,"bold"),fg="navyblue",bg="white")
student_address_label.grid(row=3,column=2,padx=5,pady=5,sticky=W)

student_address_entry =
ttk.Entry(class_Student_frame,width=15,textvariable=self.var_address,font=("verdana",16,"bold"))
student_address_entry.grid(row=3,column=3,padx=5,pady=5,sticky=W)

#Radio Buttons
self.var_radio1=StringVar()
radiobtn1=ttk.Radiobutton(class_Student_frame,variable=self.var_radio1,text="Take Photo

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 49


Engineering
Sample",value="yes") radiobtn1.grid(row=5,column=0,padx=5,pady=5,sticky=W)

radiobtn2=ttk.Radiobutton(class_Student_frame,variable=self.var_radio1 ,text="No Photo


Sample",value="no")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 50


Engineering
radiobtn2.grid(row=5,column=1,padx=5,pady=5,sticky=W)

#Button Frame
btn_frame = Frame(left_frame,bd=2,bg="white",relief=RIDGE)
btn_frame.place(x=5,y=605,width=805,height=45)

#save button

save_btn=Button(btn_frame,text="Save",command=self.add_data,width=14,font=("verdana",16,"bold"),
fg="bla ck",bg="navyblue")
save_btn.grid(row=0,column=0,padx=5,pady=10,sticky=W)

#update button

update_btn=Button(btn_frame,text="Update",command=self.update_data,width=14,font=("verdana",16
,"bold"), fg="black",bg="navyblue")
update_btn.grid(row=0,column=1,padx=5,pady=8,sticky=W)

#delete button

del_btn=Button(btn_frame,text="Delete",command=self.delete_data,width=14,font=("verdana",16,"bold
"),fg="b lack",bg="navyblue")
del_btn.grid(row=0,column=2,padx=5,pady=10,sticky=W)

#reset button

reset_btn=Button(btn_frame,text="Reset",command=self.reset_data,width=14,font=("verdana",16,"bold
"),fg="b lack",bg="navyblue")
reset_btn.grid(row=0,column=3,padx=5,pady=10,sticky=W)

#Button Frame
btn2_frame = Frame(left_frame,bd=2,bg="white",relief=RIDGE)
btn2_frame.place(x=5,y=655,width=805,height=35)

#take photo button


take_photo_btn=Button(btn2_frame,text="Take
Pic",command=self.generate_dataset,width=32,font=("verdana",16,"bold"),fg="black",bg="navyblue"
)
take_photo_btn.grid(row=0,column=0,padx=5,pady=3,sticky=W)

#update photo button


update_photo_btn=Button(btn2_frame,text="Update
Pic",width=32,font=("verdana",16,"bold"),fg="black",bg="navyblue")
update_photo_btn.grid(row=0,column=1,padx=5,pady=3,sticky=W)

# right label frame


right_frame=LabelFrame(main_frame,bd=2,relief=RIDGE,text="Student
Details",font=("verdana",20,"bold"),fg="black",bg="white")
right_frame.place(x=845,y=10,width=820,height=720)

img_right = Image.open("./college_images/studdetailsbaner.png")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 51


Engineering
img_right = img_right.resize((800, 130))
self.photoimg_right =
ImageTk.PhotoImage(img_right) f_lbl =
Label(right_frame, image=self.photoimg_right)
f_lbl.place(x=5, y=0, width=810, height=130)

search_frame = LabelFrame(right_frame,bd=2,bg="white",relief=RIDGE,text="Search
System",font=("verdana",20,"bold"),fg="navyblue")
search_frame.place(x=5,y=135,width=805,height=100)

search_label = Label(search_frame,text="Search
By:",font=("verdana",17,"bold"),fg="darkgreen",bg="white")
search_label.grid(row=0,column=0,padx=5,pady=10,sticky=W)

search_combo=ttk.Combobox(search_frame,font=("verdana",16,"bold"),textvariable=self.var_searchTX,
state= "readonly",width=13)
search_combo["values"]=("Select","Roll No")
search_combo.current(0)
search_combo.grid(row=0,column=1,padx=2,pady=10,stick
y=W)

search_entry = ttk.Entry(search_frame,textvariable=self.var_search,width=13,font=("verdana",17,"bold"))
search_entry.grid(row=0,column=2,padx=5,pady=10,sticky=W)

search_btn=Button(search_frame,text="Search",width=9,command=self.search_data,font=("verdana",1
7,"bold "),fg="black",bg="white")
search_btn.grid(row=0,column=3,padx=3)

showAll_btn=Button(search_frame,text="Show
All",command=self.fetch_data,width=8,font=("verdana",17,"bold"),fg="black",bg="
white")
showAll_btn.grid(row=0,column=4,padx=3)

#table frame
table_frame = Frame(right_frame,bd=2,bg="white",relief=RIDGE)
table_frame.place(x=5,y=245,width=805,height=400)

#scroll bar
scroll_x =
ttk.Scrollbar(table_frame,orient=HORIZONTAL) scroll_y
= ttk.Scrollbar(table_frame,orient=VERTICAL)

self.student_table=ttk.Treeview(table_frame,column=("Department","Class","Year","Sem","Id","Name","
Roll-
No","Gender","DOB","Email","Phone","Address","Photo"),xscrollcommand=scroll_x.set,yscrollcomm
and=scroll_ y.set)
scroll_x.pack(side=BOTTOM,fill=X)
scroll_y.pack(side=RIGHT,fill=Y)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 52


Engineering
scroll_x.config(command=self.student_table.xview)
scroll_y.config(command=self.student_table.yview)

self.student_table.heading("Department",text="Department")
self.student_table.heading("Class",text="Class")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 53


Engineering
self.student_table.heading("Year",text="Year")
self.student_table.heading("Sem",text="Semest
er")
self.student_table.heading("Id",text="StudentID
")
self.student_table.heading("Name",text="Name
") self.student_table.heading("Roll-
No",text="Roll-No")
self.student_table.heading("Gender",text="Gen
der")
self.student_table.heading("DOB",text="DOB")
self.student_table.heading("Email",text="Email"
)
self.student_table.heading("Phone",text="Phone
")
self.student_table.heading("Address",text="Add
ress")
self.student_table.heading("Photo",text="Photo"
)

self.student_table["show"]="headings"

self.student_table.column("Department",width
=100)
self.student_table.column("Class",width=100)
self.student_table.column("Year",width=100)
self.student_table.column("Sem",width=100)
self.student_table.column("Id",width=100)
self.student_table.column("Name",width=100)
self.student_table.column("Roll-
No",width=100)
self.student_table.column("Gender",width=10
0)
self.student_table.column("DOB",width=100)
self.student_table.column("Email",width=140)
self.student_table.column("Phone",width=100)
self.student_table.column("Address",width=10
0)
self.student_table.column("Photo",width=100)

#
self.student_table.column("Gender",width=100)
# self.student_table.column("DOB",width=100)
# self.student_table.column("Teacher",width=100)

self.student_table.pack(fill=BOTH,expand=1)
self.student_table.bind("<ButtonRelease>",self.get_curs
or) self.fetch_data()

# ====================function declarrtion======================

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 54


Engineering
def add_data(self):
if self.var_dep.get()=="Select Department"or self.var_std_name.get()=="" or self.var_std_id=="":
messagebox.showerror("Error","All fields are
required",parent=self.root) else:
try:

conn=mysql.connector.connect(host="localhost",user="root",password="swarnim0129",database="face_recogniz
er",aut h_plugin='mysql_native_password')
my_cursor=conn.cursor()
my_cursor.execute("insert into student values(%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s)",(
self.var_dep.get(),
self.var_class.get(),

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 55


Engineering
self.var_year.get(),
self.var_semester.get(),
self.var_std_id.get(),
self.var_std_name.get(),
self.var_roll.get(),
self.var_gender.get(),
self.var_dob.get(),
self.var_email.get(),
self.var_phone.get(),
self.var_address.get(),
self.var_radio1.get()
))
conn.commit()
self.fetch_data()
conn.close()
messagebox.showinfo("Success","Student details added successfully
",parent=self.root) except Exception as es:
messagebox.showerror("Error",f"Due To:{str(es)}",parent=self.root)

# ========================fetch data=======================
def fetch_data(self):
conn = mysql.connector.connect(host="localhost", user="root",
password="swarnim0129", database="face_recognizer",
auth_plugin='mysql_native_password')
my_cursor = conn.cursor()
my_cursor.execute("select * from student")
data=my_cursor.fetchall()

if len(data)!=0:
self.student_table.delete(*self.student_table.get_childr
en()) for i in data:
self.student_table.insert("",END,values=i)
conn.commit()
conn.close()

# =========================get cursor=========================

def get_cursor(self,event=" "):


cursor_focus=self.student_table.focus()
content=self.student_table.item(cursor_f
ocus) data=content["values"]
self.var_dep.set(data[0])
self.var_class.set(data[1]),
self.var_year.set(data[2]),
self.var_semester.set(data[3]),
self.var_std_id.set(data[4]),
self.var_std_name.set(data[5]),
self.var_roll.set(data[6]),
self.var_gender.set(data[7]),
self.var_dob.set(data[8]),
self.var_email.set(data[9]),
self.var_phone.set(data[10]),

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 56


Engineering
self.var_address.set(data[11]),
self.var_radio1.set(data[12])

#=========================update function=====================
def update_data(self):
if self.var_dep.get()=="Select Department"or self.var_std_name.get()=="" or self.var_std_id=="":
messagebox.showerror("Error","All fields are required",parent=self.root)

else:
try:
Update=messagebox.askyesno("Update","Do you want to update this student
details",parent=self.root) if Update>0:
conn = mysql.connector.connect(host="localhost", user="root",
password="swarnim0129",database="face_recognizer",
auth_plugin='mysql_native_password')
my_cursor = conn.cursor()
my_cursor.execute("Update student set
Dep=%s,Class=%s,Year=%s,Semester=%s,Name=%s,Roll=%s,Gender=%s,DOB=%s,Email=
%s,Ph one=%s,Address=%s,Photo=%s where Student_id=%s",(
self.var_dep.get(),
self.var_class.get(),
self.var_year.get(),

self.var_semester.get(),

self.var_std_name.get
(),
self.var_roll.get(),
self.var_gender.get
(),
self.var_dob.get(),
self.var_email.get()
,
self.var_phone.get(
),

self.var_address.get(
), self.var_radio1.get(),
self.var_std_id.get()
))
else:
if not Update:
return
messagebox.showinfo("Success","Student Details successfully
updated",parent=self.root) conn.commit()
self.fetch_data()
conn.close()
except Exception as es:
messagebox.showerror("Error",f"Due to:{str(es)}",parent=self.root)

# ===========================delete function====================

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 57


Engineering
def delete_data(self):
if self.var_std_id.get()=="":
messagebox.showerror("Error","Student id is required to delete the data",parent=self.root)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 58


Engineering
else:
try:
delete=messagebox.askyesno("Delete Confirmation","Do you want to delete this
student",parent=self.root) if delete>0:
conn = mysql.connector.connect(host="localhost", user="root", password="swarnim0129",
database="face_recognizer", auth_plugin='mysql_native_password')
my_cursor = conn.cursor()
sql="delete from student where Student_id=
%s" val=(self.var_std_id.get(),)
my_cursor.execute(sql,val)
else:
if not delete:
return
conn.commit()
self.fetch_data()
conn.close()

messagebox.showinfo("Delete","Successfully deleted student details",parent=self.root)


self.fetch_data()

except Exception as es:


messagebox.showerror("Error", f"Due to:{str(es)}", parent=self.root)

# ==============================function reset data=====================


def reset_data(self):
self.var_dep.set("Select
Department")
self.var_class.set("Select Class"),
self.var_year.set("Select Year"),
self.var_semester.set("Select
Semester"), self.var_std_id.set(""),
self.var_std_name.set(""),
self.var_roll.set(""),
self.var_gender.set("Male"),
self.var_dob.set(""),
self.var_email.set(""),
self.var_phone.set(""),
self.var_address.set(""),
self.var_radio1.set("")

# =================================search data===========================

def search_data(self):
if self.var_search.get()=="" or self.var_searchTX.get()=="Select":
messagebox.showerror("Error","Select Combo option and enter entry
box",parent=self.root) else:
try:
conn = mysql.connector.connect(host="localhost", user="root",

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 59


Engineering
my_cursor = conn.cursor()
sql = "SELECT Dep,Class,Year,Semester,Name,Student_id,Gender,DOB,Email,Phone,Address,Photo
from student where Roll='" +str(self.var_search.get()) + "'"
my_cursor.execute(sql)
# my_cursor.execute("select * from student where Roll_No= " +str(self.var_search.get())+"
"+str(self.var_searchTX.get())+"")
rows=my_cursor.fetchal
l() if len(rows)!=0:
self.student_table.delete(*self.student_table.get_childr
en()) for i in rows:
self.student_table.insert("",END,values
=i) conn.commit()
# messagebox.showinfo("done","done",parent=self.root)
# if rows==None:
# messagebox.showerror("Error","Data Not
Found",parent=self.root) # conn.commit()
# elif i==0:
# messagebox.showerror("Error","The desired data not
found",parent=self.root) # else:
# pass
else:
messagebox.showerror("Error", "Data Not Found", parent=self.root)

conn.close()
except Exception as es:
messagebox.showerror("Error",f"Due To :{str(es)}",parent=self.root)

# ==========================generate dataset and photo samples================================


def generate_dataset(self):
if self.var_dep.get()=="Select Department"or self.var_std_name.get()=="" or self.var_std_id=="":
messagebox.showerror("Error","All fields are required",parent=self.root)

else:
try:

conn = mysql.connector.connect(host="localhost", user="root",


password="swarnim0129",database="face_recognizer",
auth_plugin='mysql_native_password')
my_cursor = conn.cursor()
my_cursor.execute("select * from
student") myresult=my_cursor.fetchall()
id=0
for x in myresult:
id+=1
my_cursor.execute("Update student set
Dep=%s,Class=%s,Year=%s,Semester=%s,Name=%s,Roll=%s,Gender=%s,DOB=%s,Email=
%s, Phone=%s,Address=%s,Photo=%s where Student_id=%s",(
self.var_dep.get(),
self.var_class.get(),

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 60


Engineering
self.var_year.get(),

self.var_semester.get(),

self.var_std_name.get
(),
self.var_roll.get(),
self.var_gender.get
(),
self.var_dob.get(),
self.var_email.get()
,
self.var_phone.get(
),

self.var_address.get(),
self.var_radio1.get(),

self.var_std_id.get()==id+1
))
conn.commit()
self.fetch_data()
self.reset_data()
conn.close()

# ==============================loadpredefined data on facefrontals from


opencv=========================
face_classifier=cv2.CascadeClassifier("haarcascade_frontalface_default.xml")

def face_cropped(img):
gray=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
faces=face_classifier.detectMultiScale(gray,1.3,5)

for (x,y,w,h) in faces:


face_cropped=img[y:y+h,x:
x+w] return face_cropped

cap=cv2.VideoCapture(0)
img_id=0
while True:
ret,my_frame=cap.read()
if face_cropped(my_frame) is not None:
img_id+=1
face=cv2.resize(face_cropped(my_frame),(500,500))
face=cv2.cvtColor(face,cv2.COLOR_BGR2GRAY)
file_name_path="data/user."+str(id)+"."+str(img_id)+".jpg"
cv2.imwrite(file_name_path,face)
cv2.putText(face,str(img_id),(50,50),cv2.FONT_HERSHEY_COMPLEX,2,(0,0,0),2) #white color
cv2.imshow("Cropped face",face)

if cv2.waitKey(1)==13 or
int(img_id)==180: break
cap.release()
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 61
Engineering
cv2.destroyAllWindows()
messagebox.showinfo("Result","Generating Datasets
Completed ")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 62


Engineering
except Exception as es:
messagebox.showerror("Error", f"Due to:{str(es)}", parent=self.root)

if name ==" main ":


root=Tk()
obj=Student(root)
root.mainloop()

Train.py
from tkinter import *
from tkinter import ttk

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 63


Engineering
from PIL import Image, ImageTk
import numpy as np
from tkinter import messagebox
import os
import cv2

class Train:
def init (self, root):
self.root = root
self.root.geometry("1710x1150+0
+0") self.root.title("Training
Panel")

title_lb1 = Label(self.root, text="Welcome to Training Window", font=("verdana", 38, "bold"), bg="black",


fg="white") title_lb1.place(x=0, y=0, width=1710, height=58)

img3 =
Image.open("./college_images/trainBGBG.png")
img3 = img3.resize((1710, 1050))
self.photoimg3 = ImageTk.PhotoImage(img3)
bg_img = Label(self.root,
image=self.photoimg3) bg_img.place(x=0,
y=58, width=1710, height=1050)

b1_1 = Button(bg_img, text="Train Images", cursor="hand2",


command=self.train_classifier, font=("veranda", 45, "bold"), bg="white",
fg='black')
b1_1.place(x=660, y=400, width=420, height=62)

def train_classifier(self):
data_dir = "data"
path = [os.path.join(data_dir, file) for file in os.listdir(data_dir) if
file.lower().endswith(('.png', '.jpg', '.jpeg', '.gif'))]

faces = []
ids = []

progress_frame = Frame(self.root, width=800,


height=30) progress_frame.place(relx=0.5, rely=0.5,
anchor=CENTER)

self.progress_bar = ttk.Progressbar(progress_frame, orient=HORIZONTAL, length=800,


mode='determinate') self.progress_bar.pack(fill='both', expand=True,pady=30)

total_images = len(path)
self.current_idx = 0

self.train_images(path, faces, ids, total_images)

def train_images(self, path, faces, ids,


total_images): if self.current_idx <
total_images:

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 64


Engineering
image_path = path[self.current_idx]
img = Image.open(image_path).convert('L') # gray scale
image_np = np.array(img, 'uint8')
img_id = int(os.path.split(image_path)[1].split('.')[1])

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 65


Engineering
faces.append(image_n
p) ids.append(img_id)

# Update progress bar


progress_value = int((self.current_idx + 1) / total_images *
100) self.progress_bar['value'] = progress_value
self.root.update_idletasks()

# Schedule the next update affter processing the current image


self.root.after(1, self.train_images, path, faces, ids,
total_images) self.current_idx += 1
else:
self.finish_training(faces, ids)
self.progress_bar.destroy() # Remove progress bar after training

def finish_training(self, faces, ids):


ids = np.array(ids)

# Train the classifier


clf = cv2.face.LBPHFaceRecognizer_create()
clf.train(faces, ids)
clf.write("clifi.xml")

cv2.destroyAllWindows()
messagebox.showinfo("Result", "Training dataset completed!!", parent=self.root)

if name == " main


": root = Tk()
obj = Train(root)
root.mainloop()

Register.py
from tkinter import *
from tkinter import ttk
from PIL import Image,ImageTk
from tkinter import messagebox
import mysql.connector

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 66


Engineering
class Register:

def init (self,root):


self.root=root
self.root.geometry("1710x1150+0+0")
self.root.title("Register")

# ==============variables==================
self.var_fname=StringVar
()
self.var_lname=StringVar
()
self.var_cnum=StringVar(
)
self.var_email=StringVar(
) self.var_ssq=StringVar()
self.var_sa=StringVar()
self.var_pwd=StringVar()
self.var_cpwd=StringVar(
) self.var_check=IntVar()

img3 =
Image.open("college_images/u.jpg") img3
= img3.resize((1710, 1150))
self.photoimg3 =
ImageTk.PhotoImage(img3) bg_img =
Label(self.root, image=self.photoimg3)
bg_img.place(x=0, y=0, width=1710, height=1050)

frame= Frame(self.root,bg="#F2F2F2",border=3)
frame.place(x=405,y=200,width=900,height=580)

get_str = Label(frame,text="Registration",font=("times new


roman",36,"bold"),fg="#002B53",bg="#F2F2F2") get_str.place(x=350,y=50)

#label1
fname =lb1= Label(frame,text="First Name:",font=("times new
roman",18,"bold"),fg="#002B53",bg="#F2F2F2") fname.place(x=100,y=120)

#entry1
self.txtuser=ttk.Entry(frame,textvariable=self.var_fname,font=("times new
roman",18,"bold")) self.txtuser.place(x=103,y=145,width=270)

#label2
lname =lb1= Label(frame,text="Last Name:",font=("times new
roman",18,"bold"),fg="#002B53",bg="#F2F2F2") lname.place(x=100,y=190)

#entry2

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 67


Engineering
self.txtpwd=ttk.Entry(frame,textvariable=self.var_lname,font=("times new
roman",18,"bold")) self.txtpwd.place(x=103,y=215,width=270)

#label1
cnum =lb1= Label(frame,text="Contact No:",font=("times new
roman",18,"bold"),fg="#002B53",bg="#F2F2F2")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 68


Engineering
cnum.place(x=530,y=120)

#entry1
self.txtuser=ttk.Entry(frame,textvariable=self.var_cnum,font=("times new
roman",18,"bold")) self.txtuser.place(x=533,y=145,width=270)

#label2
email =lb1= Label(frame,text="Email:",font=("times new roman",18,"bold"),fg="#002B53",bg="#F2F2F2")
email.place(x=530,y=190)

#entry2
self.txtpwd=ttk.Entry(frame,textvariable=self.var_email,font=("times new
roman",18,"bold")) self.txtpwd.place(x=533,y=215,width=270)

#label1
ssq =lb1= Label(frame,text="Select Security Question:",font=("times new
roman",18,"bold"),fg="#002B53",bg="#F2F2F2")
ssq.place(x=100,y=270)

#Combo Box1
self.combo_security = ttk.Combobox(frame,textvariable=self.var_ssq,font=("times new
roman",18,"bold"),state="readonly")
self.combo_security["values"]=("Select","Your Date of Birth","Your Nick Name","Your
Favorite Book") self.combo_security.current(0)
self.combo_security.place(x=103,y=295,width=270)

#label2
sa =lb1= Label(frame,text="Security Answer:",font=("times new
roman",18,"bold"),fg="#002B53",bg="#F2F2F2") sa.place(x=100,y=340)

#entry2
self.txtpwd=ttk.Entry(frame,textvariable=self.var_sa,font=("times new
roman",18,"bold")) self.txtpwd.place(x=103,y=365,width=270)

#label1
pwd =lb1= Label(frame,text="Password:",font=("times new
roman",18,"bold"),fg="#002B53",bg="#F2F2F2") pwd.place(x=530,y=270)

#entry1
self.txtuser=ttk.Entry(frame,textvariable=self.var_pwd,font=("times new
roman",18,"bold")) self.txtuser.place(x=533,y=295,width=270)

#label2
cpwd =lb1= Label(frame,text="Confirm Password:",font=("times new
roman",18,"bold"),fg="#002B53",bg="#F2F2F2") cpwd.place(x=530,y=340)

#entry2
self.txtpwd=ttk.Entry(frame,textvariable=self.var_cpwd,font=("times new
roman",18,"bold")) self.txtpwd.place(x=533,y=365,width=270)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 69


Engineering
# Checkbutton
checkbtn = Checkbutton(frame,text="I Agree the Terms & Conditions",variable=self.var_check,font=("times
new roman",18,"bold"),fg="#002B53",bg="#F2F2F2")
checkbtn.place(x=100,y=415,width=270)

# Creating Button Register

loginbtn=Button(frame,text="Register",command=self.register_data,font=("times new
roman",18,"bold"),relief=RIDGE,fg="black")
loginbtn.place(x=103,y=470,width=270,height=35)

# Creating Button Login

loginbtn=Button(frame,text="Login",font=("times new
roman",18,"bold"),command=self.ret_login,relief=RIDGE,fg="black")
loginbtn.place(x=533,y=470,width=270,height=35)

def ret_login(self):
self.root.destroy
()

# ======================function decaration===================
def register_data(self):
if (self.var_fname.get()=="" or self.var_lname.get()=="" or self.var_cnum.get()=="" or
self.var_email.get()=="" or self.var_ssq.get()=="Select" or self.var_sa.get()=="" or
self.var_pwd.get()=="" or self.var_cpwd.get()==""):
messagebox.showerror("Error","All Field Required!")
elif(self.var_pwd.get() != self.var_cpwd.get()):
messagebox.showerror("Error","Please Enter Password & Confirm Password are
Same!") elif(self.var_check.get()==0):
messagebox.showerror("Error","Please Check the Agree Terms and
Conditons!") else:
try:
# messagebox.showinfo("Successfully","Successfully Register!")

conn=mysql.connector.connect(host="localhost",user="root",password="swarnim0129",database=
"login
_schema",auth_plugin='mysql_native_passwor
d') mycursor = conn.cursor()
query=("select * from register where
email=%s") value=(self.var_email.get(),)
mycursor.execute(query,value)
row=mycursor.fetchone()
if row!=None:
messagebox.showerror("Error","User already exist,please try another
email") else:
mycursor.execute("insert into register values(%s,%s,%s,%s,%s,%s,%s)",(
self.var_fname.get(),
self.var_lname.get
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 70
Engineering
(),
self.var_cnum.get(
),

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 71


Engineering
self.var_email.get(
),
self.var_ssq.get(),
self.var_sa.get(),
self.var_pwd.get()
))

conn.commit()
conn.close()
messagebox.showinfo("Success","Successfully
Registerd!",parent=self.root) except Exception as es:
messagebox.showerror("Error",f"Due to: {str(es)}",parent=self.root)

if name ==" main ":


root=Tk()
obj=Register(root)

FaceRecognition.py
from tkinter import *
from PIL import Image, ImageTk
import cv2
import mysql.connector
from datetime import datetime
import webbrowser

class Face_Recognition:
#new
def init (self, root):
self.root=root
self.root.geometry("1710x1150+0+0
") self.root.title("Training Panel")

title_lb1 = Label(self.root,text="Face Recognition",font=("verdana",38,"bold"),bg="white",fg="blue")


title_lb1.place(x=0,y=0,width=1710,height=58)

img3 =
Image.open("./college_images/frec.png")
img3 = img3.resize((1710, 1050))
self.photoimg3 =
ImageTk.PhotoImage(img3) bg_img =
Label(self.root, image=self.photoimg3)
bg_img.place(x=0, y=58, width=1710, height=1010)

b1_1 = Button(bg_img, text="Detect Face",cursor="hand2",


command=self.face_recog,font=("veranda", 45, "bold"), bg="grey",
fg='darkblue')
b1_1.place(x=660, y=750,width=390, height=50)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 72


Engineering
if key == ord("m"):
with open("Attendance.csv", "r+", newline="\n") as f:
myDataList = f.readlines()
name_list = []
for line in myDataList:
entry = line.split(",")
name_list.append(entry[0])
if (i not in name_list) and (r not in name_list) and (n not in name_list) and (c not in
name_list): now = datetime.now()
d1 = now.strftime("%d/%m/%Y")
dtString = now.strftime("%H:%M:
%S")
f.writelines(f"\n{i},{c},{r},{n},{dtString},{d1},Present")

def face_recog(self):
def draw_boundray(img, classifier, scaleFactor, minNeighbors, color, text, clf):

gray_image=cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)
featuers=classifier.detectMultiScale(gray_image,scaleFactor,minNeighbors)

coord=[]

for (x,y,w,h) in featuers: cv2.rectangle(img,


(x,y),(x+w,y+h),(0,255,0),3)
id,predict=clf.predict(gray_image[y:y+h,x:
x+w])

confidence=int((100*(1-predict/300)))

conn = mysql.connector.connect(host="localhost", user="root",


password="swarnim0129", database="face_recognizer",
auth_plugin='mysql_native_password')
cursor = conn.cursor()

cursor.execute("select Name from student where


Student_id="+str(id)) n_result = cursor.fetchone()
n = n_result[0] if n_result is not None else "Unknown"

cursor.execute("select Roll from student where


Student_id="+str(id)) r_result = cursor.fetchone()
r = r_result[0] if r_result is not None else "Unknown"

cursor.execute("select Student_id from student where


Student_id="+str(id)) i_result = cursor.fetchone()
i = i_result[0] if i_result is not None else "Unknown"

cursor.execute("select Class from student where


Student_id="+str(id)) c_result = cursor.fetchone()
c = c_result[0] if c_result is not None else "Unknown"

if confidence > 77:

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 73


Engineering
cv2.putText(img,f"Student_id:{i}",(x,y-80),cv2.FONT_HERSHEY_COMPLEX,0.8,
(64,15,223),2) cv2.putText(img,f"Name:{n}",(x,y-
55),cv2.FONT_HERSHEY_COMPLEX,0.8,(64,15,223),2)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 74


Engineering
cv2.putText(img,f"Roll:{r}",(x,y-30),cv2.FONT_HERSHEY_COMPLEX,0.8,(64,15,223),2)
self.mark_attendance(i,r,n,c)

else:
cv2.rectangle(img,(x,y),(x+w,y+h),(0,0,255),3)
cv2.putText(img,"Unknown Face",(x,y-5),cv2.FONT_HERSHEY_COMPLEX,0.8,(255,255,0),3)

return False

coord=[x,y,w,y]

return coord

r_pressed=False

def recognize(img, clf, faceCascade):


coord = draw_boundray(img, faceCascade, 1.1, 10, (255, 25, 255), "Face",
clf) return img, coord

def redirect_to_website():
webbrowser.open("https://sparkling-starship-e44032.netlify.app/") # Replace with your desired website URL

faceCascade =
cv2.CascadeClassifier("haarcascade_frontalface_default.xml") clf =
cv2.face.LBPHFaceRecognizer_create()
clf.read("clifi.xml")

videoCap = cv2.VideoCapture(0)

while True:
ret, img = videoCap.read()
img, coord = recognize(img, clf, faceCascade)
cv2.imshow("Face Detector", img)

key = cv2.waitKey(1)

if key == 13: # Enter key to exit


break
elif key == ord('r') and coord and not r_pressed:
r_pressed=True # 'r' key pressed and face detected
redirect_to_website() # Call the function to redirect to the website
elif key!=ord('r'):
r_pressed=False
videoCap.release()
cv2.destroyAllWindows()

if name == " main


": root = Tk()
obj =
Face_Recognition(root)
root.mainloop()

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 75


Engineering
Attendance.py
from tkinter import *
from tkinter import ttk
from PIL import Image,ImageTk
from tkinter import messagebox
import mysql.connector
import os
from tkinter import filedialog
import csv

mydata=[]
class Attendance:

def init (self,root):


self.root=root
self.root.geometry("1710x1150+0+
0") self.root.title("Attendance
Management")

img=Image.open("./college_images/scanning-
banner.png") img=img.resize((600,130))
self.photoimg=ImageTk.PhotoImage(img)
f_lbl =Label(self.root,image=self.photoimg)

# Variables
self.var_id=StringVar()
self.var_roll=StringVar()
self.var_name=StringVar
()
self.var_dep=StringVar()
self.var_time=StringVar()
self.var_date=StringVar()

img1 =
Image.open("./college_images/facialrecognition.png")
img1 = img1.resize((600,150))
self.photoimg1 =
ImageTk.PhotoImage(img1) f_lbl =

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 76


Engineering
img2 = Image.open("./college_images/facial-recognition-system-
banner.jpeg") img2 = img2.resize((600, 130))
self.photoimg2 =
ImageTk.PhotoImage(img2) f_lbl =
Label(self.root, image=self.photoimg2)
f_lbl.place(x=1200, y=0, width=600,
height=130)

# bg img
img3 =
Image.open("./college_images/brainai.jpeg")
img3 = img3.resize((1710, 1050))
self.photoimg3 = ImageTk.PhotoImage(img3)
bg_img = Label(self.root,
image=self.photoimg3) bg_img.place(x=0,
y=130, width=1710, height=1050)

title_lbl=Label(bg_img,text="Attendance
Records",font=("verdana",35,"bold"),bg="white",fg="green")
title_lbl.place(x=0,y=0,width=1710,height="45")

main_frame=Frame(bg_img,bd=2,bg="white")
main_frame.place(x=10,y=75,width=
1680,height=825)

# left label frame


left_side_frame=LabelFrame(main_frame,bd=2,relief=RIDGE,text="Student Attendance
Details",font=("verdana",20,"bold"),fg="navyblue",bg="white")
left_side_frame.place(x=15,y=10,width=820,height=800)
img_left =
Image.open("./college_images/CanvaStudentsbanner.webp")
img_left = img_left.resize((800, 130))
self.photoimg_left =
ImageTk.PhotoImage(img_left) f_lbl =
Label(left_side_frame, image=self.photoimg_left)
f_lbl.place(x=1, y=0, width=813, height=110)

#inside left frame

left_frame=LabelFrame(left_side_frame,bd=2,relief=RIDGE,text="Student Attendance
Details",font=("verdana",20,"bold"),fg="navyblue",bg="white")
left_frame.place(x=0,y=135,width=813,height=300)

#Student id
studentId_label = Label(left_frame,text="Std-
ID:",font=("verdana",18,"bold"),fg="black",bg="white")
studentId_label.grid(row=0,column=0,padx=5,pady=5,sticky=W)

studentId_entry =
ttk.Entry(left_frame,textvariable=self.var_id,width=20,font=("verdana",16,"bold"))

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 77


Engineering
studentId_entry.grid(row=0,column=1,padx=5,pady=5,sticky=W)

#Student Roll
student_roll_label = Label(left_frame,text="Roll.No:",font=("verdana",18,"bold"),fg="black",bg="white")
student_roll_label.grid(row=0,column=2,padx=5,pady=5,sticky=W)

student_roll_entry = ttk.Entry(left_frame,textvariable=self.var_roll,width=20,font=("verdana",16,"bold"))
student_roll_entry.grid(row=0,column=3,padx=5,pady=5,sticky=W)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 78


Engineering
#Studnet Name
student_name_label = Label(left_frame,text="Std-
Name:",font=("verdana",18,"bold"),fg="black",bg="white")
student_name_label.grid(row=1,column=0,padx=5,pady=5,sticky=W)

student_name_entry =
ttk.Entry(left_frame,textvariable=self.var_name,width=20,font=("verdana",16,"bold"))
student_name_entry.grid(row=1,column=1,padx=5,pady=5,sticky=W)

#time
time_label =
Label(left_frame,text="Time:",font=("verdana",18,"bold"),fg="black",bg="white")
time_label.grid(row=1,column=2,padx=5,pady=5,sticky=W)

time_entry =
ttk.Entry(left_frame,textvariable=self.var_time,width=20,font=("verdana",16,"bold"))
time_entry.grid(row=1,column=3,padx=5,pady=5,sticky=W)

#Date
date_label =
Label(left_frame,text="Date:",font=("verdana",18,"bold"),fg="black",bg="white")
date_label.grid(row=2,column=0,padx=5,pady=5,sticky=W)

date_entry =
ttk.Entry(left_frame,textvariable=self.var_date,width=20,font=("verdana",16,"bold"))
date_entry.grid(row=2,column=1,padx=5,pady=5,sticky=W)

#Attendance
student_attend_label = Label(left_frame,text="Attend-
status:",font=("verdana",18,"bold"),fg="black",bg="white")
student_attend_label.grid(row=2,column=2,padx=5,pady=5,sticky=W)

attend_combo=ttk.Combobox(left_frame,textvariable=self.var_attend,width=19,font=("verdana",16,"bol
d"),stat e="readonly")
attend_combo["values"]=("Status","Present","Absent")
attend_combo.current(0)
attend_combo.grid(row=2,column=3,padx=5,pady=5,s
ticky=W)

#Button Frame
btn_frame = Frame(left_side_frame,bd=2,bg="white",relief=RIDGE)
btn_frame.place(x=5,y=320,width=805,height=110)

#Import button
save_btn=Button(btn_frame,text="Import
CSV",width=19,command=self.importCsv,font=("verdana",19,"bold"),fg="navyblue",bg="navyblue")
save_btn.grid(row=0,column=0,padx=22,pady=10,sticky=W)

#Export button
update_btn=Button(btn_frame,text="Export
CSV",command=self.exportCsv,width=19,font=("verdana",19,"bold"),fg="navyblue",bg="navyblue")

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 79


Engineering
update_btn.grid(row=0,column=1,padx=22,pady=8,sticky=W)

#Update button

del_btn=Button(btn_frame,text="Update",width=19,command=self.update_data,font=("verdana",19,"bol
d"),fg= "navyblue",bg="navyblue")
del_btn.grid(row=1,column=0,padx=22,pady=10,sticky=W)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 80


Engineering
#reset button

reset_btn=Button(btn_frame,text="Reset",width=19,command=self.reset_data,font=("verdana",19,"bold
"),fg="n avyblue",bg="navyblue")
reset_btn.grid(row=1,column=1,padx=22,pady=10,sticky=W)

# right label frame


right_frame=LabelFrame(main_frame,bd=2,relief=RIDGE,text="Student
Details",font=("verdana",20,"bold"),fg="navyblue",bg="white")
right_frame.place(x=845,y=10,width=820,height=800)

table_frame = LabelFrame(right_frame,bd=2,bg="white",relief=RIDGE,text="Search
System",font=("verdana",20,"bold"),fg="navyblue")
table_frame.place(x=5,y=5,width=805,height=445)

# ==========================scroll bar table=========================


scroll_x =
ttk.Scrollbar(table_frame,orient=HORIZONTAL) scroll_y
= ttk.Scrollbar(table_frame,orient=VERTICAL)

self.attendanceReport = ttk.Treeview(table_frame,column=("Student_id","Class","Roll-
No","Name","Time","Date","Attend"),xscrollcommand=scroll_x.set,yscrollcommand=
scroll_y.set)

scroll_x.pack(side=BOTTOM,fill=X)
scroll_y.pack(side=RIGHT,fill=Y)
scroll_x.config(command=self.attendanceReport.xview)
scroll_y.config(command=self.attendanceReport.yview)

self.attendanceReport.heading("Student_id",text="Stude
nt_id") self.attendanceReport.heading("Roll-
No",text="Roll-No")
self.attendanceReport.heading("Class",text="Class")
self.attendanceReport.heading("Name",text="Student-
Name")
self.attendanceReport.heading("Time",text="Time")
self.attendanceReport.heading("Date",text="Date")
self.attendanceReport.heading("Attend",text="Attend-
status") self.attendanceReport["show"]="headings"

# Set Width of Colums


self.attendanceReport.column("Student_id",width
=100) self.attendanceReport.column("Roll-
No",width=100)
self.attendanceReport.column("Class",width=100
)
self.attendanceReport.column("Name",width=15
0)
self.attendanceReport.column("Time",width=100)
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 81
Engineering
self.attendanceReport.column("Date",width=100)
self.attendanceReport.column("Attend",width=10
0)

self.attendanceReport.pack(fill=BOTH,expand=1)
self.attendanceReport.bind("<ButtonRelease>",self.get_cursor_left)

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 82


Engineering
# ==============================functions=================================
def fetchData(self,rows):
self.attendanceReport.delete(*self.attendanceReport.get_chil
dren()) for i in rows:
self.attendanceReport.insert("",END,values=i)

def importCsv(self):
global
mydata
mydata.clear
()
fln=filedialog.askopenfilename(initialdir=os.getcwd(),title="Open Csv",filetypes=(("CSV file","*csv"),( "All
File","*.*")),parent=self.root)
with open(fln) as myfile:
csvread=csv.reader(myfile,delimiter
=",") for i in csvread:
mydata.append(i)
self.fetchData(mydata)

def
exportCsv(self):
try:
if len(mydata)<1:
messagebox.showerror("No Data","No Data found to
export",parent=self.root) return False
fln=filedialog.asksaveasfilename(initialdir=os.getcwd(),title="Open Csv",filetypes=(("CSV file","*csv"),( "All
File","*.*")),parent=self.root)
with open(fln,mode="w",newline="") as
myfile:
exp_write=csv.writer(myfile,delimiter
=",") for i in mydata:
exp_write.writerow(i)
messagebox.showinfo("Data export","Your data exported to "+os.path.basename(fln)+"
Successfully") except Exception as es:
messagebox.showerror("Error", f"Due to:{str(es)}", parent=self.root)

def reset_data(self):
self.var_id.set("")
self.var_roll.set("")
self.var_name.set("")
self.var_time.set("")
self.var_date.set("")
self.var_attend.set("Statu
s")

# ========================== cursor for csv=====================


def get_cursor_left(self,event=""):
cursor_focus = self.attendanceReport.focus()
content =
self.attendanceReport.item(cursor_focus) data
= content["values"]

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 83


Engineering
self.var_id.set(data[0]),
self.var_roll.set(data[1]),
self.var_name.set(data[2]),
self.var_time.set(data[3]),
self.var_date.set(data[4]),

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 84


Engineering
self.var_attend.set(data[5])

def update_data(self):
if self.var_id.get()=="" or self.var_roll.get=="" or self.var_name.get()=="" or
self.var_time.get()=="" or self.var_date.get()=="" or
self.var_attend.get()=="Status":
messagebox.showerror("Error","Please Fill All Fields are
Required!",parent=self.root) else:
try:
Update=messagebox.askyesno("Update","Do you want to Update this Student
Attendance!",parent=self.root) if Update > 0:
conn = mysql.connector.connect(host="localhost", user="root",
password="swarnim0129",database="face_recognizer",
auth_plugin='mysql_native_password')
mycursor = conn.cursor()
mycursor.execute("update attendance
set
std_id=%s,std_roll_no=%s,std_name=%s,std_time=%s,std_date=
%s,std_attendance=%s where std_id=%s",(
self.var_id.get(),
self.var_roll.get(),
self.var_name.get(
),
self.var_time.get(),
self.var_date.get(),
self.var_attend.get
(), self.var_id.get()
))
else:
if not Update:
return
messagebox.showinfo("Success","Successfully Updated!",parent=self.root)
conn.commit()
self.fetch_data()
conn.close()
except Exception as es:
messagebox.showerror("Error",f"Due to: {str(es)}",parent=self.root)

def fetch_data(self):
conn = mysql.connector.connect(host="localhost", user="root",
password="swarnim0129",database="face_recognizer", auth_plugin='mysql_native_password')
mycursor = conn.cursor()

mycursor.execute("select * from attendance")


data=mycursor.fetchall()

if len(data)!= 0:
self.attendanceReport.delete(*self.attendanceReport.get_childr
en()) for i in data:
self.attendanceReport.insert("",END,values
=i) conn.commit()
conn.close()

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 85


Engineering
if name ==" main ":

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 86


Engineering
root=Tk()
obj=Attendance(roo
t) root.mainloop()

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 87


Engineering
CHAPTER 6

ALGORITHM
FACE-FLEX

Algorithm

6.1 Algorithm to train faces we use LBPH algorithm

LBPH stands for:


● L - Local
● B - Binary
● P - Pattern
● H- Histogram

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 88


Engineering
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 89
Engineering
1. Working of LBPH algorithm

It uses this formula and based on this formula it recognizes the face by building
Certain confidence and based on that confidence it tracks down the image.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 90


Engineering
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 91
Engineering
It generates a classifier file which contains the binary data which gets automatically
generated. When the images are trained, and based on the binary data the face is
detected

Fig 6 .1.1 Training Algo

This function will take the images from a folder and train the images using LBPH
algorithm and generate the classifier file (clifi). Which contains the binary data of the
trained images

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 92


Engineering
6.2Detecting Faces

Fig 6.2.1 Face Detect

This function reads the classifier file and detects the face according to the binary
data generated in the file and is released after hitting enter key to free up the
memory as well and to reduce the load on the cpu/processor

Fig 6.2.2 Confidence

If the confidence generated by detecting the face is greater than 88 (it is used to
mark the attendance when it is more accurate) then only it will show the
student details above the camera frame else It will show unknown face.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 93


Engineering
CHAPTER 7

TESTING
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 94


Engineering
TESTING

TESTING WITH TEST CASES

7.1Introduction:
Once source code has been generated, software must be tested to uncover
(and correct) as manyerrors as possible before delivering to the customer.
Our goal is to design a series of test casesthat have a high likelihood of
finding errors. To uncover the errors software techniques are used. These
techniques provide systematic guidance for designing test that:
1) Exercise the internal logic of software components.
2) Exercise the input and output domains of the program to uncover

errors in programfunction, behavior, and performance.


3)

7.2Testing Methodologies:
A strategy for software testing must accommodate low-level test that are
necessary to verify that a small source code segment has been correctly
implemented as well as high level tests that validate major system functions
again customer requirements. A strategy must provide guidance for the
practitioner and a set of milestones for the manager. Because the step of
the test strategyoccur at a time and deadline pressure begins to rise,
progress must be measurable, and problems must surface as early as
possible. Following testing techniques are well known and the same
strategy is adopted during this project testing.
7.2.1 Unit testing
7.2.2 System testing
7.2.3 Performance testing

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 95


Engineering
1. Unit Testing:
Unit testing focuses verification effort on the smallest unit of the
software design – the software component or module. the unit test is
white box oriented. the unit testing implemented in every module of
student attendance management system. by giving correct manual input
to the system, the data are stored in database and retrieved. if you want
required module to access input or get the output from the end user. Any
error will accrue the time will provide the time will provide handler to
show what type of error will be accrued.

2. System Testing:

System testing is a series of different test whose primary purpose is to


fully exercise the computer-based system. Below we have described the
two types of testing which have beentaken for this project. it is to check
all modules worked on input basis. If you want to changeany values or
inputs will change all information. so specified input is must.

3. Performance Testing:

Performance testing is designed to test the run time performance of


software within the context of an integrated system. performance testing
occurs throughout all steps in the testingprocess. Even at the until level,
the performance of an individual module may be assessed aswhite -box
tests are conducted. this project reduces attendance table, code. It will
generate report fast. No have extra time or waiting of result. entered
correct data will show result fewmilliseconds. just used only low
memory of our system. Automatically do not get getting access at
another software. get user permission and access to other application.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 96


Engineering
7.3 TEST CASES:

Test Test Case TestData Expected Actual Result Pass/Fail


Case Description Results
No.
01 To check Login Login Login was Pass
the Student details, should successful
Login username be
Module and successf
password ul
02 To check Enter the Admin Admin Is Pass
the forget username should redirected to the
password and click on be forget password
in the forget redirect module
Login pasword ed to the
Module forget
passwor
d
module
03 To check Registration Registratio Registration Pass
the student details n shouldbe was
registration successful successful
Module
04 To check Click on the The login The login is Pass
the login button should be successful
Login successful
button
05 To Check Click on the The student The student Pass
the Student Student details details
details page
details page window window is
should get opened
opened
06 To check the Enter details The values The entry Pass
entry fields into the entry should get boxes are
and field and entered taking the
dropdown select inside the input
list entry field

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 97


Engineering
07 To Check Create Classroom Classroom was Pass
the Create classroo should get created
classroom m created successfully
module details successfully

08 To Check Student Attendance Attendance was Pass


the mark details should be marked
attendance marked
function

09 To check Click on The csv file The csv file is Pass


the import import should get imported into the
csv csv imported into application
function in button the
the application
attendance
model
10 To check Click on The csv file The csv file is Pass
the export the should get exported
function in export exported and according to the
the csv should prompt user
attendance button user to enter
model the name by
which the file
should be
saved
12 Check the Click The The application Pass
Exit on the Application is closed
function Exit should be
button closed

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 98


Engineering
7.4COST ESTIMATION

The cost estimation for a face detection attendance system can vary depending on
several factors such as the size and complexity of the system, the features and
functionalities required, the technology and tools used, and the development
team's location and hourly rate.

Here are some of the major cost components to consider: -


 Development team: The cost of hiring a development team to build the system
can vary depending on their location and hourly rate. A team of developers
may include a project manager, software engineers, designers, quality
assurance testers, and other specialists.

 Technology and tools: The cost of technology and tools used in building the
system such as server infrastructure, cloud services, software licenses, and
development tools should be considered.

 Features and functionalities: The cost of developing features such as


attendance tracking, generating trained faces, student registration, admin
registration, analytics, and reporting should be taken into account.

Cost Category Description Amount


Development Costs Man Hours INR 5,800
2 hours/day at INR 200/hour
Tools and other services FREE VERSION
Total Development Cost INR 5,800

Operating Costs Electricity costs INR 580


Other Expenses INR 300
Total Operating Cost INR 880

Documentation Costs Black Book INR 500


Pen drive INR 300
Project Diaries INR 300
Project Report and Portfolio INR 200
Total Marketing Cost INR 1,300

Total Estimated Cost INR 7,980

Cost Estimation Table

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 99


Engineering
CONCLUSION
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 10


Engineering 0
CONCLUSION

Face Flex is a standalone application for generating attendance by detecting


face It is a great difficult task for teachers to mark attendance for multiple
subjects at a time manually. So proposed system will help to overcome this
disadvantage. Its basic function is to generate theschedule tracker according
to the data filled. The user which has login id and password can loginor
otherwise he can register himself. After login, he will fill all the details
related to the college and save the details. Then he can also view the
attendance. After filling the entiredata, schedule tracker will generate. Our
system is very user friendly.

Future Work:

 Geo-location-based attendance tracking can made way better in the future.

 In the future comings the web application will be made location specific
like the QR and the attendance marking will bound by the location that is
only the range of classroom. Anyone who isalso not just a step outside from
the classroom would not be able to mark Attendance using the location
API.
 Based on this Concept we can create A website which handles all
the academic related work such as notes management and doubt
solver
 In future the feature will be updated which will display and assign roles
for each of the teacher andstaff working.

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 10


Engineering 1
REFERENCE
FACE-FLEX

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 10


Engineering 2
REFERENCES
1. Automated Class Scheduling Generation in the Context of a University
Schedule InformationSystem, Kuldeep Singh Sandhu.

2. A Genetic Algorithm Based University Scheduling System, Edmund


Burke, David Elliman andRupert Weare.

3. An Evolutionary Algorithm for solving School Time-tabling problem,


Calogero Di Stefano andAndrea G. B. Tettamanzi.

4. Student Schedule By Using Graph Coloring Algorithm, Baki Koyuncu ,Mah-


mut Seir.

5. Constraint Based Scheduling, A.M. Abbas, E.P.K Tsang.

6. Generating Complete University Course Schedules by Using Local Search


Meth-ods, DuongTuan Anh, Vo Hoang Tam, and Nguyen Quoc Viet Hung.

7. OPUS-College Schedule Module Design Document A. Cornelissen, M.J.


Sprengers, B. Mader.

8. Construction of Schedules Based on Periodic Event Scheduling, Jonas


Christofer Villumsen.

9. Application to a University Course Scheduling Problem byGeneral Project,


Scheduler MasanoriHorio, Atsuo Suzuki.

10. AUTOMATED COURSE SCHEDULING USING GAM-6, M. Nandani,


Dr. S. Kanmani ,Gilbert S., Theepan S. and Venkatesan K.

11. Dynamic Schedule tracker, Paula Okunie, Transit IDEA Project.

http://www.academia.edu/

http://www.stackoverflow.com/

http://www.iproject.com

Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 10


Engineering 3
Copyright © 2023-2024 Vidyavardhni’s Bhausaheb Vartak Polytechnic, Computer 0
Engineering

You might also like