Home Assistant Community

Microsoft facial recognition, who is able to make it work?


I think Microsoft end point is incorrect even in their own documentation… Try it here https://westus.api.cognitive.microsoft.com/face/v1.0/



Did you get your Google tensorflow face recognition working? Can you share your code and experiences?



Thank you for this great post. What was the reason you ran out of API Calls?
Where you processing images or video?

30 per minute sounds like a LOT of calls. My naive guess at this moment is that once you detect motion , you take 2-3 pics and process them. Most of the day, there is no motion in the house.

how did you get those 30 calls per minute? why do you need to process so many requests?

What are you using now? Did you do another post on OpenCV or other image processing API?
I am about to start on this path, so would be great to get your feedback on where did you wind up.



I think someone needs to check if the Microsoft service works still, if not remove the component.
I am working on Clarifai integration here



Took a look at their site. Clarifai does not have face recognition , only face detection. Or are you building a custom model with their API? or you are not actually looking for face recognition?



Custom model - one of the best features of Clarifai. If you just want face recognition the OpenCV component works



I was able to get microsoft face working. It is correctly firing automations when I walk in front of the assigned camera. I’ll need to test it now with the whole family and see how accurate the ID is.

One thing that would be neat would be if I can get an automation to fire when there is a face detected that is not known.



28-3-2018 Component is working, I was probably using incorrect config before.

1 Like


@Ouassimf did you ever get a solution for the quota issue? i have everything working, however with the trial susbscription you can only use the API 30000 times in a month, and i’m spending that amount in a week.

is there any way to only trigger face recognition based on some events??



I realized that anyway I dont want to rely on cloud. Went for dlib instead which does NOT work out of the work on hassio / hassbian.
I installed everything on a rpi3 and modified had to modifiy the dlib component face_recognition requirement from 1.0.0 to 1.2.2 (latest version that DO work with scipy)



I would recommend to use this Face detection & recognition with Docker/Machinebox

Works great for me. Thank you @robmarkcole



Just having a go at setting this up… I’ve got the config in for microsoft_face

api_key: xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
azure_region: westeurope

I’ve restarted hass, but can’t see any of the services available as described in the documentation, as a result I get the following error:

Unable to find service microsoft_face/create_group

Any clues where I’m going wrong?





@mcinnes01 i had microsoft face fully working however didn’t follow the instructions on HASS help, here are my suggestions.

  1. verify your region, it has to match the region where you created the azure account
  2. API key, couldn’t get to work with the KEY1 i had to use the KEY2 always
  3. i didn’t create users, groups or trained the component using the HASS, i’ve used the toolbox provided by microsoft, you can find it on the website, it’s probably the longest way to do it but its the most realible because you would see an instant response.

i’m still dealing with the 30K monthly limitation of the API requests, but is working perfectly.



@armdan it works great indeed, the only problem is you have to train it every time you restarted because the free version wont let you save the state, anyway to overcome this?



I believe the great @robmarkcole trying to work on it. He is trying to make a folder where you put all your pics and it gets recognized automatically. Let’s see and hope but still there is no alternative for me. I tried them all and this one is the best and fastest.

1 Like


It looks like the create part of the component is broken.

@peteonus What does the toolbox look like? How do you get to it?



Stuck on adding groups via UI and Json errors.
Think keys are working (either Key 1 or 2) only way I can tell is by entering an invalid kep system throws a log error, else now way of telling.

But can’t create group and can’t find anywhere within Azure to create users or groups.
Running bleeding edge of HA @ 86.3
Any pointers?



I was able to get everything working throughout this post but the 2 faces I add it will show the names properly and it appears to have a guid assigned to them each but when I use the camera with 1 person or 2 people it comes back stating it finds it but shows this…

I’ve tried to delete all items and start over, trained multiple times but it always comes back as [Object object] for the name instead of the name of the person.

Hopefully someone has run into this or has a suggestion to work around it.



Were you able to find a solution? My face works fine and returns my name. Also recognizes my wife’s face but not returning the name, not even unknown.