Reputation: 291
Currently, if I have a facebook friend whom I've tagged in a picture that I've uploaded, when I upload a picture with his face on it, facebook automatically suggests his user as a tag.
Is it possible to emulate this same behavior via the facebook graph api or the SDK?
In other words, if I use the api as described on https://developers.facebook.com/docs/graph-api/reference/user/photos/ to upload a photo (described under "Creating") of a user that my account is friends with, is there any way facebook will make that same suggestion in the request return parameters or something like that?
Upvotes: 21
Views: 34748
Reputation: 1650
Facebook DeepFace face recognition model is wrapped by the deepface package for python. Also, the package offers an API to be called as rest services as well.
!pip install deepface
from deepface import DeepFace
resp = DeepFace.verify("img1.jpg", "img2.jpg", model_name = "DeepFace")
print(resp)
Upvotes: 0
Reputation: 106
You can use https://github.com/samj1912/fbrecog. Python wrapper for Facebook face recognition. And the only one in my knowledge that currently works.
Upvotes: 1
Reputation: 146
Yes. You can use Facematch, an unofficial wrapper for the Facebook face recognition feature.
When you upload a picture on Facebook, the /photos/tagging/recognition endpoint is called. This program uploads a private picture (using Facebook API) + calls the recognition endpoint (by simulating a browser using the user's information).
Upvotes: 13
Reputation: 31479
Face recognition is not exposed via the Graph API, so no, it's not possible.
Upvotes: 0