WO2023071190A1 - Liveness detection method and apparatus, computer device, and storage medium - Google Patents

Liveness detection method and apparatus, computer device, and storage medium Download PDF

Info

Publication number
WO2023071190A1
WO2023071190A1 PCT/CN2022/096444 CN2022096444W WO2023071190A1 WO 2023071190 A1 WO2023071190 A1 WO 2023071190A1 CN 2022096444 W CN2022096444 W CN 2022096444W WO 2023071190 A1 WO2023071190 A1 WO 2023071190A1
Authority
WO
WIPO (PCT)
Prior art keywords
detected
detection
image
threshold
images
Prior art date
Application number
PCT/CN2022/096444
Other languages
French (fr)
Chinese (zh)
Inventor
胡宇轩
于志鹏
石华峰
吴一超
梁鼎
Original Assignee
上海商汤智能科技有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 上海商汤智能科技有限公司 filed Critical 上海商汤智能科技有限公司
Publication of WO2023071190A1 publication Critical patent/WO2023071190A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F18/00Pattern recognition
    • G06F18/20Analysing
    • G06F18/21Design or setup of recognition systems or techniques; Extraction of features in feature space; Blind source separation
    • G06F18/214Generating training patterns; Bootstrap methods, e.g. bagging or boosting
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06NCOMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS
    • G06N3/00Computing arrangements based on biological models
    • G06N3/02Neural networks
    • G06N3/08Learning methods

Definitions

  • the present disclosure relates to the technical field of face recognition, and in particular to a living body detection method, device, computer equipment and storage medium.
  • live body detection technology is widely used in various smart devices to detect whether the "user" who is currently performing face recognition is a real user.
  • Embodiments of the present disclosure at least provide a living body detection method, device, computer equipment, and storage medium.
  • an embodiment of the present disclosure provides a living body detection method, including:
  • multiple frames of images to be detected corresponding to the target action are obtained by responding to the living body detection request, wherein the target action is an action instructed by the user when performing live body detection;
  • the feature point position information matched by the target action determines the detection values corresponding to each frame of the image to be detected to indicate the completion of the target action; in this way, by determining the detection value corresponding to the target action, each frame to be detected can be
  • the completion of the target action in the detection image is quantified, so as to facilitate subsequent detection and quantitative analysis of the detection value; the detection value is detected based on the detection scheme that matches the target action, and the living body detection result is obtained.
  • Detection of the detection values of multiple frames of images to be detected can reduce the influence of a single frame of images on the detection results, making the accuracy of living body detection higher.
  • the obtaining a living body detection result based on the detection scheme matched with the target action and the detection value includes:
  • the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result.
  • the set detection threshold can be made more in line with the actual situation of the target action; by integrating the detection values of multiple frames of images to be detected through the detection threshold, it is possible to make the determination of the living body detection result.
  • the accuracy rate is higher.
  • the detection value when the target action is nodding or shaking the head, the detection value includes a head deviation angle; the detection threshold includes a positive deviation threshold, a negative deviation threshold, an image frame number threshold;
  • the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
  • the feature points matching the target action include mouth feature points
  • the determining the detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected includes:
  • the detection value is determined based on the first mouth distance and the second mouth distance.
  • the determined detection value can better represent the state of the mouth, and the detection process and calculation process also save computing resources.
  • the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold;
  • the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
  • the first preset condition includes:
  • the number of the third images to be detected whose corresponding detection value is the mouth opening threshold is a first preset value
  • the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of mouth opening frames.
  • the first preset condition further includes:
  • the difference between the detected values of any two frames of the second images to be detected is smaller than a second preset value.
  • the determining the second image to be detected between every two adjacent first images to be detected in the multiple frames of the first image to be detected includes:
  • the second preset condition includes:
  • the number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the maximum detection value of the images to be detected between adjacent first images to be detected meets the threshold corresponding to the mouth opening filter criteria.
  • the determination of each frame of the image to be detected is based on the position information of the feature point in each frame of the image to be detected that matches the target action.
  • Corresponding detection values used to represent the completion of the target action include:
  • the image to be detected is corrected;
  • the rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
  • the accuracy of the obtained detection value can be made higher, so that the accuracy rate when performing living body detection can be effectively improved.
  • the detection value includes a first detection value used to describe the situation of eye occlusion, and a second detection value used to describe the completion of eye opening and closing;
  • the detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold;
  • the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
  • the embodiment of the present disclosure also provides a living body detection device, including:
  • An acquisition module configured to respond to a liveness detection request, and acquire multiple frames of images to be detected corresponding to a target action, wherein the target action is an action instructed by a user during liveness detection;
  • a determining module configured to determine detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected;
  • the detection module is configured to obtain a living body detection result based on the detection scheme matched with the target action and the detection value.
  • the detection module is configured to detect detection values of the multiple frames of images to be detected based on a detection threshold corresponding to the target action and a detection scheme matching the target action, to obtain Liveness test results.
  • the detection value when the target action is nodding or shaking the head, the detection value includes a head deviation angle; the detection threshold includes a positive deviation threshold, a negative deviation threshold, an image frame number threshold;
  • the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtains a living body detection result, it is used for:
  • the feature points matching the target action include mouth feature points
  • the determination module determines the detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected, Used for:
  • the detection value is determined based on the first mouth distance and the second mouth distance.
  • the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold;
  • the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtains a living body detection result, it is used for:
  • the first preset condition includes:
  • the number of the third images to be detected whose corresponding detection value is the mouth opening threshold is a first preset value
  • the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of mouth opening frames.
  • the first preset condition further includes:
  • the difference between the detected values of any two frames of the second images to be detected is smaller than a second preset value.
  • the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, to obtain the living body
  • the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, to obtain the living body
  • the second preset condition includes:
  • the number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the maximum detection value of the images to be detected between adjacent first images to be detected meets the threshold corresponding to the mouth opening filter criteria.
  • the determining module determines each When the detection values corresponding to the frames to be detected are respectively used to represent the completion of the target action, it is used for:
  • the image to be detected is corrected;
  • the rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
  • the detection value includes a first detection value used to describe the situation of eye occlusion, and a second detection value used to describe the completion of eye opening and closing;
  • the detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold;
  • the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtains a living body detection result, it is used for:
  • an embodiment of the present disclosure further provides a computer device, including: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processing The processor communicates with the memory through a bus, and when the machine-readable instructions are executed by the processor, the above-mentioned first aspect, or the steps in any possible implementation manner of the first aspect are executed.
  • a computer device including: a processor, a memory, and a bus
  • the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processing
  • the processor communicates with the memory through a bus, and when the machine-readable instructions are executed by the processor, the above-mentioned first aspect, or the steps in any possible implementation manner of the first aspect are executed.
  • embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned first aspect, or any of the first aspects of the first aspect, may be executed. Steps in one possible implementation.
  • FIG. 1 shows a flow chart of a living body detection method provided by an embodiment of the present disclosure
  • Fig. 2 shows a schematic diagram of determining the first mouth distance and the second mouth distance in the living body detection method provided by the embodiment of the present disclosure
  • FIG. 3 shows a flow chart of a specific method for determining a living body detection result in the living body detection method provided by an embodiment of the present disclosure
  • FIG. 4 shows a flow chart of another specific method for determining a living body detection result in the living body detection method provided by an embodiment of the present disclosure
  • Fig. 5 shows a schematic diagram of determining the first image to be detected in the living body detection method provided by the embodiment of the present disclosure
  • Fig. 6 shows a flow chart of another specific method for determining a living body detection result in the living body detection method provided by an embodiment of the present disclosure
  • FIG. 7 shows a schematic structural diagram of a living body detection device provided by an embodiment of the present disclosure
  • FIG. 8 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.
  • the present disclosure provides a living body detection method, device, computer equipment, and storage medium, which respond to a live body detection request and acquire multiple frames of images to be detected corresponding to target actions, wherein the target action is when performing live body detection Indicating the action made by the user; based on the feature point position information matching the target action in each frame of the image to be detected, determining detection values corresponding to each frame of the image to be detected for indicating the completion of the target action; In this way, by determining the detection value corresponding to the target action, the completion of the target action in each frame of the image to be detected can be quantified, thereby facilitating subsequent detection and quantitative analysis of the detection value;
  • the detection scheme detects the detection value to obtain the detection result of the living body. In this way, by detecting the detection value of multiple frames of images to be detected, the influence of a single frame image on the detection result can be reduced, so that the accuracy of the living body detection is higher.
  • the execution subject of the living body detection method provided in the embodiment of the present disclosure is generally a computer device with a certain computing power.
  • the computer The equipment includes, for example: terminal equipment or server or other processing equipment, and the terminal equipment can be user equipment (User Equipment, UE), mobile equipment, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA) , handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc.
  • the living body detection method may be implemented by a processor invoking computer-readable instructions stored in a memory.
  • FIG. 1 is a flowchart of a living body detection method provided by an embodiment of the present disclosure, the method includes steps S101 to S103, wherein:
  • S101 Responding to a live body detection request, acquire multiple frames of images to be detected corresponding to a target action, wherein the target action is an action instructed to a user when performing live body detection.
  • S102 Based on the feature point position information matching the target action in each frame of the image to be detected, determine detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action.
  • the target action can be nodding, shaking the head, opening mouth, closing mouth, opening eyes, closing eyes, etc.
  • the target action used in liveness detection can be preset, for example, the completion of a liveness detection requires Only by completing the two actions of nodding and shaking the head in sequence can it be determined that the liveness detection has passed; or, the target action can also be selected by the user, for example, the user selects the target action to be performed as opening and closing eyes; or, it can It is determined according to the current user's face recognition results. For example, if it is detected that the user is wearing a mask (that is, the mouth is covered and the feature points of the mouth cannot be recognized), the target action can be determined as opening and closing eyes. If you are wearing sunglasses (that is, the eyes are blocked and the feature points of the eyes cannot be recognized), then the target action can be determined as opening and closing the mouth.
  • the image acquisition device of the terminal device may be controlled to collect the video to be detected corresponding to the target action.
  • the multiple frames of images to be detected can be obtained by sampling the video to be detected.
  • S102 Based on the feature point position information matching the target action in each frame of the image to be detected, determine detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action.
  • the position information of the feature points can be determined by detecting the image to be detected through a face feature point detection algorithm.
  • the feature points matched with the target action may also be different, and the determined detection values may also be different.
  • the determined detection value used to indicate the completion of the target action may be the angle of nodding (or shaking the head), correspondingly, at this time, the feature point matching the target action is able to characterize nodding (or shaking the head)
  • the feature points used may also be different according to the detection algorithm used to determine the angle of nodding (or shaking the head).
  • the feature points corresponding to shaking the head may be the feature points corresponding to the outer corner of the left eye, the outer corner of the right eye, and the tip of the nose respectively.
  • the horizontal distance from the outer corner of the eye to the tip of the nose is similar to the horizontal distance from the outer corner of the right eye to the tip of the nose.
  • the decreasing speed is slower than the decreasing speed of the horizontal distance from the outer corner of the right eye to the tip of the nose, so the ratio of the horizontal distance from the outer corner of the left eye to the tip of the nose and the horizontal distance from the outer corner of the right eye to the tip of the nose is gradually increasing, which can be further passed
  • the ratio determines how far the user shakes his head to the right.
  • the opening and closing of the mouth means opening and closing the mouth, and when the user opens and closes the mouth first, it can be confirmed that the user has completed opening and closing the mouth.
  • the determined detection value used to indicate the completion of the target action may be the mouth state score indicating the mouth opening range.
  • the feature point matching the target action at this time is the mouth Feature points.
  • the first mouth distance representing the opening amplitude at the central position of the mouth and the opening distance representing the opening at the corner position of the mouth may be determined based on the position information of the mouth feature points.
  • a second mouth distance of the opening width; based on the first mouth distance and the second mouth distance, the detection value is determined.
  • a schematic diagram of determining the first mouth distance and the second mouth distance can be shown in Figure 2.
  • Figure 2 when determining the first mouth distance, it can first be determined that the The first mouth feature point at the center of the lips (as shown at point A in Figure 2), and the second mouth feature point at the center of the lower lip corresponding to the first mouth feature point (as shown in Figure 2 2), wherein the connection line between the first mouth feature point and the second mouth feature point is the same as the opening direction of the mouth; based on the first mouth feature point and The position information corresponding to the second mouth feature points determines the first mouth distance.
  • At least one mouth corner, the third mouth feature point located on the upper lip (as shown at point C in Figure 2), and the fourth mouth feature point located on the lower lip can be determined first.
  • Mouth feature point (as shown in D point among Fig. 2), wherein, the connecting line between the 3rd mouth feature point and the 4th mouth feature point is the same as the opening direction of the mouth; based on the The position information corresponding to the third mouth feature point and the fourth mouth feature point determines the second mouth distance.
  • the second mouth distance corresponding to each corner of the mouth can be calculated respectively, and the two The average value of the second mouth distance corresponding to the corners of the mouth is used as the second mouth distance corresponding to the image to be detected;
  • the second mouth distance of is used as the second mouth distance corresponding to the image to be detected, which is not limited in this embodiment of the present disclosure.
  • the ratio between the second mouth distance and the first mouth distance can be approximately 1; when the user opens his mouth, the increase of the first mouth distance is larger than the increase of the second mouth distance. At this time, the ratio of the second mouth distance to the first mouth distance is less than 1, and as the The ratio of the mouth opening range decreases gradually, so the ratio of the second mouth distance to the first mouth distance can be used to represent the mouth state score of the mouth opening range.
  • the two points used to determine the first mouth distance are compared with the two points used to determine the second mouth distance. There is a difference in the distance from the longitudinal midline of the lips, so that when the mouth is opened, there is an obvious difference between the first mouth distance and the second mouth distance.
  • the points used for determining the distance to the first mouth and the distance to the second mouth may include but are not limited to the cases listed above.
  • the opening and closing of eyes means opening and closing of eyes, and when the user closes eyes first and then opens them again, it can be confirmed that the user has completed opening and closing eyes.
  • the determined detection value used to represent the completion of the target action may include an eye state score (second detection value) representing the degree of eye opening.
  • the matched feature points may be eye feature points.
  • the method for determining the eye state score may be similar to the method for determining the mouth state score in Case 2, and details are not repeated here.
  • feature points matched with the target action can also be feature points that can represent the angle of deflection of the face, such as the feature points that represent the angle of rotation of the face in case 1, and will not be described again here.
  • the eye image in the image to be detected may also be input into a pre-trained neural network to obtain the output of the neural network and the value to be detected. The corresponding eye state score for the image.
  • the sample image when training the neural network, can be input into the neural network to be trained to obtain the sample prediction score output by the neural network; based on the sample prediction score, determine the opening and closing of the eyes in the sample object (eye opening or eyes closed); according to the determined opening and closing situation and the pre-marked label data representing the opening and closing situation of the eyes of the sample image, determine the loss value of this training, and adjust the network parameters of the neural network based on the loss value .
  • the image to be detected is corrected; and then The rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
  • the eye state score output by the neural network can be obtained.
  • the detection value may also include an eye occlusion score (the first detection value ), which can be determined by the number of successful recognitions of the eye feature points and the number of eye standard recognitions. For example, if the number of eye standard recognitions is 10 and the number of successful recognitions is 8, it can be determined that the eyes that have not been successfully recognized There are 2 facial feature points, and the corresponding eye occlusion score is 0.2; or, it can also be obtained from the output of the neural network, such as inputting the eye image with the occluded eyes into the neural network, then The resulting output eye occlusion score is 0.1.
  • an eye occlusion score the first detection value
  • the detection value when the detection value is detected based on a detection scheme that matches the target action to obtain a living body detection result, it may be based on a detection threshold corresponding to the target action and a detection threshold that matches the target action.
  • the detection scheme is used to detect the detection values of the multiple frames of images to be detected to obtain a living body detection result.
  • the detection threshold is the threshold set for the target action, and the corresponding detection threshold is different according to the target action.
  • the detection value includes a head offset angle
  • the detection threshold includes a positive offset threshold, a negative offset threshold, and an image frame number threshold.
  • the living body detection result may be determined through the following steps:
  • S301 Determine a first target detection image whose head deviation angle is greater than the positive deviation threshold, and a second target detection image whose head deviation angle is smaller than the negative deviation threshold.
  • the rightward offset of the head is taken as the positive offset
  • the positive offset threshold is 15°
  • the offset angles corresponding to the images 1 to 5 to be detected are 12° and 16° to the right , 18°, 16°, and 12° as examples
  • the images to be detected 2, 3, and 4 may be determined as the first target detection images.
  • the rightward offset of the head is still regarded as a positive offset
  • the negative offset threshold is negative 15°
  • the offset angles corresponding to images 6 to 10 to be detected are rightward offset negative 12° (A negative 12° offset to the right means a 12° left offset, the same below), negative 16°, negative 18°, negative 16°, and negative 12° are examples, and images 7, 8, and 9 to be detected can be determined An image is detected for the second object.
  • the first image frame number threshold and the second image frame number threshold may be the same, and the first image frame number threshold and the second image frame number threshold may also be different.
  • the first image frame number threshold is the same as the second image frame number threshold (such as 3), and at this time, when the number of the first target detection images and the second target detection images are detected to be greater than 3, that is It can be determined that the living body test is passed.
  • the first image frame number threshold is different from the second image frame number threshold.
  • the first image frame number threshold can be set to 3 for the number of the first target detection images
  • the second image frame number threshold can be set for the second target detection images.
  • the image frame number threshold is 4. At this time, in a case where the number of first object detection images exceeds three and the number of second object detection images exceeds four, it is determined that the living body detection is passed.
  • the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold.
  • the living body detection result can also be determined through the following steps:
  • S401 Determine multiple frames of first images to be detected whose detection values are the mouth shutting threshold.
  • the obtained mouth state scores of multiple frames of images to be detected can be shown in Table 1 below:
  • Fraction number of frames Fraction number of frames Fraction number of frames Fraction 1 0.5 9 0.95 17 0.5 25 0.8 2 0.55 10 0.98 18 0.6 26 0.96 3 0.61 11 0.95 19 0.7 the the 4 0.68 12 0.8 20 0.8 the the
  • columns 1, 3, 5, and 7 represent the number of frames of the image to be detected in the video to be detected, and columns 2, 4, 6, and 8 represent those corresponding to columns 1, 3, 5, and 7, respectively. Mouth status score for .
  • FIG. 5 the schematic diagram of determining the first image to be detected may be shown in FIG. 5.
  • Frame 6 point O in Fig. 5
  • frame 12 point A in Fig. 5
  • frame 20 point C in Fig. 5
  • frame 23 point D in Fig. 5
  • frame 25 point D in Fig. point F in Figure 5
  • the abscissa corresponding to the intersection point is located between two frames, the video frame closest to the intersection point may be used as the first image to be detected.
  • S402 Determine a second image to be detected between every two adjacent frames of the first image to be detected among the multiple frames of the first image to be detected.
  • the second image to be detected when determining the second image to be detected, it may be determined that among the multiple frames of the first image to be detected, the number of adjacent frames of the first image to be detected that satisfies the second preset condition is The second image to be detected between;
  • the second preset condition includes: the number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the number of images to be detected between adjacent first images to be detected The maximum detection value satisfies the filter condition corresponding to the mouth opening threshold.
  • the first images to be detected that are adjacent to each other in two frames indicate that they are sequentially adjacent in the determined multiple frames of the first images to be detected.
  • the The first image to be detected O point determined by the first frame, and the second image to be detected A point determined by the second frame are the adjacent first image to be detected; the maximum value of the detection value satisfies the corresponding threshold of the mouth opening
  • the filtering condition may be that the minimum value of the mouth state score is less than the mouth opening threshold.
  • the first preset condition may be:
  • the number of third images to be detected whose corresponding detection value is the mouth opening threshold is a first preset value.
  • the number of detected images is also 1.
  • a to B represent the mouth opening process
  • B to C represent the mouth closing process
  • Condition 2 Among the multiple frames of the third images to be detected, the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of frames of mouth opening.
  • the second image to be detected between A to C between two adjacent frames of the third image to be detected is the 15th frame, the 16th frame, the 16th frame 17 frames, the number of which is 3 frames, which is greater than the mouth opening frame number threshold, then the condition 2 is met.
  • Condition 3 Among multiple frames of the second images to be detected between two adjacent frames of the third images to be detected, the difference between the detection values of any two frames of the second images to be detected is smaller than a second preset value.
  • the second preset value is 0.15
  • the mouth state score difference between the 15th frame and the 16th frame is 0.1
  • the mouth state score difference between the 16th frame and the 17th frame The value is also 0.1, both of which are smaller than the second preset value 0.15, then the condition 3 is met.
  • condition 1 and condition 2 need to be satisfied at the same time, or condition 1, condition 2, and condition 3 must be satisfied at the same time.
  • condition 1 and condition 2 need to be satisfied at the same time, or condition 1, condition 2, and condition 3 must be satisfied at the same time.
  • Different solutions may also be adopted in different application scenarios, which is not limited in this embodiment of the present disclosure.
  • the detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold.
  • Liveness detection is performed for the right eyes, or target eye state scores for liveness detection may also be determined from eye state scores corresponding to the left eye and the right eye.
  • the eye state score similar to the mouth state score the larger the eye opening range, the smaller the corresponding eye state score as an example, when determining the target eye state score, for For any frame of the image to be detected, it can be determined that among the eye state scores corresponding to the two eyes of the image to be detected, the eye state score with a larger score is the target eye state score corresponding to the frame image, that is, take The eye state score corresponding to the eye with the smaller eye opening range in the two eyes is used for liveness detection.
  • the living body detection result may also be determined through the following steps:
  • S601 Based on the eye-opening threshold, the eye-closing threshold, and the second detection values of the multiple frames of images to be detected, determine a fourth image to be detected that satisfies a third preset condition.
  • the third preset condition may be at least one of the following conditions:
  • the number of fourth images to be detected whose corresponding detection value is the eye-opening threshold is a third preset value.
  • Condition 2 Among the multiple frames of fifth images to be detected, the number of fourth images to be detected between two adjacent frames of fifth images to be detected is greater than the threshold of open-eye frames.
  • Condition 3 In the fourth image to be detected between two adjacent frames of the fifth image to be detected, the difference between the second detection values of any two frames of the fourth image to be detected is smaller than the fourth preset value.
  • S602 Determine a target number of fourth to-be-detected images whose corresponding first detection value is smaller than the eye occlusion threshold.
  • the number of targets of the fourth image to be detected it may be determined after determining the fourth detection value that satisfies the third preset value; or, it may also be determined after obtaining the eye occlusion After scoring the score, the images to be detected whose eye occlusion scores are less than the eye occlusion threshold are directly deleted, so that when subsequent judgments are made, it is not necessary to judge these deleted images to be detected.
  • the living body detection if the living body detection is not completed within the preset time period, it may be determined that the corresponding living body detection result is failed.
  • the preset duration as 10 seconds and the target action as opening and closing the mouth as an example, if the user fails to complete the liveness detection within 10 seconds, it may be that the user has not performed the target action (opening and closing the mouth), or the corresponding detection If the value does not meet the corresponding detection threshold, it can be determined that the current living body detection result fails.
  • a prompt message may also be sent to the user, prompting the reasons for failing the liveness test, such as no human face detected, irregular movements, and the like.
  • the living body detection method responds to the living body detection request and acquires multiple frames of images to be detected corresponding to the target action, wherein the target action is an action instructed by the user when performing live body detection; based on the frames
  • the feature point position information in the image to be detected that matches the target action determines the detection values corresponding to each frame of the image to be detected to indicate the completion of the target action; in this way, by determining the detection value corresponding to the target action value, which can quantify the completion of the target action in each frame of the image to be detected, so as to facilitate the subsequent detection and quantitative analysis of the detection value; the detection value is detected based on the detection scheme that matches the target action, and the living body In this way, by detecting the detection values of multiple frames of images to be detected, the influence of a single frame image on the detection result can be reduced, so that the accuracy of living body detection is higher.
  • the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process.
  • the specific execution order of each step should be based on its function and possible
  • the inner logic is OK.
  • the embodiment of the present disclosure also provides a living body detection device corresponding to the living body detection method. Since the problem-solving principle of the device in the embodiment of the present disclosure is similar to the above-mentioned living body detection method in the embodiment of the present disclosure, the implementation of the device Reference can be made to the implementation of the method, and repeated descriptions will not be repeated.
  • FIG. 7 it is a schematic structural diagram of a living body detection device provided by an embodiment of the present disclosure, the device includes: an acquisition module 701, a determination module 702, and a detection module 703; wherein,
  • the acquiring module 701 is configured to respond to a living body detection request, and acquire multiple frames of images to be detected corresponding to a target action, wherein the target action is an action instructed by a user during live body detection;
  • Determining module 702 for determining the detection value corresponding to each frame of the image to be detected for indicating the completion of the target action based on the feature point position information matched with the target action in each frame of the image to be detected;
  • the detection module 703 is configured to obtain a living body detection result based on the detection scheme matched with the target action and the detection value.
  • the detection module 703 is configured to:
  • the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result.
  • the detection value when the target action is nodding or shaking the head, the detection value includes a head deviation angle; the detection threshold includes a positive deviation threshold, a negative deviation threshold, an image frame number threshold;
  • the detection module 703 when detecting the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtaining a living body detection result, is used to:
  • the feature points matching the target action include mouth feature points
  • the determining module 702 when determining the detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected , for:
  • the detection value is determined based on the first mouth distance and the second mouth distance.
  • the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold;
  • the detection module 703 when detecting the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtaining a living body detection result, is used to:
  • the first preset condition includes:
  • the number of the third images to be detected whose corresponding detection value is the mouth opening threshold is the first preset value
  • the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of mouth opening frames.
  • the first preset condition further includes:
  • the difference between the detected values of any two frames of the second images to be detected is smaller than a second preset value.
  • the detection module 703 when determining the second image to be detected between every two adjacent frames of the first image to be detected in the multiple frames of the first image to be detected, :
  • the second preset condition includes:
  • the number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the maximum detection value of the images to be detected between adjacent first images to be detected meets the threshold corresponding to the mouth opening filter criteria.
  • the determination module 702 determines, based on the feature point position information matching the target action in each frame of the image to be detected When each frame of the image to be detected corresponds to the detection value used to indicate the completion of the target action, it is used for:
  • the image to be detected is corrected;
  • the rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
  • the detection value includes a first detection value used to describe the situation of eye occlusion, and a second detection value used to describe the completion of eye opening and closing;
  • the detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold;
  • the detection module 703 when detecting the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtaining a living body detection result, is used to:
  • the living body detection device responds to the living body detection request and acquires multiple frames of images to be detected corresponding to the target action, wherein the target action is an action instructed by the user when performing live body detection; based on the frames
  • the feature point position information in the image to be detected that matches the target action determines the detection values corresponding to each frame of the image to be detected to indicate the completion of the target action; in this way, by determining the detection value corresponding to the target action value, which can quantify the completion of the target action in each frame of the image to be detected, so as to facilitate the subsequent detection and quantitative analysis of the detection value; the detection value is detected based on the detection scheme that matches the target action, and the living body In this way, by detecting the detection values of multiple frames of images to be detected, the influence of a single frame image on the detection result can be reduced, so that the accuracy of living body detection is higher.
  • FIG. 8 it is a schematic structural diagram of a computer device 800 provided by an embodiment of the present disclosure, including a processor 801 , a memory 802 , and a bus 803 .
  • the memory 802 is used to store execution instructions, including a memory 8021 and an external memory 8022; the memory 8021 here is also called an internal memory, and is used to temporarily store calculation data in the processor 801 and exchange data with an external memory 8022 such as a hard disk.
  • the processor 801 exchanges data with the external memory 8022 through the memory 8021.
  • the processor 801 communicates with the memory 802 through the bus 803, so that the processor 801 executes the following instructions:
  • the detection value is detected based on a detection scheme matched with the target action to obtain a living body detection result.
  • Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the living body detection method described in the foregoing method embodiments are executed.
  • the storage medium may be a volatile or non-volatile computer-readable storage medium.
  • the embodiment of the present disclosure also provides a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the living body detection method described in the above method embodiment, for details, please refer to the above method The embodiment will not be repeated here.
  • the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof.
  • the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
  • a software development kit Software Development Kit, SDK
  • the units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
  • each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
  • the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor.
  • the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure.
  • the aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .

Abstract

A liveness detection method and apparatus, a computer device, and a storage medium. The method comprises: in response to a liveness detection request, obtaining a plurality of frames of images to be detected corresponding to a target action, the target action being an action instructed to be performed by a user when liveness detection is performed (S101); on the basis of feature point position information matching the target action in each frame of image to be detected, determining a detection value respectively corresponding to each frame of image to be detected and used for representing a completion condition of the target action (S102); and detecting the detection value on the basis of a detection scheme matching the target action to obtain a liveness detection result (S103).

Description

一种活体检测方法、装置、计算机设备及存储介质A living body detection method, device, computer equipment and storage medium
本公开要求于2021年10月28日提交中国专利局、申请号为202111265552.1、发明名称为“一种活体检测方法、装置、计算机设备及存储介质”,其全部内容通过引用结合在本公开中。This disclosure is required to be submitted to the China Patent Office on October 28, 2021. The application number is 202111265552.1, and the title of the invention is "a living body detection method, device, computer equipment, and storage medium", the entire contents of which are incorporated by reference in this disclosure.
技术领域technical field
本公开涉及人脸识别技术领域,具体涉及一种活体检测方法、装置、计算机设备及存储介质。The present disclosure relates to the technical field of face recognition, and in particular to a living body detection method, device, computer equipment and storage medium.
背景技术Background technique
目前,活体检测技术被广泛应用中各种智能设备中,以检测当前进行人脸识别的“用户”是否为真实用户。At present, live body detection technology is widely used in various smart devices to detect whether the "user" who is currently performing face recognition is a real user.
相关技术中,在进行活体检测时,需要通过图像采集设备实时获取用户的人脸图像,然后检测实时获取的人脸图像中,是否有满足预设条件的人脸图像,比如张嘴的人脸图像,若有,则可以确定活体检测通过。但是,在进行活体检测的过程中,非法登录者可以通过伪造人脸图像来欺骗图像采集设备,使得基于人脸识别的身份验证的安全性较低。In related technologies, when performing liveness detection, it is necessary to obtain a user's face image in real time through an image acquisition device, and then detect whether there is a face image that meets preset conditions in the face image acquired in real time, such as a face image with an open mouth , if yes, it can be determined that the liveness detection is passed. However, in the process of performing liveness detection, illegal registrants can deceive the image acquisition device by forging face images, making the security of identity verification based on face recognition low.
发明内容Contents of the invention
本公开实施例至少提供一种活体检测方法、装置、计算机设备及存储介质。Embodiments of the present disclosure at least provide a living body detection method, device, computer equipment, and storage medium.
第一方面,本公开实施例提供了一种活体检测方法,包括:In a first aspect, an embodiment of the present disclosure provides a living body detection method, including:
响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;Responding to the liveness detection request, acquiring multiple frames of images to be detected corresponding to the target action, wherein the target action is an action instructed by the user during liveness detection;
基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;Based on the feature point position information matching the target action in each frame of the image to be detected, determine detection values corresponding to each frame of the image to be detected for indicating the completion of the target action;
基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果。Based on the detection scheme matched with the target action and the detection value, a living body detection result is obtained.
这样,通过响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;这样,通过确定与所述目标动作对应的检测值,可以对各帧待检测图像中目标动作的完成情况进行量化,从而便于后续对检测值进行检测及量化分析;基于与所述目标动作匹配的检测方案对所述检测值进行检测,得到活体检测结果,这样,通过对多帧待检测图像的检测值进行检测,可以减少单帧图像对于检测结果的影响,使得活体检测的准确率更高。In this way, multiple frames of images to be detected corresponding to the target action are obtained by responding to the living body detection request, wherein the target action is an action instructed by the user when performing live body detection; The feature point position information matched by the target action determines the detection values corresponding to each frame of the image to be detected to indicate the completion of the target action; in this way, by determining the detection value corresponding to the target action, each frame to be detected can be The completion of the target action in the detection image is quantified, so as to facilitate subsequent detection and quantitative analysis of the detection value; the detection value is detected based on the detection scheme that matches the target action, and the living body detection result is obtained. In this way, by Detection of the detection values of multiple frames of images to be detected can reduce the influence of a single frame of images on the detection results, making the accuracy of living body detection higher.
一种可能的实施方式中,所述基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果,包括:In a possible implementation manner, the obtaining a living body detection result based on the detection scheme matched with the target action and the detection value includes:
基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果。Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result.
这样,通过针对目标动作设置对应的检测阈值,可以使得设置的检测阈值更符合目标 动作的实际情况;通过检测阈值对多帧待检测图像的检测值进行整合,可以使得在确定活体检测结果时的准确率更高。In this way, by setting the corresponding detection threshold for the target action, the set detection threshold can be made more in line with the actual situation of the target action; by integrating the detection values of multiple frames of images to be detected through the detection threshold, it is possible to make the determination of the living body detection result. The accuracy rate is higher.
一种可能的实施方式中,在所述目标动作为点头或摇头的情况下,所述检测值包括头部偏移角度;所述检测阈值包括正向偏移阈值、负向偏移阈值、图像帧数阈值;In a possible implementation manner, when the target action is nodding or shaking the head, the detection value includes a head deviation angle; the detection threshold includes a positive deviation threshold, a negative deviation threshold, an image frame number threshold;
所述基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果,包括:Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
确定头部偏移角度大于所述正向偏移阈值的第一目标检测图像,以及小于所述负向偏移阈值的第二目标检测图像;determining a first object detection image with a head offset angle greater than the positive offset threshold, and a second object detection image with a head offset angle smaller than the negative offset threshold;
在所述第一目标检测图像的数量超过第一图像帧数阈值,且所述第二目标检测图像的数量超过第二图像帧数阈值的情况下,确定活体检测通过。If the number of the first target detection images exceeds the first image frame number threshold and the second target detection image number exceeds the second image frame number threshold, it is determined that the living body detection is passed.
这样,通过设置正向偏移阈值、负向偏移阈值、图像帧数阈值这三帧阈值,可以有效的检测用户是否完成了点头或摇头这一目标动作,从而可以有效的提高进行活体检测时的准确率。In this way, by setting the three frame thresholds of positive offset threshold, negative offset threshold, and image frame number threshold, it can effectively detect whether the user has completed the target action of nodding or shaking the head, thereby effectively improving the liveness detection time. the accuracy rate.
一种可能的实施方式中,在所述目标动作为张闭嘴的情况下,与所述目标动作匹配的特征点包括嘴部特征点;In a possible implementation manner, when the target action is opening and closing the mouth, the feature points matching the target action include mouth feature points;
所述基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值,包括:The determining the detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected includes:
基于嘴部特征点位置信息,确定表征嘴部中央位置处张开幅度的第一嘴部距离和表征嘴角位置处张开幅度的第二嘴部距离;Based on the mouth feature point position information, determine a first mouth distance representing the opening amplitude at the central position of the mouth and a second mouth distance representing the opening amplitude at the corner position of the mouth;
基于所述第一嘴部距离和第二嘴部距离,确定所述检测值。The detection value is determined based on the first mouth distance and the second mouth distance.
这样,通过针对嘴部特征点进行检测及计算,可以使得确定的检测值能够更好的表征嘴部的状态,且检测过程和计算过程也更节约计算资源。In this way, by performing detection and calculation on the feature points of the mouth, the determined detection value can better represent the state of the mouth, and the detection process and calculation process also save computing resources.
一种可能的实施方式中,所述检测阈值包括张嘴阈值、闭嘴阈值、张嘴帧数阈值;In a possible implementation manner, the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold;
所述基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果,包括:Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
确定检测值为所述闭嘴阈值的多帧第一待检测图像;Determine the multi-frame first image to be detected whose detection value is the shut-up threshold;
确定所述多帧第一待检测图像中,每两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between every two adjacent frames of the first image to be detected among the multiple frames of the first image to be detected;
在检测到所述第二待检测图像满足第一预设条件的情况下,确定通过活体检测。If it is detected that the second image to be detected satisfies the first preset condition, it is determined that the living body detection is passed.
这样,通过设置张嘴阈值、闭嘴阈值、张嘴帧数阈值这三帧阈值,可以有效的检测用户是否完成了张闭嘴这一目标动作,从而可以有效的提高进行活体检测时的准确率。In this way, by setting the three frame thresholds of mouth opening threshold, mouth closing threshold, and mouth opening frame number threshold, it can effectively detect whether the user has completed the target action of opening and closing the mouth, thereby effectively improving the accuracy of liveness detection.
一种可能的实施方式中,所述第一预设条件包括:In a possible implementation manner, the first preset condition includes:
所述第二待检测图像中,对应的检测值为所述张嘴阈值的第三待检测图像的数量为第一预设值;Among the second images to be detected, the number of the third images to be detected whose corresponding detection value is the mouth opening threshold is a first preset value;
所述多帧第三待检测图像中,相邻两帧第三待检测图像之间的第二待检测图像的数量大于所述张嘴帧数阈值。In the plurality of frames of the third images to be detected, the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of mouth opening frames.
这样,通过设置多种第一预设条件,可以更好的模拟出张闭嘴时的真实情况,从而可以有效的提高进行活体检测时的准确率。In this way, by setting a variety of first preset conditions, the real situation when the mouth is opened and closed can be better simulated, thereby effectively improving the accuracy rate of the living body detection.
一种可能的实施方式中,所述第一预设条件还包括:In a possible implementation manner, the first preset condition further includes:
相邻两帧第三待检测图像之间的多帧第二待检测图像中,任意两帧第二待检测图像的检测值之间的差值小于第二预设值。Among the multiple frames of the second images to be detected between two adjacent frames of the third images to be detected, the difference between the detected values of any two frames of the second images to be detected is smaller than a second preset value.
一种可能的实施方式中,所述确定所述多帧第一待检测图像中,每两帧相邻的第一待检测图像之间的第二待检测图像,包括:In a possible implementation manner, the determining the second image to be detected between every two adjacent first images to be detected in the multiple frames of the first image to be detected includes:
确定所述多帧第一待检测图像中,满足第二预设条件的两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between two frames of adjacent first images to be detected that meet a second preset condition among the multiple frames of the first image to be detected;
其中,所述第二预设条件包括:Wherein, the second preset condition includes:
相邻的第一待检测图像之间的待检测图像的数量大于所述张嘴帧数阈值;相邻的第一待检测图像之间的待检测图像的检测值最值满足所述张嘴阈值对应的筛选条件。The number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the maximum detection value of the images to be detected between adjacent first images to be detected meets the threshold corresponding to the mouth opening filter criteria.
这样,通过设置第二预设条件,可以在最终进行判断前先进行一遍筛选,从而使得后续进行更为精确的判断时的速度更快,节约计算资源。In this way, by setting the second preset condition, one pass of screening can be performed before the final judgment, so that the speed of subsequent more accurate judgment is faster and computing resources are saved.
一种可能的实施方式中,在所述目标动作为睁闭眼的情况下,所述基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值,包括:In a possible implementation manner, when the target action is opening and closing eyes, the determination of each frame of the image to be detected is based on the position information of the feature point in each frame of the image to be detected that matches the target action. Corresponding detection values used to represent the completion of the target action include:
针对多帧待检测图像中的每帧待检测图像,基于所述待检测图像的特征点位置信息,对所述待检测图像进行矫正处理;For each frame of the image to be detected in the multiple frames of the image to be detected, based on the feature point position information of the image to be detected, the image to be detected is corrected;
将矫正处理后的所述待检测图像输入至预先训练好的神经网络,确定所述待检测图像对应的检测值。The rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
这样,通过对待检测图像进行矫正处理,可以使得得到的检测值的精确度更高,从而可以有效的提高进行活体检测时的准确率。In this way, by performing correction processing on the image to be detected, the accuracy of the obtained detection value can be made higher, so that the accuracy rate when performing living body detection can be effectively improved.
一种可能的实施方式中,所述检测值包括用于描述眼部遮挡情况的第一检测值,以及用于描述睁闭眼完成情况的第二检测值;In a possible implementation manner, the detection value includes a first detection value used to describe the situation of eye occlusion, and a second detection value used to describe the completion of eye opening and closing;
所述检测阈值包括睁眼阈值、闭眼阈值、睁眼帧数阈值、眼部遮挡阈值;The detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold;
所述基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果,包括:Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
基于所述睁眼阈值、闭眼阈值、以及所述多帧待检测图像的第二检测值,确定满足第三预设条件的第四待检测图像;determining a fourth image to be detected that satisfies a third preset condition based on the eye-opening threshold, the eye-closing threshold, and the second detection values of the multiple frames of images to be detected;
确定对应的第一检测值小于所述眼部遮挡阈值的第四待检测图像的目标数量;determining the target quantity of the fourth image to be detected whose corresponding first detection value is less than the eye occlusion threshold;
在所述目标数量超过所述睁眼帧数阈值的情况下,确定通过活体检测。When the number of targets exceeds the eye-opening frame number threshold, it is determined that the living body detection is passed.
这样,通过设置睁眼阈值、闭眼阈值、睁眼帧数阈值、眼部遮挡阈值这四帧阈值,可以有效的检测用户是否完成了睁闭眼这一目标动作,从而可以有效的提高进行活体检测时的准确率。In this way, by setting the four frame thresholds of eye-opening threshold, eye-closing threshold, eye-opening frame number threshold, and eye occlusion threshold, it can effectively detect whether the user has completed the target action of opening and closing eyes, thereby effectively improving the performance of the living body. The accuracy of detection.
第二方面,本公开实施例还提供一种活体检测装置,包括:In the second aspect, the embodiment of the present disclosure also provides a living body detection device, including:
获取模块,用于响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;An acquisition module, configured to respond to a liveness detection request, and acquire multiple frames of images to be detected corresponding to a target action, wherein the target action is an action instructed by a user during liveness detection;
确定模块,用于基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;A determining module, configured to determine detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected;
检测模块,用于基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果。The detection module is configured to obtain a living body detection result based on the detection scheme matched with the target action and the detection value.
一种可能的实施方式中,所述检测模块,用于基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果。In a possible implementation manner, the detection module is configured to detect detection values of the multiple frames of images to be detected based on a detection threshold corresponding to the target action and a detection scheme matching the target action, to obtain Liveness test results.
一种可能的实施方式中,在所述目标动作为点头或摇头的情况下,所述检测值包括头部偏移角度;所述检测阈值包括正向偏移阈值、负向偏移阈值、图像帧数阈值;In a possible implementation manner, when the target action is nodding or shaking the head, the detection value includes a head deviation angle; the detection threshold includes a positive deviation threshold, a negative deviation threshold, an image frame number threshold;
所述检测模块,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果时,用于:When the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtains a living body detection result, it is used for:
确定头部偏移角度大于所述正向偏移阈值的第一目标检测图像,以及小于所述负向偏移阈值的第二目标检测图像;determining a first object detection image with a head offset angle greater than the positive offset threshold, and a second object detection image with a head offset angle smaller than the negative offset threshold;
在所述第一目标检测图像的数量超过第一图像帧数阈值,且所述第二目标检测图像的数量超过第二图像帧数阈值的情况下,确定活体检测通过。If the number of the first target detection images exceeds the first image frame number threshold and the second target detection image number exceeds the second image frame number threshold, it is determined that the living body detection is passed.
一种可能的实施方式中,在所述目标动作为张闭嘴的情况下,与所述目标动作匹配的特征点包括嘴部特征点;In a possible implementation manner, when the target action is opening and closing the mouth, the feature points matching the target action include mouth feature points;
所述确定模块,在基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值时,用于:When the determination module determines the detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected, Used for:
基于嘴部特征点位置信息,确定表征嘴部中央位置处张开幅度的第一嘴部距离和表征嘴角位置处张开幅度的第二嘴部距离;Based on the mouth feature point position information, determine a first mouth distance representing the opening amplitude at the central position of the mouth and a second mouth distance representing the opening amplitude at the corner position of the mouth;
基于所述第一嘴部距离和第二嘴部距离,确定所述检测值。The detection value is determined based on the first mouth distance and the second mouth distance.
一种可能的实施方式中,所述检测阈值包括张嘴阈值、闭嘴阈值、张嘴帧数阈值;In a possible implementation manner, the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold;
所述检测模块,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果时,用于:When the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtains a living body detection result, it is used for:
确定检测值为所述闭嘴阈值的多帧第一待检测图像;Determine the multi-frame first image to be detected whose detection value is the shut-up threshold;
确定所述多帧第一待检测图像中,每两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between every two adjacent frames of the first image to be detected among the multiple frames of the first image to be detected;
在检测到所述第二待检测图像满足第一预设条件的情况下,确定通过活体检测。If it is detected that the second image to be detected satisfies the first preset condition, it is determined that the living body detection is passed.
一种可能的实施方式中,所述第一预设条件包括:In a possible implementation manner, the first preset condition includes:
所述第二待检测图像中,对应的检测值为所述张嘴阈值的第三待检测图像的数量为第一预设值;Among the second images to be detected, the number of the third images to be detected whose corresponding detection value is the mouth opening threshold is a first preset value;
所述多帧第三待检测图像中,相邻两帧第三待检测图像之间的第二待检测图像的数量大于所述张嘴帧数阈值。In the plurality of frames of the third images to be detected, the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of mouth opening frames.
一种可能的实施方式中,所述第一预设条件还包括:In a possible implementation manner, the first preset condition further includes:
相邻两帧第三待检测图像之间的多帧第二待检测图像中,任意两帧第二待检测图像的检测值之间的差值小于第二预设值。Among the multiple frames of the second images to be detected between two adjacent frames of the third images to be detected, the difference between the detected values of any two frames of the second images to be detected is smaller than a second preset value.
一种可能的实施方式中,所述检测模块,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结 果时,用于:In a possible implementation manner, the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, to obtain the living body When testing results, use to:
确定所述多帧第一待检测图像中,满足第二预设条件的两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between two frames of adjacent first images to be detected that meet a second preset condition among the multiple frames of the first image to be detected;
其中,所述第二预设条件包括:Wherein, the second preset condition includes:
相邻的第一待检测图像之间的待检测图像的数量大于所述张嘴帧数阈值;相邻的第一待检测图像之间的待检测图像的检测值最值满足所述张嘴阈值对应的筛选条件。The number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the maximum detection value of the images to be detected between adjacent first images to be detected meets the threshold corresponding to the mouth opening filter criteria.
一种可能的实施方式中,在所述目标动作为睁闭眼的情况下,所述确定模块,在基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值时,用于:In a possible implementation manner, when the target action is opening and closing eyes, the determining module determines each When the detection values corresponding to the frames to be detected are respectively used to represent the completion of the target action, it is used for:
针对多帧待检测图像中的每帧待检测图像,基于所述待检测图像的特征点位置信息,对所述待检测图像进行矫正处理;For each frame of the image to be detected in the multiple frames of the image to be detected, based on the feature point position information of the image to be detected, the image to be detected is corrected;
将矫正处理后的所述待检测图像输入至预先训练好的神经网络,确定所述待检测图像对应的检测值。The rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
一种可能的实施方式中,所述检测值包括用于描述眼部遮挡情况的第一检测值,以及用于描述睁闭眼完成情况的第二检测值;In a possible implementation manner, the detection value includes a first detection value used to describe the situation of eye occlusion, and a second detection value used to describe the completion of eye opening and closing;
所述检测阈值包括睁眼阈值、闭眼阈值、睁眼帧数阈值、眼部遮挡阈值;The detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold;
所述检测模块,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果时,用于:When the detection module detects the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtains a living body detection result, it is used for:
基于所述睁眼阈值、闭眼阈值、以及所述多帧待检测图像的第二检测值,确定满足第三预设条件的第四待检测图像;determining a fourth image to be detected that satisfies a third preset condition based on the eye-opening threshold, the eye-closing threshold, and the second detection values of the multiple frames of images to be detected;
确定对应的第一检测值小于所述眼部遮挡阈值的第四待检测图像的目标数量;determining the target quantity of the fourth image to be detected whose corresponding first detection value is less than the eye occlusion threshold;
在所述目标数量超过所述睁眼帧数阈值的情况下,确定通过活体检测。When the number of targets exceeds the eye-opening frame number threshold, it is determined that the living body detection is passed.
第三方面,本公开实施例还提供一种计算机设备,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当计算机设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤。In a third aspect, an embodiment of the present disclosure further provides a computer device, including: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the processing The processor communicates with the memory through a bus, and when the machine-readable instructions are executed by the processor, the above-mentioned first aspect, or the steps in any possible implementation manner of the first aspect are executed.
第四方面,本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述第一方面,或第一方面中任一种可能的实施方式中的步骤。In a fourth aspect, embodiments of the present disclosure further provide a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the above-mentioned first aspect, or any of the first aspects of the first aspect, may be executed. Steps in one possible implementation.
关于上述活体检测装置、计算机设备及存储介质的效果描述参见上述活体检测方法的说明,这里不再赘述。For the effect description of the above-mentioned living body detection device, computer equipment and storage medium, please refer to the description of the above-mentioned living body detection method, which will not be repeated here.
为使本公开的上述目的、特征和优点能更明显易懂,下文特举较佳实施例,并配合所附附图,作详细说明如下。In order to make the above-mentioned objects, features and advantages of the present disclosure more comprehensible, preferred embodiments will be described in detail below together with the accompanying drawings.
附图说明Description of drawings
为了更清楚地说明本公开实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,此处的附图被并入说明书中并构成本说明书中的一部分,这些附图示出了符合本公开的实施例,并与说明书一起用于说明本公开的技术方案。应当理解,以下附图仅 示出了本公开的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。In order to illustrate the technical solutions of the embodiments of the present disclosure more clearly, the following will briefly introduce the accompanying drawings used in the embodiments. The accompanying drawings here are incorporated into the specification and constitute a part of the specification. The drawings show the embodiments consistent with the present disclosure, and are used together with the description to explain the technical solution of the present disclosure. It should be understood that the following drawings only show some embodiments of the present disclosure, and therefore should not be regarded as limiting the scope. For those skilled in the art, they can also make From these drawings other related drawings are obtained.
图1示出了本公开实施例所提供的一种活体检测方法的流程图;FIG. 1 shows a flow chart of a living body detection method provided by an embodiment of the present disclosure;
图2示出了本公开实施例所提供的活体检测方法中,确定第一嘴部距离和第二嘴部距离的示意图;Fig. 2 shows a schematic diagram of determining the first mouth distance and the second mouth distance in the living body detection method provided by the embodiment of the present disclosure;
图3示出了本公开实施例所提供的活体检测方法中,一种确定活体检测结果的具体方法的流程图;FIG. 3 shows a flow chart of a specific method for determining a living body detection result in the living body detection method provided by an embodiment of the present disclosure;
图4示出了本公开实施例所提供的活体检测方法中,另一种确定活体检测结果的具体方法的流程图;FIG. 4 shows a flow chart of another specific method for determining a living body detection result in the living body detection method provided by an embodiment of the present disclosure;
图5示出了本公开实施例所提供的活体检测方法中,确定第一待检测图像的示意图;Fig. 5 shows a schematic diagram of determining the first image to be detected in the living body detection method provided by the embodiment of the present disclosure;
图6示出了本公开实施例所提供的活体检测方法中,另一种确定活体检测结果的具体方法的流程图;Fig. 6 shows a flow chart of another specific method for determining a living body detection result in the living body detection method provided by an embodiment of the present disclosure;
图7示出了本公开实施例所提供的一种活体检测装置的架构示意图;FIG. 7 shows a schematic structural diagram of a living body detection device provided by an embodiment of the present disclosure;
图8示出了本公开实施例所提供的一种计算机设备的结构示意图。FIG. 8 shows a schematic structural diagram of a computer device provided by an embodiment of the present disclosure.
具体实施方式Detailed ways
为使本公开实施例的目的、技术方案和优点更加清楚,下面将结合本公开实施例中附图,对本公开实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例仅仅是本公开一部分实施例,而不是全部的实施例。通常在此处附图中描述和示出的本公开实施例的组件可以以各种不同的配置来布置和设计。因此,以下对在附图中提供的本公开的实施例的详细描述并非旨在限制要求保护的本公开的范围,而是仅仅表示本公开的选定实施例。基于本公开的实施例,本领域技术人员在没有做出创造性劳动的前提下所获得的所有其他实施例,都属于本公开保护的范围。In order to make the purpose, technical solutions and advantages of the embodiments of the present disclosure clearer, the technical solutions in the embodiments of the present disclosure will be clearly and completely described below in conjunction with the accompanying drawings in the embodiments of the present disclosure. Obviously, the described embodiments are only It is a part of the embodiments of the present disclosure, but not all of them. The components of the disclosed embodiments generally described and illustrated in the figures herein may be arranged and designed in a variety of different configurations. Accordingly, the following detailed description of the embodiments of the present disclosure provided in the accompanying drawings is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of the present disclosure. Based on the embodiments of the present disclosure, all other embodiments obtained by those skilled in the art without creative efforts shall fall within the protection scope of the present disclosure.
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。It should be noted that like numerals and letters denote similar items in the following figures, therefore, once an item is defined in one figure, it does not require further definition and explanation in subsequent figures.
本文中术语“和/或”,仅仅是描述一种关联关系,表示可以存在三种关系,例如,A和/或B,可以表示:单独存在A,同时存在A和B,单独存在B这三种情况。另外,本文中术语“至少一种”表示多种中的任意一种或多种中的至少两种的任意组合,例如,包括A、B、C中的至少一种,可以表示包括从A、B和C构成的集合中选择的任意一个或多个元素。The term "and/or" in this article only describes an association relationship, which means that there can be three kinds of relationships, for example, A and/or B can mean: there is A alone, A and B exist at the same time, and B exists alone. situation. In addition, the term "at least one" herein means any one of a variety or any combination of at least two of the more, for example, including at least one of A, B, and C, which may mean including from A, Any one or more elements selected from the set formed by B and C.
经研究发现,在进行活体检测时,需要通过图像采集设备实时获取用户的人脸图像,然后检测实时获取的人脸图像中,是否有满足预设条件的人脸图像,比如张嘴的人脸图像,若有,则可以确定活体检测通过。但是,在进行活体检测的过程中,非法登录者可以通过伪造人脸图像来欺骗图像采集设备,使得基于人脸识别的身份验证的安全性较低。After research, it is found that when performing liveness detection, it is necessary to obtain the user's face image in real time through the image acquisition device, and then detect whether there is a face image that meets the preset conditions in the face image acquired in real time, such as a face image with an open mouth , if yes, it can be determined that the liveness detection is passed. However, in the process of performing liveness detection, illegal registrants can deceive the image acquisition device by forging face images, making the security of identity verification based on face recognition low.
基于上述研究,本公开提供了一种活体检测方法、装置、计算机设备及存储介质,响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;这 样,通过确定与所述目标动作对应的检测值,可以对各帧待检测图像中目标动作的完成情况进行量化,从而便于后续对检测值进行检测及量化分析;基于与所述目标动作匹配的检测方案对所述检测值进行检测,得到活体检测结果,这样,通过对多帧待检测图像的检测值进行检测,可以减少单帧图像对于检测结果的影响,使得活体检测的准确率更高。Based on the above research, the present disclosure provides a living body detection method, device, computer equipment, and storage medium, which respond to a live body detection request and acquire multiple frames of images to be detected corresponding to target actions, wherein the target action is when performing live body detection Indicating the action made by the user; based on the feature point position information matching the target action in each frame of the image to be detected, determining detection values corresponding to each frame of the image to be detected for indicating the completion of the target action; In this way, by determining the detection value corresponding to the target action, the completion of the target action in each frame of the image to be detected can be quantified, thereby facilitating subsequent detection and quantitative analysis of the detection value; The detection scheme detects the detection value to obtain the detection result of the living body. In this way, by detecting the detection value of multiple frames of images to be detected, the influence of a single frame image on the detection result can be reduced, so that the accuracy of the living body detection is higher.
为便于对本实施例进行理解,首先对本公开实施例所公开的一种活体检测方法进行详细介绍,本公开实施例所提供的活体检测方法的执行主体一般为具有一定计算能力的计算机设备,该计算机设备例如包括:终端设备或服务器或其它处理设备,终端设备可以为用户设备(User Equipment,UE)、移动设备、用户终端、终端、蜂窝电话、无绳电话、个人数字助理(Personal Digital Assistant,PDA)、手持设备、计算设备、车载设备、可穿戴设备等。在一些可能的实现方式中,该活体检测方法可以通过处理器调用存储器中存储的计算机可读指令的方式来实现。In order to facilitate the understanding of this embodiment, a living body detection method disclosed in the embodiment of the present disclosure is first introduced in detail. The execution subject of the living body detection method provided in the embodiment of the present disclosure is generally a computer device with a certain computing power. The computer The equipment includes, for example: terminal equipment or server or other processing equipment, and the terminal equipment can be user equipment (User Equipment, UE), mobile equipment, user terminal, terminal, cellular phone, cordless phone, personal digital assistant (Personal Digital Assistant, PDA) , handheld devices, computing devices, vehicle-mounted devices, wearable devices, etc. In some possible implementation manners, the living body detection method may be implemented by a processor invoking computer-readable instructions stored in a memory.
参见图1所示,为本公开实施例提供的活体检测方法的流程图,所述方法包括步骤S101至S103,其中:Referring to FIG. 1 , which is a flowchart of a living body detection method provided by an embodiment of the present disclosure, the method includes steps S101 to S103, wherein:
S101:响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作。S101: Responding to a live body detection request, acquire multiple frames of images to be detected corresponding to a target action, wherein the target action is an action instructed to a user when performing live body detection.
S102:基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值。S102: Based on the feature point position information matching the target action in each frame of the image to be detected, determine detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action.
S103:基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果。S103: Obtain a living body detection result based on the detection scheme matched with the target action and the detection value.
以下是对上述步骤的详细介绍。The following is a detailed description of the above steps.
针对S101,所述目标动作可以是点头、摇头、张嘴、闭嘴、睁眼以及闭眼等,其中,在进行活体检测时所使用的目标动作可以是预先设定的,比如完成一次活体检测需要依次完成点头和摇头这两个动作,才能确定活体检测通过;或者,所述目标动作也可以是用户自行选择的,比如用户选择想要执行的目标动作为睁眼和闭眼;又或者,可以根据当前用户的脸部识别结果进行确定的,比如检测到用户正在戴口罩(即嘴部被遮挡,嘴部特征点无法识别),则可以将目标动作确定为睁眼和闭眼,检测到用户正在戴墨镜(即眼部被遮挡,眼部特征点无法识别),则可以将目标动作确定为张嘴和闭嘴。For S101, the target action can be nodding, shaking the head, opening mouth, closing mouth, opening eyes, closing eyes, etc., wherein the target action used in liveness detection can be preset, for example, the completion of a liveness detection requires Only by completing the two actions of nodding and shaking the head in sequence can it be determined that the liveness detection has passed; or, the target action can also be selected by the user, for example, the user selects the target action to be performed as opening and closing eyes; or, it can It is determined according to the current user's face recognition results. For example, if it is detected that the user is wearing a mask (that is, the mouth is covered and the feature points of the mouth cannot be recognized), the target action can be determined as opening and closing eyes. If you are wearing sunglasses (that is, the eyes are blocked and the feature points of the eyes cannot be recognized), then the target action can be determined as opening and closing the mouth.
具体的,在获取与目标动作对应的多帧待检测图像时,可以是在响应活体检测请求后,通过控制终端设备的图像采集装置进行采集,得到与目标动作对应的待检测视频,通过对所述待检测视频进行采样,即可得到所述多帧待检测图像。Specifically, when obtaining multiple frames of images to be detected corresponding to the target action, after responding to the live body detection request, the image acquisition device of the terminal device may be controlled to collect the video to be detected corresponding to the target action. The multiple frames of images to be detected can be obtained by sampling the video to be detected.
S102:基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值。S102: Based on the feature point position information matching the target action in each frame of the image to be detected, determine detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action.
这里,通过人脸特征点检测算法对所述待检测图像进行检测,即可确定出特征点位置信息。其中,根据目标动作的不同,与所述目标动作匹配的特征点也可以不同,确定的检测值也可以不同。Here, the position information of the feature points can be determined by detecting the image to be detected through a face feature point detection algorithm. Wherein, according to different target actions, the feature points matched with the target action may also be different, and the determined detection values may also be different.
具体的,根据目标动作的不同,可以分为以下几种情况:Specifically, according to different target actions, it can be divided into the following situations:
情况1、目标动作为点头或摇头。 Case 1. The target action is nodding or shaking the head.
在这种情况下,确定的所述用于表示目标动作完成情况的检测值可以是点头(或摇头)角度,相应的,此时与目标动作匹配的特征点即为能够表征点头(或摇头)角度的特征点, 根据确定点头(或摇头)角度时的检测算法的不同,所使用的特征点也可以不同。In this case, the determined detection value used to indicate the completion of the target action may be the angle of nodding (or shaking the head), correspondingly, at this time, the feature point matching the target action is able to characterize nodding (or shaking the head) As for the feature points of the angle, the feature points used may also be different according to the detection algorithm used to determine the angle of nodding (or shaking the head).
示例性的,与摇头对应的特征点可以是左眼外眼角、右眼外眼角、鼻尖分别对应的特征点,当人脸正对图像采集装置时,采集得到的人脸图像中从左眼外眼角到鼻尖的水平距离,与从右眼外眼角到鼻尖的水平距离是相近的,当用户向右摇头(即将左侧面部朝向图像采集装置)时,由于左眼外眼角到鼻尖的水平距离的减少速度比右眼外眼角到鼻尖的水平距离的减少速度慢,因此左眼外眼角到鼻尖的水平距离与右眼外眼角到鼻尖的水平距离的比值是逐渐增加的,从而可以进一步的通过该比值确定出用户向右摇头的角度。Exemplarily, the feature points corresponding to shaking the head may be the feature points corresponding to the outer corner of the left eye, the outer corner of the right eye, and the tip of the nose respectively. The horizontal distance from the outer corner of the eye to the tip of the nose is similar to the horizontal distance from the outer corner of the right eye to the tip of the nose. The decreasing speed is slower than the decreasing speed of the horizontal distance from the outer corner of the right eye to the tip of the nose, so the ratio of the horizontal distance from the outer corner of the left eye to the tip of the nose and the horizontal distance from the outer corner of the right eye to the tip of the nose is gradually increasing, which can be further passed The ratio determines how far the user shakes his head to the right.
情况2、目标动作为张闭嘴。Case 2. The target action is to open and close the mouth.
这里,所述张闭嘴表示张嘴和闭嘴,当用户先张嘴然后再闭嘴时,即可确认用户完成了张闭嘴。Here, the opening and closing of the mouth means opening and closing the mouth, and when the user opens and closes the mouth first, it can be confirmed that the user has completed opening and closing the mouth.
在这种情况下,确定的所述用于表示目标动作完成情况的检测值可以是表示嘴部张开幅度的嘴部状态分数,相应的,此时与目标动作匹配的特征点即为嘴部特征点。In this case, the determined detection value used to indicate the completion of the target action may be the mouth state score indicating the mouth opening range. Correspondingly, the feature point matching the target action at this time is the mouth Feature points.
一种可能的实施方式中,在确定所述嘴部状态分数时,可以先基于嘴部特征点位置信息,确定表征嘴部中央位置处张开幅度的第一嘴部距离和表征嘴角位置处张开幅度的第二嘴部距离;基于所述第一嘴部距离和第二嘴部距离,确定所述检测值。In a possible implementation manner, when determining the mouth state score, the first mouth distance representing the opening amplitude at the central position of the mouth and the opening distance representing the opening at the corner position of the mouth may be determined based on the position information of the mouth feature points. A second mouth distance of the opening width; based on the first mouth distance and the second mouth distance, the detection value is determined.
示例性的,确定所述第一嘴部距离和所述第二嘴部距离的示意图可以如图2所示,图2中,在确定所述第一嘴部距离时,可以先确定出位于上嘴唇中央位置处的第一嘴部特征点(如图2中A点所示),以及与所述第一嘴部特征点对应的位于下嘴唇中央位置处的第二嘴部特征点(如图2中B点所示),其中,所述第一嘴部特征点与所述第二嘴部特征点之间的连线与嘴部张开方向相同;基于所述第一嘴部特征点和所述第二嘴部特征点分别对应的位置信息,确定出所述第一嘴部距离。Exemplarily, a schematic diagram of determining the first mouth distance and the second mouth distance can be shown in Figure 2. In Figure 2, when determining the first mouth distance, it can first be determined that the The first mouth feature point at the center of the lips (as shown at point A in Figure 2), and the second mouth feature point at the center of the lower lip corresponding to the first mouth feature point (as shown in Figure 2 2), wherein the connection line between the first mouth feature point and the second mouth feature point is the same as the opening direction of the mouth; based on the first mouth feature point and The position information corresponding to the second mouth feature points determines the first mouth distance.
此外,在确定所述第二嘴部距离时,可以先确定出至少一个嘴角中,位于上嘴唇的第三嘴部特征点(如图2中C点所示),以及位于下嘴唇的第四嘴部特征点(如图2中D点所示),其中,所述第三嘴部特征点与所述第四嘴部特征点之间的连线与嘴部张开方向相同;基于所述第三嘴部特征点和所述第四嘴部特征点分别对应的位置信息,确定出所述第二嘴部距离。In addition, when determining the second mouth distance, at least one mouth corner, the third mouth feature point located on the upper lip (as shown at point C in Figure 2), and the fourth mouth feature point located on the lower lip can be determined first. Mouth feature point (as shown in D point among Fig. 2), wherein, the connecting line between the 3rd mouth feature point and the 4th mouth feature point is the same as the opening direction of the mouth; based on the The position information corresponding to the third mouth feature point and the fourth mouth feature point determines the second mouth distance.
需要说明的是,在确定所述第二嘴部距离时,为了提高确定的所述第二嘴部距离的准确性,可以分别求出各嘴角分别对应的第二嘴部距离,并将两个嘴角分别对应的第二嘴部距离的平均值作为待检测图像对应的第二嘴部距离;另一方面,为了节约计算资源,也可以选取左右嘴角中的任一个嘴角进行计算,并将计算得到的第二嘴部距离作为待检测图像对应的第二嘴部距离,本公开实施例对此不做限定。It should be noted that, when determining the second mouth distance, in order to improve the accuracy of the determined second mouth distance, the second mouth distance corresponding to each corner of the mouth can be calculated respectively, and the two The average value of the second mouth distance corresponding to the corners of the mouth is used as the second mouth distance corresponding to the image to be detected; The second mouth distance of is used as the second mouth distance corresponding to the image to be detected, which is not limited in this embodiment of the present disclosure.
具体的,当用户闭嘴时,此时的第一嘴部距离与第二嘴部距离之间相差不大,第二嘴部距离与第一嘴部距离之间的比值可以近似为1;当用户张嘴时,第一嘴部距离的增大幅度是比第二嘴部距离的增大幅度要更大的,此时第二嘴部距离与第一嘴部距离的比值小于1,且随着嘴部张开幅度的增大该比值是逐渐减小的,因此可以使用第二嘴部距离与第一嘴部距离的比值表示嘴部张开幅度的嘴部状态分数。Specifically, when the user closes the mouth, there is not much difference between the first mouth distance and the second mouth distance at this time, and the ratio between the second mouth distance and the first mouth distance can be approximately 1; when When the user opens his mouth, the increase of the first mouth distance is larger than the increase of the second mouth distance. At this time, the ratio of the second mouth distance to the first mouth distance is less than 1, and as the The ratio of the mouth opening range decreases gradually, so the ratio of the second mouth distance to the first mouth distance can be used to represent the mouth state score of the mouth opening range.
需要说明的是,在确定第一嘴部距离和第二嘴部距离的过程中,用于确定第一嘴部距离的两个点与用于确定第二嘴部距离的两个点,相较于唇部纵向中线的距离存在差异,这 样可以确保嘴部张开时,第一嘴部距离与第二嘴部距离存在明显的差异。在实际应用过程中,用于第一嘴部距离确定和用于第二嘴部距离确定的几个点,可以包括但不限于上述例举的情况。It should be noted that, in the process of determining the first mouth distance and the second mouth distance, the two points used to determine the first mouth distance are compared with the two points used to determine the second mouth distance. There is a difference in the distance from the longitudinal midline of the lips, so that when the mouth is opened, there is an obvious difference between the first mouth distance and the second mouth distance. In practical applications, the points used for determining the distance to the first mouth and the distance to the second mouth may include but are not limited to the cases listed above.
情况3、目标动作为睁闭眼。Case 3. The target action is to open and close the eyes.
这里,所述睁闭眼表示睁眼和闭眼,当用户先闭眼然后再睁眼时,即可确认用户完成了睁闭眼。Here, the opening and closing of eyes means opening and closing of eyes, and when the user closes eyes first and then opens them again, it can be confirmed that the user has completed opening and closing eyes.
在这种情况下,可以将确定的所述用于表示目标动作完成情况的检测值可以包括表示眼部睁开幅度的眼部状态分数(第二检测值),相应的,此时与目标动作匹配的特征点可以为眼部特征点。此时,确定眼部状态分数的方法可以与情况2中确定嘴部状态分数的方法类似,在此不再赘述。In this case, the determined detection value used to represent the completion of the target action may include an eye state score (second detection value) representing the degree of eye opening. The matched feature points may be eye feature points. At this time, the method for determining the eye state score may be similar to the method for determining the mouth state score in Case 2, and details are not repeated here.
此外,所述与目标动作匹配的特征点还可以为能够表征脸部偏转幅度角度的特征点,比如情况1中表示脸部转动角度的特征点,在此不再赘述。In addition, the feature points matched with the target action can also be feature points that can represent the angle of deflection of the face, such as the feature points that represent the angle of rotation of the face in case 1, and will not be described again here.
在一种可能的实施方式中,在确定所述眼部状态分数时,也可以将所述待检测图像中的眼部图像输入至预先训练好的神经网络中,得到神经网络输出的与待检测图像对应的眼部状态分数。In a possible implementation manner, when determining the eye state score, the eye image in the image to be detected may also be input into a pre-trained neural network to obtain the output of the neural network and the value to be detected. The corresponding eye state score for the image.
其中,在训练所述神经网络时,可以将样本图像输入至待训练的神经网络中,得到神经网络输出的样本预测分数;基于所述样本预测分数确定样本对象中眼睛的睁闭情况(睁眼或闭眼);根据确定的所述睁闭情况以及预先标注的表征样本图像眼睛睁闭情况的标注数据,确定本次训练的损失值,并基于所述损失值对神经网络的网络参数进行调整。Wherein, when training the neural network, the sample image can be input into the neural network to be trained to obtain the sample prediction score output by the neural network; based on the sample prediction score, determine the opening and closing of the eyes in the sample object (eye opening or eyes closed); according to the determined opening and closing situation and the pre-marked label data representing the opening and closing situation of the eyes of the sample image, determine the loss value of this training, and adjust the network parameters of the neural network based on the loss value .
实际应用中,为提高神经网络的检测精度,针对多帧待检测图像中的每帧待检测图像,基于所述待检测图像的特征点位置信息,对所述待检测图像进行矫正处理;然后将矫正处理后的所述待检测图像输入至预先训练好的神经网络,确定所述待检测图像对应的检测值。In practical applications, in order to improve the detection accuracy of the neural network, for each frame of the image to be detected in the multiple frames of the image to be detected, based on the feature point position information of the image to be detected, the image to be detected is corrected; and then The rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
具体的,由于人脸图像中眼部部分面积较小,且眼部特征点之间的距离也较小,因此受人脸转动的影响较大,为了提高最终得到的所述眼部状态分数的精确度,可以在输入至神经网络之前,使用相应的人脸特征点以及人脸矫正算法,对所述待检测图像进行矫正处理,并将矫正处理后的待检测图像中的眼部图像输入至所述神经网络中,即可得到所述神经网络输出的眼部状态分数。Specifically, since the area of the eye part in the face image is small, and the distance between the eye feature points is also small, it is greatly affected by the rotation of the face, in order to improve the final score of the eye state Accuracy, before inputting into the neural network, use the corresponding face feature points and face correction algorithm to correct the image to be detected, and input the eye image in the image to be detected after correction processing to In the neural network, the eye state score output by the neural network can be obtained.
进一步的,由于眼部容易受到头发等物体的遮挡,因此在所述目标动作为睁闭眼时,所述检测值还可以包括用于描述眼部遮挡情况的眼部遮挡分数(第一检测值),其可以由所述眼部特征点的识别成功数量和眼部标准识别数量进行确定,比如眼部标准识别数量为10个,成功识别数量为8个,则可以确定未被成功识别的眼部特征点为2个,对应的所述眼部遮挡分数为0.2;或者,还可以由所述神经网络输出得到,比如将眼部被遮挡的眼部图像输入至所述神经网络中,即可得到输出的眼部遮挡分数为0.1。Further, since the eyes are easily blocked by objects such as hair, when the target action is opening and closing the eyes, the detection value may also include an eye occlusion score (the first detection value ), which can be determined by the number of successful recognitions of the eye feature points and the number of eye standard recognitions. For example, if the number of eye standard recognitions is 10 and the number of successful recognitions is 8, it can be determined that the eyes that have not been successfully recognized There are 2 facial feature points, and the corresponding eye occlusion score is 0.2; or, it can also be obtained from the output of the neural network, such as inputting the eye image with the occluded eyes into the neural network, then The resulting output eye occlusion score is 0.1.
S103:基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果。S103: Obtain a living body detection result based on the detection scheme matched with the target action and the detection value.
一种可能的实施方式中,在基于与所述目标动作匹配的检测方案对所述检测值进行检测,得到活体检测结果时,可以基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果。In a possible implementation manner, when the detection value is detected based on a detection scheme that matches the target action to obtain a living body detection result, it may be based on a detection threshold corresponding to the target action and a detection threshold that matches the target action. The detection scheme is used to detect the detection values of the multiple frames of images to be detected to obtain a living body detection result.
这里,所述检测阈值为针对目标动作设置的阈值,根据目标动作的不同,相应的检测 阈值也不同。Here, the detection threshold is the threshold set for the target action, and the corresponding detection threshold is different according to the target action.
具体的,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测时,根据目标动作的不同,可以分为以下几种情况:Specifically, when detecting the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, according to different target actions, it can be divided into the following types: Cases:
情况1、目标动作为点头或摇头。 Case 1. The target action is nodding or shaking the head.
在这种情况下,所述检测值包括头部偏移角度;所述检测阈值包括正向偏移阈值、负向偏移阈值、图像帧数阈值。In this case, the detection value includes a head offset angle; the detection threshold includes a positive offset threshold, a negative offset threshold, and an image frame number threshold.
一种可能的实施方式中,如图3所示,可以通过以下步骤确定活体检测结果:In a possible implementation manner, as shown in FIG. 3, the living body detection result may be determined through the following steps:
S301:确定头部偏移角度大于所述正向偏移阈值的第一目标检测图像,以及小于所述负向偏移阈值的第二目标检测图像。S301: Determine a first target detection image whose head deviation angle is greater than the positive deviation threshold, and a second target detection image whose head deviation angle is smaller than the negative deviation threshold.
示例性的,以头部向右偏移为正向偏移,所述正向偏移阈值为15°,待检测图像1至5分别对应的偏移角度为向右偏移12°、16°、18°、16°、12°为例,可以确定待检测图像2、3、4为所述第一目标检测图像。Exemplarily, the rightward offset of the head is taken as the positive offset, the positive offset threshold is 15°, and the offset angles corresponding to the images 1 to 5 to be detected are 12° and 16° to the right , 18°, 16°, and 12° as examples, the images to be detected 2, 3, and 4 may be determined as the first target detection images.
承接上例,仍以头部向右偏移为正向偏移,所述负向偏移阈值为负15°,待检测图像6至10分别对应的偏移角度为向右偏移负12°(向右偏移负12°,即为向左偏移12°,后同)、负16°、负18°、负16°、负12°为例,可以确定待检测图像7、8、9为所述第二目标检测图像。Carrying on from the above example, the rightward offset of the head is still regarded as a positive offset, the negative offset threshold is negative 15°, and the offset angles corresponding to images 6 to 10 to be detected are rightward offset negative 12° (A negative 12° offset to the right means a 12° left offset, the same below), negative 16°, negative 18°, negative 16°, and negative 12° are examples, and images 7, 8, and 9 to be detected can be determined An image is detected for the second object.
S302:在所述第一目标检测图像的数量超过第一图像帧数阈值,且所述第二目标检测图像的数量超过第二图像帧数阈值的情况下,确定活体检测通过。S302: When the number of the first object detection images exceeds the first image frame number threshold and the number of the second object detection images exceeds the second image frame number threshold, determine that the living body detection is passed.
本公开实施例中,第一图像帧数阈值和第二图像帧数阈值可以相同,第一图像帧数阈值和第二图像帧数阈值也可以不同。In the embodiment of the present disclosure, the first image frame number threshold and the second image frame number threshold may be the same, and the first image frame number threshold and the second image frame number threshold may also be different.
例如,第一图像帧数阈值和第二图像帧数阈值相同(比如3),此时当检测所述第一目标检测图像的数量和所述第二目标检测图像的数量均大于3时,即可确定活体检测通过。For example, the first image frame number threshold is the same as the second image frame number threshold (such as 3), and at this time, when the number of the first target detection images and the second target detection images are detected to be greater than 3, that is It can be determined that the living body test is passed.
又例如,第一图像帧数阈值和第二图像帧数阈值不同,具体的可以针对第一目标检测图像的数量设置第一图像帧数阈值为3,针对第二目标检测图像的数量设置第二图像帧数阈值为4。此时,在第一目标检测图像的数量超过3,且第二目标检测图像的数量超过4的情况下,确定活体检测通过。For another example, the first image frame number threshold is different from the second image frame number threshold. Specifically, the first image frame number threshold can be set to 3 for the number of the first target detection images, and the second image frame number threshold can be set for the second target detection images. The image frame number threshold is 4. At this time, in a case where the number of first object detection images exceeds three and the number of second object detection images exceeds four, it is determined that the living body detection is passed.
情况2、目标动作为张闭嘴。Case 2. The target action is to open and close the mouth.
在这种情况下,所述检测阈值包括张嘴阈值、闭嘴阈值、张嘴帧数阈值。In this case, the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold.
一种可能的实施方式中,如图4所示,还可以通过以下步骤确定活体检测结果:In a possible implementation, as shown in Figure 4, the living body detection result can also be determined through the following steps:
S401:确定检测值为所述闭嘴阈值的多帧第一待检测图像。S401: Determine multiple frames of first images to be detected whose detection values are the mouth shutting threshold.
这里,以所述检测值为所述嘴部状态分数为例,得到的多帧待检测图像的嘴部状态分数可以如下表1所示:Here, taking the detected value as the mouth state score as an example, the obtained mouth state scores of multiple frames of images to be detected can be shown in Table 1 below:
表1Table 1
帧数number of frames 分数Fraction 帧数number of frames 分数Fraction 帧数number of frames 分数Fraction 帧数number of frames 分数Fraction
11 0.50.5 99 0.950.95 1717 0.50.5 2525 0.80.8
22 0.550.55 1010 0.980.98 1818 0.60.6 2626 0.960.96
33 0.610.61 1111 0.950.95 1919 0.70.7  the  the
44 0.680.68 1212 0.80.8 2020 0.80.8  the  the
55 0.750.75 1313 0.70.7 21twenty one 0.950.95  the  the
66 0.80.8 1414 0.60.6 22twenty two 0.980.98  the  the
77 0.90.9 1515 0.50.5 23twenty three 0.80.8  the  the
88 0.940.94 1616 0.40.4 24twenty four 0.70.7  the  the
表1中,第1、3、5、7列分别表示待检测图像在待检测视频中的帧数,第2、4、6、8列则分别表示与第1、3、5、7列对应的嘴部状态分数。In Table 1, columns 1, 3, 5, and 7 represent the number of frames of the image to be detected in the video to be detected, and columns 2, 4, 6, and 8 represent those corresponding to columns 1, 3, 5, and 7, respectively. Mouth status score for .
示例性的,以所述闭嘴阈值为0.8为例,确定第一待检测图像的示意图可以如图5所示,图5中,确定的检测分数等于闭嘴阈值的多帧第一待检测图像依次为第6帧(图5中O点)、第12帧(图5中A点)、第20帧(图5中C点)、第23帧(图5中D点)、第25帧(图5中F点)。Exemplarily, taking the shut-up threshold as 0.8 as an example, the schematic diagram of determining the first image to be detected may be shown in FIG. 5. In FIG. Frame 6 (point O in Fig. 5), frame 12 (point A in Fig. 5), frame 20 (point C in Fig. 5), frame 23 (point D in Fig. 5), frame 25 (point D in Fig. point F in Figure 5).
具体的,确定所述多帧第一待检测图像,即为确定图5(表示待检测图像与嘴部状态分数的对应关系图)中折线与直线Y=0.8(闭嘴阈值)的交点对应的视频帧,若交点对应的横坐标位于两帧之间,则可以将最接近交点的视频帧作为所述第一待检测图像。Specifically, determining the multiple frames of the first image to be detected is to determine the intersection point corresponding to the broken line and the straight line Y=0.8 (closed mouth threshold) in Figure 5 (representing the corresponding relationship between the image to be detected and the mouth state score). For video frames, if the abscissa corresponding to the intersection point is located between two frames, the video frame closest to the intersection point may be used as the first image to be detected.
S402:确定所述多帧第一待检测图像中,每两帧相邻的第一待检测图像之间的第二待检测图像。S402: Determine a second image to be detected between every two adjacent frames of the first image to be detected among the multiple frames of the first image to be detected.
一种可能的实施方式中,在确定所述第二待检测图像时,可以确定所述多帧第一待检测图像中,满足第二预设条件的两帧相邻的第一待检测图像之间的第二待检测图像;In a possible implementation manner, when determining the second image to be detected, it may be determined that among the multiple frames of the first image to be detected, the number of adjacent frames of the first image to be detected that satisfies the second preset condition is The second image to be detected between;
其中,所述第二预设条件包括:相邻的第一待检测图像之间的待检测图像的数量大于所述张嘴帧数阈值;相邻的第一待检测图像之间的待检测图像的检测值最值满足所述张嘴阈值对应的筛选条件。Wherein, the second preset condition includes: the number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the number of images to be detected between adjacent first images to be detected The maximum detection value satisfies the filter condition corresponding to the mouth opening threshold.
这里,两帧相邻的所述第一待检测图像表示在确定的多帧第一待检测图像中的先后顺序相邻,以由左到右确定第一待检测图像为例,图5中的第一帧确定的第一待检测图像O点,和第二帧确定的第二待检测图像A点即为相邻的第一待检测图像;所述检测值最值满足所述张嘴阈值对应的筛选条件,可以是所述嘴部状态分数的最小值小于所述张嘴阈值。Here, the first images to be detected that are adjacent to each other in two frames indicate that they are sequentially adjacent in the determined multiple frames of the first images to be detected. Taking the determination of the first image to be detected from left to right as an example, the The first image to be detected O point determined by the first frame, and the second image to be detected A point determined by the second frame are the adjacent first image to be detected; the maximum value of the detection value satisfies the corresponding threshold of the mouth opening The filtering condition may be that the minimum value of the mouth state score is less than the mouth opening threshold.
承接上例,图5中O至A之间共有5帧待检测图像,A至C之间共有7帧待检测图像,C至D之间共有2帧待检测图像,D至F之间共有1帧待检测图像,若所述张嘴帧数阈值为3帧,则可以确定C至D与D至F不符合所述第二预设条件,若所述张嘴阈值为0.6,由于A至C之间的最小值B对应的嘴部状态分数为0.4,小于所述张嘴阈值0.6,则可以确定A至C之间的7帧待检测图像为所述第二待检测图像。Following the above example, there are 5 frames of images to be detected between O and A in Figure 5, 7 frames of images to be detected between A and C, 2 frames of images to be detected between C and D, and 1 frame between D and F Frames of images to be detected, if the mouth opening frame number threshold is 3 frames, it can be determined that C to D and D to F do not meet the second preset condition, if the mouth opening threshold is 0.6, due to the The mouth state score corresponding to the minimum value B of is 0.4, which is less than the mouth opening threshold of 0.6, then the 7 frames of images to be detected between A and C can be determined as the second images to be detected.
S403:在检测到所述第二待检测图像满足第一预设条件的情况下,确定通过活体检测。S403: When it is detected that the second image to be detected satisfies the first preset condition, determine that the living body detection is passed.
其中,所述第一预设条件可以是:Wherein, the first preset condition may be:
条件1、所述第二待检测图像中,对应的检测值为所述张嘴阈值的第三待检测图像的数量为第一预设值。 Condition 1. Among the second images to be detected, the number of third images to be detected whose corresponding detection value is the mouth opening threshold is a first preset value.
这里,所述第三待检测图像在判断时的过程与上述第一待检测图像在判断时的过程类似,即为确定图5中第二待检测图像中与直线Y=0.6(张嘴阈值)的交点的横坐标,所述第一预设值可以2,表示正常人在张闭嘴时,张嘴过程中为所述第三待检测图像的数量为1,闭嘴过程中为所述第三待检测图像的数量也为1。Here, the process of judging the third image to be detected is similar to the process of judging the first image to be detected above, that is, to determine the line Y=0.6 (mouth opening threshold) in the second image to be detected in FIG. The abscissa of the intersection point, the first preset value can be 2, which means that when a normal person opens and closes his mouth, the number of the third image to be detected is 1 during the mouth opening process, and the number of the third image to be detected is 1 during the closing process. The number of detected images is also 1.
承接上例,A至C中,A至B表示张嘴过程,B至C表示闭嘴过程,张嘴过程和闭嘴过 程中分别与直线Y=0.6相交一次,则满足所述条件1。Continuing the above example, among A to C, A to B represent the mouth opening process, B to C represent the mouth closing process, and the mouth opening process and the mouth closing process respectively intersect with the straight line Y=0.6 once, then the above condition 1 is satisfied.
条件2、所述多帧第三待检测图像中,相邻两帧第三待检测图像之间的第二待检测图像的数量大于所述张嘴帧数阈值。Condition 2: Among the multiple frames of the third images to be detected, the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of frames of mouth opening.
示例性的,以所述张嘴帧数阈值为2帧为例,A至C之间位于相邻两帧第三待检测图像之间的第二待检测图像为第15帧、第16帧、第17帧,数量为3帧,大于所述张嘴帧数阈值,则满足所述条件2。Exemplarily, taking the mouth opening frame number threshold as 2 frames as an example, the second image to be detected between A to C between two adjacent frames of the third image to be detected is the 15th frame, the 16th frame, the 16th frame 17 frames, the number of which is 3 frames, which is greater than the mouth opening frame number threshold, then the condition 2 is met.
条件3、相邻两帧第三待检测图像之间的多帧第二待检测图像中,任意两帧第二待检测图像的检测值之间的差值小于第二预设值。Condition 3: Among multiple frames of the second images to be detected between two adjacent frames of the third images to be detected, the difference between the detection values of any two frames of the second images to be detected is smaller than a second preset value.
这里,由于用户在进行张闭嘴时,速度是有限的,不可能在极短的时间内完成张嘴和闭嘴的动作,表现在待检测图像中即为相邻两帧待检测图像的检测值之间的差值不会超过一个最大值,针对这一特性,可以设置这一判断条件,从而可以提高活体检测的安全性。Here, since the speed of the user opening and closing the mouth is limited, it is impossible to complete the actions of opening and closing the mouth in a very short time, which is reflected in the detection value of the two adjacent frames of the image to be detected in the image to be detected The difference between will not exceed a maximum value, and for this feature, this judgment condition can be set, so as to improve the security of liveness detection.
承接上例,若所述第二预设值为0.15,由于第15帧和第16帧之间的嘴部状态分数差值为0.1,第16帧和第17帧之间的嘴部状态分数差值也为0.1,均小于所述第二预设值0.15,则满足所述条件3。Following the above example, if the second preset value is 0.15, since the mouth state score difference between the 15th frame and the 16th frame is 0.1, the mouth state score difference between the 16th frame and the 17th frame The value is also 0.1, both of which are smaller than the second preset value 0.15, then the condition 3 is met.
需要说明的是,在判断所述多帧第二待检测图像是否满足第一预设条件时,可以通过上述条件中的任意一种或几种。比如需要同时满足条件1和条件2或者同时满足条件1、条件2、条件3,不同的应用场景中也可以采用不同的方案,本公开实施例对此不做限定。It should be noted that, when judging whether the multiple frames of second images to be detected satisfy the first preset condition, any one or several of the above conditions may be passed. For example, condition 1 and condition 2 need to be satisfied at the same time, or condition 1, condition 2, and condition 3 must be satisfied at the same time. Different solutions may also be adopted in different application scenarios, which is not limited in this embodiment of the present disclosure.
情况3、目标动作为睁闭眼。Case 3. The target action is to open and close the eyes.
在这种情况下,所述检测阈值包括睁眼阈值、闭眼阈值、睁眼帧数阈值、眼部遮挡阈值。In this case, the detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold.
实际应用中,由于人的眼睛有两只,导致了同一张待检测图像中会有两个对应的眼部状态分数,以及两个对应的眼部遮挡分数,此时可以选择分别对左眼和右眼分别进行活体检测,或者也可以从左眼和右眼分别对应的眼部状态分数中,确定用于进行活体检测的目标眼部状态分数。In practical applications, since there are two eyes, there will be two corresponding eye state scores and two corresponding eye occlusion scores in the same image to be detected. Liveness detection is performed for the right eyes, or target eye state scores for liveness detection may also be determined from eye state scores corresponding to the left eye and the right eye.
示例性的,以所述眼部状态分数与所述嘴部状态分数相似,为睁眼幅度越大,对应的眼部状态分数越小为例,在确定所述目标眼部状态分数时,针对任一帧待检测图像,可以确定所述待检测图像的双眼分别对应的眼部状态分数中,分数较大的眼部状态分数为该帧图像对应的所述目标眼部状态分数,也即取双眼中睁眼幅度较小的眼睛对应的眼部状态分数进行活体检测。Exemplarily, taking the eye state score similar to the mouth state score, the larger the eye opening range, the smaller the corresponding eye state score as an example, when determining the target eye state score, for For any frame of the image to be detected, it can be determined that among the eye state scores corresponding to the two eyes of the image to be detected, the eye state score with a larger score is the target eye state score corresponding to the frame image, that is, take The eye state score corresponding to the eye with the smaller eye opening range in the two eyes is used for liveness detection.
一种可能的实施方式中,如图6所示,还可以通过以下步骤确定活体检测结果:In a possible implementation manner, as shown in FIG. 6, the living body detection result may also be determined through the following steps:
S601:基于所述睁眼阈值、闭眼阈值、以及所述多帧待检测图像的第二检测值,确定满足第三预设条件的第四待检测图像。S601: Based on the eye-opening threshold, the eye-closing threshold, and the second detection values of the multiple frames of images to be detected, determine a fourth image to be detected that satisfies a third preset condition.
这里,与上述步骤S401和S402类似,可以先确定所述第二检测值为闭眼阈值的多帧第五待检测图像,然后确定多帧第五待检测图像中,每两帧相邻的第五待检测图像之间满足所述第三预设条件的第四待检测图像。Here, similar to the above-mentioned steps S401 and S402, it is possible to first determine the fifth frame of the fifth image to be detected whose second detection value is the eye-closing threshold, and then determine the fifth frame of the fifth image to be detected in the multiple frames of the fifth image to be detected, every two adjacent frames A fourth image to be detected that satisfies the third preset condition among the five images to be detected.
其中,所述第三预设条件可以是以下条件中的至少一项:Wherein, the third preset condition may be at least one of the following conditions:
条件①、所述第五待检测图像中,对应的检测值为所述睁眼阈值的第第四待检测图像的数量为第三预设值。 Condition ①. Among the fifth images to be detected, the number of fourth images to be detected whose corresponding detection value is the eye-opening threshold is a third preset value.
条件②、所述多帧第五待检测图像中,相邻两帧第五待检测图像之间的第四待检测图像的数量大于所述睁眼帧数阈值。Condition ②: Among the multiple frames of fifth images to be detected, the number of fourth images to be detected between two adjacent frames of fifth images to be detected is greater than the threshold of open-eye frames.
条件③、相邻两帧第五待检测图像之间的第四待检测图像中,任意两帧第四待检测图像的第二检测值之间的差值小于第四预设值。Condition ③. In the fourth image to be detected between two adjacent frames of the fifth image to be detected, the difference between the second detection values of any two frames of the fourth image to be detected is smaller than the fourth preset value.
上述条件①至条件③的相关描述,参见上述S403中的所述条件1至条件3的详细内容,在此不再赘述。For the relevant descriptions of the above conditions ① to ③, refer to the detailed content of the conditions 1 to 3 in the above S403, which will not be repeated here.
S602:确定对应的第一检测值小于所述眼部遮挡阈值的第四待检测图像的目标数量。S602: Determine a target number of fourth to-be-detected images whose corresponding first detection value is smaller than the eye occlusion threshold.
S603:在所述目标数量超过所述睁眼帧数阈值的情况下,确定通过活体检测。S603: When the number of targets exceeds the eye-opening frame number threshold, determine that the living body detection is passed.
具体的,在确定所述第四待检测图像的目标数量时,可以是在确定满足所述第三预设值的第四检测值之后进行确定;或者,也可以是在得到所述眼部遮挡分数之后,直接将所述眼部遮挡分数小于所述眼部遮挡阈值的待检测图像进行删除,使得后续进行判断时,不需要对这部分删除的待检测图像进行判断。Specifically, when determining the number of targets of the fourth image to be detected, it may be determined after determining the fourth detection value that satisfies the third preset value; or, it may also be determined after obtaining the eye occlusion After scoring the score, the images to be detected whose eye occlusion scores are less than the eye occlusion threshold are directly deleted, so that when subsequent judgments are made, it is not necessary to judge these deleted images to be detected.
一种可能的实施方式中,若在预设时长内未完成活体检测,则可以确定对应的活体检测结果为不通过。In a possible implementation manner, if the living body detection is not completed within the preset time period, it may be determined that the corresponding living body detection result is failed.
示例性的,以所述预设时长为10秒,目标动作为张闭嘴为例,用户10秒内未完成活体检测可以是用户未执行目标动作(未进行张闭嘴),或者对应的检测值不符合相应的检测阈值,此时可以确定当前的活体检测结果不通过。Exemplarily, taking the preset duration as 10 seconds and the target action as opening and closing the mouth as an example, if the user fails to complete the liveness detection within 10 seconds, it may be that the user has not performed the target action (opening and closing the mouth), or the corresponding detection If the value does not meet the corresponding detection threshold, it can be determined that the current living body detection result fails.
进一步的,在确定活体检测结果不通过的情况下,还可以向用户发送提示信息,提示未通过活体检测的原因,比如未检测到人脸、动作不规范等。Further, when it is determined that the result of the liveness detection fails, a prompt message may also be sent to the user, prompting the reasons for failing the liveness test, such as no human face detected, irregular movements, and the like.
本公开实施例提供的活体检测方法,响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;这样,通过确定与所述目标动作对应的检测值,可以对各帧待检测图像中目标动作的完成情况进行量化,从而便于后续对检测值进行检测及量化分析;基于与所述目标动作匹配的检测方案对所述检测值进行检测,得到活体检测结果,这样,通过对多帧待检测图像的检测值进行检测,可以减少单帧图像对于检测结果的影响,使得活体检测的准确率更高。The living body detection method provided by the embodiments of the present disclosure responds to the living body detection request and acquires multiple frames of images to be detected corresponding to the target action, wherein the target action is an action instructed by the user when performing live body detection; based on the frames The feature point position information in the image to be detected that matches the target action determines the detection values corresponding to each frame of the image to be detected to indicate the completion of the target action; in this way, by determining the detection value corresponding to the target action value, which can quantify the completion of the target action in each frame of the image to be detected, so as to facilitate the subsequent detection and quantitative analysis of the detection value; the detection value is detected based on the detection scheme that matches the target action, and the living body In this way, by detecting the detection values of multiple frames of images to be detected, the influence of a single frame image on the detection result can be reduced, so that the accuracy of living body detection is higher.
本领域技术人员可以理解,在具体实施方式的上述方法中,各步骤的撰写顺序并不意味着严格的执行顺序而对实施过程构成任何限定,各步骤的具体执行顺序应当以其功能和可能的内在逻辑确定。Those skilled in the art can understand that in the above method of specific implementation, the writing order of each step does not mean a strict execution order and constitutes any limitation on the implementation process. The specific execution order of each step should be based on its function and possible The inner logic is OK.
基于同一发明构思,本公开实施例中还提供了与活体检测方法对应的活体检测装置,由于本公开实施例中的装置解决问题的原理与本公开实施例上述活体检测方法相似,因此装置的实施可以参见方法的实施,重复之处不再赘述。Based on the same inventive concept, the embodiment of the present disclosure also provides a living body detection device corresponding to the living body detection method. Since the problem-solving principle of the device in the embodiment of the present disclosure is similar to the above-mentioned living body detection method in the embodiment of the present disclosure, the implementation of the device Reference can be made to the implementation of the method, and repeated descriptions will not be repeated.
参照图7所示,为本公开实施例提供的一种活体检测装置的架构示意图,所述装置包括:获取模块701、确定模块702、检测模块703;其中,Referring to FIG. 7 , it is a schematic structural diagram of a living body detection device provided by an embodiment of the present disclosure, the device includes: an acquisition module 701, a determination module 702, and a detection module 703; wherein,
获取模块701,用于响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;The acquiring module 701 is configured to respond to a living body detection request, and acquire multiple frames of images to be detected corresponding to a target action, wherein the target action is an action instructed by a user during live body detection;
确定模块702,用于基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信 息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;Determining module 702, for determining the detection value corresponding to each frame of the image to be detected for indicating the completion of the target action based on the feature point position information matched with the target action in each frame of the image to be detected;
检测模块703,用于基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果。The detection module 703 is configured to obtain a living body detection result based on the detection scheme matched with the target action and the detection value.
一种可能的实施方式中,所述检测模块703,在基于与所述目标动作匹配的检测方案对所述检测值进行检测,得到活体检测结果时,用于:In a possible implementation manner, the detection module 703 is configured to:
基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果。Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result.
一种可能的实施方式中,在所述目标动作为点头或摇头的情况下,所述检测值包括头部偏移角度;所述检测阈值包括正向偏移阈值、负向偏移阈值、图像帧数阈值;In a possible implementation manner, when the target action is nodding or shaking the head, the detection value includes a head deviation angle; the detection threshold includes a positive deviation threshold, a negative deviation threshold, an image frame number threshold;
所述检测模块703,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果时,用于:The detection module 703, when detecting the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtaining a living body detection result, is used to:
确定头部偏移角度大于所述正向偏移阈值的第一目标检测图像,以及小于所述负向偏移阈值的第二目标检测图像;determining a first object detection image with a head offset angle greater than the positive offset threshold, and a second object detection image with a head offset angle smaller than the negative offset threshold;
在所述第一目标检测图像的数量超过第一图像帧数阈值,且所述第二目标检测图像的数量超过第二图像帧数阈值的情况下,确定活体检测通过。If the number of the first target detection images exceeds the first image frame number threshold and the second target detection image number exceeds the second image frame number threshold, it is determined that the living body detection is passed.
一种可能的实施方式中,在所述目标动作为张闭嘴的情况下,与所述目标动作匹配的特征点包括嘴部特征点;In a possible implementation manner, when the target action is opening and closing the mouth, the feature points matching the target action include mouth feature points;
所述确定模块702,在基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值时,用于:The determining module 702, when determining the detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected , for:
基于嘴部特征点位置信息,确定表征嘴部中央位置处张开幅度的第一嘴部距离和表征嘴角位置处张开幅度的第二嘴部距离;Based on the mouth feature point position information, determine a first mouth distance representing the opening amplitude at the central position of the mouth and a second mouth distance representing the opening amplitude at the corner position of the mouth;
基于所述第一嘴部距离和第二嘴部距离,确定所述检测值。The detection value is determined based on the first mouth distance and the second mouth distance.
一种可能的实施方式中,所述检测阈值包括张嘴阈值、闭嘴阈值、张嘴帧数阈值;In a possible implementation manner, the detection threshold includes a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold;
所述检测模块703,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果时,用于:The detection module 703, when detecting the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtaining a living body detection result, is used to:
确定检测值为所述闭嘴阈值的多帧第一待检测图像;Determine the multi-frame first image to be detected whose detection value is the shut-up threshold;
确定所述多帧第一待检测图像中,每两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between every two adjacent frames of the first image to be detected among the multiple frames of the first image to be detected;
在检测到所述第二待检测图像满足第一预设条件的情况下,确定通过活体检测。If it is detected that the second image to be detected satisfies the first preset condition, it is determined that the living body detection is passed.
一种可能的实施方式中,所述第一预设条件包括:In a possible implementation manner, the first preset condition includes:
所述二待检测图像中,对应的检测值为所述张嘴阈值的第三待检测图像的数量为第一预设值;Among the two images to be detected, the number of the third images to be detected whose corresponding detection value is the mouth opening threshold is the first preset value;
所述多帧第三待检测图像中,相邻两帧第三待检测图像之间的第二待检测图像的数量大于所述张嘴帧数阈值。In the plurality of frames of the third images to be detected, the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of mouth opening frames.
一种可能的实施方式中,所述第一预设条件还包括:In a possible implementation manner, the first preset condition further includes:
相邻两帧第三待检测图像之间的多帧第二待检测图像中,任意两帧第二待检测图像的检测值之间的差值小于第二预设值。Among the multiple frames of the second images to be detected between two adjacent frames of the third images to be detected, the difference between the detected values of any two frames of the second images to be detected is smaller than a second preset value.
一种可能的实施方式中,所述检测模块703,在确定所述多帧第一待检测图像中,每 两帧相邻的第一待检测图像之间的第二待检测图像时,用于:In a possible implementation manner, the detection module 703, when determining the second image to be detected between every two adjacent frames of the first image to be detected in the multiple frames of the first image to be detected, :
确定所述多帧第一待检测图像中,满足第二预设条件的两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between two frames of adjacent first images to be detected that meet a second preset condition among the multiple frames of the first image to be detected;
其中,所述第二预设条件包括:Wherein, the second preset condition includes:
相邻的第一待检测图像之间的待检测图像的数量大于所述张嘴帧数阈值;相邻的第一待检测图像之间的待检测图像的检测值最值满足所述张嘴阈值对应的筛选条件。The number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the maximum detection value of the images to be detected between adjacent first images to be detected meets the threshold corresponding to the mouth opening filter criteria.
一种可能的实施方式中,在所述目标动作为睁闭眼的情况下,所述确定模块702,在基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值时,用于:In a possible implementation manner, when the target action is opening and closing eyes, the determination module 702 determines, based on the feature point position information matching the target action in each frame of the image to be detected When each frame of the image to be detected corresponds to the detection value used to indicate the completion of the target action, it is used for:
针对多帧待检测图像中的每帧待检测图像,基于所述待检测图像的特征点位置信息,对所述待检测图像进行矫正处理;For each frame of the image to be detected in the multiple frames of the image to be detected, based on the feature point position information of the image to be detected, the image to be detected is corrected;
将矫正处理后的所述待检测图像输入至预先训练好的神经网络,确定所述待检测图像对应的检测值。The rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
一种可能的实施方式中,所述检测值包括用于描述眼部遮挡情况的第一检测值,以及用于描述睁闭眼完成情况的第二检测值;In a possible implementation manner, the detection value includes a first detection value used to describe the situation of eye occlusion, and a second detection value used to describe the completion of eye opening and closing;
所述检测阈值包括睁眼阈值、闭眼阈值、睁眼帧数阈值、眼部遮挡阈值;The detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold;
所述检测模块703,在基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果时,用于:The detection module 703, when detecting the detection values of the multiple frames of images to be detected based on the detection threshold corresponding to the target action and the detection scheme matching the target action, and obtaining a living body detection result, is used to:
基于所述睁眼阈值、闭眼阈值、以及所述多帧待检测图像的第二检测值,确定满足第三预设条件的第四待检测图像;determining a fourth image to be detected that satisfies a third preset condition based on the eye-opening threshold, the eye-closing threshold, and the second detection values of the multiple frames of images to be detected;
确定对应的第一检测值小于所述眼部遮挡阈值的第四待检测图像的目标数量;determining the target quantity of the fourth image to be detected whose corresponding first detection value is less than the eye occlusion threshold;
在所述目标数量超过所述睁眼帧数阈值的情况下,确定通过活体检测。When the number of targets exceeds the eye-opening frame number threshold, it is determined that the living body detection is passed.
本公开实施例提供的活体检测装置,响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;这样,通过确定与所述目标动作对应的检测值,可以对各帧待检测图像中目标动作的完成情况进行量化,从而便于后续对检测值进行检测及量化分析;基于与所述目标动作匹配的检测方案对所述检测值进行检测,得到活体检测结果,这样,通过对多帧待检测图像的检测值进行检测,可以减少单帧图像对于检测结果的影响,使得活体检测的准确率更高。The living body detection device provided by the embodiments of the present disclosure responds to the living body detection request and acquires multiple frames of images to be detected corresponding to the target action, wherein the target action is an action instructed by the user when performing live body detection; based on the frames The feature point position information in the image to be detected that matches the target action determines the detection values corresponding to each frame of the image to be detected to indicate the completion of the target action; in this way, by determining the detection value corresponding to the target action value, which can quantify the completion of the target action in each frame of the image to be detected, so as to facilitate the subsequent detection and quantitative analysis of the detection value; the detection value is detected based on the detection scheme that matches the target action, and the living body In this way, by detecting the detection values of multiple frames of images to be detected, the influence of a single frame image on the detection result can be reduced, so that the accuracy of living body detection is higher.
关于装置中的各模块的处理流程、以及各模块之间的交互流程的描述可以参照上述方法实施例中的相关说明,这里不再详述。For the description of the processing flow of each module in the device and the interaction flow between the modules, reference may be made to the relevant description in the above method embodiment, and details will not be described here.
基于同一技术构思,本公开实施例还提供了一种计算机设备。参照图8所示,为本公开实施例提供的计算机设备800的结构示意图,包括处理器801、存储器802、和总线803。其中,存储器802用于存储执行指令,包括内存8021和外部存储器8022;这里的内存8021也称内存储器,用于暂时存放处理器801中的运算数据,以及与硬盘等外部存储器8022交换的数据,处理器801通过内存8021与外部存储器8022进行数据交换,当计算机设备800 运行时,处理器801与存储器802之间通过总线803通信,使得处理器801在执行以下指令:Based on the same technical idea, the embodiment of the present disclosure also provides a computer device. Referring to FIG. 8 , it is a schematic structural diagram of a computer device 800 provided by an embodiment of the present disclosure, including a processor 801 , a memory 802 , and a bus 803 . Among them, the memory 802 is used to store execution instructions, including a memory 8021 and an external memory 8022; the memory 8021 here is also called an internal memory, and is used to temporarily store calculation data in the processor 801 and exchange data with an external memory 8022 such as a hard disk. The processor 801 exchanges data with the external memory 8022 through the memory 8021. When the computer device 800 is running, the processor 801 communicates with the memory 802 through the bus 803, so that the processor 801 executes the following instructions:
响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;Responding to the liveness detection request, acquiring multiple frames of images to be detected corresponding to the target action, wherein the target action is an action instructed by the user during liveness detection;
基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;Based on the feature point position information matching the target action in each frame of the image to be detected, determine detection values corresponding to each frame of the image to be detected for indicating the completion of the target action;
基于与所述目标动作匹配的检测方案对所述检测值进行检测,得到活体检测结果。The detection value is detected based on a detection scheme matched with the target action to obtain a living body detection result.
本公开实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的活体检测方法的步骤。其中,该存储介质可以是易失性或非易失的计算机可读取存储介质。Embodiments of the present disclosure also provide a computer-readable storage medium, on which a computer program is stored. When the computer program is run by a processor, the steps of the living body detection method described in the foregoing method embodiments are executed. Wherein, the storage medium may be a volatile or non-volatile computer-readable storage medium.
本公开实施例还提供一种计算机程序产品,该计算机程序产品承载有程序代码,所述程序代码包括的指令可用于执行上述方法实施例中所述的活体检测方法的步骤,具体可参见上述方法实施例,在此不再赘述。The embodiment of the present disclosure also provides a computer program product, the computer program product carries a program code, and the instructions included in the program code can be used to execute the steps of the living body detection method described in the above method embodiment, for details, please refer to the above method The embodiment will not be repeated here.
其中,上述计算机程序产品可以具体通过硬件、软件或其结合的方式实现。在一个可选实施例中,所述计算机程序产品具体体现为计算机存储介质,在另一个可选实施例中,计算机程序产品具体体现为软件产品,例如软件开发包(Software Development Kit,SDK)等等。Wherein, the above-mentioned computer program product may be specifically implemented by means of hardware, software or a combination thereof. In an optional embodiment, the computer program product is embodied as a computer storage medium, and in another optional embodiment, the computer program product is embodied as a software product, such as a software development kit (Software Development Kit, SDK) etc. wait.
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统和装置的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。在本公开所提供的几个实施例中,应该理解到,所揭露的系统、装置和方法,可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,又例如,多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些通信接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working process of the above-described system and device can refer to the corresponding process in the foregoing method embodiments, which will not be repeated here. In the several embodiments provided in the present disclosure, it should be understood that the disclosed systems, devices and methods may be implemented in other ways. The device embodiments described above are only illustrative. For example, the division of the units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or May be integrated into another system, or some features may be ignored, or not implemented. In another point, the mutual coupling or direct coupling or communication connection shown or discussed may be through some communication interfaces, and the indirect coupling or communication connection of devices or units may be in electrical, mechanical or other forms.
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Part or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
另外,在本公开各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。In addition, each functional unit in each embodiment of the present disclosure may be integrated into one processing unit, each unit may exist separately physically, or two or more units may be integrated into one unit.
所述功能如果以软件功能单元的形式实现并作为独立的产品销售或使用时,可以存储在一个处理器可执行的非易失的计算机可读取存储介质中。基于这样的理解,本公开的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本公开各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。If the functions are realized in the form of software function units and sold or used as independent products, they can be stored in a non-volatile computer-readable storage medium executable by a processor. Based on this understanding, the technical solution of the present disclosure is essentially or the part that contributes to the prior art or the part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including Several instructions are used to make a computer device (which may be a personal computer, a server, or a network device, etc.) execute all or part of the steps of the methods described in various embodiments of the present disclosure. The aforementioned storage media include: U disk, mobile hard disk, read-only memory (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disk or optical disc and other media that can store program codes. .
最后应说明的是:以上所述实施例,仅为本公开的具体实施方式,用以说明本公开的技术方案,而非对其限制,本公开的保护范围并不局限于此,尽管参照前述实施例对本公开进行了详细的说明,本领域的普通技术人员应当理解:任何熟悉本技术领域的技术人员在本公开揭露的技术范围内,其依然可以对前述实施例所记载的技术方案进行修改或可轻易想到变化,或者对其中部分技术特征进行等同替换;而这些修改、变化或者替换,并不使相应技术方案的本质脱离本公开实施例技术方案的精神和范围,都应涵盖在本公开的保护范围之内。因此,本公开的保护范围应所述以权利要求的保护范围为准。Finally, it should be noted that: the above-mentioned embodiments are only specific implementations of the present disclosure, and are used to illustrate the technical solutions of the present disclosure, rather than limit them, and the protection scope of the present disclosure is not limited thereto, although referring to the aforementioned The embodiments have described the present disclosure in detail, and those skilled in the art should understand that any person familiar with the technical field can still modify the technical solutions described in the foregoing embodiments within the technical scope disclosed in the present disclosure Changes can be easily imagined, or equivalent replacements can be made to some of the technical features; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present disclosure, and should be included in this disclosure. within the scope of protection. Therefore, the protection scope of the present disclosure should be defined by the protection scope of the claims.

Claims (13)

  1. 一种活体检测方法,其特征在于,包括:A living body detection method, characterized in that, comprising:
    响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;Responding to the liveness detection request, acquiring multiple frames of images to be detected corresponding to the target action, wherein the target action is an action instructed by the user during liveness detection;
    基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;Based on the feature point position information matching the target action in each frame of the image to be detected, determine detection values corresponding to each frame of the image to be detected for indicating the completion of the target action;
    基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果。Based on the detection scheme matched with the target action and the detection value, a living body detection result is obtained.
  2. 根据权利要求1所述的方法,其特征在于,所述基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果,包括:The method according to claim 1, characterized in that the obtaining the living body detection result based on the detection scheme matched with the target action and the detection value comprises:
    基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果。Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result.
  3. 根据权利要求2所述的方法,其特征在于,在所述目标动作为点头或摇头的情况下,所述检测值包括头部偏移角度;所述检测阈值包括正向偏移阈值、负向偏移阈值、图像帧数阈值;The method according to claim 2, wherein when the target action is nodding or shaking the head, the detection value includes a head deviation angle; the detection threshold includes a positive deviation threshold, a negative deviation Offset threshold, image frame number threshold;
    所述基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果,包括:Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
    确定头部偏移角度大于所述正向偏移阈值的第一目标检测图像,以及小于所述负向偏移阈值的第二目标检测图像;determining a first object detection image with a head offset angle greater than the positive offset threshold, and a second object detection image with a head offset angle smaller than the negative offset threshold;
    在所述第一目标检测图像的数量超过第一图像帧数阈值,且所述第二目标检测图像的数量超过第二图像帧数阈值的情况下,确定活体检测通过。If the number of the first target detection images exceeds the first image frame number threshold and the second target detection image number exceeds the second image frame number threshold, it is determined that the living body detection is passed.
  4. 根据权利要求1至3任一所述的方法,其特征在于,在所述目标动作为张闭嘴的情况下,与所述目标动作匹配的特征点包括嘴部特征点;The method according to any one of claims 1 to 3, wherein when the target action is opening and closing the mouth, the feature points matching the target action include mouth feature points;
    所述基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值,包括:The determining the detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected includes:
    基于嘴部特征点位置信息,确定表征嘴部中央位置处张开幅度的第一嘴部距离和表征嘴角位置处张开幅度的第二嘴部距离;Based on the mouth feature point position information, determine a first mouth distance representing the opening amplitude at the central position of the mouth and a second mouth distance representing the opening amplitude at the corner position of the mouth;
    基于所述第一嘴部距离和第二嘴部距离,确定所述检测值。The detection value is determined based on the first mouth distance and the second mouth distance.
  5. 根据权利要求2或3所述的方法,其特征在于,所述检测阈值包括张嘴阈值、闭嘴阈值、张嘴帧数阈值;The method according to claim 2 or 3, wherein the detection threshold comprises a mouth opening threshold, a mouth closing threshold, and a mouth opening frame number threshold;
    所述基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果,包括:Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
    确定检测值为所述闭嘴阈值的多帧第一待检测图像;Determine the multi-frame first image to be detected whose detection value is the shut-up threshold;
    确定所述多帧第一待检测图像中,每两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between every two adjacent frames of the first image to be detected among the multiple frames of the first image to be detected;
    在检测到所述第二待检测图像满足第一预设条件的情况下,确定通过活体检测。If it is detected that the second image to be detected satisfies the first preset condition, it is determined that the living body detection is passed.
  6. 根据权利要求5所述的方法,其特征在于,所述第一预设条件包括:The method according to claim 5, wherein the first preset condition comprises:
    所述第二待检测图像中,对应的检测值为所述张嘴阈值的第三待检测图像的数量为第一预设值;Among the second images to be detected, the number of the third images to be detected whose corresponding detection value is the mouth opening threshold is a first preset value;
    所述多帧第三待检测图像中,相邻两帧第三待检测图像之间的第二待检测图像的数量大于所述张嘴帧数阈值。In the plurality of frames of the third images to be detected, the number of the second images to be detected between two adjacent frames of the third images to be detected is greater than the threshold of the number of mouth opening frames.
  7. 根据权利要求5或6所述的方法,其特征在于,所述第一预设条件还包括:The method according to claim 5 or 6, wherein the first preset condition further comprises:
    相邻两帧第三待检测图像之间的多帧第二待检测图像中,任意两帧第二待检测图像的检测值之间的差值小于第二预设值。Among the multiple frames of the second images to be detected between two adjacent frames of the third images to be detected, the difference between the detected values of any two frames of the second images to be detected is smaller than a second preset value.
  8. 根据权利要求5至7任一所述的方法,其特征在于,所述确定所述多帧第一待检测图像中,每两帧相邻的第一待检测图像之间的第二待检测图像,包括:The method according to any one of claims 5 to 7, wherein the determining of the second image to be detected between every two adjacent frames of the first image to be detected among the multiple frames of the first image to be detected ,include:
    确定所述多帧第一待检测图像中,满足第二预设条件的两帧相邻的第一待检测图像之间的第二待检测图像;Determining a second image to be detected between two frames of adjacent first images to be detected that meet a second preset condition among the multiple frames of the first image to be detected;
    其中,所述第二预设条件包括:Wherein, the second preset condition includes:
    相邻的第一待检测图像之间的待检测图像的数量大于所述张嘴帧数阈值;相邻的第一待检测图像之间的待检测图像的检测值最值满足所述张嘴阈值对应的筛选条件。The number of images to be detected between adjacent first images to be detected is greater than the mouth opening frame number threshold; the maximum detection value of the images to be detected between adjacent first images to be detected meets the threshold corresponding to the mouth opening filter criteria.
  9. 根据权利要求1至8任一所述的方法,其特征在于,在所述目标动作为睁闭眼的情况下,所述基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值,包括:The method according to any one of claims 1 to 8, wherein when the target action is opening and closing eyes, the feature points in the images to be detected based on the frames to be detected are matched with the target action. The position information is used to determine the detection values corresponding to the images to be detected in each frame to indicate the completion of the target action, including:
    针对多帧待检测图像中的每帧待检测图像,基于所述待检测图像的特征点位置信息,对所述待检测图像进行矫正处理;For each frame of the image to be detected in the multiple frames of the image to be detected, based on the feature point position information of the image to be detected, the image to be detected is corrected;
    将矫正处理后的所述待检测图像输入至预先训练好的神经网络,确定所述待检测图像对应的检测值。The rectified image to be detected is input to a pre-trained neural network to determine a detection value corresponding to the image to be detected.
  10. 根据权利要求2、3、5至8任一所述的方法,其特征在于,所述检测值包括用于描述眼部遮挡情况的第一检测值,以及用于描述睁闭眼完成情况的第二检测值;The method according to any one of claims 2, 3, 5 to 8, wherein the detection values include a first detection value used to describe the eye occlusion situation, and a first detection value used to describe the completion of eye opening and closing. Two detection values;
    所述检测阈值包括睁眼阈值、闭眼阈值、睁眼帧数阈值、眼部遮挡阈值;The detection threshold includes an eye opening threshold, an eye closing threshold, an eye opening frame number threshold, and an eye occlusion threshold;
    所述基于所述目标动作对应的检测阈值和与所述目标动作匹配的检测方案,对所述多帧待检测图像的检测值进行检测,得到活体检测结果,包括:Based on the detection threshold corresponding to the target action and the detection scheme matching the target action, the detection values of the multiple frames of images to be detected are detected to obtain a living body detection result, including:
    基于所述睁眼阈值、闭眼阈值、以及所述多帧待检测图像的第二检测值,确定满足第三预设条件的第四待检测图像;determining a fourth image to be detected that satisfies a third preset condition based on the eye-opening threshold, the eye-closing threshold, and the second detection values of the multiple frames of images to be detected;
    确定对应的第一检测值小于所述眼部遮挡阈值的第四待检测图像的目标数量;determining the target quantity of the fourth image to be detected whose corresponding first detection value is less than the eye occlusion threshold;
    在所述目标数量超过所述睁眼帧数阈值的情况下,确定通过活体检测。When the number of targets exceeds the eye-opening frame number threshold, it is determined that the living body detection is passed.
  11. 一种活体检测装置,其特征在于,包括:A living body detection device, characterized in that it comprises:
    获取模块,用于响应活体检测请求,获取与目标动作对应的多帧待检测图像,其中,所述目标动作为进行活体检测时指示用户做出的动作;An acquisition module, configured to respond to a liveness detection request, and acquire multiple frames of images to be detected corresponding to a target action, wherein the target action is an action instructed by a user during liveness detection;
    确定模块,用于基于所述各帧待检测图像中与所述目标动作匹配的特征点位置信息,确定各帧待检测图像分别对应的用于表示所述目标动作完成情况的检测值;A determining module, configured to determine detection values corresponding to each frame of the image to be detected and used to indicate the completion of the target action based on the feature point position information matching the target action in each frame of the image to be detected;
    检测模块,用于基于与所述目标动作匹配的检测方案和所述检测值,得到活体检测结果。The detection module is configured to obtain a living body detection result based on the detection scheme matched with the target action and the detection value.
  12. 一种计算机设备,其特征在于,包括:处理器、存储器和总线,所述存储器存储有所述处理器可执行的机器可读指令,当计算机设备运行时,所述处理器与所述存储器之间通过总线通信,所述机器可读指令被所述处理器执行时执行如权利要求1至10任一所述 的活体检测方法的步骤。A computer device, characterized in that it includes: a processor, a memory, and a bus, the memory stores machine-readable instructions executable by the processor, and when the computer device is running, the connection between the processor and the memory The machine-readable instructions execute the steps of the living body detection method according to any one of claims 1 to 10 when executed by the processor.
  13. 一种计算机可读存储介质,其特征在于,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求1至10任一项所述的活体检测方法的步骤。A computer-readable storage medium, characterized in that a computer program is stored on the computer-readable storage medium, and when the computer program is executed by a processor, the steps of the living body detection method according to any one of claims 1 to 10 are executed .
PCT/CN2022/096444 2021-10-28 2022-05-31 Liveness detection method and apparatus, computer device, and storage medium WO2023071190A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202111265552.1A CN113971841A (en) 2021-10-28 2021-10-28 Living body detection method and device, computer equipment and storage medium
CN202111265552.1 2021-10-28

Publications (1)

Publication Number Publication Date
WO2023071190A1 true WO2023071190A1 (en) 2023-05-04

Family

ID=79588905

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2022/096444 WO2023071190A1 (en) 2021-10-28 2022-05-31 Liveness detection method and apparatus, computer device, and storage medium

Country Status (2)

Country Link
CN (1) CN113971841A (en)
WO (1) WO2023071190A1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113971841A (en) * 2021-10-28 2022-01-25 北京市商汤科技开发有限公司 Living body detection method and device, computer equipment and storage medium
CN114612986A (en) * 2022-03-17 2022-06-10 北京市商汤科技开发有限公司 Detection method, detection device, electronic equipment and storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160373437A1 (en) * 2015-02-15 2016-12-22 Beijing Kuangshi Technology Co., Ltd. Method and system for authenticating liveness face, and computer program product thereof
CN109684974A (en) * 2018-12-18 2019-04-26 北京字节跳动网络技术有限公司 Biopsy method, device, electronic equipment and storage medium
CN111242090A (en) * 2020-01-22 2020-06-05 腾讯科技(深圳)有限公司 Human face recognition method, device, equipment and medium based on artificial intelligence
CN111767760A (en) * 2019-04-01 2020-10-13 北京市商汤科技开发有限公司 Living body detection method and apparatus, electronic device, and storage medium
CN113420667A (en) * 2021-06-23 2021-09-21 工银科技有限公司 Face living body detection method, device, equipment and medium
CN113971841A (en) * 2021-10-28 2022-01-25 北京市商汤科技开发有限公司 Living body detection method and device, computer equipment and storage medium

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20160373437A1 (en) * 2015-02-15 2016-12-22 Beijing Kuangshi Technology Co., Ltd. Method and system for authenticating liveness face, and computer program product thereof
CN109684974A (en) * 2018-12-18 2019-04-26 北京字节跳动网络技术有限公司 Biopsy method, device, electronic equipment and storage medium
CN111767760A (en) * 2019-04-01 2020-10-13 北京市商汤科技开发有限公司 Living body detection method and apparatus, electronic device, and storage medium
CN111242090A (en) * 2020-01-22 2020-06-05 腾讯科技(深圳)有限公司 Human face recognition method, device, equipment and medium based on artificial intelligence
CN113420667A (en) * 2021-06-23 2021-09-21 工银科技有限公司 Face living body detection method, device, equipment and medium
CN113971841A (en) * 2021-10-28 2022-01-25 北京市商汤科技开发有限公司 Living body detection method and device, computer equipment and storage medium

Also Published As

Publication number Publication date
CN113971841A (en) 2022-01-25

Similar Documents

Publication Publication Date Title
WO2023071190A1 (en) Liveness detection method and apparatus, computer device, and storage medium
WO2019232866A1 (en) Human eye model training method, human eye recognition method, apparatus, device and medium
US10049262B2 (en) Method and system for extracting characteristic of three-dimensional face image
TWI687879B (en) Server, client, user verification method and system
WO2020024400A1 (en) Class monitoring method and apparatus, computer device, and storage medium
WO2018028546A1 (en) Key point positioning method, terminal, and computer storage medium
CN100592322C (en) An automatic computer authentication method for photographic faces and living faces
WO2019232862A1 (en) Mouth model training method and apparatus, mouth recognition method and apparatus, device, and medium
CN108182409B (en) Living body detection method, living body detection device, living body detection equipment and storage medium
CN105612533B (en) Living body detection method, living body detection system, and computer program product
TW202004637A (en) Risk prediction method and apparatus, storage medium, and server
CN107679506A (en) Awakening method, intelligent artifact and the computer-readable recording medium of intelligent artifact
WO2018218839A1 (en) Living body recognition method and system
WO2022174699A1 (en) Image updating method and apparatus, and electronic device and computer-readable medium
CN111598038B (en) Facial feature point detection method, device, equipment and storage medium
CN105335719A (en) Living body detection method and device
WO2022105118A1 (en) Image-based health status identification method and apparatus, device and storage medium
WO2020124993A1 (en) Liveness detection method and apparatus, electronic device, and storage medium
CN112101124B (en) Sitting posture detection method and device
US11062126B1 (en) Human face detection method
WO2018103416A1 (en) Method and device for detecting facial image
CN110612530A (en) Method for selecting a frame for use in face processing
JP2020184331A (en) Liveness detection method and apparatus, face authentication method and apparatus
US20170344811A1 (en) Image processing method and apparatus
WO2021179719A1 (en) Face detection method, apparatus, medium, and electronic device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 22885100

Country of ref document: EP

Kind code of ref document: A1