Attention detection method, device and system for face recognition

Through automated robotic arm and testing environment adjustment, combined with facial image acquisition and recognition technology, efficient attention detection is achieved, solving the problems of long time and high resource utilization in the prior art.

CN119479022APending Publication Date: 2025-02-18ALIPAY (HANGZHOU) INFORMATION TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411197584.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-29
Publication Date
2025-02-18

AI Technical Summary

Technical Problem

In the prior art, attention detection needs to be done manually, which consumes a lot of time and has high resource usage, making it difficult to improve detection efficiency.

Method used

By obtaining test cases, the robotic arm adjusts the angle and distance of the terminal device, and adjusts the test environment through the test environment adjustment component, generates guidance information to automatically collect user facial images for attention calibration and attack detection.

Benefits of technology

Automatic attention detection is realized, which shortens detection time, saves resources, improves detection efficiency, and realizes unattended testing.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119479022A_ABST
    Figure CN119479022A_ABST
Patent Text Reader

Abstract

The embodiment of the invention discloses an attention detection method, device and system for face recognition. The method comprises the steps that a test case used for attention detection for face recognition is acquired; based on the test case, controlling a mechanical arm to adjust a test angle of a to-be-detected target terminal and a distance between the target terminal and a user, and based on the test case, controlling a test environment adjusting assembly to adjust a current test environment; generating guide information for guiding the user to perform attention detection based on a test process in the test case, and collecting a face image of the user through the target terminal under the guide of the guide information to the user, and performing attention calibration and / or attack detection for face recognition on the target terminal based on the collected face image to obtain a corresponding detection result.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This document relates to the field of computer technology, and more particularly to an attention detection method, device and system for facial recognition. Background Art

[0002] Attention detection is a test item currently set up in many terminal devices. It is also a basic test item to ensure that the user's privacy data is not leaked. Terminal devices installed with the Android operating system include the above test items in the Android protocols Android Protocal13 and 14.

[0003] Usually, completing the above test items requires manual work and requires two major steps: the first is attention calibration detection, which takes about 1040 hours per person per round; followed by attention attack detection, which takes about N hours per person per round, and usually requires about 10 people. However, during manual detection, it takes a certain amount of time to place the terminal device to be detected and adjust the light source position. In addition, one manual detection resource is always occupied and repetitive work is done. Therefore, a better attention detection method needs to be provided to improve the efficiency of attention detection. Summary of the invention

[0004] The purpose of the embodiments of this specification is to provide a better attention detection method to improve the efficiency of attention detection.

[0005] In order to implement the above technical solution, the embodiments of this specification are implemented as follows:

[0006] An embodiment of the present specification provides a method for attention detection for facial recognition, the method comprising: obtaining a test case for performing attention detection for facial recognition. Based on the test case, the robotic arm is controlled to adjust the test angle of the target terminal to be detected, and the distance between the target terminal and the user, and based on the test case, the test environment adjustment component is controlled to adjust the current test environment. Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the guidance information to the user, the facial image of the user is collected through the target terminal, and attention calibration and / or attack detection for facial recognition is performed on the target terminal based on the collected facial image to obtain corresponding detection results.

[0007] The embodiment of the present specification provides an attention detection system for facial recognition, the system includes a main control device, a mechanical arm, a target terminal, and a test environment adjustment component, wherein the target terminal to be detected, the mechanical arm, and the test environment adjustment component are respectively connected to the main control device, wherein: the mechanical arm is configured to clamp the target terminal, and can adjust the test angle of the target terminal, and the distance between the target terminal and the user. The test environment adjustment component is configured to be connected to a preset environment component, and adjust the current test environment by controlling the environment component. The main control device is configured to obtain a test case for attention detection for facial recognition, and based on the test case, control the mechanical arm to adjust the test angle of the target terminal, and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment, generate guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collect the user's facial image through the target terminal, and perform attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image to obtain the corresponding detection result.

[0008] An embodiment of the present specification provides an attention detection device for facial recognition, the attention detection device for facial recognition comprising: a processor; and a memory arranged to store computer executable instructions, wherein the executable instructions, when executed, cause the processor to: obtain a test case for performing attention detection for facial recognition. Based on the test case, the mechanical arm is controlled to adjust the test angle of the target terminal to be detected, and the distance between the target terminal and the user, and based on the test case, the test environment adjustment component is controlled to adjust the current test environment. Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the user by the guidance information, the user's facial image is collected through the target terminal, and attention calibration and / or attack detection for facial recognition is performed on the target terminal based on the collected facial image to obtain a corresponding detection result.

[0009] The embodiments of this specification also provide a storage medium, which is used to store computer executable instructions. When the executable instructions are executed by the processor, they implement the following process: obtain a test case for attention detection for facial recognition. Based on the test case, control the mechanical arm to adjust the test angle of the target terminal to be detected, and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment. Based on the test process in the test case, generate guidance information for guiding the user to perform attention detection, and under the guidance of the guidance information to the user, collect the user's facial image through the target terminal, and perform attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image to obtain corresponding detection results.

[0010] The embodiments of this specification also provide a computer program product, including a computer program, which implements the following process when executed by a processor: obtaining a test case for attention detection for facial recognition. Based on the test case, the robotic arm is controlled to adjust the test angle of the target terminal to be detected, and the distance between the target terminal and the user, and based on the test case, the test environment adjustment component is controlled to adjust the current test environment. Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the guidance information to the user, the facial image of the user is collected through the target terminal, and attention calibration and / or attack detection for facial recognition is performed on the target terminal based on the collected facial image to obtain corresponding detection results. BRIEF DESCRIPTION OF THE DRAWINGS

[0011] In order to more clearly illustrate the technical solutions in the embodiments of this specification or the prior art, the drawings required for use in the embodiments or the prior art description will be briefly introduced below. Obviously, the drawings described below are only some embodiments recorded in this specification. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative labor.

[0012] Figure 1 This is a schematic diagram of the structure of an attention detection system for face recognition in this specification;

[0013] Figure 2 This is an embodiment of an attention detection method for facial recognition in this specification;

[0014] Figure 3 This is another embodiment of the attention detection method for face recognition in this specification;

[0015] Figure 4This is another embodiment of an attention detection method for facial recognition in this specification;

[0016] Figure 5 This is another embodiment of an attention detection method for facial recognition in this specification;

[0017] Figure 6 This is an embodiment of an attention detection device for facial recognition in this specification. DETAILED DESCRIPTION

[0018] The embodiments of this specification provide a method, device and system for detecting attention for facial recognition.

[0019] In order to enable those skilled in the art to better understand the technical solutions in this specification, the technical solutions in the embodiments of this specification will be clearly and completely described below in conjunction with the drawings in the embodiments of this specification. Obviously, the described embodiments are only part of the embodiments of this specification, not all of the embodiments. Based on the embodiments in this specification, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of this specification.

[0020] The embodiments of this specification provide an automated interactive test mechanism for attention detection. Attention detection is a test item currently set by many terminal devices. For example, terminal devices installed with the Android operating system, wherein the Android protocols Android Protocal13 and 14 include the above test items. Usually, the above test items need to be completed manually and need to go through two major steps: the first is the attention calibration test, and the attention calibration test process takes about 1040 hours per round for a single person; followed by attention attack detection, and the attention attack detection process takes about N hours per round for a single person, and attention attack detection usually requires about 10 people. However, during manual detection, it takes a certain amount of time to place the position of the terminal device to be detected, adjust the position of the light source, etc. In addition, a manual detection resource needs to be occupied all the time to do repetitive work. Therefore, it is necessary to provide a better attention detection method to improve the efficiency of attention detection. For specific processing, please refer to the specific content in the following embodiments.

[0021] like Figure 1The embodiment of the specification provides an attention detection system for facial recognition, which includes a main control device 110, a mechanical arm 120, and a test environment adjustment component 130. The main control device 110 can be a terminal device or a server, etc. The terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (specifically, a smart watch, a car device, etc.), etc. The server can be an independent server, or a server cluster composed of multiple servers, etc. The server can be a background server for a financial service or an online shopping service, etc., or a background server for an application, etc. The mechanical arm 120 can be connected to the main control device 110, and the main control device 110 can send a control instruction to the mechanical arm 120, and the mechanical arm 120 can perform a corresponding operation based on the control instruction. The mechanical arm 120 can also be provided with a clamping component for clamping and fixing the terminal device. The target terminal 140 can be used as a terminal device to be detected. The target terminal 140 is provided with a camera component for performing facial recognition, such as a front camera of a mobile phone. For this purpose, it is necessary to perform attention detection on the camera component for performing facial recognition to improve the accuracy of facial recognition. The test environment adjustment component 130 can be used to adjust the influence of the external natural light source and the specified light source on the current test environment. For example, the test environment adjustment component 130 can be connected to the curtain, and the strength of the external natural light entering the test area can be adjusted by controlling the opening and closing of the curtain. It can be set according to actual conditions, and this embodiment of the specification does not limit this. Based on the above-mentioned components included in the system, the target terminal 140, the mechanical arm 120 and the test environment adjustment component 130 are respectively connected to the main control device 110. In addition, the target terminal 140 is clamped at a specified position of the mechanical arm 120, and the test environment adjustment component 130 can be connected to a specified component (such as the above-mentioned curtain, other light sources (such as fill light 150 or flash light)). The main control device 110 controls the target terminal 140 to perform a specified operation (such as capturing an image) at a specified time (or within a time period) by connecting to the target terminal 140 .

[0022] Based on the above components included in the system, the following processing can be completed to detect the ability of the target terminal 140 in terms of attention in facial recognition, as follows:

[0023] The mechanical arm 120 is configured to clamp the target terminal 140 and can adjust the test angle of the target terminal 140 and the distance between the target terminal 140 and the user.

[0024] In implementation, Figure 1As shown, the target terminal 140 is clamped in the "palm" of the mechanical arm 120. At this time, the mechanical arm 120 can adjust the posture of the target terminal 140 so that the target terminal 140 is at different angles. The above process can achieve the purpose of adjusting the test angle of the target terminal 140. In addition, the mechanical arm 120 can move the target terminal 140 away from the user to increase the distance between the target terminal 140 and the user, and can also move the target terminal 140 toward the user to reduce the distance between the target terminal 140 and the user. The above process can achieve the purpose of adjusting the distance between the target terminal 140 and the user.

[0025] In actual applications, the test environment adjustment component 130 is configured to be connected to a preset environment component and adjust the current test environment by controlling the environment component.

[0026] Among them, the environmental components can be such as the above-mentioned curtains and / or other light sources, etc., which can be specifically set according to actual conditions.

[0027] In implementation, Figure 1 As shown, the environmental component is a fill light 150, and the test environment adjustment component 130 is connected to the fill light 150. When the test environment adjustment component 130 receives an ambient light adjustment instruction, it can adjust the color temperature, light intensity, etc. of the fill light 150 based on the ambient light adjustment instruction until the current test environment meets the requirements in the ambient light adjustment instruction.

[0028] The main control device 110 is configured to obtain a test case for performing attention detection for facial recognition, and based on the test case, control the robotic arm 120 to adjust the test angle of the target terminal 140 and the distance between the target terminal 140 and the user, and based on the test case, control the test environment adjustment component 130 to adjust the current test environment, generate guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collect the user's facial image through the target terminal 140, perform attention calibration and / or attack detection for facial recognition on the target terminal 140 based on the collected facial image, and obtain corresponding detection results.

[0029] Among them, the test case can be a sample or case required for attention detection for facial recognition. The test sample may include a test process, a node passed by the test, a test angle of the target terminal 140, test environment information, the form of the test result, etc., which can be set according to the actual situation, and the embodiment of this specification does not limit this. The test process can be a process in which the specified operation needs to be performed in sequence according to the time sequence. For example, the test process is to first adjust the test angle of the target terminal 140 to xx degrees (the angle with the vertical direction), and then adjust the test environment to xxx, and then perform attention calibration detection, which is as follows: ask the user to perform xx action, and the target terminal 140 takes the corresponding image..., and then perform attention attack detection, which is as follows: ask the user to perform xx action, and the target terminal 140 takes the corresponding image..., and finally, output the detection result, etc., which can be set according to the actual situation. The guidance information can be presented in a variety of different ways, for example, the user can be guided to perform an operation in the form of a video demonstration, or the user can be guided to perform an operation in the form of a voice broadcast, or the user can be guided to perform an operation in the form of a text prompt, etc., which can be set according to the actual situation, and the embodiment of this specification does not limit this.

[0030] In implementation, one or more different test cases can be pre-constructed according to actual conditions. When it is necessary to perform attention detection on the target terminal 140, the main control device 110 can obtain a test case that matches this detection from the above test cases. The test case provides a process for performing attention detection. The main control device 110 can generate guidance information for guiding the user to perform attention detection based on the process, and can play or display the guidance information to guide the user to perform corresponding operations. At the same time, the main control device 110 can control the mechanical arm 120 to adjust the test angle of the target terminal 140 according to the requirements of the test angle and test distance provided in the test case until the test angle reaches the requirements given by the test case, and can adjust the distance between the target terminal 140 and the user until the distance reaches the requirements given by the test case. In addition, the main control device 110 can control the test environment adjustment component 130 to adjust the current test environment according to the requirements of the test environment and other aspects provided in the test case. Specifically, for example, the test environment adjustment component 130 can be controlled to close the curtains. At the same time, the test environment adjustment component 130 can be controlled to adjust the color temperature and light intensity of the light source to the requirements given by the test case, thereby achieving adjustment of the current test environment.

[0031] After the above preparations are completed, the user can be guided to adjust his posture through the above guidance information. At the same time, based on the test case, the main control device 110 can send a control instruction to the target terminal 140, and the target terminal 140 can collect the user's facial image based on the control instruction. The main control device 110 can perform an attention calibration test on the target terminal 140 for facial recognition based on the collected facial image. For example, the user can be guided to close his eyes through the guidance information, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user with his eyes closed. After that, the user can be guided to wear specified glasses through the guidance information, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user wearing glasses. The main control device 110 can perform an attention calibration test on the target terminal 140 for facial recognition based on the collected facial image, and finally a corresponding test result can be obtained.

[0032] In addition, the main control device 110 can also perform attention attack detection on the target terminal 140 for facial recognition based on the collected facial image in the above manner. For example, the user can be guided to cover the eyes with a printed eye image through the guidance information, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user covering the eyes with the printed eye image. After that, the user can be guided to wear specified glasses and cover the eyes with the printed eye image through the guidance information, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user wearing glasses and covering the eyes with the printed eye image. After that, the user can also be guided to use artificial eyes instead of eyes through the guidance information, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user using artificial eyes instead of eyes. The main control device 110 can perform attention attack detection on the target terminal 140 for facial recognition based on the above-mentioned collected facial images, and finally a corresponding detection result can be obtained, and the main control device 110 can output the detection result.

[0033] The embodiment of this specification provides an attention detection system for facial recognition, which includes a main control device, a mechanical arm, a target terminal, and a test environment adjustment component. The target terminal to be detected, the mechanical arm, and the test environment adjustment component are respectively connected to the main control device, wherein: the mechanical arm is configured to clamp the target terminal and can adjust the test angle of the target terminal and the distance between the target terminal and the user. The test environment adjustment component is configured to connect to a preset environment component and adjust the current test environment by controlling the environment component. The main control device is configured to obtain a test case for attention detection for facial recognition, and based on the test case, control the robotic arm to adjust the test angle of the target terminal and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment, generate guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collect the user's facial image through the target terminal, perform attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtain corresponding detection results. In this way, the total duration of attention detection for facial recognition can be controlled within a shorter time, thereby improving the detection efficiency of attention detection and saving resources for attention detection. Moreover, the attention detection system for facial recognition can automatically complete attention detection, thereby realizing unattended testing.

[0034] In practical applications, the attention detection system for facial recognition further includes a prompt component, which is connected to the main control device 110, and the prompt component includes a text prompt unit and / or a voice prompt unit, wherein:

[0035] A text prompt unit is configured to display the above guidance information in the form of text, and under the guidance of the user by the guidance information displayed in the form of text, collect the user's facial image through the target terminal 140;

[0036] In implementation, the attention detection system for facial recognition can be provided with a question-and-answer display capability, which can be implemented through a text prompt unit, and can enter the corresponding test node according to the test case. In this process, the text prompt unit displays the above guidance information in the form of text to guide the user. For example, the guidance information is "test the first scene", "check whether the glasses are worn properly number: 2010", etc., which can be set according to actual conditions. Under the guidance of the guidance information to the user, the user's facial image is collected in real time through the target terminal 140, and the collected image is analyzed and the face is automatically aligned, and finally a facial image that meets the preset requirements can be obtained.

[0037] The voice prompt unit is configured to display the above-mentioned guidance information in the form of voice broadcast, and to collect the user's facial image through the target terminal 140 under the guidance of the guidance information displayed in the form of voice broadcast to the user.

[0038] In practice, since the user needs to close his eyes during the test, a voice broadcast function can be set to give suggestions on the user's status, that is, a voice prompt unit is set in the attention detection system for facial recognition, and the voice prompt unit displays the above guidance information in the form of voice broadcast, for example, "glasses are not worn", "eyes are not completely closed", "need to rest", etc., to give suggestions on the user's status. Under the guidance of the guidance information to the user, the target terminal 140 collects the user's facial image in real time, analyzes the collected image and automatically aligns the face, and finally obtains a facial image that meets the preset requirements.

[0039] In practical applications, the above-mentioned environmental components include shielding members and / or fill light 150 for controlling external natural light, wherein the shielding members may include multiple types, such as curtains, door curtains, doors, windows, etc., which can be set according to actual conditions. The fill light 150 can be a lamp of any light source, and the color temperature and illumination of the fill light 150 can be adjusted within a specified range, for example, the color temperature range can be 2700-550K, and the illumination (i.e., light intensity) range can be 0-100,000 Lux, etc., which can be set according to actual conditions. Among them:

[0040] The main control device 110 is configured to control the first adjustment subcomponent in the test environment adjustment component 130 to open or close the shielding member to adjust the influence of external natural light on the current test environment if it is determined based on the above test case that the current test environment does not meet the environmental requirements of the test case; and / or,

[0041] The main control device 110 is configured to control the second adjustment subcomponent in the test environment adjustment component 130 to adjust the color temperature and / or illumination of the fill light 150 until the adjusted test environment meets the environmental requirements of the test case.

[0042] In actual applications, the above test cases may include information on a variety of scenarios, which can be set specifically according to actual conditions. For example, the test cases may include information on one or more different scenarios, including a scene with eyes closed, a scene with glasses worn, a scene with eyes blocked by a copy of the eyes, a scene with glasses worn and eyes blocked by a copy of the eyes, a scene with glasses worn and special markings similar to eyes, and a scene with eyes of a physical model.

[0043] In actual applications, the main control device 110 is configured to input the collected facial image into a pre-trained neural network model to obtain recognition results of preset operations and / or preset body states in attention detection for facial recognition of the target terminal 140, wherein the preset operations include but are not limited to one or more of closing eyes, opening eyes, opening mouth, and closing mouth, and the preset body states include fatigue states; based on the above recognition results, the detection results of attention calibration and / or attack detection for facial recognition of the target terminal 140 are determined.

[0044] In implementation, a model for image analysis and attention detection can be constructed according to actual conditions, and a neural network can be selected to construct the above model, thereby obtaining a neural network model. Then, a specified training sample can be obtained, and the training sample can be used to train the neural network model to obtain a trained neural network model. The trained neural network model can be used to determine the recognition result of the preset operation and / or preset body state in the attention detection for facial recognition of the target terminal 140 by analyzing the input image. After the collected facial image is obtained, the facial image can be input into the above-mentioned trained neural network model, and the facial image can be analyzed by the neural network model to determine the preset operations such as closing eyes, opening eyes, opening mouth, and closing mouth, and the user's body state, such as fatigue state, anxiety state, etc., can also be determined. Finally, the neural network model can output the above-mentioned recognition result. The target terminal 140 can be subjected to attention calibration and / or attack detection for facial recognition by identifying the preset operation obtained, and the corresponding detection result can be obtained. If it is recognized that the user is in a specified body state such as fatigue state, anxiety state, etc., a corresponding prompt information can be generated to prompt the user whether he needs to rest, etc., which can be set according to actual conditions.

[0045] It should be noted that the above is to perform preset operations and preset body states recognition by training a neural network model and using the neural network model. In practical applications, the above processing can also be performed through other models. For example, the above processing can be performed through a specified large model, or the above processing can be performed through a corresponding model constructed by a specified algorithm. The specific setting can be based on actual conditions, and the embodiments of this specification do not limit this.

[0046] In actual applications, the main control device 110 is configured to input the collected facial image into a pre-trained information extraction network model to obtain information about the facial area and facial feature points contained in the facial image; based on the information about the facial area and facial feature points contained in the facial image, the facial image is divided into one or more different areas; the facial image divided into one or more different areas is input into the image classification model to obtain recognition results of preset operations and / or preset body states in attention detection for facial recognition of the target terminal 140, the preset operations include but are not limited to one or more of closing eyes, opening eyes, opening mouth, and closing mouth, and the preset body states include fatigue states; based on the recognition results, the detection results of attention calibration and / or attack detection for facial recognition of the target terminal 140 are determined.

[0047] In implementation, in order to make the recognition result of the preset operation and / or preset body state in the attention detection for facial recognition of the target terminal 140 more accurate, two models can be constructed, namely, an information extraction network model and an image classification model, wherein the information extraction network model is used to identify the information of the facial area and the information of the facial feature points contained in the facial image, and the image classification model is used to identify the preset operation and the preset body state in the facial image of the specified area, and different training data can be obtained respectively, and the information extraction network model and the image classification model are trained by the corresponding training data to obtain the trained information extraction network model and the trained image classification model. The main control device 110 can input the collected facial image into the trained information extraction network model, and identify the information of the facial area and the information of the facial feature points contained in the facial image through the information extraction network model to obtain the information of the facial area and the information of the facial feature points contained in the facial image. The main control device 110 can divide the facial image into one or more different areas based on the information of the facial area and the information of the facial feature points contained in the facial image. For example, the main control device 110 can divide the facial image into multiple different areas according to the facial division rule of "three sections and five eyes (that is, the length of the face is divided into three equal parts according to the length ratio of the face, and the width of the face is divided into five equal parts according to the width ratio of the face and the length of the eye shape)". In addition, the facial image can also be divided into regions according to other facial division rules. For example, the length of the face can be divided into four equal parts, and the width of the face can be divided into seven equal parts, or the facial image can be divided more finely, etc. The specific settings can be based on actual conditions, and the embodiments of this specification are not limited to this.

[0048] The main control device 110 can input the facial image divided into one or more different areas into the image classification model, analyze the facial image of each area through the image classification model, determine the preset operations such as closing eyes, opening eyes, opening mouth, closing mouth, etc., and also determine the user's physical state, such as fatigue state, anxiety state, etc. Finally, the image classification model can output the above recognition results. The target terminal 140 can be calibrated for attention and / or attack detection for facial recognition through the preset operation obtained by recognition to obtain the corresponding detection results. If the user is identified to be in a specified physical state such as fatigue state, anxiety state, etc., a corresponding prompt information can be generated to prompt the user whether he needs to rest, etc.

[0049] In practical applications, the above-mentioned information extraction network model may include a multi-task cascade convolutional neural network MTCNN model, and the image classification model includes a first classification model and / or a second classification model constructed based on the PERCLOS algorithm. The first classification model is used to identify preset operations in facial images, and the second classification model constructed based on the PERCLOS algorithm is used to identify preset body states in facial images.

[0050] Among them, the MTCNN model is a deep learning model for face detection and alignment, which gradually improves the accuracy and speed of face detection through cascading. The MTCNN model includes a multi-task cascade network structure, which can include three sub-networks: P-Net, R-Net and O-Net. Each network is responsible for different tasks, thereby gradually refining the results of face detection. Specifically, P-Net is responsible for quickly generating a large number of possible face candidate frames; R-Net further filters and optimizes the above face candidate frames on the basis of P-Net, excluding frames that do not contain faces; O-Net finally determines the key face frames and the positions of key points of the face. Due to the cascade network structure and multi-task learning method of the MTCNN model, the MTCNN model can reduce the requirements for the device while maintaining high accuracy, so that the model can run on small devices. The PERCLOS (Percentage of Eye Closure) algorithm determines whether the user is in a state of fatigue by calculating the percentage of eyelid closure time in the total time. The specific processing process of the PERCLOS algorithm may include: obtaining the user's facial video image to determine the eye area that needs attention; obtaining the number of frames of eye closure and opening through image processing rules such as facial recognition and tracking; calculating the proportion of eye closure time to the total time (if the proportion is high, the user may be in a state of fatigue); continuously monitoring and analyzing changes in the above proportions. Maintaining a low eye closure rate for a long time may indicate that the user's fatigue level is increasing. Ultimately, it can be determined whether the user is in a state of fatigue.

[0051] In addition, in order to better carry out human-computer interaction, the functions of the input components of the main control device can be set. For example, the functions of pause detection and continue detection can be set for the input components of the main control device. Specifically, taking the input component as a mouse as an example, the left button of the mouse can be set to interrupt detection, and the right button of the mouse can be set to continue detection, so as to control the interruption and continuation of the automated attention detection process, so as to improve the flexibility and efficiency of attention detection.

[0052] The embodiment of this specification provides an attention detection system for facial recognition, which includes a main control device, a mechanical arm, a target terminal, and a test environment adjustment component. The target terminal to be detected, the mechanical arm, and the test environment adjustment component are respectively connected to the main control device, wherein: the mechanical arm is configured to clamp the target terminal and can adjust the test angle of the target terminal and the distance between the target terminal and the user. The test environment adjustment component is configured to connect to a preset environment component and adjust the current test environment by controlling the environment component. The main control device is configured to obtain a test case for attention detection for facial recognition, and based on the test case, control the robotic arm to adjust the test angle of the target terminal and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment, generate guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collect the user's facial image through the target terminal, perform attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtain corresponding detection results. In this way, the total duration of attention detection for facial recognition can be controlled within a shorter time, thereby improving the detection efficiency of attention detection and saving resources for attention detection. Moreover, the attention detection system for facial recognition can automatically complete attention detection, thereby realizing unattended testing.

[0053] In addition, voice broadcast is introduced to remind users in real time what operations need to be performed in different states such as eyes open and eyes closed, so as to cope with changes in subsequent test scenarios, thereby improving the flexibility and efficiency of attention detection. In addition, visual real-time detection analysis is developed based on the MTCNN model to ensure that attention detection in different states can become effective attack detection data. In addition, the interactive advantages of the left and right mouse buttons can be used to develop the ability to interrupt detection and continue detection, ensuring that users can interrupt and resume detection behavior at any time during the detection process, and reducing the difficulty of use, thereby further improving the flexibility and efficiency of attention detection.

[0054] like Figure 2As shown, an embodiment of the present specification provides an attention detection method for facial recognition, and the executor of the method can be an attention detection system for facial recognition, which includes a main control device 110, a robotic arm 120, a target terminal 140, and a test environment adjustment component 130. The main control device 110 can be a terminal device or a server, etc. The terminal device can be a mobile terminal device such as a mobile phone, a tablet computer, or a computer device such as a laptop or a desktop computer, or an IoT device (such as a smart watch, a car-mounted device, etc.), etc. The server can be an independent server, or a server cluster composed of multiple servers, etc. The server can be a background server for financial services or online shopping services, etc., or a background server for an application, etc. The target terminal 140 is the terminal device to be tested. The target terminal 140, the mechanical arm 120 and the test environment adjustment component 130 are respectively connected to the main control device 110. In addition, the target terminal 140 is clamped at a specified position of the mechanical arm 120, and the test environment adjustment component 130 can be connected to a specified component (such as the above-mentioned curtains, other light sources (such as fill light 150 or flash light)). The main control device 110 controls the target terminal 140 to perform a specified operation (such as taking an image, etc.) at a specified time (or time period) by connecting to the target terminal 140. The method may specifically include the following steps:

[0055] In step S202, a test case for performing attention detection for facial recognition is obtained.

[0056] In step S204, based on the above test case, the robot arm 120 is controlled to adjust the test angle of the target terminal 140 to be detected and the distance between the target terminal 140 and the user, and based on the test case, the test environment adjustment component 130 is controlled to adjust the current test environment.

[0057] In implementation, the test case provides a process for performing attention detection, and guidance information for guiding the user to perform attention detection can be generated based on the process. The guidance information can be played or displayed to guide the user to perform corresponding operations. At the same time, according to the requirements of the test angle and test distance provided in the test case, the mechanical arm 120 can be controlled to adjust the test angle of the target terminal 140 until the test angle reaches the requirements given by the test case, and the distance between the target terminal 140 and the user can be adjusted until the distance reaches the requirements given by the test case. In addition, according to the requirements of the test environment and other aspects provided in the test case, the test environment adjustment component 130 can be controlled to adjust the current test environment. Specifically, for example, the test environment adjustment component 130 can be controlled to close the curtains. At the same time, the test environment adjustment component 130 can be controlled to adjust the color temperature and light intensity of the light source to the requirements given by the test case, thereby achieving adjustment of the current test environment.

[0058] In step S206, guidance information for guiding the user to perform attention detection is generated based on the test process in the above test case, and under the guidance of the guidance information to the user, the user's facial image is collected through the target terminal 140, and attention calibration and / or attack detection for facial recognition are performed on the target terminal 140 based on the collected facial image to obtain corresponding detection results.

[0059] In implementation, the user can be guided to adjust the posture through the above-mentioned guidance information. At the same time, a control instruction can be sent to the target terminal 140 based on the test case. The target terminal 140 collects the user's facial image based on the control instruction. The target terminal 140 can perform attention calibration detection for facial recognition based on the collected facial image. For example, the user can be guided to close his eyes through the guidance information, and then a shooting instruction can be sent to the target terminal 140. The target terminal 140 can collect the facial image of the user with his eyes closed. After that, the user can be guided to wear specified glasses through the guidance information, and then a shooting instruction can be sent to the target terminal 140. The target terminal 140 can collect the facial image of the user wearing glasses. The target terminal 140 can perform attention calibration detection for facial recognition based on the above-mentioned collected facial image, and finally a corresponding test result can be obtained.

[0060] In addition, the above-mentioned method can also be used to perform attention attack detection on the target terminal 140 for facial recognition based on the collected facial image. For example, the user can be guided by the guidance information to cover the eyes with a printed eye image, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user covering the eyes with the printed eye image. After that, the user can be guided by the guidance information to wear specified glasses and cover the eyes with the printed eye image, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user wearing glasses and covering the eyes with the printed eye image. After that, the user can also be guided by the guidance information to use artificial eyes instead of eyes, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user using artificial eyes instead of eyes. The main control device 110 can perform attention attack detection on the target terminal 140 for facial recognition based on the collected facial image, and finally a corresponding detection result can be obtained, and the main control device 110 can output the detection result.

[0061] The embodiments of the present specification provide an attention detection method for facial recognition, by obtaining a test case for performing attention detection for facial recognition, and based on the test case, controlling a robotic arm to adjust the test angle of a target terminal and the distance between the target terminal and a user, and based on the test case, controlling a test environment adjustment component to adjust the current test environment, generating guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collecting the user's facial image through the target terminal, performing attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtaining corresponding detection results. In this way, the total duration of attention detection for facial recognition can be controlled within a shorter time, thereby improving the detection efficiency of attention detection and saving resources for attention detection. Moreover, the attention detection system for facial recognition can automatically complete attention detection, thereby realizing unattended testing.

[0062] In practical applications, the specific processing methods for controlling the test environment adjustment component 130 to adjust the current test environment based on the test case in the above step S204 can be various. An optional processing method is provided below, such as Figure 3 As shown, the processing may specifically include the following steps S2042 and S2044.

[0063] In step S2042, based on the above test case, it is determined whether the current test environment meets the environmental requirements of the test case.

[0064] In step S2044, if the current test environment does not meet the environmental requirements of the test case, the first adjustment subcomponent in the test environment adjustment component 130 is controlled to open or close the shielding member to adjust the impact of external natural light on the current test environment, and / or the second adjustment subcomponent in the test environment adjustment component 130 is controlled to adjust the color temperature and / or illumination of the fill light 150 until the adjusted test environment meets the environmental requirements of the test case.

[0065] The above-mentioned environmental components include shielding members and / or fill light 150 for controlling external natural light, wherein the shielding members may include various types, such as curtains, door curtains, doors, windows, etc., which can be set according to actual conditions. The fill light 150 can be a lamp of any light source, and the color temperature and illumination of the fill light 150 can be adjusted within a specified range, for example, the color temperature range can be 2700-550K, and the illumination (i.e., light intensity) range can be 0-100,000 Lux, etc., which can be set according to actual conditions.

[0066] In actual applications, the above-mentioned guidance information includes text-based guidance information and / or voice-based guidance information; the test cases include information on one or more different scenarios including scenes with eyes closed, scenes with glasses worn, scenes with eyes blocked by copies of eyes, scenes with glasses worn and eyes blocked by copies of eyes, scenes with glasses worn and special markings similar to eyes, and scenes with eyes of a physical model.

[0067] The text-based guidance information may be the guidance information displayed in the form of text as described above, and the voice-based guidance information may be the guidance information displayed in the form of voice broadcast as described above.

[0068] In practical applications, in the above step S206, the target terminal 140 is subjected to attention calibration and / or attack detection for facial recognition based on the collected facial image, and the specific processing methods for obtaining the corresponding detection results can be various. The following is an optional processing method, such as Figure 4 As shown, the processing may specifically include the following steps S20602 and S20604.

[0069] In step S20602, the collected facial image is input into a pre-trained neural network model to obtain recognition results of preset operations and / or preset body states in attention detection for facial recognition of the target terminal 140, wherein the preset operations include but are not limited to one or more of closing eyes, opening eyes, opening mouth, and closing mouth, and the preset body states include fatigue states.

[0070] In step S20604, based on the above recognition results, the detection results of attention calibration and / or attack detection for facial recognition of the target terminal 140 are determined.

[0071] The specific processing of the above steps S20602 and S20604 can be found in the above related content and will not be repeated here.

[0072] In practical applications, in the above step S206, the target terminal 140 is subjected to attention calibration and / or attack detection for facial recognition based on the collected facial image, and the specific processing methods for obtaining the corresponding detection results can be various. The following is an optional processing method, such as Figure 5 As shown, the processing may specifically include the following steps S20606 to S20612.

[0073] In step S20606, the collected facial image is input into a pre-trained information extraction network model to obtain information about the facial area and facial feature points contained in the facial image.

[0074] In step S20608, based on the information of the facial region and the information of the facial feature points contained in the facial image, the facial image is divided into one or more different regions.

[0075] In implementation, the facial image can be divided into one or more different areas based on the information of the facial area and the information of the facial feature points contained in the facial image. For example, the main control device 110 can divide the facial image into multiple different areas according to the facial division rule of "three sections and five eyes (i.e., the length of the face is divided into three equal parts according to the length ratio of the face, and the width of the face is divided into five equal parts according to the width ratio of the face and the length of the eye shape)". In addition, the facial image can also be divided into regions according to other facial division rules. For example, the length of the face can be divided into four equal parts, and the width of the face can be divided into seven equal parts, or the facial image can be divided more finely, etc. The specific settings can be made according to actual conditions, and the embodiments of this specification are not limited to this.

[0076] In step S20610, the facial image divided into one or more different areas is input into the image classification model to obtain the recognition results of preset operations and / or preset body states in the attention detection for facial recognition of the target terminal 140, wherein the preset operations include but are not limited to one or more of closing eyes, opening eyes, opening mouth, and closing mouth, and the preset body states include fatigue states.

[0077] During implementation, a facial image divided into one or more different areas can be input into an image classification model. The facial image of each area is analyzed by the image classification model to determine preset operations such as closing eyes, opening eyes, opening mouth, and closing mouth. The user's physical state, such as fatigue, anxiety, etc., can also be determined. Finally, the image classification model can output the above-mentioned recognition results.

[0078] In step S20612, based on the above recognition results, the detection results of attention calibration and / or attack detection for facial recognition of the target terminal 140 are determined.

[0079] In implementation, the target terminal 140 can be subjected to an attention calibration test for facial recognition based on the recognized facial image. For example, the user can be guided to close his eyes through guidance information, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user with his eyes closed. Afterwards, the user can be guided to wear designated glasses through guidance information, and then the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect the facial image of the user wearing glasses. The main control device 110 can identify the collected facial images through an image classification model, and determine the facial images of preset operations or scenes such as closing the eyes and wearing glasses. Afterwards, the detection result of the attention calibration test for facial recognition of the target terminal 140 can be determined based on the above recognition result.

[0080] Based on the recognized facial image, the target terminal 140 is subjected to attention attack detection for facial recognition. For example, the user may be guided to cover the eyes with a printed eye image through a guidance message. Then, the main control device 110 may send a shooting instruction to the target terminal 140, and the target terminal 140 may collect a facial image of the user covering the eyes with a printed eye image. After that, the user may be guided to wear designated glasses and cover the eyes with a printed eye image through a guidance message. Then, the main control device 110 may send a shooting instruction to the target terminal 140, and the target terminal 140 may collect a facial image of the user wearing glasses and covering the eyes with a printed eye image. For example, after that, the user can be guided to use artificial eyes instead of eyes through guidance information, and then, the main control device 110 can send a shooting instruction to the target terminal 140, and the target terminal 140 can collect facial images of the user using artificial eyes instead of eyes. The main control device 110 can recognize the collected facial images through the image classification model, and determine the facial images of preset operations or scenes such as using printed eye images to cover the eyes, wearing specified glasses and using printed eye images to cover the eyes, and using artificial eyes instead of eyes. After that, based on the above recognition results, the detection result of the attention attack detection for facial recognition of the target terminal 140 can be determined.

[0081] In practical applications, the information extraction network model includes a multi-task cascade convolutional neural network MTCNN model, and the image classification model includes a first classification model and / or a second classification model constructed based on the PERCLOS algorithm. The first classification model is used to identify preset operations in facial images, and the second classification model constructed based on the PERCLOS algorithm is used to identify preset body states in facial images.

[0082] The above specific processing can be found in the above related content, which will not be repeated here.

[0083] The embodiments of the present specification provide an attention detection method for facial recognition, by obtaining a test case for performing attention detection for facial recognition, and based on the test case, controlling a robotic arm to adjust the test angle of a target terminal and the distance between the target terminal and a user, and based on the test case, controlling a test environment adjustment component to adjust the current test environment, generating guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collecting the user's facial image through the target terminal, performing attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtaining corresponding detection results. In this way, the total duration of attention detection for facial recognition can be controlled within a shorter time, thereby improving the detection efficiency of attention detection and saving resources for attention detection. Moreover, the attention detection system for facial recognition can automatically complete attention detection, thereby realizing unattended testing.

[0084] In addition, voice announcements are introduced to remind users of the operations they need to perform in different states, such as eyes open or eyes closed, in order to cope with changes in subsequent test scenarios, thereby improving the flexibility and efficiency of attention detection. In addition, visual real-time detection analysis is developed based on the MTCNN model to ensure that attention detection in different states can become effective attack detection data.

[0085] The above is the attention detection method for facial recognition provided by the embodiment of this specification. Based on the same idea, the embodiment of this specification also provides an attention detection device for facial recognition, such as Figure 6 shown.

[0086] The attention detection device for facial recognition may provide a terminal device or a server, etc. for the above-mentioned embodiment.

[0087] The attention detection device for facial recognition may have relatively large differences due to different configurations or performances, and may include one or more processors 601 and memory 602, and one or more storage applications or data may be stored in the memory 602. Among them, the memory 602 may be a short-term storage or a persistent storage. The application stored in the memory 602 may include one or more modules (not shown in the figure), and each module may include a series of computer executable instructions in the attention detection device for facial recognition. Furthermore, the processor 601 may be configured to communicate with the memory 602, and execute a series of computer executable instructions in the memory 602 on the attention detection device for facial recognition. The attention detection device for facial recognition may also include one or more power supplies 603, one or more wired or wireless network interfaces 604, one or more input and output interfaces 605, and one or more keyboards 606.

[0088] Specifically in this embodiment, the attention detection device for facial recognition includes a memory and one or more programs, wherein the one or more programs are stored in the memory, and the one or more programs may include one or more modules, and each module may include a series of computer executable instructions in the attention detection device for facial recognition, and the one or more programs are configured to be executed by one or more processors, including computer executable instructions for performing the following:

[0089] Get test cases for attention detection for face recognition;

[0090] Based on the test case, control the mechanical arm to adjust the test angle of the target terminal to be detected and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment;

[0091] Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the guidance information to the user, the facial image of the user is collected through the target terminal, and based on the collected facial image, attention calibration and / or attack detection for facial recognition is performed on the target terminal to obtain corresponding detection results.

[0092] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the embodiment of the attention detection device for facial recognition, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0093] The embodiments of the present specification provide an attention detection device for facial recognition, which obtains a test case for performing attention detection for facial recognition, and based on the test case, controls a mechanical arm to adjust the test angle of a target terminal and the distance between the target terminal and a user, and based on the test case, controls a test environment adjustment component to adjust the current test environment, generates guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collects the user's facial image through the target terminal, performs attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtains corresponding detection results. In this way, the total duration of attention detection for facial recognition can be controlled within a shorter time, thereby improving the detection efficiency of attention detection and saving resources for attention detection. Moreover, the attention detection system for facial recognition can automatically complete attention detection, thereby realizing unattended testing.

[0094] Furthermore, based on the above Figures 2 to 5 In one embodiment, the present specification further provides a storage medium for storing computer executable instruction information. In a specific embodiment, the storage medium may be a USB flash drive, an optical disk, a hard disk, etc. When the computer executable instruction information stored in the storage medium is executed by the processor, the following process can be implemented:

[0095] Get test cases for attention detection for face recognition;

[0096] Based on the test case, control the mechanical arm to adjust the test angle of the target terminal to be detected and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment;

[0097] Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the guidance information to the user, the facial image of the user is collected through the target terminal, and based on the collected facial image, attention calibration and / or attack detection for facial recognition is performed on the target terminal to obtain corresponding detection results.

[0098] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned storage medium embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0099] The embodiments of the present specification provide a storage medium, which obtains a test case for performing attention detection for facial recognition, and based on the test case, controls a robotic arm to adjust the test angle of a target terminal and the distance between the target terminal and a user, and based on the test case, controls a test environment adjustment component to adjust the current test environment, generates guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collects the user's facial image through the target terminal, performs attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtains corresponding detection results. In this way, the total duration of attention detection for facial recognition can be controlled within a shorter time, thereby improving the detection efficiency of attention detection and saving resources for attention detection. Moreover, the attention detection system for facial recognition can automatically complete attention detection, thereby realizing unattended testing.

[0100] Furthermore, based on the above Figures 2 to 5 In one or more embodiments of the present specification, a computer program product is provided, including a computer program. When the computer program in the computer program product is executed by a processor, the following process can be implemented:

[0101] Get test cases for attention detection for face recognition;

[0102] Based on the test case, control the mechanical arm to adjust the test angle of the target terminal to be detected and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment;

[0103] Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the guidance information to the user, the facial image of the user is collected through the target terminal, and based on the collected facial image, attention calibration and / or attack detection for facial recognition is performed on the target terminal to obtain corresponding detection results.

[0104] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the above-mentioned computer program product embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0105] The embodiments of the present specification provide a computer program product, which obtains a test case for performing attention detection for facial recognition, and based on the test case, controls a robotic arm to adjust the test angle of a target terminal and the distance between the target terminal and a user, and based on the test case, controls a test environment adjustment component to adjust the current test environment, generates guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collects the user's facial image through the target terminal, performs attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtains corresponding detection results. In this way, the total duration of attention detection for facial recognition can be controlled within a shorter time, thereby improving the detection efficiency of attention detection and saving resources for attention detection. Moreover, the attention detection system for facial recognition can automatically complete attention detection, thereby realizing unattended testing.

[0106] The above is a description of a specific embodiment of the specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recorded in the claims can be performed in an order different from that in the embodiments and still achieve the desired results. In addition, the processes depicted in the drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.

[0107] In the 1990s, improvements to a technology could be clearly distinguished as hardware improvements (for example, improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the method flow). However, with the development of technology, many improvements to the method flow today can be regarded as direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved method flow into the hardware circuit. Therefore, it cannot be said that an improvement in a method flow cannot be implemented using a hardware entity module. For example, a programmable logic device (PLD) (such as a field programmable gate array (FPGA)) is such an integrated circuit whose logical function is determined by the user's programming of the device. Designers can "integrate" a digital system on a PLD by programming it themselves, without having to ask a chip manufacturer to design and produce a dedicated integrated circuit chip. Moreover, nowadays, instead of manually making integrated circuit chips, this kind of programming is mostly implemented by "logic compiler" software, which is similar to the software compiler used when developing and writing programs, and the original code before compilation must also be written in a specific programming language, which is called hardware description language (HDL). There is not only one HDL, but many kinds, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc. The most commonly used ones are VHDL (Very-High-Speed ​​Integrated Circuit Hardware Description Language) and Verilog. Those skilled in the art should also know that it is only necessary to program the method flow slightly in the above-mentioned hardware description languages ​​and program it into the integrated circuit, and then it is easy to obtain the hardware circuit that implements the logic method flow.

[0108] The controller can be implemented in any appropriate manner, for example, the controller can take the form of a microprocessor or processor and a computer-readable medium storing a computer-readable program code (such as software or firmware) that can be executed by the (micro)processor, a logic gate, a switch, an application-specific integrated circuit (ASIC), a programmable logic controller, and an embedded microcontroller. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicone Labs C8051F320. The memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art also know that in addition to implementing the controller in a purely computer-readable program code manner, the controller can be implemented in the form of a logic gate, a switch, an application-specific integrated circuit, a programmable logic controller, and an embedded microcontroller by logically programming the method steps. Therefore, this controller can be considered as a hardware component, and the devices included therein for implementing various functions can also be regarded as structures within the hardware component. Or even, the devices for implementing various functions can be regarded as both software modules for implementing the method and structures within the hardware component.

[0109] The systems, devices, modules or units described in the above embodiments may be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer may be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.

[0110] For the convenience of description, the above devices are described in terms of functions and are divided into various units. Of course, when implementing one or more embodiments of this specification, the functions of each unit can be implemented in the same or multiple software and / or hardware.

[0111] Those skilled in the art will appreciate that the embodiments of this specification may be provided as methods, systems, or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment, or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that contain computer-usable program code.

[0112] The embodiments of this specification are described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of this specification. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable fraud case serial and parallel device to produce a machine, so that the instructions executed by the processor of the computer or other programmable fraud case serial and parallel device generate instructions for implementing the process in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.

[0113] These computer program instructions may also be stored in a computer readable memory capable of directing a computer or other programmable fraud case serial and parallel device to operate in a specific manner, so that the instructions stored in the computer readable memory produce an article of manufacture including an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.

[0114] These computer program instructions may also be loaded onto a computer or other programmable device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, whereby the instructions executed on the computer or other programmable device provide for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.

[0115] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0116] The memory may include non-permanent storage in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0117] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0118] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0119] It should be understood by those skilled in the art that the embodiments of this specification may be provided as methods, systems or computer program products. Therefore, one or more embodiments of this specification may take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware. Moreover, one or more embodiments of this specification may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program codes.

[0120] One or more embodiments of the present specification may be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. One or more embodiments of the present specification may also be practiced in distributed computing environments where tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules may be located in local and remote computer storage media, including storage devices.

[0121] Each embodiment in this specification is described in a progressive manner, and the same or similar parts between the embodiments can be referred to each other, and each embodiment focuses on the differences from other embodiments. In particular, for the system embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.

[0122] The above description is only an embodiment of this specification and is not intended to limit this document. For those skilled in the art, this specification may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of this specification should be included in the scope of the claims of this specification.

Claims

1. A method for detecting attention for facial recognition, the method comprising: Get test cases for attention detection for face recognition; Based on the test case, control the mechanical arm to adjust the test angle of the target terminal to be detected and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment; Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the guidance information to the user, the facial image of the user is collected through the target terminal, and based on the collected facial image, attention calibration and / or attack detection for facial recognition is performed on the target terminal to obtain corresponding detection results.

2. The method according to claim 1, wherein the controlling the test environment adjustment component to adjust the current test environment based on the test case comprises: Based on the test case, determine whether the current test environment meets the environmental requirements of the test case; If the current test environment does not meet the environmental requirements of the test case, the first adjustment subcomponent in the test environment adjustment component is controlled to open or close the shielding member to adjust the impact of external natural light on the current test environment, and / or the second adjustment subcomponent in the test environment adjustment component is controlled to adjust the color temperature and / or illumination of the fill light until the adjusted test environment meets the environmental requirements of the test case.

3. According to the method described in claim 2, the guidance information includes text-based guidance information and / or voice-based guidance information; the test cases include information on one or more different scenarios including a scenario of closing eyes, a scenario of wearing glasses, a scenario of blocking eyes by a copy of eyes, a scenario of wearing glasses and blocking eyes by a copy of eyes, a scenario of wearing glasses and having special markings similar to eyes, and a scenario of eyes of a physical model.

4. The method according to claim 3, wherein the step of performing attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image to obtain corresponding detection results comprises: Inputting the collected facial image into a pre-trained neural network model to obtain a recognition result of a preset operation and / or a preset body state in attention detection for facial recognition of the target terminal, wherein the preset operation includes but is not limited to one or more of closing eyes, opening eyes, opening mouth, and closing mouth, and the preset body state includes a fatigue state; Based on the recognition result, a detection result of attention calibration and / or attack detection for facial recognition of the target terminal is determined.

5. According to the method of claim 3, the step of performing attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image to obtain corresponding detection results comprises: Inputting the collected facial image into a pre-trained information extraction network model to obtain information about the facial region and facial feature points contained in the facial image; Based on information of facial regions and information of facial feature points contained in the facial image, dividing the target image into one or more different regions; Inputting a facial image divided into one or more different regions into an image classification model, obtaining a recognition result of a preset operation and / or a preset body state in attention detection for facial recognition of the target terminal, wherein the preset operation includes but is not limited to one or more of closing eyes, opening eyes, opening mouth, and closing mouth, and the preset body state includes a fatigue state; Based on the recognition result, a detection result of attention calibration and / or attack detection for facial recognition of the target terminal is determined.

6. According to the method of claim 5, the information extraction network model includes a multi-task cascade convolutional neural network model, the image classification model includes a first classification model and / or a second classification model constructed based on the PERCLOS algorithm, the first classification model is used to identify preset operations in facial images, and the second classification model constructed based on the PERCLOS algorithm is used to identify preset body states in facial images.

7. An attention detection system for facial recognition, the system comprising a main control device, a mechanical arm, and a test environment adjustment component, wherein a target terminal to be detected, the mechanical arm, and the test environment adjustment component are respectively connected to the main control device, wherein: The mechanical arm is configured to clamp the target terminal and is capable of adjusting a test angle of the target terminal and a distance between the target terminal and a user; The test environment adjustment component is configured to connect with a preset environment component and adjust the current test environment by controlling the environment component; The main control device is configured to obtain a test case for performing attention detection for facial recognition, and based on the test case, control the robotic arm to adjust the test angle of the target terminal and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment, generate guidance information for guiding the user to perform attention detection based on the test process in the test case, and under the guidance of the guidance information to the user, collect the user's facial image through the target terminal, perform attention calibration and / or attack detection for facial recognition on the target terminal based on the collected facial image, and obtain corresponding detection results.

8. The system according to claim 7, further comprising a prompt component, wherein the prompt component is connected to the main control device, and the prompt component comprises a text prompt unit and / or a voice prompt unit; The text prompt unit is configured to display the guidance information in the form of text, and to collect the facial image of the user through the target terminal under the guidance of the guidance information displayed in the form of text to the user; The voice prompt unit is configured to display the guidance information in the form of voice broadcast, and to collect the facial image of the user through the target terminal under the guidance of the guidance information displayed in the form of voice broadcast to the user.

9. The system according to claim 7, wherein the environmental component comprises a shielding member and / or a supplementary light for controlling external natural light. The main control device is configured to control the first adjustment subcomponent in the test environment adjustment component to open or close the shielding member to adjust the influence of external natural light on the current test environment if it is determined based on the test case that the current test environment does not meet the environmental requirements of the test case; and / or, The main control device is configured to control the second adjustment subcomponent in the test environment adjustment component to adjust the color temperature and / or illumination of the fill light until the adjusted test environment meets the environmental requirements of the test case.

10. An attention detection device for facial recognition, the attention detection device for facial recognition comprising: processor; as well as a memory arranged to store computer executable instructions which, when executed, cause the processor to: Get test cases for attention detection for face recognition; Based on the test case, control the mechanical arm to adjust the test angle of the target terminal to be detected and the distance between the target terminal and the user, and based on the test case, control the test environment adjustment component to adjust the current test environment; Based on the test process in the test case, guidance information for guiding the user to perform attention detection is generated, and under the guidance of the guidance information to the user, the facial image of the user is collected through the target terminal, and based on the collected facial image, attention calibration and / or attack detection for facial recognition is performed on the target terminal to obtain corresponding detection results.