Azure Face — facial recognition without machine learning knowledge

Fancy applications detecting people’s faces in photos… Probably very expensive, complicated, requiring a highly skilled team in machine learning. I don’t think it’s worth implementing in my project…

Well, not really! Let’s see a solution that can be both affordable and nearly effort-free!

What is Azure Face?

Now let’s talk a little more precise about what this service allows. First of all, it detects faces on the image with their attributes, like the position of eyes, mouth, etc., gender, age, even emotions. It also allows creating private repositories of faces and then recognizes those faces on new photos that were not a part of a learning data. It can also find similar faces.

How can I use it?

Let’s cover example usage of the service to better understand how easy it is and how little expertise it requires.

Let’s assume we want to predefine a set of people and then we want to be able to detect their faces on new photos. The first step is to define our known set of people. Using the API or the SDK we can define a person. Then, we can provide learning data for each person. The more photos from different angles and with different expressions the better. But to make it work, about as much as ten photos are required. Then, having our system trained we can upload a new photo and in response from Face, we will get a list of recognized people on that photo (if any were found). At this point, it is also worth mentioning that Microsoft claims not to store the photos you use to detect faces, which are only used in the process of recognition and are removed afterward.

Is it worth it?

  • The whole infrastructure — there’s no need to install any additional software, we don’t need powerful graphical processing units, all we need to do is consume an API.
  • Time — training machine learning models is very time consuming, depending on the scale of the learning data, but it can take a very long time to get prepared. With time comes energy consumption which also is not free (especially when high-end GPU is running for a long time, trust me, the bill can be terrifying).
  • Expertise — Machine learning, especially when it comes to image processing, is a fairly complicated process that requires a high level of knowledge and experience. It might seem not worth building a whole team fairly or even get one expert, for instance just to implement an additional feature to the application that could use facial recognition.
  • Time again — there is a team, there is an infrastructure. Now the features need to be implemented. And this also takes time, no magic here. Even if some ready-to-use components are implemented, the application still needs to be deployed, tested, and so on.

Azure Face offers two pricing plans. Free and Standard. The free plan doesn’t offer SLA and is limited to a few thousand requests per month. It can be used in the development or a proof of concept. Standard plan prices are about 1 USD per 1000 transactions. As you can see, this doesn’t necessarily mean fortune, and if facial recognition is supposed to be only an additional feature of the application that won’t mean the main usage, then the pricing sounds very fair.

Pardon me, but you see… I’ve seen that face before

Detecting employees

Slackbot

Every time a photo of one of our people is posted, whether it’s a selfie they sent from vacation or a photo from a conference, our bot says some nice things about that person using their name. “You are looking good today, John!”. It’s very similar usage as in the first example — we detect faces on the photo, and generate a message for known people. Almost no effort at all!

What we truly wish to point out here is that all those mechanisms, both recognition of faces and features detection (like gender, age, emotions) work well beyond expectations! We could expect that pre-trained AI to work “okay-ish” at most. Since it’s supposed to cover so many cases. But you’ve got to see that with your own eyes! It just works!

When shouldn’t I use it?

If the main feature of the application is face detecting or recognizing it might be a better idea to use a custom solution. First of all, if the detection will be done very often, after some time the bill might get large enough to reach the cost of a custom solution.

We need to keep in mind that we are limited to the provided functionality, which is very rich, but we might come to the point when we need something impossible to achieve with Face.

Azure Face has very good performance, and predictions are being executed very quickly. However we might find ourselves in a need of a solution that acts in real-time, and with API we are also limited by the bandwidth of our network.

Conclusion

human-centric software design & development. check out our website: www.iteo.com