How min2yadav/face_recognition_attendancce-project works
Main Components
• Data Storage & Models:
• Data files (faces.pkl, names.pkl) that store the known face encodings and associated names.
• The Haar Cascade XML model (haarcascade_frontalface_default.xml) for detecting faces using OpenCV.
• Face Management:
• “add_faces.py” script handles adding new face data to the system.
• Recognition Core:
• “app.py” serves as the main entry point for performing face recognition, integrating detection and matching using the stored data.
• Attendance Tracking:
• The Attendance directory (e.g., Attendance_07-04-2023.csv) captures attendance records or logs, possibly generated after recognition events.
• Testing:
• “test.py” likely serves as a module to validate that the face recognition and associated functionalities work as expected.
Relationships and Interactions
• Data Flow:
• The “app.py” module accesses the data from the “data” folder to perform face recognition operations.
• “add_faces.py” updates or augments the data (faces and names) stored as pickle files.
• Once a face is recognized, results may be logged or updated into an attendance CSV (stored in the Attendance directory).
• Interaction Flow:
• The user might initially run “add_faces.py” to register faces, building a face database.
• Then, “app.py” is used in a real-time or batch mode to detect and recognize faces using the Haar Cascade model and compare them against existing encodings.
• Recognized faces trigger attendance updates (or another form of logging) that are stored in the CSV files within the Attendance directory.
• Testing:
• “test.py” verifies components, ensuring the face detection, addition, and recognition are working properly.
Architectural Patterns and Design Principles
• Modularity:
• The project separates concerns: different scripts for adding faces, running recognition, and testing.
• Data-Driven Design:
• The system relies on pre-stored data files for recognition, thereby externalizing its core knowledge base.
• Separation of Functions:
• UI/Operational logic (app.py) is separated from Data Update logic (add_faces.py) and logging (Attendance files), improving maintainability.
Final Recommendations for the Principal Software Engineer
• Detail the role of the Haar Cascade XML model and how it is leveraged within the Recognition Engine.