alchemist hour: face recognition
Post on 07-Aug-2015
162 Views
Preview:
TRANSCRIPT
AlchemyAPI – Face Recognition
The housekeeping items
#AlchemistHour
• Webinar slides, recording and Q&A will be emailed • Enter questions in chat on webinar panel • Interact with us on Twitter @alchemyapi
• Use #AlchemistHour
What will be covered today?
#AlchemistHour
• Face detection/recognition examples • Sample calls • Parameter explanation
"imageFaces": [ { "age": { "ageRange": "55-64", "score": "0.6011" }, "gender": { "gender": "MALE", "score": "0.99394" }, "height": "233", "identity": { "disambiguated": { "dbpedia": "http://dbpedia.org/resource/Bill_Nye", "freebase": "http://rdf.freebase.com/ns/m.01j4ch", "name": "Bill Nye", "subType": [ "Person", "Academic", "BoardMember", "ProjectParticipant", "Scientist", "TVPersonality", "TVActor" ], "website": "http://www.billnye.com/", "yago": "http://yago-knowledge.org/resource/Bill_Nye" }, "name": "Bill Nye", "score": "0.992608" }, "positionX": "352", "positionY": "84", "width": "233" } ]}
Making API Calls - cURL
#AlchemistHour
curl --data-binary @face.jpg 'http://access.alchemyapi.com/calls/image/ImageGetRankedImageFaceTags? apikey='$API_KEY'&imagePostMode=raw&outputMode=json'
"imageFaces": [ { "age": { "ageRange": "35-44", "score": "0.506266" }, "gender": { "gender": "FEMALE", "score": "0.993307" }, "height": "140", "positionX": "22", "positionY": "65", "width": "140" } ]
Making API Calls - Python
#AlchemistHour
import requests apikey=YOUR_API_KEYpicture = open('face.jpg', 'rb').read()url = "http://access.alchemyapi.com/calls/image/ImageGetRankedImageFaceTags?apikey=%s&outputMode=json&imagePostMode=raw&forceShowAll=1" % apikey
r = requests.post(url = url, data = picture) print r.text
Parameters
#AlchemistHour
• url – url of image • only used with endpoint URLGetRankedImageFaceTags
• imagePostMode - set to raw, pass image via POST • only used with endpoint ImageGetRankedImageFaceTags
• apikey – your API key • outputMode – json or xml • knowledgeGraph – set to 1 to expose knowledge graph info
Additional info
#AlchemistHour
• Maximum image document size is 1 MB • 4 transaction credits per image call, with 1 additional transaction for
knowledge graph info
Remember, you can…
#AlchemistHour
• Get an API Key • Download an SDK • Check out the Getting Started Guides • Ask me questions!
#AlchemistHour
Q&A
• Look out for a follow up email with a copy of these slides, a recording of the webinar, Q&A recap, and additional resources
• The series continues on Wednesday, July 22 @ 12pm ET / 9 am PT
• July 22 - Sentiment Analysis / Personality Insights • August 8 - Cognitive News
#AlchemistHour
What’s next?
• June 24 – AlchemyAPI Overview • June 24 – Image Tagging • June 24 – Entity Extraction
#AlchemistHour
What have you missed?
Contact us 1-877-253-0308
zach@alchemyapi.com www.alchemyapi.com
Thank you for attending!
#AlchemistHour
top related