Automatic attendance checking method and device, terminal equipment and storage medium
Through the surveillance camera, real-time video streams are collected for face detection and recognition, the existing cumbersome attendance methods are solved, and the automatic check-in without any sense is realized, which improves the employee experience.
Patent Information
- Application Number
- CN202411850183.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-16
- Publication Date
- 2025-01-14
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
The existing attendance method requires additional operations by employees, resulting in a cumbersome punch-in process.
Use surveillance cameras to collect video streams in real time, perform face detection and recognition, and generate attendance results without additional operations from employees.
It realizes contactless attendance, simplifies the check-in process of employees, and improves the employee experience.
Smart Images

Figure CN119314232A_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the field of computer technology, and in particular, relates to an automatic attendance method, apparatus, terminal device and storage medium. Background Art
[0002] In order to facilitate attendance management, most companies require employees to clock in. Common clock-in methods include swiping cards, clocking in with fingerprint recognition devices, clocking in with face recognition devices, clocking in with mobile phones, etc. However, all of the above clock-in methods require employees to perform additional clock-in operations. For example, when clocking in with a fingerprint recognition device, employees need to place a specific finger on the fingerprint recognition device to clock in, and when clocking in with a face recognition device, employees need to stand in a designated position and wait for face recognition. It can be seen that the employee clock-in operation in the relevant technology is relatively cumbersome. Summary of the invention
[0003] The embodiments of the present application provide an automatic attendance method, apparatus, terminal device and storage medium, which can solve the problem of cumbersome employee clocking-in operation in related technologies.
[0004] In a first aspect, an embodiment of the present application provides an automatic attendance method, the method comprising: Get the video stream collected by the surveillance camera in real time; Reading images from a video stream and performing face detection to determine a face image containing a human face; Perform facial recognition on facial images to determine the corresponding target employees; Get the acquisition time corresponding to the face image; Generate the attendance results of the target employees based on the preset attendance time and collection time.
[0005] In a second aspect, an embodiment of the present application provides an automatic attendance device, comprising: The first acquisition module is used to acquire the video stream collected by the surveillance camera in real time; A detection module, used for reading images from a video stream and performing face detection to determine a face image containing a face; The recognition module is used to perform face recognition on the face image and determine the corresponding target employee; The second acquisition module is used to obtain the acquisition time corresponding to the face image; The generation module is used to generate the attendance results of the target employees according to the preset attendance time and collection time.
[0006] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the above-mentioned automatic attendance method when executing the computer program.
[0007] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps of the above-mentioned automatic attendance method are implemented.
[0008] In a fifth aspect, an embodiment of the present application provides a computer program product, which, when executed on a terminal device, enables the terminal device to execute the above-mentioned automatic attendance method.
[0009] The beneficial effects of the embodiments of the present application compared to the prior art are as follows: the embodiments of the present application obtain the video stream collected in real time by the surveillance camera, read the image from the video stream and perform face detection to determine the facial image containing the face, then perform face recognition on the facial image to determine the corresponding target employee, and obtain the collection time corresponding to the facial image, and generate the attendance result of the target employee according to the preset attendance time and collection time. The implementation method of the present application utilizes the surveillance camera to realize the senseless collection of facial images, and performs face detection and face recognition, and finally can realize senseless attendance. For employees, there is no need to stand in the designated position or perform additional operations, they only need to appear in the area covered by the surveillance camera to realize automatic clocking in, which simplifies the attendance operation and improves the employee experience. BRIEF DESCRIPTION OF THE DRAWINGS
[0010] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0011] Figure 1 This is a schematic diagram of an implementation flow of an automatic attendance method provided in an embodiment of the present application; Figure 2 It is a structural schematic diagram of an automatic attendance device provided in an embodiment of the present application; Figure 3 It is a schematic diagram of the structure of the terminal device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0012] In order to make the purpose, technical solutions and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not intended to limit the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work are protected by the present application.
[0013] It should be noted that the terms "include", "comprises" and "have" and any variations thereof in the specification and claims of the present application and the above-mentioned drawings are intended to cover non-exclusive inclusions. For example, a process, method, terminal, product or device that includes a series of steps or units is not limited to the listed steps or units, but may optionally include steps or units that are not listed, or may optionally include other steps or units that are inherent to these processes, methods, products or devices. In the claims, specification and drawings of the present application, relational terms such as "first" and "second" are merely used to distinguish one entity / operation / object from another entity / operation / object, and do not necessarily require or imply any such real-time relationship or order between these entities / operations / objects.
[0014] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.
[0015] In order to facilitate attendance management, most companies require employees to clock in. Common clock-in methods include swiping cards, clocking in with fingerprint recognition devices, clocking in with face recognition devices, clocking in with mobile phones, etc. However, all of the above clock-in methods require employees to perform additional clock-in operations. For example, when clocking in with a fingerprint recognition device, employees need to place a specific finger on the fingerprint recognition device to clock in, and when clocking in with a face recognition device, employees need to stand in a designated position and wait for face recognition. It can be seen that the employee clock-in operation in the relevant technology is relatively cumbersome.
[0016] In view of this, the implementation method of the present application uses surveillance cameras to realize the senseless collection of facial images, and performs face detection and face recognition, and finally realizes senseless attendance. For employees, there is no need to stand in a designated position or perform additional operations, just appear in the area covered by the surveillance camera to realize automatic clocking in, which simplifies the attendance operation and improves the employee experience.
[0017] In order to illustrate the technical solution of the present application, a specific embodiment is provided below for illustration.
[0018] Figure 1 The present invention provides a schematic diagram of the implementation process of an automatic attendance method provided in an embodiment of the present application. The method can be applied to a terminal device, specifically a smart phone, a tablet computer, a laptop computer, an ultra-mobile personal computer (UMPC), a netbook, etc.
[0019] Specifically, the above automatic attendance method may include the following steps S101 to S105.
[0020] Step S101, obtaining a video stream collected in real time by a surveillance camera.
[0021] Among them, surveillance cameras are devices used to collect video streams in real time. They can be installed at the entrance, exit or work area of the enterprise to monitor and record the entry and exit of employees.
[0022] It is important to understand that surveillance cameras are different from face clocking devices. The differences between the two are as follows: The face clocking device usually integrates a camera, image processing module, face recognition module, etc. It is a device specially designed for face recognition attendance. The image acquisition area of the device is small, and the user needs to actively walk in front of the face clocking device, and the camera will automatically capture the user's face image for recognition.
[0023] Surveillance camera clocking in is a common surveillance device. It is not set up specifically for face clocking in. It can usually only collect video streams but cannot perform image processing and face recognition. Its image collection area is large, and users can automatically clock in just by passing through its image collection area.
[0024] In an implementation manner of the present application, the terminal device can be connected to the surveillance camera via a network or a local interface to obtain the video data collected by the surveillance camera in real time.
[0025] Step S102, reading images from the video stream and performing face detection to determine a facial image containing a human face.
[0026] In the implementation manner of the present application, the terminal device can read images frame by frame from the video stream, and use a face detection algorithm (such as Haar features, HOG+SVM, deep learning, etc.) to locate the face area in the image, thereby extracting the image area containing the face as the face image.
[0027] It should be noted that this application uses surveillance cameras to collect employee images. Since the surveillance cameras are always on and their image collection area is large, there may be no employees in the images they collect, or the area occupied by the employees is small. Therefore, face detection is required to determine the images containing the employee's face for subsequent face recognition. The existing face clocking machines will only collect images after detecting that an employee is approaching, so the images they collect basically contain face images, and there is no need for face detection.
[0028] In some specific implementations of the present application, the above-mentioned reading of images from the video stream and performing face detection to determine a facial image containing a face may specifically include steps S401 to S403.
[0029] Step S401, reading video images from a video stream according to a preset time, and performing face detection on the video images.
[0030] In an embodiment of the present application, the terminal device can read a frame of video image from the video stream at a preset time interval (such as every 5 seconds, every 10 seconds, etc.), and apply a face detection algorithm, such as Haar features, HOG features or a deep learning model (such as a convolutional neural network) to the read video image to identify the face in the image.
[0031] Step S402, when it is detected that the video image contains a human face, the video image is continuously read from the video stream and face detection is performed until it is detected that the video image does not contain a human face.
[0032] In an embodiment of the present application, when the terminal device detects a face in a video image, the terminal device may continue to read the next frame of video image from the video stream and perform face detection again, and continue this process (for example, for 10 frames) until it is detected that the video image no longer contains a face.
[0033] Step S403, calculating the face definition of all read video images, and selecting the video image with the highest face definition as the face image.
[0034] In the implementation mode of the present application, the terminal device can evaluate the clarity of the face part in all the read video images. Specifically, this can be achieved by calculating the local contrast, sharpness, etc. of the image. Finally, the video image with the highest clarity is selected as the final face image to ensure that the face image with the best quality and the easiest to perform subsequent analysis is selected.
[0035] During the research and development process, the applicant discovered that since the surveillance camera is working continuously, if the terminal device performs face detection on each frame of the image captured by the surveillance camera, it will consume a lot of computing resources. Since it takes a certain amount of time for an employee to pass through the image acquisition area of the surveillance camera, for example, the average passing time is 10 seconds. Therefore, the applicant reads the video image and performs face detection at preset time intervals, which can reduce the computing burden and response time of the system while ensuring the accuracy of the detection. In addition, by selecting the face image with the highest clarity for subsequent processing, unnecessary calculations and resource waste can also be reduced.
[0036] Step S103: perform face recognition on the face image to determine the corresponding target employee.
[0037] In an implementation manner of the present application, the terminal device may use a facial recognition algorithm (such as a deep learning model) to compare a facial image with facial data in a database, thereby determining the identity of the employee corresponding to the facial image (ie, the target employee).
[0038] Step S104, obtaining the collection time corresponding to the face image.
[0039] In an implementation manner of the present application, the surveillance camera records the acquisition timestamp of each frame of the image when acquiring images. The terminal device can read this data and record the timestamp of the video frame containing the face image as the acquisition time.
[0040] Step S105, generating the attendance result of the target employee according to the preset attendance time and collection time.
[0041] In the implementation mode of the present application, the terminal device can read the preset attendance time specified by the enterprise (such as working hours and leaving hours), and compare the collection time with the preset attendance time, so as to determine whether the target employee is late, leaves early or normal, and finally generate the corresponding attendance result and store or send it to the attendance management system.
[0042] The beneficial effects of the embodiments of the present application compared to the prior art are as follows: the embodiments of the present application obtain the video stream collected in real time by the surveillance camera, read the image from the video stream and perform face detection to determine the facial image containing the face, then perform face recognition on the facial image to determine the corresponding target employee, and obtain the collection time corresponding to the facial image, and generate the attendance result of the target employee according to the preset attendance time and collection time. The implementation method of the present application utilizes the surveillance camera to realize the senseless collection of facial images, and performs face detection and face recognition, and finally can realize senseless attendance. For employees, there is no need to stand in the designated position or perform additional operations, they only need to appear in the area covered by the surveillance camera to realize automatic clocking in, which simplifies the attendance operation and improves the employee experience.
[0043] It should be understood that in the application scenarios of the present application, the lighting environments in which the surveillance cameras are located are varied, which may have a significant impact on face recognition. For example, in a backlit or single strong light source environment, the face image may appear dark or have a yin-yang face phenomenon, resulting in difficulty in recognition. As for the face recognition equipment in the prior art, it is usually set in a location with good lighting conditions, so the face images it collects usually do not have the problem of poor lighting conditions. In view of this, in some specific embodiments of the present application, before the above-mentioned face recognition is performed on the face image and the corresponding target employee is determined, steps S501 to S504 may also be included.
[0044] Step S501, normalize the grayscale of the face image to obtain a grayscale normalized image.
[0045] In an embodiment of the present application, the terminal device can read a facial image, convert the image into a grayscale image, calculate the mean and standard deviation of the grayscale image, and normalize the grayscale value of each pixel. Specifically, the formula (grayscale value - mean) / standard deviation can be used to obtain the normalized grayscale value.
[0046] Step S502, performing histogram equalization on the grayscale normalized image to obtain a histogram equalized image.
[0047] In an embodiment of the present application, the terminal device may calculate the grayscale histogram of the grayscale normalized image, specifically, calculate the cumulative distribution function (CDF) according to the histogram, and use the CDF to map the original grayscale value to the new grayscale value to achieve histogram equalization.
[0048] Step S503: performing logarithmic transformation on the histogram equalization image to obtain a logarithmic transformed image.
[0049] In an embodiment of the present application, the terminal device may apply a logarithmic transformation formula to the image after histogram equalization, such as c * log(1 + r), where r is the grayscale value of the pixel and c is a constant used to adjust the grayscale range after the transformation.
[0050] Step S504: performing histogram matching on the logarithmic transformed image to obtain an enhanced image.
[0051] In an embodiment of the present application, the terminal device may select a grayscale histogram of a reference image as a target histogram, calculate the grayscale histogram of the enhanced image (logarithmically transformed image), and use a histogram matching algorithm to adjust the grayscale histogram of the enhanced image to be similar to the target histogram, and finally obtain the enhanced image.
[0052] The implementation method of the present application can significantly improve the quality of facial images through grayscale normalization, histogram equalization, logarithmic transformation and histogram matching, and reduce problems such as uneven illumination and insufficient contrast of images collected by surveillance cameras. In addition, the improved image can provide clearer and more accurate feature information during the face recognition process, thereby improving the accuracy and reliability of recognition.
[0053] It should be understood that in the application scenario of the present application, employees may wear some obstructions, such as masks, glasses, headphones, etc., when passing through the image acquisition area of the surveillance camera. For the face recognition equipment in the prior art, when it detects that there is an obstruction on the employee's face, it usually issues a relevant prompt to prompt the employee to remove the obstruction before performing face recognition. This operation is obviously not applicable to the use scenario of the present application. In view of this, in some specific embodiments of the present application, the above-mentioned face recognition of the face image to determine the corresponding target employee may specifically include steps S601 to S605.
[0054] Step S601, performing occlusion detection on the face image to determine the occlusion area.
[0055] In an embodiment of the present application, the terminal device may use a deep learning model (such as a convolutional neural network) or a traditional image processing algorithm (such as edge detection, morphological operations) to detect occluded areas in a facial image, thereby marking the location and size of the occluded areas.
[0056] Step S602, dividing the face image into multiple local areas, and performing feature extraction on each local area to obtain corresponding local features.
[0057] In an embodiment of the present application, the terminal device may divide a facial image into multiple local areas of fixed size or adaptively divided according to facial key points, and apply a feature extraction algorithm (such as LBP, HOG, SIFT, etc.) to each local area to extract local features.
[0058] Step S603: configuring weights for the occluded area and the non-occluded area.
[0059] In an embodiment of the present application, the terminal device may assign a lower weight to the occluded area according to the result of the occlusion detection, because the information of the occluded area may be inaccurate or missing, and assign a higher weight to the non-occluded area, because the non-occluded area contains more useful facial feature information.
[0060] Step S604: The local features corresponding to the occluded area and the local features corresponding to the non-occluded area are fused according to the weights to obtain the global features.
[0061] In an implementation manner of the present application, the terminal device may use methods such as weighted averaging, weighted summation, feature stitching, etc. to fuse local features of occluded areas and non-occluded areas according to configured weights, thereby obtaining global features representing the entire facial image.
[0062] Step S605: Perform face recognition based on the global features to determine the corresponding target employee.
[0063] In the implementation of the present application, the terminal device can compare the fused global features with the pre-stored facial feature library. Specifically, a similarity measurement method (such as cosine similarity, Euclidean distance, etc.) can be used to calculate the similarity between the global features and each feature in the feature library, and the similarity can be sorted to determine the facial features that best match the target employee, thereby identifying the target employee.
[0064] The embodiments of the present application can reduce the negative impact of the occlusion area on the face recognition result through occlusion detection and weight configuration, and improve the recognition accuracy under occlusion. In addition, dividing the face image into multiple local areas for feature extraction and fusion can enhance the system's adaptability to face images under different postures, expressions and lighting conditions.
[0065] In some implementations of the present application, performing face recognition on a face image to determine a corresponding target employee may specifically include the following steps: Input the facial image into the trained facial recognition model to identify the target employee.
[0066] In an implementation manner of the present application, the terminal device can input a facial image into a trained facial recognition model, extract features in the facial image through the facial recognition model, and compare it with a pre-stored employee facial feature library, and determine the target employee based on the comparison results.
[0067] In some specific embodiments of the present application, before inputting the facial image into the trained facial recognition model to determine the target employee, the method further includes steps S701 to S703.
[0068] Step S701, obtaining a data set.
[0069] In the implementation of the present application, the terminal device can obtain a large number of face images from public face recognition data sets, company internal databases or other reliable sources to form a data set. The data set contains images of different genders, ages, postures and lighting conditions to ensure the generalization ability of the model.
[0070] Step S702: Perform illumination adjustment and occlusion processing on the images in the data set to obtain an enhanced data set.
[0071] In the implementation of the present application, the terminal device can use an image processing algorithm to adjust the lighting conditions of the image and reduce the lighting quality of the image, thereby improving the face recognition ability of the face recognition model for images with poor lighting quality. In addition, the terminal device can also randomly add occlusions (such as hats, glasses, masks, etc.) to the image, or change the position and size of the existing occlusion area in the image to simulate the occlusion that may occur in the real scene, thereby improving the model's recognition ability for occluded faces.
[0072] Step S703, training the face recognition model according to the enhanced data set to obtain a trained face recognition model.
[0073] In the implementation mode of the present application, the terminal device can use a deep learning framework (such as TensorFlow, PyTorch, etc.) to build a face recognition model. The enhanced data set is divided into a training set and a validation set for model training and validation. Through iterative training, the parameters of the model are adjusted so that the model can accurately identify images in the enhanced data set. During the training process, a loss function (such as cross entropy loss, triple loss, etc.) can be used to measure the performance of the model, and the loss can be minimized through an optimization algorithm (such as gradient descent, Adam, etc.).
[0074] The implementation methods of the present application enhance the generalization ability and robustness of the model by performing lighting adjustment and occlusion processing on the data set, so that the model can more accurately recognize facial images under different lighting conditions and occlusion situations.
[0075] In some implementations of the present application, the above method may further include steps S801 to S804.
[0076] Step S801, detecting the ambient brightness of the environment where the surveillance camera is located.
[0077] In the implementation of the present application, the terminal device can use a built-in light sensor of a surveillance camera or an additional brightness detection device to measure the ambient brightness. The ambient brightness can also be estimated indirectly by analyzing the brightness information in the image captured by the camera.
[0078] Step S802: compare the ambient brightness with the preset brightness to obtain a comparison result.
[0079] In an embodiment of the present application, the terminal device may compare the detected ambient brightness value with a preset brightness threshold. If the ambient brightness is lower than the preset brightness, it indicates that the environment is dark and the exposure needs to be increased; if it is higher than the preset brightness, it indicates that the environment is bright and the exposure needs to be reduced.
[0080] Step S803: Calculate and adjust exposure parameters according to the comparison result.
[0081] In an embodiment of the present application, the terminal device may calculate the required exposure adjustment amount according to the difference between the ambient brightness and the preset brightness, which may be one or more of the parameters such as the shutter speed, aperture size or ISO sensitivity of the camera.
[0082] Step S804: adjusting the exposure parameters of the surveillance camera according to the adjusted exposure parameters.
[0083] In an embodiment of the present application, the terminal device may send the calculated adjusted exposure parameters to the surveillance camera. The surveillance camera may adjust its exposure settings according to the received parameters to optimize the captured image quality.
[0084] The embodiment of the present application can ensure that images captured under different lighting conditions have appropriate brightness and contrast by adaptively adjusting the exposure parameters of the camera, thereby improving image quality. The optimized image quality helps to improve the accuracy of face recognition, especially under low light or high light conditions.
[0085] In some implementations of the present application, after generating the attendance result of the target employee according to the preset attendance time and the collection time, the method may further include steps S901 to S903.
[0086] Step S901, generating attendance notification information according to the attendance result.
[0087] In the implementation mode of the present application, the terminal device can analyze the attendance results to determine which employees are on time, which employees are late, leave early or are not present. And based on this information, the corresponding attendance notification information is generated. For example, for employees who are on time, a simple confirmation message can be sent; for employees who are late, leave early or are not present, a reminder or warning message may need to be sent.
[0088] Step S902, obtaining the communication number of the target employee.
[0089] In the implementation manner of the present application, the terminal device can retrieve the communication number of the target employee from a database, which can contain basic information such as the employee's name, department, position, and communication number.
[0090] Step S903: according to the communication number, all attendance notification information is added to the message queue and sent sequentially.
[0091] In the implementation mode of the present application, the terminal device can use a message queue middleware to store and forward attendance notification information. Each attendance notification information is associated with the communication number of the target employee and added to the message queue. The message queue middleware will send the attendance notification information to the target employees one by one in the order in which the messages are added. This ensures that even in high concurrency situations, messages can be sent in order, avoiding the problem of message loss or repeated sending.
[0092] Figure 2 The structure diagram of an automatic attendance device provided in an embodiment of the present application is shown. The automatic attendance device 2 can be configured on a terminal device. Specifically, the automatic attendance device 2 can include: The first acquisition module 201 is used to acquire the video stream collected by the surveillance camera in real time; The detection module 202 is used to read images from the video stream and perform face detection to determine a face image containing a face; The recognition module 203 is used to perform face recognition on the face image and determine the corresponding target employee; The second acquisition module 204 is used to acquire the acquisition time corresponding to the face image; The generating module 205 is used to generate the attendance result of the target employee according to the preset attendance time and the collection time.
[0093] The beneficial effects of the embodiments of the present application compared to the prior art are as follows: the embodiments of the present application obtain the video stream collected in real time by the surveillance camera, read the image from the video stream and perform face detection to determine the facial image containing the face, then perform face recognition on the facial image to determine the corresponding target employee, and obtain the collection time corresponding to the facial image, and generate the attendance result of the target employee according to the preset attendance time and collection time. The implementation method of the present application utilizes the surveillance camera to realize the senseless collection of facial images, and performs face detection and face recognition, and finally can realize senseless attendance. For employees, there is no need to stand in the designated position or perform additional operations, they only need to appear in the area covered by the surveillance camera to realize automatic clocking in, which simplifies the attendance operation and improves the employee experience.
[0094] In some embodiments of the present application, the automatic attendance device 2 further includes an enhancement module, which is used to: perform grayscale normalization on the face image to obtain a grayscale normalized image; Perform histogram equalization on the grayscale normalized image to obtain a histogram equalized image; Perform logarithmic transformation on the histogram equalization image to obtain a logarithmic transformed image; Histogram matching is performed on the logarithmic transformed image to obtain the enhanced image.
[0095] In some embodiments of the present application, the recognition module 203 is further used to: perform occlusion detection on the face image to determine the occlusion area; Divide the face image into multiple local areas, and extract features from each local area to obtain corresponding local features; Configure weights for occluded and non-occluded areas; The local features corresponding to the occluded area and the local features corresponding to the non-occluded area are fused according to the weights to obtain the global features; Perform face recognition based on global features to determine the corresponding target employees.
[0096] In some implementations of the present application, the recognition module 203 is further used to: input the face image into a trained face recognition model to determine the target employee.
[0097] In some embodiments of the present application, the automatic attendance device 2 further includes a training module for: acquiring a data set; Perform illumination adjustment and occlusion processing on the images in the data set to obtain an enhanced data set; The face recognition model is trained according to the enhanced data set to obtain a trained face recognition model.
[0098] In some embodiments of the present application, the automatic attendance device 2 further includes an adjustment module for: detecting the ambient brightness of the environment in which the surveillance camera is located; Compare the ambient brightness with the preset brightness to obtain a comparison result; Calculate and adjust exposure parameters according to the comparison results; Adjust the exposure parameters of the surveillance camera according to the exposure parameters.
[0099] In some embodiments of the present application, the automatic attendance device 2 further includes a notification module, which is used to: generate attendance notification information according to the attendance result; Obtaining the communication number of the target employee; According to the communication number, all the attendance notification information is added to the message queue and sent sequentially.
[0100] like Figure 3 As shown, it is a schematic diagram of a terminal device provided in an embodiment of the present application. The terminal device 3 may include: a processor 301, a memory 302, and a computer program 303 stored in the memory 302 and executable on the processor 301, such as an automatic attendance program. When the processor 301 executes the computer program 303, the steps in the above-mentioned various automatic attendance method embodiments are implemented.
[0101] The computer program may be divided into one or more modules / units, one or more modules / units are stored in the memory 302 and executed by the processor 301 to complete the present application. One or more modules / units may be a series of computer program instruction segments capable of completing specific functions, and the instruction segments are used to describe the execution process of the computer program in the terminal device.
[0102] The terminal device may include, but is not limited to, a processor 301 and a memory 302. Those skilled in the art will appreciate that Figure 3It is only an example of a terminal device and does not constitute a limitation of the terminal device. It may include more or fewer components than shown in the figure, or a combination of certain components, or different components. For example, the terminal device may also include input and output devices, network access devices, buses, etc.
[0103] The processor 301 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.
[0104] The memory 302 may be an internal storage unit of the terminal device, such as a hard disk or memory of the terminal device. The memory 302 may also be an external storage device of the terminal device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the terminal device. Further, the memory 302 may also include both an internal storage unit of the terminal device and an external storage device. The memory 302 is used to store computer programs and other programs and data required by the terminal device. The memory 302 may also be used to temporarily store data that has been output or is to be output.
[0105] It should be noted that, for the convenience and brevity of description, the structure of the above-mentioned terminal device can also refer to the specific description of the structure in the method embodiment, which will not be repeated here.
[0106] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.
[0107] The embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, the steps in the above-mentioned automatic attendance method can be implemented.
[0108] The embodiment of the present application provides a computer program product. When the computer program product is run on a mobile terminal, the steps in the above-mentioned automatic attendance method can be implemented when the mobile terminal executes the computer program product.
[0109] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0110] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.
[0111] In the embodiments provided in the present application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are only schematic. For example, the division of the modules or units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0112] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0113] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0114] If the integrated module / unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, U disk, mobile hard disk, disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electric carrier signal, telecommunication signal and software distribution medium. It should be noted that the content contained in the computer-readable medium can be appropriately increased or decreased according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electric carrier signals and telecommunication signals.
[0115] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the spirit and scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. An automatic attendance method, characterized in that: The method comprises: Get the video stream collected by the surveillance camera in real time; Reading an image from the video stream and performing face detection to determine a facial image containing a human face; Performing face recognition on the face image to determine the corresponding target employee; Obtaining the acquisition time corresponding to the face image; The attendance result of the target employee is generated according to the preset attendance time and the collection time.
2. The automatic attendance method according to claim 1, characterized in that: Before performing face recognition on the face image to determine the corresponding target employee, the method further includes: Performing grayscale normalization on the face image to obtain a grayscale normalized image; Performing histogram equalization on the grayscale normalized image to obtain a histogram equalized image; Performing logarithmic transformation on the histogram equalization image to obtain a logarithmic transformed image; Histogram matching is performed on the logarithmic transformation image to obtain an enhanced image.
3. The automatic attendance method according to claim 1, characterized in that: The performing face recognition on the face image to determine the corresponding target employee includes: Performing occlusion detection on the face image to determine an occlusion area; Dividing the face image into a plurality of local regions, and performing feature extraction on each of the local regions to obtain corresponding local features; Configuring weights for the occluded area and the non-occluded area; The local features corresponding to the occluded area and the local features corresponding to the non-occluded area are fused according to the weights to obtain global features; Face recognition is performed based on the global features to determine the corresponding target employee.
4. The automatic attendance method according to claim 1, characterized in that: The performing face recognition on the face image to determine the corresponding target employee includes: The face image is input into a trained face recognition model to determine the target employee.
5. The automatic attendance method according to claim 4, characterized in that: Before inputting the face image into the trained face recognition model to determine the target employee, the method further includes: Get the dataset; Performing illumination adjustment and occlusion processing on the images in the data set to obtain an enhanced data set; The face recognition model is trained according to the enhanced data set to obtain a trained face recognition model.
6. The automatic attendance method according to claim 1, characterized in that: The method further comprises: Detecting the ambient brightness of the environment in which the surveillance camera is located; Comparing the ambient brightness with a preset brightness to obtain a comparison result; Calculate and adjust exposure parameters according to the comparison result; The exposure parameters of the surveillance camera are adjusted according to the adjusted exposure parameters.
7. The automatic attendance method according to claim 1, characterized in that: After generating the attendance result of the target employee according to the preset attendance time and the collection time, the method further includes: Generate attendance notification information according to the attendance result; Obtaining the communication number of the target employee; According to the communication number, all the attendance notification information is added to the message queue and sent sequentially.
8. An automatic attendance device, characterized in that: include: The first acquisition module is used to acquire the video stream collected by the surveillance camera in real time; A detection module, used for reading images from the video stream and performing face detection to determine a face image containing a face; A recognition module, used to perform face recognition on the face image to determine the corresponding target employee; A second acquisition module is used to obtain the acquisition time corresponding to the face image; A generating module is used to generate the attendance result of the target employee according to the preset attendance time and the collection time.
9. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the automatic attendance method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the automatic attendance method according to any one of claims 1 to 7 are implemented.
Citation Information
Patent Citations
Image processing, frequency estimation, mechanical control and illumination for an automatic IV monitoring and controlling system
CN104010676A
SVM linear discriminant analysis-based face recognition method
CN108446691A
A system and method for insensible attendance
CN109308584A
Coal mine dynamic face recognition attendance checking method and system based on deep learning
CN110569809A
Face recognition attendance checking method and system and readable storage medium
CN110992502A