CHAPTER THREE
METHODOLOGY
3.0 Waterfall Software Development Life Cycle Phases
This methodology outlines the Waterfall Software Development Life Cycle (SDLC)
phases for developing a system with a focus on implementing facial recognition
technology. The Waterfall model is a linear and sequential approach to software
development, where each phase must be completed before moving on to the next.
Here's a detailed explanation of each phase:
3.1 Requirements Gathering
3.2 System Design
3.3 Implementation
3.4 Testing
3.5 Deployment
3.6 Maintenance and Support
3.1 Requirements Gathering:
The main objective of this phase is to gather detailed requirements from stakeholders
to understand the needs and expectations for implementing Facial Authentication for
access control to view [Link] is ahieved through the following ways:
Stakeholder Interviews: Conduct interviews with key stakeholders, including
administrators, lecturers, and students, to understand the access control
requirements and expectations for viewing results.
Methods:
Interview administrators to understand who should have access to
student results.
Interview administrators to determine the desired level of security and
user roles.
User Surveys: Distribute surveys to potential users, such as teachers and
students, to gather additional insights on preferences and expectations
regarding facial authentication.
Methods:
Ask teachers about their preferred authentication methods and the
frequency of accessing student results.
Collect feedback from students on their concerns and expectations
regarding the security of their results.
Regulatory Compliance: Identify any regulatory requirements related to
access control in educational institutions and ensure that the solution complies
with data protection and privacy laws.
A detailed Requirements Specification document that includes:
Functional requirements(such as who needs access, under what circumstances,
and any specific functionalities required).
Register new visitors in the system.
Capture visitor photos during check-in.
Integrate with the existing access control system.
Non-functional requirements (such as security, performance, and compliance
requirements).
System should support at least 100 simultaneous check-ins.
Response time for user interactions should be less than 10 seconds.
3.2 System Design:
The main objective of this phase is to define the system architecture and design the
user interface for the Facial Authentication system.
3.2.1 System Architecture Design: Outline the overall structure of the Facial
Authentication system, including components like the facial recognition module,
database, and access control logic. Here is the break down of the code.
1. Import Libraries
import cv2
import face_recognition
The code imports the OpenCV library (cv2) for computer vision tasks and the
face_recognition library for face recognition.
2. Load Known Faces
known_faces = []
known_names = []
known_face_image = face_recognition.load_image_file("known_face.jpg")
known_face_encoding = face_recognition.face_encodings(known_face_image)
[0]
known_faces.append(known_face_encoding)
known_names.append("Your Name")
It initializes two lists, known_faces and known_names, to store known faces
and their corresponding names. A known face image is loaded from the file
"known_face.jpg", and its face encoding is computed using the
face_recognition library. The face encoding and the associated name are then
added to the respective lists.
3. Result Data
results =
"Your Name": {"subject": "Math", "score": 95},
"Other Person": {"subject": "English", "score": 85},
A dictionary (results) is created to store example result data associated with each
authenticated user. In this example, it includes subjects and scores.
4. Display Result Function
def display_result(name):
result_data = [Link](name)
if result_data:
print(f"Subject: {result_data['subject']}")
print(f"Score: {result_data['score']}")
else:
print("No result data found for this user.")
This function takes a user's name as input and prints the associated subject and score
from the results dictionary.
5. Webcam Initialization
video_capture = [Link](0)
It initializes the webcam (capturing video from the default camera, denoted by 0).
6. Face Recognition
face_locations = face_recognition.face_locations(frame)
face_encodings = face_recognition.face_encodings(frame, face_locations)
It detects face locations and computes face encodings for all faces in the current
frame.
7. Matching Faces
for face_encoding in face_encodings:
matches = face_recognition.compare_faces(known_faces, face_encoding)
It compares each face encoding in the current frame with the known faces.
8. Authentication and Result Display
if True in matches:
name = known_names[[Link](True)]
print(f"Hello, {name}! Access granted to view the result.")
display_result(name)
else:
print("Access denied. Face not recognized.")
If a match is found with a known face, it prints a greeting, grants access, and displays
the result using the display_result function. Otherwise, it prints "Access
denied."
9. Display Frame
[Link]("Facial Authentication", frame)
It displays the current frame with the recognized face and authentication result.
10. Exit Condition
if [Link](1) & 0xFF == ord('q'):
break
The loop breaks if the 'q' key is pressed.
In summary, this code captures video frames from a webcam, performs facial
recognition, checks if the recognized face is in the list of known faces, and displays a
greeting and associated result data if authenticated. The authentication result is
continuously displayed on the screen, and the loop can be exited by pressing the 'q'
key.
3.3 Implementation
3.3.1 flow chat
In this process, the system detects face from a web camera and check with stored
images, if the
pattern matched then users allow login the system otherwise reject. This process is
shown below like Figure below.
3.3.2 Code Development
Facial Recognition Module:
Write code to integrate the chosen facial recognition technology into the
system.
Implement the enrollment process for capturing and storing facial
features.
Develop the recognition process to match enrolled faces during
authentication.
Access Control Logic:
Implement access control rules based on facial recognition results.
Develop backend logic to manage user roles and permissions.
Define rules that allow only authorized users (students, lecturers,
administrators) to access student results.
3.3.3 Code Reviews:
Conduct regular code reviews to ensure code quality, security, and adherence to
coding standards.
Address feedback from team members to improve code readability,
maintainability, and security.
3.3.4 Security Measures:
Implement security measures to protect against potential threats and ensure the
confidentiality of facial recognition data.
Use encryption to secure the storage and transmission of facial feature data.
Implement secure coding practices to prevent common security vulnerabilities.
3.3.5 Integration Testing:
Integrate the developed components and test their interactions to identify and
resolve integration issues.
Test the communication between the facial recognition module, access control
logic, and user interface to ensure seamless operation.
Verify that data flows correctly between different system components.
3.3.6 Documentation:
Create comprehensive documentation for the implemented code, including
code comments, API documentation, and system architecture documentation.
Provide a system architecture document outlining the communication flow
between different modules.
3.3.7 User Training:
Conduct training sessions for end-users (students, lecturers, administrators) on
how to use the new Facial Authentication system.
Provide step-by-step guides and demonstrations on facial enrollment,
authentication, and result viewing processes.
Address common user questions and concerns during training sessions.
The implementation phase involves translating the design specifications into
functional code, ensuring security measures are in place, and preparing for
deployment. Attention to code quality, security, and performance optimization is
crucial during this phase to deliver a reliable Facial Authentication system.
3.4 Testing:
The main objective of this phase is to ensure that the Facial Authentication system
functions correctly and meets specified requirements.
Unit Testing: Test individual components of the system (facial recognition
module, access control logic) in isolation.
Verify that the facial recognition algorithm accurately recognizes
enrolled faces.
Test the access control logic for different user roles.
Integration Testing: Verify that all system components work together as
expected.
Test the end-to-end flow from facial recognition to access control.
Confirm that the system integrates seamlessly with existing result-
viewing functionality.
System Testing: Validate the entire system against the documented
requirements.
Verify that only authorized users can access student results using facial
authentication.
Test system responsiveness and error handling.
3.5 Deployment:
The main objective of this phase is to prepare the Facial Authentication system for
deployment in the educational institution.
System Configuration: Configure the system for deployment, ensuring
compatibility with production servers and databases.
Configure server settings to handle the expected user load during result-
viewing periods.
Set up the database with necessary user roles and access permissions.
User Training: Conduct training sessions for end-users (teachers,
administrators) on how to use the new Facial Authentication system.
Train students and lecturers on the enrollment process for facial
recognition.
Instruct administrators on managing user roles and access permissions.
Deployment: Install the system on production servers and make it accessible
to users.
Deploy the system during a low-activity period to minimize disruptions.
Monitor system performance immediately after deployment.
3.6 Maintenance and Support:
Issue Resolution: Address reported issues or bugs in a timely manner.
Investigate and resolve any instances of false rejections by the facial
recognition system.
Address user-reported issues related to result access.
System Updates: Implement updates and improvements as needed.
Integrate new versions of the facial recognition SDK to benefit from
improved accuracy.
Update the system to comply with any changes in regulatory
requirements.
Monitoring: Continuously monitor system performance and user feedback.
Use monitoring tools to detect and address potential performance issues.
Gather feedback from users on their experience with the Facial
Authentication system.