Face authentication method and device applied to attendance checking, electronic equipment and storage medium

By extracting and matching the target face features in attendance images, the technical problems that changes in lighting, posture and expression affect face recognition are solved, and high-precision and robust attendance data processing are achieved.

CN119919980AInactive Publication Date: 2025-05-02ZHUHAI WANDA INTELLIGENT COMMERCIAL TECH CO LTD
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202411999559.X
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-31
Publication Date
2025-05-02
Estimated Expiration
Not applicable · inactive patent

AI Technical Summary

Technical Problem

The existing facial recognition technology has low recognition rate when lighting conditions, postures and facial expressions change, resulting in attendance errors and sign-up problems.

Method used

By obtaining the attendance image of the current time, extracting the target face image of the person to be tested, and obtaining the corresponding set of face features of multiple people to match the face features. If the match is successful, it is determined that the attendance data will take effect.

Benefits of technology

It realizes high-precision face recognition, adapts to feature matching in different postures, improves the accuracy and robustness of attendance data processing, and ensures timely effectiveness and feedback of attendance data.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119919980A_ABST
    Figure CN119919980A_ABST
Patent Text Reader

Abstract

The invention discloses a face authentication method and device applied to attendance checking, electronic equipment and a storage medium. The face authentication method comprises the following steps: acquiring an attendance checking image at the current time; detecting the attendance image to obtain a target face feature of the to-be-detected person; obtaining a face feature set related to the current time, wherein the face feature set comprises face features corresponding to a plurality of persons; detecting whether a face feature matched with the target face feature exists in the face feature set or not, obtaining a recognition result, and if the recognition result is that the face feature matched with the target face feature exists, determining that the attendance data of the to-be-detected person takes effect. The face recognition method provided by the embodiment of the invention can provide more reliable and accurate identity recognition. In addition, even if the to-be-detected person adopts different postures in the attendance checking process, the face feature matching can be adaptively carried out, and the accuracy and robustness are improved. By acquiring the attendance image at the current time and matching the face features, real-time attendance data processing can be realized.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of feature processing, and in particular to a face recognition method, device, electronic equipment and storage medium applied to attendance. Background Art

[0002] In the process of face recognition, the recognition rate may be affected by lighting conditions, posture, facial expressions, etc. For example, factors such as uneven lighting, intensity changes, or backlight may affect the quality of the face image, resulting in recognition failure or misjudgment. At the same time, the existing attendance punching process often encounters the problem of signing in on behalf of others. Summary of the invention

[0003] In view of this, the embodiments of the present invention provide a face recognition method, device, electronic device and storage medium for attendance, so as to solve the problem of attendance errors caused by lighting and the problem of signature in attendance.

[0004] In a first aspect, an embodiment of the present invention provides a face recognition method for attendance, characterized in that the method comprises:

[0005] Acquire the attendance image of the current time, wherein the attendance image includes the person to be detected;

[0006] Based on the attendance image, extracting the target face image of the person to be detected;

[0007] Acquire a facial feature set related to the current time, wherein the facial feature set includes facial features corresponding to multiple persons, and the facial features are obtained by detecting facial images of persons in different postures;

[0008] The target facial features in the target facial image are extracted, and the facial feature set is detected to see whether there are facial features matching the target facial features to obtain a recognition result. If the recognition result shows that there are facial features matching the target facial features, it is determined that the attendance data of the person to be detected is effective.

[0009] Furthermore, extracting the target face image of the person to be detected based on the attendance image includes:

[0010] Preprocessing the attendance image to obtain a preprocessed attendance image;

[0011] Detect the preprocessed attendance image and obtain multiple original face key points;

[0012] Performing affine transformation on the original facial key points to obtain target facial key points;

[0013] The target face features are constructed based on the target face key points.

[0014] Furthermore, performing affine transformation on the original facial key points to obtain target facial key points includes:

[0015] Acquire eye key points from the original face key points, and determine the center point of face rotation based on the eye key points;

[0016] Calculate the rotation angle according to the key point coordinates of the eye key point;

[0017] The original facial key points are rotated and translated using the rotation angle and the center point to obtain the target facial key points.

[0018] Further, the calculating the rotation angle according to the key point coordinates of the eye key point includes:

[0019] Calculating coordinate differences based on the key point coordinates of the eye key points;

[0020] The slope is calculated using the coordinate difference, and the rotation angle is calculated using the slope.

[0021] Furthermore, the acquiring of the face feature set related to the current time includes:

[0022] Obtain the shift information corresponding to the current time, and query the personnel information corresponding to the shift information;

[0023] Querying the facial features corresponding to the personnel information from the facial feature database;

[0024] The facial feature set is constructed based on the facial features corresponding to the personnel information.

[0025] Further, extracting the target facial features in the target facial image and detecting whether the facial feature set contains facial features that match the target facial features to obtain a recognition result includes:

[0026] Calculating the similarity between the target facial feature and each facial feature in the facial feature set;

[0027] The recognition result is determined according to the similarity.

[0028] Furthermore, the method further comprises:

[0029] Get the attendance data set within the preset period;

[0030] Analyze the attendance data in the attendance data set to determine the distribution of personnel in each time period;

[0031] The shift information corresponding to the future period is updated according to the personnel distribution.

[0032] In a second aspect, an embodiment of the present invention provides a face recognition device for attendance, the device comprising:

[0033] An acquisition module, used for acquiring an attendance image of the current time, wherein the attendance image includes the person to be detected;

[0034] A detection module, used for extracting a target face image of the person to be detected based on the attendance image;

[0035] A query module, used to obtain a facial feature set related to the current time, wherein the facial feature set includes facial features corresponding to multiple persons, and the facial features are obtained by detecting facial images of persons in different postures;

[0036] The processing module is used to extract the target facial features in the target facial image, and detect whether there are facial features matching the target facial features in the facial feature set to obtain a recognition result. If the recognition result is that there are facial features matching the target facial features, it is determined that the attendance data of the person to be detected is effective.

[0037] In a third aspect, an embodiment of the present invention provides a computer device, comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.

[0038] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the method of the first aspect or any corresponding embodiment thereof.

[0039] The method provided in the embodiment of the present application has the following beneficial effects:

[0040] The method provided in the embodiment of the present application utilizes face recognition technology to detect the target facial features of the person to be detected, and can achieve high-precision identification. Compared with traditional attendance methods, such as swiping a card or a password, face recognition can provide more reliable and accurate identity recognition. In addition, even if the person to be detected takes different postures during the attendance process, facial feature matching can be adaptively performed to improve accuracy and robustness. By acquiring the attendance image of the current time and performing facial feature matching, real-time attendance data processing can be achieved. In this way, the effectiveness and feedback of the attendance data can be completed in a short time, which is convenient for timely statistics and recording of attendance. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] In order to more clearly illustrate the specific implementation methods of the present invention or the technical solutions in the prior art, the drawings required for use in the specific implementation methods or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are some implementation methods of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0042] Figure 1 is a flow chart of a face recognition method applied to attendance according to some embodiments of the present invention;

[0043] Figure 2 is a structural block diagram of a face recognition device applied to attendance according to an embodiment of the present invention;

[0044] Figure 3 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0045] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.

[0046] According to an embodiment of the present invention, a face recognition method, device, electronic device and storage medium for attendance are provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.

[0047] In this embodiment, a face recognition method for attendance is provided. Figure 1 is a flow chart of a face recognition method applied to attendance according to an embodiment of the present invention. Figure 1 As shown, the process includes the following steps:

[0048] Step S11, obtaining the attendance image of the current time, wherein the attendance image includes the person to be detected.

[0049] In an embodiment of the present application, a function provided by a programming language or an operating system is used to obtain the current date and time. The attendance authentication system establishes a connection with an image acquisition device, which may be a surveillance camera, a camera array, an image sensor, etc. Ensure that the device communicates with the computer or system. The image acquisition operation is triggered by sending a corresponding instruction or calling the API of the image acquisition device. The captured attendance image is received from the image acquisition device. This can be real-time streaming image data, or data of a single image.

[0050] Step S12: extracting the target face image of the person to be detected based on the attendance image.

[0051] In the embodiment of the present application, the attendance image is detected to obtain the target facial features of the person to be detected, including the following steps A1-A4:

[0052] Step A1, preprocessing the attendance image to obtain a preprocessed attendance image.

[0053] In the embodiment of the present application, the image preprocessing process includes: color image histogram equalization processing, dark light or exposure judgment and corresponding GAMMER transformation, image blur judgment and blur image processing, and finally obtains the preprocessed attendance image. The specific processing process is as follows:

[0054] ① Color image histogram equalization: Color image histogram equalization can enhance the contrast of the attendance image and make the details in the attendance image clearer. This method adjusts the brightness distribution of the attendance image by mapping the pixel values ​​of the attendance image into a wider grayscale range to obtain better visual effects.

[0055] ② Dark light or exposure judgment and corresponding GAMMA transformation: Attendance images with dark light or uneven exposure may affect the extraction and matching of facial features, so corresponding processing is required. For example: detect the light conditions by judging the brightness value of the attendance image. Then, the Gamma transformation can be applied to adjust the brightness and contrast of the attendance image to improve the quality of the attendance image.

[0056] ③ Image blur judgment and blurred image processing: Blurred attendance images may make it difficult to extract and match facial features, so blurred attendance images need to be processed. Attendance image clarity assessment algorithms, such as Laplacian transform or frequency domain-based methods, can be used to judge the clarity of attendance images. If the attendance image is judged to be blurred, an attendance image sharpening or deblurring algorithm can be applied to improve the clarity of the attendance image.

[0057] Step A2: Detect the preprocessed attendance image to obtain a plurality of original face key points.

[0058] In an embodiment of the present application, the YOLOV5 model is used to detect faces in photos, quickly and accurately locate the position of the face of the person to be detected in the image, and then extract facial features based on the position to obtain multiple original facial key points.

[0059] Specifically, use the corresponding library or framework of the YOLOv5 model to load the pre-trained YOLOv5 model into the program. This can be done in Python using PyTorch or other libraries that support YOLOv5. Use the loaded YOLOv5 model to perform face detection on the photo. Pass in the photo as input, and the model will output the location of the detected face frame and the corresponding confidence. Based on the recognition results, extract the face frame of the person to be detected. Faces can be filtered based on the confidence threshold to ensure that the selected face bounding box is reliable. Use a face key point detection algorithm, such as the shape_predictor model in the dlib library or other deep learning-based face key point detection models, to extract key points from the selected face frame and obtain multiple original face key points. These key points usually include the positions of eyes, nose, mouth, etc. Save the extracted face key points in an appropriate data structure, such as a list or array, for subsequent use.

[0060] Through these steps, the YOLOv5 model can be used to quickly and accurately locate the position of the face of the person to be detected in the image, and extract facial features based on these positions to obtain multiple original facial key points. These key points can be used for subsequent face recognition processing and analysis. This application pre-trains attendance images based on the yolov5 model framework. It can improve the accuracy of face detection and reduce the false detection rate of balloons, hands, and shadows as faces.

[0061] In an embodiment of the present application, a set of image data sets containing faces are collected and annotated, wherein the business attendance image data sets of different resolutions have image resolutions ranging from 480 to 3000, and the number of faces in each image ranges from 1 to 30. In the face detection task, it is necessary to annotate the bounding box position of each face, and the bounding box can be a minimum circumscribed rectangle. The data set is divided into a training set and a validation set. Usually most of the data is used for training, and a small amount is used to verify and evaluate the performance of the model, wherein the division ratio of the training set, validation set, and test set is 8:1:1.

[0062] Perform data augmentation operations on the training set, such as random cropping, rotation, scaling, and flipping, to expand the training data set and increase the diversity of samples. Choose a suitable YOLOv5 model structure, such as YOLOv5s, YOLOv5m, YOLOv5l, or YOLOv5x. These models vary in size and complexity, and you can choose an appropriate model based on the task requirements. Initialize the parameters of the model, either using a pre-trained weight file or randomly initializing. Choose an appropriate objective function (loss function), such as the GIoU loss function or the MSE loss function used in YOLOv5, to measure the difference between the predicted box and the true box. Use the training set to train the model. In each training iteration, the input image is forward propagated to obtain the predicted result, the loss function is calculated, and the parameters of the network are updated through backpropagation. Use the validation set to evaluate the performance of the model. At the end of each training cycle, the validation set is used to calculate the evaluation indicators of the model, such as precision and recall. Based on the results of the validation set, adjust the model hyperparameters, such as learning rate, batch size, training image resolution, and number of training rounds, to optimize the model performance. After the training is completed, the trained model parameters are saved for subsequent prediction and reasoning.

[0063] Step A3: Perform affine transformation on the original facial key points to obtain the target facial key points.

[0064] In an embodiment of the present application, an affine transformation is performed on the original facial key points to obtain target facial key points, including: obtaining eye key points from the original facial key points, and determining the center point of facial rotation based on the eye key points; calculating the rotation angle based on the key point coordinates of the eye key points; and using the rotation angle and the center point to rotate and translate the original facial key points to obtain the target facial key points.

[0065] Specifically, it is necessary to obtain the eye key points from the original face key points. The eye key points usually include the coordinates of the inner and outer corners of the eyes. You can use a face key point detection algorithm, such as the face detector in dlib or OpenCV, to find the key points of the face, and then get the coordinates of the eye key points according to a predefined index or name. Determine the center point of face rotation based on the eye key points. The coordinates of the rotation center point can be used by calculating the center position of the eye key point. The coordinates of the center point can be obtained by averaging the coordinates of the inner and outer corners of the eye. Then, the rotation angle is calculated based on the coordinates of the eye key points. The angle between the inner and outer corners of the eye can be calculated as the rotation angle using the knowledge of coordinate geometry. The angle can be calculated using inverse trigonometric functions (such as arctan, acos, or asin). Next, the original face key points are rotated and translated using the rotation angle and the center point. The key points can be rotated and translated using affine transformation or matrix transformation based on the rotation center point and the rotation angle. The specific transformation method can be implemented using related functions in the mathematical library or image processing library. Finally, the target face key points are obtained, which are obtained by affine transformation (rotation and translation) of the original face key points. These target face key points can be used for the next step of face recognition.

[0066] In an embodiment of the present application, the rotation angle is calculated according to the key point coordinates of the eye key point, including: calculating the coordinate difference based on the key point coordinates of the eye key point; calculating the slope using the coordinate difference, and calculating the rotation angle using the slope.

[0067] Step A4: construct target facial features based on target facial key points.

[0068] The method provided in the embodiment of the present application can remove noise, blur and other interference factors in the image through preprocessing, thereby improving the quality of the image, making the subsequent face key point detection and feature extraction more accurate, and also improving the accuracy and stability of face key point detection. At the same time, through affine transformation, the original face key points can be rotated and translated according to the position and angle of the eye key points, so as to correct the posture of the face so that the key points are in the same position. Through affine transformation, the original face key points can be scaled and translated according to the position and distance of the eye key points, thereby standardizing the sizes of different faces so that the target face key points are on the same scale.

[0069] Step S13, obtaining a facial feature set related to the current time, wherein the facial feature set includes facial features corresponding to multiple persons, and the facial features are obtained by detecting facial images of persons in different postures.

[0070] In an embodiment of the present application, a facial feature set related to the current time is obtained, including: obtaining shift information corresponding to the current time, and querying personnel information corresponding to the shift information; querying facial features corresponding to the personnel information from a facial feature library; and constructing a facial feature set based on the facial features corresponding to the personnel information.

[0071] Specifically, query and obtain the shift information corresponding to the current time from the shift information database or other storage media. The shift information includes the start time and end time of the shift, as well as related personnel information. According to the obtained shift information, query the personnel information associated with the shift information. The personnel information may include name, work number, department, etc. According to the unique identifier in the personnel information (such as work number), query the facial features of the person in the facial feature library. The facial feature library stores the extracted facial features corresponding to each person, and the features of a specific person can be quickly obtained by database query or indexing. The queried facial features are integrated according to the personnel information to construct a facial feature set. The feature set can be stored in memory or persisted in a database or file for subsequent face recognition or other related operations.

[0072] Step S14, extract the target facial features in the target facial image, and detect whether there are facial features matching the target facial features in the facial feature set to obtain a recognition result. If the recognition result is that there are facial features matching the target facial features, it is determined that the attendance data of the person to be detected is effective.

[0073] In an embodiment of the present application, extracting target facial features from a target facial image includes: inputting the target facial image into a ResNet network for feature extraction. The ResNet network gradually extracts features of the image through multiple levels of convolutional layers and pooling layers. The dimension of the feature vector finally obtained is 128.

[0074] Specifically, the target face image is preprocessed, including operations such as image scaling, cropping, and normalization, to ensure that the input image matches the requirements of the ResNet network. The preprocessed target face image is then input into the ResNet network, and the image is passed step by step through multiple convolutional layers and pooling layers, and a feature map is generated at each stage. After the last convolutional layer of the ResNet network, the feature map is average pooled to obtain a vectorized feature representation. The dimension of the feature vector is 128. The feature vector is L2 normalized to convert it into a vector of unit length.

[0075] In an embodiment of the present application, detecting whether a facial feature set contains a facial feature that matches a target facial feature to obtain a recognition result includes: calculating the similarity between the target facial feature and each facial feature in the facial feature set; and determining the recognition result based on the similarity.

[0076] Specifically, cosine similarity is used to compare faces. Cosine similarity is a method for measuring the similarity between vectors. For two feature vectors, the cosine similarity between them can be calculated, and the similarity between them can be quantified by calculating the angle between the two vectors. In this way, the feature vectors of the two faces are normalized, and then the cosine similarity between them is calculated. If the cosine similarity exceeds a preset threshold, it can be determined that the two face features are similar.

[0077] It should be noted that the similarity threshold needs to be adjusted according to the specific application scenario and requirements. Generally speaking, a higher threshold can improve the accuracy of matching, but may lead to missed detections; while a lower threshold may improve the recall rate, but may lead to false detections. Therefore, experiments and evaluations are needed to find a suitable threshold. At the same time, other information and strategies can also be combined for judgment, for example: ensuring recognition accuracy at the expense of recall rate.

[0078] The method provided in the embodiment of the present application utilizes face recognition technology to detect the target facial features of the person to be detected, and can achieve high-precision identification. Compared with traditional attendance methods, such as swiping a card or a password, face recognition can provide more reliable and accurate identity recognition. In addition, even if the person to be detected takes different postures during the attendance process, facial feature matching can be adaptively performed to improve accuracy and robustness. By acquiring the attendance image of the current time and performing facial feature matching, real-time attendance data processing can be achieved. In this way, the effectiveness and feedback of the attendance data can be completed in a short time, which is convenient for timely statistics and recording of attendance.

[0079] In an embodiment of the present application, the method also includes: obtaining a set of attendance data within a preset period; analyzing the attendance data in the attendance data set to determine the distribution of personnel in each time period; and updating the shift information corresponding to the future period according to the personnel distribution.

[0080] In an embodiment of the present application, attendance data within a preset period is obtained from an attendance system or other storage medium. Attendance data includes personnel's clock-in records, on-duty and off-duty times, leave records, etc. The attendance data set is analyzed to determine the distribution of personnel in each time period. The number of people in each time period, late arrivals and early departures, leave situations, etc. can be counted. Based on the statistical results, the distribution of personnel in different time periods is obtained, such as peak time periods, off-peak time periods, etc.

[0081] Based on the analyzed personnel distribution, evaluate whether the current shift arrangement is reasonable. If it is found that there is a large congestion or a shortage of personnel in certain time periods, the shift can be adjusted as needed. For example, you can increase or decrease the number of shifts and adjust the working hours to optimize the personnel distribution.

[0082] It should be noted that the specific methods and strategies for analyzing attendance data and updating shift information can be adjusted and optimized according to specific attendance needs and corporate conditions. Machine learning, data analysis and other technologies can be combined to analyze historical data and patterns to predict future personnel flow and demand, so as to make more accurate shift arrangements. At the same time, other factors such as holidays and workplace capacity can also be considered to further optimize shift arrangements.

[0083] In this embodiment, a face recognition device for attendance is also provided, which is used to implement the above embodiments and preferred implementations, and the descriptions that have been made will not be repeated. As used below, the term "module" can be a combination of software and / or hardware that implements a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.

[0084] This embodiment provides a face recognition device for attendance checking. Figure 2 As shown, including:

[0085] An acquisition module 21 is used to acquire an attendance image at the current time, wherein the attendance image includes the person to be detected;

[0086] A detection module 22, used to extract a target face image of a person to be detected based on the attendance image;

[0087] A query module 23 is used to obtain a facial feature set related to the current time, wherein the facial feature set includes facial features corresponding to multiple persons, and the facial features are obtained by detecting facial images of persons in different postures;

[0088] The processing module 24 is used to extract the target facial features in the target facial image, and detect whether there are facial features matching the target facial features in the facial feature set to obtain a recognition result. If the recognition result is that there are facial features matching the target facial features, it is determined that the attendance data of the person to be detected is effective.

[0089] In an embodiment of the present application, a detection module is used to preprocess the attendance image to obtain a preprocessed attendance image; detect the preprocessed attendance image to obtain multiple original facial key points; perform affine transformation on the original facial key points to obtain target facial key points; and construct target facial features based on the target facial key points.

[0090] In an embodiment of the present application, a detection module is used to obtain eye key points from the original face key points, and determine the center point of face rotation based on the eye key points; calculate the rotation angle according to the key point coordinates of the eye key points; use the rotation angle and the center point to rotate and translate the original face key points to obtain the target face key points.

[0091] In an embodiment of the present application, the detection module is used to calculate the coordinate difference based on the key point coordinates of the eye key point; calculate the slope using the coordinate difference, and calculate the rotation angle using the slope.

[0092] In an embodiment of the present application, a query module is used to obtain shift information corresponding to the current time, and query personnel information corresponding to the shift information; query facial features corresponding to the personnel information from a facial feature library; and construct a facial feature set based on the facial features corresponding to the personnel information.

[0093] In an embodiment of the present application, the processing module calculates the similarity between the target facial features and each facial feature in the facial feature set; and determines the recognition result based on the similarity.

[0094] In an embodiment of the present application, the device also includes: an update module for obtaining a set of attendance data within a preset period; analyzing the attendance data in the attendance data set to determine the distribution of personnel in each time period; and updating the shift information corresponding to the future period according to the personnel distribution.

[0095] See also Figure 3 , Figure 3 is a schematic diagram of the structure of a computer device provided by an optional embodiment of the present invention, such as Figure 3 As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process the instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as, a display device coupled to the interface). In some optional embodiments, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system).

[0096] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.

[0097] The memory 20 stores instructions executable by at least one processor 10, so that the at least one processor 10 executes the method shown in the above embodiment.

[0098] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function; the data storage area may store data created by the use of a computer device based on the presentation of a small program landing page, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some optional embodiments, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.

[0099] The memory 20 may include a volatile memory, such as a random access memory; the memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive; the memory 20 may also include a combination of the above types of memory.

[0100] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.

[0101] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a magnetic disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc.; further, the storage medium can also include a combination of the above types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.

[0102] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.

Claims

1. A face recognition method for attendance, characterized in that: The method comprises: Acquire the attendance image of the current time, wherein the attendance image includes the person to be detected; Based on the attendance image, extracting the target face image of the person to be detected; Acquire a facial feature set related to the current time, wherein the facial feature set includes facial features corresponding to multiple persons, and the facial features are obtained by detecting facial images of persons in different postures; The target facial features in the target facial image are extracted, and the facial feature set is detected to see whether there are facial features matching the target facial features to obtain a recognition result. If the recognition result shows that there are facial features matching the target facial features, it is determined that the attendance data of the person to be detected is effective.

2. The method according to claim 1, characterized in that The step of extracting the target face image of the person to be detected based on the attendance image includes: Preprocessing the attendance image to obtain a preprocessed attendance image; Detect the preprocessed attendance image and obtain multiple original face key points; Performing affine transformation on the original facial key points to obtain target facial key points; The target face image is constructed based on the target face key points.

3. The method according to claim 2, characterized in that The step of performing an affine transformation on the original facial key points to obtain the target facial key points includes: Acquire eye key points from the original face key points, and determine the center point of face rotation based on the eye key points; Calculate the rotation angle according to the key point coordinates of the eye key point; The original facial key points are rotated and translated using the rotation angle and the center point to obtain the target facial key points.

4. The method according to claim 3, characterized in that The calculating the rotation angle according to the key point coordinates of the eye key point comprises: Calculating coordinate differences based on the key point coordinates of the eye key points; The slope is calculated using the coordinate difference, and the rotation angle is calculated using the slope.

5. The method according to claim 1, characterized in that The step of obtaining the face feature set related to the current time includes: Obtain the shift information corresponding to the current time, and query the personnel information corresponding to the shift information; Querying the facial features corresponding to the personnel information from the facial feature database; The facial feature set is constructed based on the facial features corresponding to the personnel information.

6. The method according to claim 1, characterized in that The extracting of the target facial features in the target facial image and detecting whether the facial feature set contains facial features that match the target facial features to obtain a recognition result includes: Calculating the similarity between the target facial feature and each facial feature in the facial feature set; The recognition result is determined according to the similarity.

7. The method according to claim 1, characterized in that The method further comprises: Get the attendance data set within the preset period; Analyze the attendance data in the attendance data set to determine the distribution of personnel in each time period; Update the shift information corresponding to the future period according to the personnel distribution.

8. A face recognition device used for attendance, characterized in that: The device comprises: An acquisition module, used for acquiring an attendance image of the current time, wherein the attendance image includes the person to be detected; A detection module, used for extracting a target face image of the person to be detected based on the attendance image; A query module, used to obtain a facial feature set related to the current time, wherein the facial feature set includes facial features corresponding to multiple persons, and the facial features are obtained by detecting facial images of persons in different postures; The processing module is used to extract the target facial features in the target facial image, and detect whether there are facial features matching the target facial features in the facial feature set to obtain a recognition result. If the recognition result is that there are facial features matching the target facial features, it is determined that the attendance data of the person to be detected is effective.

9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the method according to any one of claims 1 to 7 by executing the computer instructions.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the method according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • A face recognition attendance checking method and device

    CN109740501A

  • Video main character recognition method and device, equipment and readable storage medium

    CN110909651A

  • Face attendance checking method and system, computer equipment and storage medium

    CN112149517A

  • Face recognition method and device

    CN114764933A