A method comprising: accessing multiple images including each a face presented by a user, the face in each of the multiple images being a face of the same person, the multiple images corresponding to a sequence of images captured by an image capture component; determining, based on the multiple images, whether the face included in the multiple images is a 3-dimensional structure or a flat surface, comprising: accessing a first image and a second image of the multiple images; extracting multiple feature points of the face from the first image and multiple feature points of the face from the second image, the multiple feature points of the face extracted from the first image and the second image comprising at least one type of feature point among: a feature point of a corner of an eye, a feature point of a corner of a mouth, and a feature point of a tip of a nose; matching feature points across the first image and the second image; and using feature points matched across the first image and the second image to generate a homography matrix between the first and second images, the homography matrix representing a relationship between views of a same planar surface in the first image and in the second image; generating a warped image by warping the first image using the homography matrix; determining an image difference between the warped image and the second image by obtaining the difference in color or intensity values at same pixels locations in the warped image and the second image; and determining that the face included in the multiple images is a 3-dimensional structure if the difference between the warped image and the second image meets a threshold value, and otherwise determining that the face included in the multiple images is a flat surface; indicating that the user can be authenticated if the face included in the multiple images is a 3 -dimensional structure; and indicating that the user cannot be authenticated if the face included in the multiple images is a flat surface. accessing multiple images including each a face presented by a user, the face in each of the multiple images being a face of the same person, the multiple images corresponding to a sequence of images captured by an image capture component; determining, based on the multiple images, whether the face included in the multiple images is a 3-dimensional structure or a flat surface, comprising: accessing a first image and a second image of the multiple images; extracting multiple feature points of the face from the first image and multiple feature points of the face from the second image, the multiple feature points of the face extracted from the first image and the second image comprising at least one type of feature point among: a feature point of a corner of an eye, a feature point of a corner of a mouth, and a feature point of a tip of a nose; matching feature points across the first image and the second image; and using feature points matched across the first image and the second image to generate a homography matrix between the first and second images, the homography matrix representing a relationship between views of a same planar surface in the first image and in the second image; generating a warped image by warping the first image using the homography matrix; determining an image difference between the warped image and the second image by obtaining the difference in color or intensity values at same pixels locations in the warped image and the second image; and determining that the face included in the multiple images is a 3-dimensional structure if the difference between the warped image and the second image meets a threshold value, and otherwise determining that the face included in the multiple images is a flat surface; accessing a first image and a second image of the multiple images; extracting multiple feature points of the face from the first image and multiple feature points of the face from the second image, the multiple feature points of the face extracted from the first image and the second image comprising at least one type of feature point among: a feature point of a corner of an eye, a feature point of a corner of a mouth, and a feature point of a tip of a nose; matching feature points across the first image and the second image; and using feature points matched across the first image and the second image to generate a homography matrix between the first and second images, the homography matrix representing a relationship between views of a same planar surface in the first image and in the second image; generating a warped image by warping the first image using the homography matrix; determining an image difference between the warped image and the second image by obtaining the difference in color or intensity values at same pixels locations in the warped image and the second image; and determining that the face included in the multiple images is a 3-dimensional structure if the difference between the warped image and the second image meets a threshold value, and otherwise determining that the face included in the multiple images is a flat surface; indicating that the user can be authenticated if the face included in the multiple images is a 3 -dimensional structure; and indicating that the user cannot be authenticated if the face included in the multiple images is a flat surface.