Classroom attendance system and method based on deep learning face recognition

Through deep learning-based face recognition technology, combined with OpenCV and dlib face detection, and using LBPH algorithm and SQLite3 database, the existing classroom attendance system is solved, and efficient and reliable automated attendance management is achieved.

CN120299107APending Publication Date: 2025-07-11GUILIN UNIV OF ELECTRONIC TECH
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202510619474.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-05-14
Publication Date
2025-07-11

AI Technical Summary

Technical Problem

The existing classroom attendance system has problems such as low efficiency, poor accuracy, prone to misjudgment and cheating, and high equipment costs.

Method used

We use deep learning-based face recognition technology, combined with OpenCV and dlib face detection, use LBPH algorithm for feature extraction and matching, and combine SQLite3 database for data storage and management to achieve automated attendance.

Benefits of technology

Improve attendance efficiency, prevent cheating, enhance the credibility of the attendance system, and provide convenient data management and user experience.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120299107A_ABST
    Figure CN120299107A_ABST
Patent Text Reader

Abstract

The invention discloses a classroom attendance system and method based on deep learning face recognition, and aims to simplify student sign-in and attendance recording processes. The system is constructed on an OpenCV and PyQt5 client framework, an improved LBPH (Local Binary Pattern Histogram) algorithm is adopted, high-precision and high-efficiency face recognition is realized, particularly, high recognition accuracy can still be kept under the conditions of illumination change and posture change, and the system is suitable for various education scenes. The system comprises a complete user registration module which is used for information input during primary use and has a powerful data management function, so that attendance tracking and reporting can be effectively carried out. In a classroom, a student only needs to face the camera, and the system can automatically identify the face of the student and record attendance data in real time. The automatic process reduces manual operation, improves classroom management efficiency, ensures reliability of attendance records, and supports effective implementation of teaching plans.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention belongs to the technical field of classroom attendance, and specifically relates to a classroom attendance system and method based on deep learning face recognition. Background Art

[0002] With the rapid development of information technology, digital teaching systems have been widely applied in many universities. Classroom attendance is a key part of school management. However, traditional attendance methods often require a large amount of manpower and are prone to problems such as recording errors, proxy sign-ins, and missed sign-ins, with low efficiency and poor accuracy. There are already various intelligent classroom attendance management systems on the current market, including attendance methods based on RFID, QR codes, face recognition, and fingerprint recognition. However, these systems have their respective limitations. For example, RFID and QR code attendance still require students to operate actively and are easily replaced by others; fingerprint recognition is affected by device maintenance and hygiene factors; although face recognition has a relatively high degree of automation, it may have misjudgments or delays in the case of light changes, occlusions, and large-scale concurrent recognition. In addition, some systems rely on expensive hardware devices, increasing the cost burden on schools. Improving classroom management efficiency based on artificial intelligence and information technology, reducing the school's equipment costs, and constructing an intelligent classroom management system have become the core issues of concern for many universities. Therefore, in-depth research on classroom attendance management systems based on artificial intelligence has important practical value and practical significance. This system optimizes the face recognition algorithm by integrating artificial intelligence technology, combines multi-modal data analysis, provides a more accurate, efficient, and low-cost classroom attendance solution, and effectively improves the classroom management level. Summary of the Invention

[0003] To solve the above problems, the present invention is implemented through the following technical solutions:

[0004] (1) A classroom attendance system based on face recognition, including a user interface module, a business logic processing module, a face detection and recognition module, and a data storage and management module:

[0005] (2) The interface design of the student login module includes a login interface, an attendance interface, a student information management interface, etc. On the front-end interface, students can perform operations such as face punching for attendance, viewing personal attendance records, and managing personal information.

[0006] (3) The business logic module is responsible for processing various business logics of the attendance system, including student information management, attendance record generation, exception handling, etc. This module interacts with the front-end interface, the face detection module, the face recognition module, and the data storage module to implement the complete process and logic of the system functions.

[0007] (4) The face detection module is responsible for detecting the location of faces in the real-time images captured by the camera. This module uses the OpenCV library and Haar feature classifier or dlib face detection method to detect the location of faces in the real-time images captured by the camera. The Haar feature classifier is based on Haar wavelet features. By sliding rectangular filters of different sizes and positions on the image, it calculates the difference in pixel values within the rectangular regions to describe the image features. During the training process, the classifier differentiates between positive and negative samples based on Haar features to improve the ability to accurately distinguish between targets (such as faces) and non-targets. The dlib face detection method is an advanced tool based on deep learning technology and is of great significance in the field of face detection. This method uses a deep convolutional neural network model trained on a large scale. By learning a large number of face samples under different conditions, it can effectively identify faces at various scales, angles, and lighting conditions. The advantage of this trained model is that it provides high accuracy and robustness and can handle complex real-world scenarios, such as occlusion, side faces, low light, etc.

[0008] (5) The face recognition module, based on face detection, uses the LBPH (Local Binary Patterns Histograms) algorithm to extract and match face features. It compares the face features captured in real-time with the student face features stored in the database to identify the student's identity and record the attendance result. This algorithm divides the image into multiple local regions and compares the grayscale values of each pixel with its neighboring pixels. Through this comparison, local binary pattern (LBP) codes are generated. For each pixel, the grayscale values of its surrounding pixels are compared with the grayscale value of the central pixel. Pixels greater than or equal to the central value are marked as 1, and those less than the central value are marked as 0, thus forming a binary number. This process enables each pixel to be represented by an LBP code to indicate its local texture features. In the LBPH algorithm, after dividing the image into multiple local regions, the LBP codes of each pixel within the region are calculated, and a histogram is generated for each region. The entries in the histogram represent the frequencies of the respective LBP codes, reflecting the texture feature distribution of the region. Subsequently, the histograms of all local regions are concatenated into a long vector to form the LBPH feature vector of the image. In the LBPH-based algorithm, the first step is to extract the image pattern using the LBPH algorithm. Then, two thresholds are set to calculate the probability of the presence of a face in the image pattern. Next, the face in the image is detected by sliding a window and face recognition is performed.

[0009] (6) The data storage and management module is implemented based on the SQLite3 database and is responsible for storing student basic information (such as name, student ID, class, etc.), attendance records, and system configuration data. It supports efficient data retrieval and management to ensure the security, integrity, and persistence of the data.

[0010] The beneficial effects of the present invention include:

[0011] (1) Improve attendance efficiency: The system automatically recognizes faces, eliminating the need for manual roll calls and significantly enhancing the efficiency of classroom attendance.

[0012] (2) Prevent cheating: Through live detection and face comparison, behaviors such as proxy clock-in and impersonation are avoided, enhancing the credibility of the attendance system.

[0013] (3) Facilitate data management: Attendance data is uniformly stored in a local database, facilitating quick querying, statistics, and analysis, and can be connected to the educational administration system.

[0014] (4) Provide a good user experience: The interface is simple and intuitive. Students can clock in and query records independently, and teachers can also conveniently manage attendance information.

[0015] (5) Provide a good user experience: The interface is simple and intuitive. Students can clock in and query records independently, and teachers can also conveniently manage attendance information.

[0016] Description of the Drawings

[0017] To more clearly illustrate the technical solutions in the embodiments of the present application, the following will briefly introduce the relevant drawings required for the description of the embodiments of the present application:

[0018] Figure 1 It is a schematic diagram of the structure of the classroom attendance system provided by the embodiment of the present invention;

[0019] Figure 2 It is a flow chart of the face recognition algorithm of the classroom attendance system provided by the embodiment of the present invention;

[0020] Figure 3 It is a flow chart of the face attendance subsystem provided by the embodiment of the present invention;

[0021] Figure 4 It is a classroom attendance sign-in diagram provided by the embodiment of the present invention. Detailed Embodiments

[0022] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the drawings in the embodiments of the present invention.

[0023] System initialization: When the system is deployed, initialization settings need to be carried out first, as Figure 1 shown, including the following steps:

[0024] Hardware device preparation: Configure a high-definition camera for capturing real-time images. Equip a computer terminal with a software environment capable of running this system. Software environment deployment: Install the Python running environment and necessary libraries such as PyQt5, OpenCV, SQLite3, etc. Deploy the system code and conduct debugging. Data initialization: The administrator enters the basic information of students through the system interface, including student ID, name, class, etc. Use the camera to collect the face images of each student and conduct face data training.

[0025] Implementation of the front-end interface module: The front-end interface is designed based on the PyQt5 framework, and users interact with the system through this interface. Login interface: The administrator logs in to the system by entering the username and password. After the login information is verified by the database, the main interface is entered. Attendance interface: In the attendance interface, the system displays the real-time image stream captured by the camera. When a face is detected, the attendance check-in is automatically completed and the student's name and attendance status are prompted.

[0026] Student information management interface: Provide functions for querying, adding, modifying, and deleting student information.

[0027] Implementation of the face detection module: Camera data capture. After the system starts, the camera captures images in real-time and transmits them to the face detection module. Face detection algorithm: Use the Haar feature classifier of the OpenCV library or the dlib library to detect faces. The detected face area is cropped and sent to the face recognition module for processing.

[0028] The face detection method of dlib is an advanced tool based on deep learning technology and is of great significance in the field of face detection. This method uses a deep convolutional neural network model trained on a large scale. By learning a large number of face samples under different conditions, it can effectively identify faces under various scales, angles, and lighting conditions. The advantage of this trained model lies in providing high accuracy and robustness, and it can handle complex actual scenarios, such as occlusion, side face, low light, etc.

[0029] Implementation of the face recognition module, feature extraction: Use the LBPH algorithm to extract features from the detected face area. Such as Figure 2As shown, the LBPH (Local Binary Patterns Histograms) algorithm is an image description and classification method based on local texture features, mainly used in the field of face recognition. The algorithm first divides the image into several local regions, and then for each pixel point, it compares it with the surrounding pixels, and generates a Local Binary Pattern (LBP) code according to the comparison result. Specifically, for each pixel, the gray values of its surrounding pixels are compared with the gray value of the central pixel. Pixels greater than or equal to the central pixel are marked as 1, and pixels less than the central pixel are marked as 0, finally forming a binary number. In this way, each pixel point can be represented by an LBP code to describe its local texture features. For details, see the specification. Figure 2 .

[0030] Implementation of the data storage and management module, database design: Use SQLite3 to build the database, and design the following main table structures: Student information table: Store information such as student ID, name, class, and face features. Attendance record table: Store information such as student attendance date, time, and status. Data operation interface:

[0031] Provide interfaces for adding, deleting, querying, and modifying the database for other modules of the system to call. Data operations are managed through transactions to ensure data consistency and integrity. Data backup and security: Regularly back up the database to the cloud or locally to prevent data loss. Encrypt and store sensitive information (such as face features) to protect student privacy.

[0032] Implementation of the business logic processing module, attendance logic: When the system starts, it enters the attendance mode, captures images in real time, and calls the face detection and recognition module. As Figure 4 shown, update the attendance record for students with successful recognition; if the recognition fails, prompt the administrator to handle it manually. Exception handling: If the camera fails to capture a face, prompt "Please get closer to the camera". If the database operation fails, record the error log and notify the administrator. Function extension: Provide a marking function for abnormal situations such as being late and absent. Support statistical attendance results by date or class and generate reports.

[0033] The system process is as Figure 3 shown. The system first starts and calls the camera to capture a face image, then collects and trains face data to improve recognition accuracy; the user then selects the current course to sign in from the course list. After completing the identity verification, the system records the attendance information and ends the process.

[0034] The above is only one of the specific implementation manners of the present invention, but the technical features of the present invention are not limited thereto. Any modifications, equivalent replacements, or improvements made within the technical idea scope of the present invention should be included within the protection scope of the present invention.

Claims

1. A classroom attendance system based on deep learning face recognition, characterized in that, The system includes: Class Attendance System Interface Module: The front-end interface is the entry point for users to interact with the system. Based on the PyQt5 framework, a graphical user interface is implemented. The interface design includes a login interface, an attendance interface, and a student information management interface. On the login module, students can perform operations such as face punching for attendance, viewing personal attendance records, and managing personal information. Face Detection Module: The face detection module is responsible for detecting the location of faces in real-time images captured by the camera. This module uses the Haar feature classifier of the OpenCV library and the dlib face detection method to process the images, locate, and identify the position and bounding box of the face. Face Recognition Module: On the basis of face detection, the face recognition module performs recognition and matching on the detected faces. This module uses the LBPH algorithm provided by OpenCV to extract features and compare face images, identify the student's identity, and complete the attendance record. Database Design Module: The data storage module uses the SQLite3 database to store student information, attendance records, and related configuration data. The system realizes the persistent storage and fast retrieval of data through the database, ensuring the security and integrity of attendance data. Business Logic Processing Module: The business logic module is responsible for processing various business logics of the attendance system, including student information management, attendance record generation, and exception handling. This module interacts with the front-end interface, face detection module, face recognition module, and data storage module to realize the complete process and logic of the system functions.

2. A classroom attendance method based on deep learning face recognition, characterized in that, The method includes the following steps: (1) Data Acquisition Phase Camera Acquisition: The system captures real-time face image data of students through the camera. Face Detection: The collected image data is processed by the Haar feature classifier to locate and identify the face area in the image. (2) Face Recognition Phase Feature Extraction: Based on the local binary pattern algorithm, texture feature analysis is performed on the detected face area, key feature points with distinctiveness are extracted, and they are encoded into highly robust feature descriptors. Face Recognition Matching: The extracted face features are matched with the existing student face features in the database to determine the student's identity. (3) Data Storage and Management Student Information Management: The system obtains student information from the database, including student ID, name, and face features. Attendance Record Storage: The successfully recognized attendance records are stored in the database as persistent storage of attendance data. (4) Business Logic Processing Exception Handling: Handle exceptions such as failed face detection and failed recognition, and provide corresponding feedback and processing. Attendance Record Generation: Generate the attendance records of students according to the recognition results and punching times, including normal attendance records and abnormal attendance records. (5) Interface Interaction and Feedback User Interface Display: Display the recognition results and attendance records on the interface for students or administrators to view. System Feedback and Prompt: Provide feedback and prompt information to users according to the recognition and processing results.

3. The method according to claim 2, characterized in that The Haar feature classifier is based on Haar wavelet features. By sliding rectangular filters of different sizes and positions on the image, it calculates the differences in pixel values within the rectangular regions to describe the image features. During the training process, the classifier distinguishes between positive and negative samples based on Haar features to improve the ability to distinguish between targets and non-targets.

4. The method according to claim 2, characterized in that, The Local Binary Pattern Histogram (LBPH) algorithm is an image description and classification method based on local texture features, mainly applied to face recognition tasks. In the LBPH-based algorithm, the first step is to extract image patterns using the LBPH algorithm, then two thresholds are set to calculate the probability of the presence of a face in the image pattern. Next, a sliding window is used to detect faces in the image and perform face recognition.

Citation Information

Cited By

  • Consistency inference anti-cheating sign-in method and system based on cross-modal feature collaboration

    CN122065053A