Face recognition sign-in sign-out attendance checking method and system based on tripartite
By using the tertile judgment algorithm and the SFace face recognition algorithm in the face recognition attendance system, combined with multi-threading technology, the problem of the existing system's recognition rate drop under light and angle changes is solved, and efficient and accurate attendance management is achieved.
Patent Information
- Application Number
- CN202510412618.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-03
- Publication Date
- 2025-06-27
AI Technical Summary
The existing facial recognition attendance system has decreased in the case of changes in lighting conditions and large differences in facial expressions and angles. The user interface design is complex and inconvenient to operate, making it difficult to meet the efficient management needs of modern enterprises for attendance systems.
The tertile-based face recognition check-in and exit attendance method is adopted, combined with the SFace face recognition algorithm and tertile judgment algorithm in the OpenCV library, the attendance logic is optimized, an intuitive and easy-to-use user interaction interface is designed, and the system processing capabilities are improved through multi-threading technology.
It has achieved a high recognition rate under different lighting conditions, facial expressions and angles, simplified the attendance process, improved attendance accuracy, and solved the safety hazards and insufficient intelligence of traditional access control systems.
Smart Images

Figure CN120220261A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of intelligent attendance systems, and particularly to a face recognition check-in and check-out attendance method and system based on the three-point position. Background Art
[0002] With the rapid development of information technology, the importance of intelligent attendance systems in various enterprises and institutions has become increasingly prominent. Traditional attendance methods, such as sign-in books and card punching machines, have defects such as cumbersome operations, easy forgery, and inconvenient data management, seriously affecting the accuracy of attendance and work efficiency. In recent years, face recognition technology based on computer vision and deep learning technology has gradually become the core component of attendance systems. This technology can not only quickly and accurately identify the identities of employees, but also has strong adaptability and can maintain a high recognition rate under different lighting conditions, facial expressions, and angles. In addition, with the development of embedded systems, combining face recognition technology with the Linux operating system can achieve more efficient resource management and real-time data processing, providing a solid foundation for the popularization and application of intelligent attendance systems.
[0003] However, existing face recognition attendance systems still face many challenges in practical applications. First, traditional attendance systems mostly rely on physical media such as cards and fingerprints, which have security risks such as being easily lost and forged, and cannot effectively meet the recognition requirements in complex environments. Second, the recognition rate of existing systems drops significantly under changing lighting conditions, large differences in facial expressions and angles, resulting in inaccurate attendance data. In addition, the user interface design of traditional systems is complex, inconvenient to operate, and lacks an efficient data management and transmission mechanism, making it difficult to meet the high-efficiency management requirements of modern enterprises for attendance systems. Finally, the application of existing systems on embedded platforms is less, and it is difficult to achieve efficient collaborative work between front-end devices and back-end servers, resulting in limited overall system performance. Therefore, there is an urgent need for an intelligent attendance system that integrates security, convenience, economy, and efficient management to solve the above problems. Summary of the Invention
[0004] The purpose of the present invention is to provide a face recognition check-in and check-out attendance method and system based on the three-point position to solve the problems raised in the above background art.
[0005] To achieve the above purpose, the present invention provides the following technical solution: A face recognition check-in and check-out attendance method based on the three-point position, the attendance method comprising the following steps:
[0006] S1, turn on the attendance system, and the server automatically loads the face database and conducts data transmission with the client;
[0007] S2, the client collects BGR images through a USB camera, displays them on the monitor, and simultaneously collects multiple faces, and sends the collected data to the server via the network;
[0008] S3, after receiving the image data, the server first converts the BGR image into the Mat image data format of OpenCV, and then converts it into QImage for QT to perform image processing, and calls the OpenCV function library to perform face detection and recognition, and simultaneously feeds back the matching result and face region data to the client;
[0009] S4, if the matching result is successful, the ternary method is called to determine whether the clock-in user has entered the attendance area. If the user has successfully entered the attendance area, the time is automatically recorded and the clock-in duration is calculated in combination with the clock-out time;
[0010] S5, the client displays the face matching region data on the interface according to the result feedback from the server, and simultaneously controls the opening and closing of the access control according to the result.
[0011] Preferably, the face detection is to separate the face region and size information from the background image, extract features from the image, and compare the extracted features with the face features in the face database. After reaching the score set by the threshold, it is judged whether there is a face and the exact coordinate position in the picture.
[0012] Preferably, the face detection uses the YuNet face detection model;
[0013] If the sizes of the input images are the same, when instantiating FaceDetectorYN, specify the size (width, height). When using the detect method to detect faces, FaceDetectorYN automatically processes them using the size (width, height);
[0014] If the sizes of the input images are different, when instantiating FaceDetectorYN, you can arbitrarily specify the size. Before using the detect method, call the setInputSize method to dynamically adjust the size of the input image.
[0015] Preferably, the face recognition lies in feature matching and recognition judgment. The attendance system compares the target face feature data to be recognized with all the feature templates in the face database, and calculates an index reflecting the similarity between the two, expressed as the cosine value of cosine and the L2 regularization value;
[0016] When using the cosine value of cosine to judge, the larger the cosine value, the more similar the faces and the closer the identities;
[0017] When using the L2 regularization value to judge, the smaller the regularization value, the more similar the faces and the closer the identities;
[0018] Finally, label the recognition result according to the calculation result.
[0019] Preferably, the calculation uses the SFace face recognition algorithm. When faces.rows is greater than 0, it means there is a face. Before inputting the detected face into the YuNet face detection model, face alignment is first performed. The transformation matrix is calculated between the facial feature points extracted by the detection part and the given facial feature points, and the face is transformed using affine transformation.
[0020] After that, feature extraction is performed. The YuNet face detection model uses the SFace algorithm and takes the aligned face image with a size of 3*112*112 as the input, and outputs a 128-dimensional face feature.
[0021] After the face features are extracted, feature comparison is performed. For the face features of different face images, the distance between the features is calculated to determine whether the different face images belong to the same identity.
[0022] Preferably, the YuNet model is implemented based on an anchor-based face detector. Square anchors are generated on feature maps of 4 scales respectively. The minimum face size detected is 10x10, and the maximum face size is 256x256. At the same time, the EIoU loss function is used as the loss function of the model.
[0023] Preferably, the SFace face recognition algorithm uses the S-shaped constrained spherical loss function SFace. The feedback gradients generated by the intra-class and inter-class losses are edited respectively through the S-shaped function, and the influence of noise samples on model training is adaptively reduced, which is expressed as:
[0024]
[0025]
[0026] Among them, L represents the loss function, x i represents the vector eigenvalue of the i-th image training set, y i represents the label value corresponding to x i W j represents the j-th column of the weights of the last fully connected layer, b j represents the bias value, θ yi represents the intra-class distance, θ j represents the inter-class distance, scosθ j means removing the bias value during the conversion of formula (4) and making:
[0027]
[0028] Preferably, the three - point method sets that the object can move left - right and up - down simultaneously, and the three - point positions are the trisection points of a specific area;
[0029] For the sign - in status, when a face enters the video capture area from the left and the face is detected, the camera will continuously capture the upper - left corner point of the face rectangle and record it as point P. First, it is judged whether it passes the first critical point of the three - point position, and then it is judged whether point P finally passes the next critical point of the three - point position until the face disappears, and the abscissa of point P should be less than the abscissa of the judgment line. If so, it indicates that the person has entered the attendance area, and this person is marked as the sign - in status;
[0030] Based on the final position of the face's point P within 5 minutes to mark the final status, the face point P needs to pass two different critical points to be marked as a legal status, otherwise the status of this face will not be marked, and the sign - out status is the same.
[0031] The face recognition sign - in / sign - out attendance system based on the three - point method is applied to the face recognition sign - in / sign - out attendance method based on the three - point method. The attendance system is composed of an application layer, a middleware layer, a driver layer, and a device layer;
[0032] The application layer is located at the top layer, including programs and services for users. The programs interact with the operating system through multiple APIs;
[0033] The middleware layer serves as a communication bridge between different application - layer components, including a message queue, a remote procedure call framework, a database access middleware, a transaction processing monitor, and a data conversion service;
[0034] The driver layer is used for the interaction between software and hardware, and the hardware device is correspondingly provided with a driver program. The driver program implements the standard interfaces required by the operating system kernel, allowing the kernel and application programs to control and access hardware resources in a standardized manner;
[0035] The device layer includes but is not limited to a processor, memory, disk, camera, and display, and the code of the driver layer interacts with the device layer to read and set registers, initialize devices, manage device status, and perform data transmission.
[0036] Preferably, the application layer is used for image display, target recognition, database operation, and network communication, and the application layer accesses hardware resources through the services provided by the operating system;
[0037] The middleware layer is also used to provide device - abstraction - layer services, enabling the application layer to program according to a unified interface standard;
[0038] The driver layer sends requests to the kernel through the system - call interface, and the kernel then converts the requests into specific operations on the hardware through the device driver program.
[0039] Technical effects and advantages of the present invention:
[0040] (1) By designing and implementing a face recognition attendance system based on the Linux embedded operating system, the present invention successfully constructs an intelligent attendance system integrating security, convenience, economy, and efficient management. The system makes full use of the SFace face recognition algorithm in the OpenCV library, introduces a three-bit judgment algorithm to optimize the attendance logic, designs an intuitive and easy-to-use user interface, and realizes various functions such as face registration, user management, feature storage, automatic attendance, and data recording. At the same time, through the application of multi-thread technology, the system's ability to handle multiple tasks is effectively improved, ensuring real-time response and user experience during the face recognition process;
[0041] (2) During the construction stage of the embedded platform, the present invention ported the application program to the ARM development board to adapt to the actual application scenario. In particular, the coordinated work of the image acquisition module, image format conversion, image display, and network communication module ensures efficient data transmission and accurate recognition between the front-end device (client) and the back-end server. The design of the electronic door lock further strengthens the system's control ability, ensuring the safe and stable operation of the attendance access control device.
[0042] (3) The design of this system shows that the face recognition attendance system can maintain a high recognition rate under different lighting conditions, different facial expressions, and angles, has strong robustness, and shows good performance in actual applications. The system not only simplifies the attendance process, improves the attendance accuracy, but also effectively solves the security hazards and insufficient intelligence problems existing in traditional access control systems. BRIEF DESCRIPTION OF THE DRAWINGS
[0043] Figure 1 It is the working flow chart of the client and server of the present invention.
[0044] Figure 2 It is the face detection flow chart of the present invention.
[0045] Figure 3 It is the face recognition flow chart of the present invention.
[0046] Figure 4 It is the schematic diagram of the three-bit discrimination method of the present invention.
[0047] Figure 5 It is the coding diagram of the three-bit discrimination algorithm of the present invention.
[0048] Figure 6 It is the hierarchical diagram of the system composition framework of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0049] Next, the technical solutions in the embodiments of the present invention will be clearly and completely described in conjunction with the accompanying drawings in the embodiments of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all the embodiments. All other embodiments obtained by those of ordinary skill in the art based on the embodiments of the present invention without creative efforts shall fall within the protection scope of the present invention.
[0050] Embodiment 1, the present invention provides a three - digit - based face recognition check - in, check - out and attendance method as Figure 1 shown, including the following steps:
[0051] S1, turn on the attendance system, and the server automatically loads the face database and transmits data with the client;
[0052] It should be noted that face recognition and attendance are carried out through the mutual cooperation of the server and the client.
[0053] S2, the client collects BGR images through a USB camera, displays them on the monitor, and simultaneously collects multiple faces, and sends the collected data to the server through the network;
[0054] It should be noted that thanks to the processing of multi - thread technology and lock technology, multiple face data collected simultaneously can be matched, and multiple matching results can be returned to the client in a non - blocking state. The client interface can also display multiple results without lag.
[0055] S3, after receiving the image data, the server first converts the BGR image into the Mat image data format of OpenCV, then converts it into QImage for QT image processing, and calls the OpenCV function library for face detection and recognition, and at the same time feeds back the matching results and face region data to the client;
[0056] Specifically, face detection is to separate the face region and size information from the background image, extract features from the image, and compare the extracted features with the face features in the face database. After reaching the score set by the threshold, it is judged whether there is a face in the picture and the exact coordinate position.
[0057] It should be noted that face matching is a biometric recognition technology that uses facial biometric information to accurately identify an individual's identity. This technology uses a camera device to capture a static image or dynamic video stream containing facial information, and intelligently captures, tracks, and deeply analyzes facial features therein.
[0058] Further, referring to Figure 2 shown, YuNet face detection model is used for face detection;
[0059] If the sizes of the input images are the same, specify the size (width, height) when instantiating FaceDetectorYN. When using the detect method to detect faces, FaceDetectorYN automatically processes them using the size (width, height).
[0060] If the sizes of the input images are different, you can arbitrarily specify the size when instantiating FaceDetectorYN. Before using the detect method, call the setInputSize method to dynamically adjust the size of the input image first.
[0061] S4. If the matching result is successful, use the trichotomy method to determine whether the clock-in user has entered the attendance area. If the user has successfully entered the attendance area, automatically record the time and calculate the clock-in duration in combination with the clock-out time.
[0062] Specifically, face recognition lies in feature matching and recognition judgment. The attendance system compares the target face feature data to be recognized with all the feature templates in the face database, and calculates an index reflecting the similarity between the two, expressed as the cosine value of cos and the L2 regularization value.
[0063] When using the cosine value of cos to discriminate, the larger the cosine value, the more similar the faces and the closer the identities.
[0064] When using the L2 regularization value to discriminate, the smaller the regularization value, the more similar the faces and the closer the identities.
[0065] Finally, label the recognition result according to the calculation result.
[0066] Further, as shown in Figure 3 When calculating, use the SFace face recognition algorithm. When faces.rows is greater than 0, it means there are faces. Before inputting the detected faces into the YuNet face detection model, first perform face alignment. Calculate the transformation matrix between the face feature points extracted by the detection part and the given face feature points, and use affine transformation to transform the face to reduce the impact of face scale, pose, etc. on the performance of face feature extraction.
[0067] After that, perform feature extraction. The YuNet face detection model uses the SFace algorithm and takes the aligned face image with a size of 3 * 112 * 112 as the input, and outputs face features with a dimension of 128.
[0068] After face feature extraction, perform feature comparison. For the face features of different face images, calculate the distance between the features to determine whether different face images belong to the same identity.
[0069] It should be noted that the YuNet model and the SFace algorithm are deployed using the OpenCV library, thus eliminating the training of the face model. By implementing algorithm control for both, face detection, recognition, and feature matching can be achieved in this system.
[0070] Furthermore, the YuNet model is implemented based on an anchor-based face detector. Square anchors are generated on feature maps of 4 scales. The minimum face size for detection is 10x10, and the maximum face size is 256x256. At the same time, the EIoU loss function is used as the loss function of the model, thereby improving the face localization ability. In addition to face localization, the model also additionally annotates 5 key points of the face (left and right eyes, nose tip, left and right mouth corners), adding multitask capabilities for key point detection to the model.
[0071] Specifically, the SFace face recognition algorithm uses the S-constrained spherical loss function SFace. By using the S function to edit the feedback gradients generated by the intra-class and inter-class losses respectively, the influence of noisy samples on model training is adaptively reduced, achieving the highest recognition accuracy on multiple face recognition datasets and improving the stability of face recognition, expressed as:
[0072]
[0073]
[0074] Among them, L represents the loss function, x i represents the vector eigenvalue of the i-th image training set, y i represents the label value corresponding to x i W j represents the j-th column of the weights of the last fully connected layer, b j represents the bias value, θ yi represents the intra-class distance, θ j represents the inter-class distance, scosθ j represents removing the bias value during the transformation of Equation (4) and making:
[0075]
[0076] It should be noted that compared with the large margin discriminant loss function based on Softmax, the advantage of SFace lies in its precise gradient design for intra-class and inter-class optimization. In the traditional large margin discriminant loss function based on Softmax, the intra-class and inter-class gradients are coupled and difficult to control. The loss function is shown in Equation (5) and can be transformed into Equation (4). However, SFace decouples the intra-class and inter-class losses, and the decoupled loss function is shown in Equation (1), achieving precise gradient editing. When the angle between the sample and its class vector is optimized to be less than a certain angle, the gradient generated by it is quickly reduced, thereby reducing the influence of noisy data.
[0077] The SFace algorithm takes into account both the local and global features of face images. The local features can make it more robust to factors such as illumination, scaling, rotation, and translation. It uses an incremental learning algorithm that can continuously update the model as new data is added. It can handle face images of different modalities, including visible light and infrared light images.
[0078] S5. The client displays the face matching area data on the interface according to the result feedback from the server, and at the same time controls the opening and closing of the access control according to the result.
[0079] Specifically, referring to Figure 4 As shown, the three-point discriminant algorithm assumes that the object only moves left or right or up and down in a specific area (generally defaulting to the entire area captured by the camera). In the left-right movement specific area, it cannot only move up and down, and in the up-down movement specific area, it cannot only move left and right. It can move both left and right and up and down at the same time. The three points are the trisection points of the specific area. In the three-point discriminant method designed in this method, taking the example of a person entering or leaving the specific area by moving left and right.
[0080] For the sign-in status, when the face enters the video capture area from the left and the face is detected, the camera will continuously capture the upper left corner point of the face rectangle and record it as point P. First, it is judged whether it passes through the first critical point of the three-point position, and then it is judged whether point P finally passes through the next critical point of the three-point position until the face disappears, and the abscissa of point P should be less than the abscissa of the judgment line. If so, it indicates that the person has entered the attendance area, and this person is marked as the sign-in status.
[0081] Based on the final position of the point P of this face within 5 minutes, the final status is marked. The face point P needs to pass through two different critical points to be marked as a legal status, otherwise the status of this face will not be marked, and the sign-out status is the same.
[0082] It should be noted that the designed three - part discriminant method has more advantages compared to the two - part and four - part methods, mainly based on these considerations: It has a certain degree of fine - grained discrimination, which can better identify the differences between the middle region and the coding region; the number of partitions is moderate, making it more robust to noisy data or outliers in the face point P markings, and it will not cross into the next interval due to slight coordinate fluctuations; there are critical points for discrimination at both ends in the movement rules, and it can also tolerate irregular movement paths to a certain extent through the middle region; while meeting the requirements of status discrimination, it also maintains the robustness and simplicity of the algorithm well.
[0083] According to the rules of three - part discriminant for attendance status, an algorithm can be designed to help achieve face attendance status discrimination. Refer to Figure 5 As shown, in the actual implementation of program code, a mapping relationship is set up, which can match the face feature id to the corresponding face information, avoiding a full - scan match of the faces in the database again, and at the same time supporting status marking for multiple faces that appear in the fast - matching area; for the second time when the face passes through the critical point, when the face point P crosses the critical point, it still needs to pass through the detection line before being marked as a legal status.
[0084] Embodiment 2, the present invention provides a three - part - based face recognition sign - in and sign - out attendance system as shown in Figure 6 shown, which is applied to the three - part - based face recognition sign - in and sign - out attendance method of Embodiment 1. The attendance system is composed of an application layer, a middleware layer, a driver layer, and a device layer;
[0085] The application layer is located at the top layer and includes programs and services for users. The programs interact with the operating system through various APIs (Application Programming Interfaces);
[0086] Specifically, the application layer is used for image display, target recognition, database operation, and network communication, and the application layer accesses hardware resources through the services provided by the operating system.
[0087] The middleware layer serves as a communication bridge between different application - layer components and includes a message queue, a remote procedure call framework, a database access middleware, a transaction processing monitor, and a data conversion service;
[0088] Specifically, the middleware layer is also used to provide device abstraction layer services, enabling the application layer to be programmed according to a unified interface standard.
[0089] The driver layer is used for the interaction between software and hardware, closely adheres to the operating system kernel, and is a key layer for software - hardware interaction. Moreover, a driver program is correspondingly set for the hardware device, and the driver program implements the standard interface required by the operating system kernel, allowing the kernel and application programs to control and access hardware resources in a standardized manner;
[0090] When the application layer needs to operate hardware devices, such as reading and writing disks, sending network data packets, or controlling the display output, the driver layer sends a request to the kernel through the system call interface, and the kernel then converts the request into specific operations on the hardware through the corresponding device driver.
[0091] The device layer is the hardware device itself, including but not limited to processors, memory, disks, cameras, and displays, and the code in the driver layer interacts with the device layer to read and set registers, initialize the device, manage the device state, and perform data transmission.
[0092] It should be noted that through the collaborative work of the above-mentioned various layers, the cooperation between these series of layers ensures that the complex software system can run stably and efficiently on different hardware platforms, and it is convenient for application developers not to pay attention to the specific implementation details of the underlying hardware, and they can build a complete Linux-based embedded face recognition attendance system. Each layer undertakes specific tasks. The application layer indirectly calls the driver layer services through the operating system and middleware, and the driver layer further communicates with the device to complete data input and output and hardware resource management.
[0093] Finally, it should be noted that the above are only the preferred embodiments of the present invention and are not used to limit the present invention. Although the present invention has been described in detail with reference to the foregoing embodiments, for those skilled in the art, they can still modify the technical solutions recorded in the foregoing embodiments, or perform equivalent replacements for some of the technical features. Any modifications, equivalent replacements, improvements, etc. made within the spirit and principle of the present invention shall be included within the protection scope of the present invention.
Claims
1. A method for checking in and out based on face recognition in three digits, characterized in that: The attendance method includes the following steps: S1, start the attendance system, the server automatically loads the face database and transmits data to the client; S2, the client collects BGR images through a USB camera, displays them on a monitor, collects multiple faces at the same time, and sends the collected data to the server through the network; S3, after receiving the image data, the server converts the BGR image into the Mat image data format of OpenCV, and then converts it into QImage to provide it to QT for image processing, and calls the OpenCV function library for face detection and recognition, and feeds back the matching results and face area data to the client; S4, if the matching result is successful, the three-point method is called to determine whether the clock-in user has entered the attendance area. If the user successfully enters the attendance area, the time is automatically recorded and the clock-in time is calculated in combination with the sign-out time; S5, the client displays the face matching area data on the interface according to the result fed back by the server, and selects the switch to control the access control according to the result.
2. The method for checking in and out attendance based on face recognition in three digits according to claim 1 is characterized in that: The face detection is to separate the face area and size information from the background image, extract features from the image, and compare the extracted features with the face features matched in the face database. After reaching the score set by the threshold, it is determined whether there is a face in the picture and the exact coordinate position.
3. The attendance method based on face recognition check-in and check-out based on three-point position according to claim 2 is characterized in that: The face detection adopts YuNet face detection model; If the size of the input image is consistent, specify the size (width, height) when instantiating FaceDetectorYN. When using the detect method to detect faces, FaceDetectorYN automatically uses the (width, height) size for processing; If the size of the input image is inconsistent, you can specify the size arbitrarily when instantiating FaceDetectorYN. Before using the detect method, call the setInputSize method to dynamically adjust the size of the input image.
4. The method for checking in and out based on face recognition in three digits according to claim 3 is characterized in that: The face recognition is feature matching and identification judgment. The attendance system compares the target face feature data to be identified with all feature templates in the face database, and calculates an index reflecting the similarity between the two, which is expressed as cosine value and L2 regularization value; When using cosine value to judge, the larger the cosine value, the more similar the faces are and the closer their identities are; When using L2 regularization value for discrimination, the smaller the regularization value, the more similar the faces are and the closer their identities are; Finally, the recognition results are marked according to the calculation results.
5. The method for checking in and out based on face recognition in three digits according to claim 4 is characterized in that: The calculation adopts the SFace face recognition algorithm. When faces.rows is greater than 0, it means that there is a face. Before the detected face is input into the YuNet face detection model, face alignment is performed first. The transformation matrix is calculated between the face feature points extracted by the detection part and the given face feature points, and the face is transformed using affine transformation; After that, feature extraction is performed. The YuNet face detection model uses the SFace algorithm, takes the face image alignment of size 3*112*112 as input, and outputs face features of 128 dimensions; After facial features are extracted, feature comparison is performed. For facial features of different facial images, the distance between the features is calculated to determine whether different facial images belong to the same identity.
6. The method for checking in and out attendance based on face recognition in three digits according to claim 5 is characterized in that: The YuNet model is implemented based on an anchor-based face detector, which generates square anchors on feature maps of four scales. The minimum face size detected is 10x10 and the maximum face size is 256x256. The EIoU loss function is used as the loss function of the model.
7. The method for checking in and out based on face recognition in three digits according to claim 5 is characterized in that: The SFace face recognition algorithm adopts the S-type constrained spherical loss function SFace. The feedback gradients generated by the intra-class and inter-class losses are edited by the S-type function to adaptively reduce the influence of noise samples on model training, which is expressed as: Among them, L represents the loss function, x i Represents the vector eigenvalue of the i-th image training set, y i Indicates the corresponding x i The label value, W j represents the jth column of the weights of the last fully connected layer, b j represents the bias value, θ yi represents the intra-class distance, θ j represents the distance between classes, scosθ j It means that the bias value is removed in the process of transforming equation (4), so that:
8. The method for checking in and out attendance based on face recognition in three digits according to claim 1 is characterized in that: The three-point method assumes that the object can move left and right and up and down at the same time, and the three-point point is the point that divides a specific area into three equal parts; For the sign-in status, when the face moves to the left and enters the video collection area, when the face is detected, the camera will continue to capture the upper left corner of the face rectangle and record it as point P. First, it is determined whether it passes through the first critical point of the three-point point, and then it is determined until the face disappears whether point P finally passes through the next critical point of the three-point point, and the horizontal coordinate of point P must be smaller than the horizontal coordinate of the judgment line. If so, it indicates that the person has entered the attendance area and is marked as signed in; The final status is marked based on the last position of the face point P within 5 minutes. The face point P needs to pass through two different critical points to be marked as a legal status. Otherwise, the face status will not be marked, and the same applies to the sign-out status.
9. A three-point facial recognition sign-in and sign-out attendance system, applied to the three-point facial recognition sign-in and sign-out attendance method according to any one of claims 1 to 8, characterized in that: The attendance system is composed of an application layer, a middleware layer, a driver layer and a device layer; The application layer is located at the top layer and includes user-oriented programs and services. The programs interact with the operating system through various APIs. The middleware layer acts as a communication bridge between different application layer components, including message queues, remote procedure call frameworks, database access middleware, transaction processing monitors, and data conversion services; The driver layer is used for the interaction between software and hardware, and the hardware devices are provided with drivers corresponding to the hardware devices. The drivers implement the standard interfaces required by the operating system kernel, allowing the kernel and application programs to control and access hardware resources in a standardized manner; The device layer includes but is not limited to a processor, memory, disk, camera, and display, and the code of the driver layer interacts with the device layer to read and set registers, initialize devices, manage device status, and perform data transmission.
10. The three-point facial recognition check-in and check-out attendance system according to claim 9 is characterized in that: The application layer is used for image display, target recognition, database operation and network communication, and the application layer accesses hardware resources through services provided by the operating system; The middleware layer is also used to provide device abstraction layer services, allowing the application layer to be programmed according to unified interface standards; The driver layer sends a request to the kernel through a system call interface, and the kernel then converts the request into a specific operation on the hardware through a device driver.