- Facebook Graph API
- Microsoft Azure Face API
- Python
- Swift
-
First, you need to set up the Face Group on MSFT Cognitive Services
Change the
Ocp-Apim-Subscription-Key
in
headers = {
# Request headers.
'Content-Type': 'application/json',
# NOTE: Replace the "Ocp-Apim-Subscription-Key" value with a valid subscription key.
'Ocp-Apim-Subscription-Key': '37e02440a4dd4ef2b738acf9e5dd46ac',
}
in setupPersonGroup.py
to your Face API Key.
you may want to change the photo files found in the array peopleInfo
to photos of you choosing in the same format as we have
Then run python setupPersonGroup.py
-
Now you need to train the group
run
python -c import setupPersonGroup as p; p.train()
and to check when it is done runpython -c import setupPersonGroup as p; p.getStatus()
-
Now setup some other stuff
in
test.py
change theOcp-Apim-Subscription-Key
again as per earlier. -
Now start up ngrok
look up ngrok and start a server on your device, should be using port 8000 copy that server url into the iOS code
-
cd into the
nodeserver
folder and runnode index.js
-
use iPhone to take or upload photo, you should be good to go
=======
Adding people on Facebook can be so cumbersome because you have to ask for their username or look them up. We wanted to invent a new way to add people on Facebook that is efficient and fun. So we came up with Face2Book!
With the Face2Book app, one can use it to snap a selfie of their new friend, and it will automatically pull up their Facebook profile!
In the back-end, we used Python to scrape information on users on Facebook (their name and profile picture using their user id) to obtain data. We then send that data to a Microsoft Azure server that has a Face API for it to train. Then it decides if the picture matches up with your friend, and if it does, it pulls up their Facebook profile!
Getting the data set from Facebook Graph API only gets friends who use the Graph API
- Facebook scraping
- Facebook Graph API
- Microsoft Azure
Add more data!
@campionfellin
@GrayTurtle
@sstevenshang