X

Face Recognition Using face-api.js

Face Recognition

Author: Khutso Nkadimeng

29 Jun 2020

Why this API?

I have written a few articles about the ethical concerns surrounding computer vision. I wanted to explore this idea further, hence my API choice face-api.js, “a javascript module, built on top of tensorflow.js core, which implements several CNNs (Convolutional Neural Networks) to solve face detection, face recognition and face landmark detection, optimized for the web and for mobile devices.”

One study I read found a 34.7% error rate in classifying dark-skinned females and 0.8% error rate in classifying light-skinned males, this fact also supported by the findings of the National Institute of Standards and Technology in the United States which came to similar conclusions after testing 189 face recognition algorithms formed the basis of my initial plans with this API. I devised the most unscientific scientific study in this subject, I wanted to put together twenty-five pictures of black females and the same number of white male and then run this algorithm to see if there was going to be discrepancies. There are obviously many academic alarms going off when reading this, however, it was a good start. Flawed as it may sound, the tests would have been equally flawed in both test cases, therefore my hypothesis would stand. However, this approach failed once I realised how much time it was taking, so I simplified my work to a simple live stream that detects facial expressions and predicts the age of the subject.

Impact on my site


This API’s impact on my site has largely been negative:


1. I failed to use it in a way that would be the most coherent for my site. This is largely because my initial plans for it were not successful. Consequently, its feature on my site that is useful for research and learning purposes which are two very important parts of this course, but it does not improve the user’s experience, it does the opposite.


2. It is the most unstable and untested part of my website; it is not properly optimised for mobile use when it comes to screen size even though it works.


3. It feels like a separate project to mine at the same time it fits perfectly to my website. It depends entirely on perspective. I believe I


4. The best part about this is the part that cannot be marked, I learned something new.

Why was it necessary for my site?

The theme and direction of my website are well cultivated with direct links between my posts and my character. My character is an entrepreneur building self-driving car capabilities and computer vision technology with personal links to the military. He has expressed concerns over the recent developments in the face recognition sector involving IBM, Microsoft, and Amazon. Although my initial idea was to focus more on the automation of jobs, I ended up in this controversial section of our tech world. The only other API that would be better suited for this scenario would YOLO or similar computer vision products, otherwise, this was the best choice given the reasons.

Alternatives

The core of this API is tensorflow.js and it was the one alternative I considered before choosing this one. The major reason why I did not use tensorflow is that I either had to have in-depth knowledge or use a second API which was prohibited in this assignment. But why tensorflow or face-api? This is simply because they were built for the browser and use JavaScript

Conclusion

It has been a privilege.