2
$\begingroup$

I want to make a face authentication application. I need to approve the face during the login based on whether the registered face and the login face match.

Which are the possible appropriate AI methods or technologies for this task?

$\endgroup$
  • 3
    $\begingroup$ you shouldn't do this unless its just for fun. a simple photograph of the person wold suffice to break the login scheme, and hence it is insecure. the iPhone, which has Face ID, also works on the dimension of depth, as in it can recognize the contours of your face. this make it much harder to crack. $\endgroup$ – k.c. sayz 'k.c sayz' Dec 17 '19 at 19:42
3
$\begingroup$

One of the methods which is quite fast and easy to implement.

You can do Principal Component Analysis (PCA) based face recognition. You can go through this paper for the theory behind it. For an example implementation you can see this blog post.

The process, roughly, is as following:

If you have a grayscale image of size $(20,20)$, then this image can be flattened to a vector of size $400$. If you have $5$ images of size $(20,20)$ then your data matrix will be of size $(5,400)$. We wish to find the principal components of the distribution of faces, or the eigenvectors of the covariance matrix of the data matrix, which will be of size $(5,5)$. Each eigenvector (out of total $5$), of size $(5,1)$, accounts for some amount of variation among the images, and they are ordered by the amount (the eigenvalues corresponding to the eigenvectors) they account for. These eigenvectors can be thought of as a set of features that characterize the variation between the images. Recognition is done by projecting a new image (flattened to size $(400,1)$)into the subspace spanned by the eigenvectors of the covariance matrix and then classifying the face by comparing its coordinates in the face space with the coordinates of the known individuals.

You can see an implementation in this git repo.

| improve this answer | |
$\endgroup$
  • $\begingroup$ why are we using grayscale images? $\endgroup$ – Bivin Vinod Dec 17 '19 at 10:26
  • 1
    $\begingroup$ @BivinVinod Using grayscale image only to make an easy example. $\endgroup$ – naive Dec 17 '19 at 10:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.