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

cool!! How?!?

Then goto API reference (i think the url has my apikey in so cant give direct link)
There is an open testing api console button there

1 Like

How what? How i did the automation? If so, its a copy paste from the component instructions here, i just added an action to trigger my study light.

Also note, i have already exceeded my quota during testing :smile:

I also used the below to check the group training status:

curl -v -X GET “https://westus.api.cognitive.microsoft.com/face/v1.0/persongroups/[groupname]/training” -H “Ocp-Apim-Subscription-Key: [apikey]”

A bit complicated to me, but I try. I opened the page, do I have to fill in the bottom with a link to my images (instead of 1.jpg)? If yes where to associate my name … ?

POST https://westus.api.cognitive.microsoft.com/face/v1.0/detect?returnFaceId=true&returnFaceLandmarks=false HTTP/1.1
Content-Type: application/json
Host: westus.api.cognitive.microsoft.com

{
    "url":"http://example.com/1.jpg"
}

you are in the section to upload the face. I didnt do this, i use HA and my camera to capture my face. That worked ok for me. But i guess, yes, if you uploaded a pic somewhere that it could access it you could change the url and submit it to upload the picture.

Which the
Face
Face list
Person
Person group

??

@CommonBlob any other advice? successfully uploaded an image and trained via the service api. still seeing “known_faces: [object Object]” for the image processor

Are you seeing requests in the Azure portal? (Portal.azure.com)

Are you seeing you in the face API section of HA. I think you can do some commands with the API to query what it has. As I said earlier, the bits that failed for me was the group training.

It didn’t pick my face every time either, but it was dark and I may need it to retrain my face.

You need to get the group created first
Then the person you want to add
Then add the picture
Then train the group

Ha did the first 3 steps ok for me, but the final step I did in the API console as it was erroring in ha.

Damn. Still no luck. I’m able to successfully train via the API console but am still seeing this:

image_processing.microsoftface_foscam unknown
friendly_name: MicrosoftFace foscam
known_faces: [object Object]
total_faces: 0

Strange. I’m also using a foscam, not that this probably makes much difference.

So you have a group, you see yourself on the ha dashboard with an ID, and you trained the group. That should be it. Any thing in your ha logs?

@CommonBlob ah! yeah, getting a 401 error for the camera. not sure how to resolve that, though. it’s displaying fine on the dashboard…

EDIT: reboot resolved that. didn’t fix anything. :expressionless:

Capture your face again, and check the HA log after you’ve done it. You should get a success message. If you get a “I couldn’t find a face” or something, it didn’t quite work.

After you have recaptured your face, run a train group again. See if that makes any difference.

I have a problem, not totally related to the component, but important.

The camera is positioned at the entrance; when the door opens lot of lights comes from the outside, and the camera does not adjust quickly to the change of light. Basically all the faces are “dark”.

I suppose many are in the same situation as me: cameras in entrance, and when you open the door there is much more light coming in the entrance room. How do you solve this?

I guess you could add an IR light beside the camera, it could be trigger by movement seen by the camera, of with another sensor…

Its seems to be rather unreliable. I have got it working…but it doesnt fire half the time and now ive moved my camera to my lobby its only detected me once. I may dump the config and retrain it all again.

And yes to claudio, channging between IR and not isnt too quick on my camera either so it might be a problem for detection. Each camera copes differently though.

Honestly I think it is a bad idea to use Microsoft, Google, Facebook etc. face recognition.
There is already a great python library called OpenVC which supports face recognition with a few lines of code - and the best, no data leave your computer.

1 Like

I’m much prefer that too. Have you got openvc wo king with HA?