METHODS AND SYSTEMS FOR DISPLAYING A VISUAL AID AND ENHANCING USER LIVENESS DETECTION
A method for displaying a visual aid is provided that includes calculating a distortion score based on an initial position of a computing device and comparing, by the computing device, the distortion score against a threshold distortion value. When the distortion score is less than or equal to the threshold distortion value, a visual aid is displayed having a first size and when the distortion score exceeds the threshold distortion value the visual aid is displayed at a second size.
1 . A method for enhancing user liveness detection comprising the steps of:
capturing, by a camera in an electronic device, facial image data of a user while there is relative movement between the electronic device and the user;
selecting pairs of frames from the captured facial image data, each frame having a distortion score, wherein a difference between the distortion scores for each pair at least equals a threshold difference;
creating, by the electronic device, a spatial displacement map for each pair of frames;
calculating, by the electronic device, a confidence score for each pair of frames based on the displacement map created for each respective pair of frames; and
determining whether the captured facial image data was taken of a live person based on the confidence scores.
2 . The method according to claim 1 , the creating a special displacement map step comprising:
calculating the position of each pixel in the facial image data in each frame of each pair; and
calculating the difference in position of each pixel between the frames of each respective pair.
3 . The method according to claim 1 , the creating a special displacement map step comprising:
calculating the position of each pixel within different blocks of pixels in the facial image data in each frame of each pair;
calculating the difference in position of each block of pixels between the frames of each respective pair; and
averaging the calculated differences in position to estimate the movement between the facial image data in the frames of each respective frame pair.
4 . The method according to claim 1 , the step of calculating the confidence score comprising:
inputting the spatial displacement map created for a pair of the selected frames into a machine learning algorithm (MLA); and
calculating a confidence score for the pair of frames using the MLA.
5 . The method according to claim 1 , the determining step further comprising:
calculating an overall confidence score from the confidence scores;
comparing the overall confidence score against a threshold confidence score; and
determining the facial image data was taken of a live person when the overall confidence score at least equals the threshold score.
6 . The method according to claim 1 , further comprising calculating the distortion score for each frame based on an interalar width and a bizygomatic width, wherein the interalar width is the maximum width of the base of the nose of the user.
7 . The method according to claim 1 further comprising
calculating a liveness detection score for the image data in each frame using at least one of a first machine learning algorithm (MLA) trained model and a second MLA trained model.
8 . An electronic device for enhanced liveness detection comprising:
a camera;
a processor; and
a memory configured to store data, the electronic device being associated with a network and the memory being in communication with the processor and having instructions stored thereon which, when read and executed by the processor, cause the electronic device to:
capture facial image data of a user while there is relative movement between the electronic device and the user;
select pairs of frames from the captured facial image data, each frame having a distortion score, wherein a difference between the distortion scores for each pair at least equals a threshold difference;
create a spatial displacement map for each pair of frames;
calculate a confidence score for each pair of frames based on the displacement map created for each respective pair of frames; and
determine whether the captured facial image data was taken of a live person based on the confidence scores.
9 . The electronic device according to claim 8 , wherein the instructions when executed by the processor further cause the electronic device to:
calculate the position of each pixel in the facial image data in each frame of each pair; and
calculate the difference in position of each pixel between the frames of each respective pair.
10 . The electronic device according to claim 8 , wherein the instructions when executed by the processor further cause the electronic device to:
calculate the position of each pixel within different blocks of pixels in the facial image data in each frame of each pair;
calculate the difference in position of each block of pixels between the frames of each respective pair; and
average the calculated differences in position to estimate the movement between the facial image data in the frames of each respective frame pair.
11 . The electronic device according to claim 8 , wherein the instructions when executed by the processor further cause the electronic device to:
input the spatial displacement map created for a pair of the selected frames into a machine learning algorithm (MLA); and
calculate a confidence score for the pair of frames using the MLA.
12 . The electronic device according to claim 8 , wherein the instructions when executed by the processor further cause the electronic device to:
calculate an overall confidence score from the confidence scores;
compare the overall confidence score against a threshold confidence score; and
determine the facial image data was taken of a live person when the overall confidence score at least equals the threshold score.
13 . The electronic device according to claim 8 , wherein the instructions when executed by the processor further cause the electronic device to calculate the distortion score for each frame based on an interalar width and a bizygomatic width, wherein the interalar width is the maximum width of the base of the nose of the user.
14 . The electronic device according to claim 8 , wherein the instructions when executed by the processor further cause the electronic device to calculate a liveness detection score for the image data in each frame using at least one of a first machine learning algorithm (MLA) trained model and a second MLA trained model.
15 . A non-transitory computer-readable recording medium in an electronic device for enhanced liveness detection, the non-transitory computer-readable recording medium storing instructions which when executed by a hardware processor cause the non-transitory recording medium to perform steps comprising:
capturing facial image data of a user while there is relative movement between the electronic device and the user;
selecting pairs of frames from the captured facial image data, each frame having a distortion score, wherein a difference between the distortion scores for each pair at least equals a threshold difference;
creating a spatial displacement map for each pair of frames;
calculating a confidence score for each pair of frames based on the displacement map created for each respective pair of frames; and
determining whether the captured facial image data was taken of a live person based on the confidence scores.
16 . The non-transitory computer-readable recording medium according to claim 15 , wherein the creating a spatial displacement map step comprises:
calculating the position of each pixel in the facial image data in each frame of each pair; and
calculating the difference in position of each pixel between the frames of each respective pair.
17 . The non-transitory computer-readable recording medium according to claim 15 , wherein the creating a spatial displacement map step comprises:
calculating the position of each pixel within different blocks of pixels in the facial image data in each frame of each pair;
calculating the difference in position of each block of pixels between the frames of each respective pair; and
averaging the calculated differences in position to estimate the movement between the facial image data in the frames of each respective frame pair.
18 . The non-transitory computer-readable recording medium according to claim 15 , wherein the step of calculating the confidence score comprises:
inputting the spatial displacement map created for a pair of the selected frames into a machine learning algorithm (MLA); and
calculating a confidence score for the pair of frames using the MLA.
19 . The non-transitory computer-readable recording medium according to claim 15 , wherein the determining step further comprises:
calculating an overall confidence score from the confidence scores;
comparing the overall confidence score against a threshold confidence score; and
determining the facial image data was taken of a live person when the overall confidence score at least equals the threshold score.
20 . The non-transitory computer-readable recording medium according to claim 15 , further comprising calculating a liveness detection score for the image data in each frame using at least one of a first machine learning algorithm (MLA) trained model and a second MLA trained model.