alchemist hour: face recognition

15
AlchemyAPI – Face Recognition

Upload: alchemyapi

Post on 07-Aug-2015

162 views

Category:

Technology


2 download

TRANSCRIPT

Page 1: Alchemist Hour: Face Recognition

AlchemyAPI – Face Recognition

Page 2: Alchemist Hour: 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

Page 3: Alchemist Hour: Face Recognition

What will be covered today?

#AlchemistHour

•  Face detection/recognition examples •  Sample calls •  Parameter explanation

Page 4: Alchemist Hour: Face Recognition

"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" } ]}

Page 5: Alchemist Hour: Face Recognition
Page 6: Alchemist Hour: Face Recognition
Page 7: Alchemist Hour: Face Recognition

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" } ]

Page 8: Alchemist Hour: Face Recognition

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

Page 9: Alchemist Hour: Face Recognition

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

Page 10: Alchemist Hour: Face Recognition

Additional info

#AlchemistHour

•  Maximum image document size is 1 MB •  4 transaction credits per image call, with 1 additional transaction for

knowledge graph info

Page 11: Alchemist Hour: Face Recognition

Remember, you can…

#AlchemistHour

•  Get an API Key •  Download an SDK •  Check out the Getting Started Guides •  Ask me questions!

Page 12: Alchemist Hour: Face Recognition

#AlchemistHour

Q&A

Page 13: Alchemist Hour: Face Recognition

•  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?

Page 14: Alchemist Hour: Face Recognition

•  June 24 – AlchemyAPI Overview •  June 24 – Image Tagging •  June 24 – Entity Extraction

#AlchemistHour

What have you missed?

Page 15: Alchemist Hour: Face Recognition

Contact us 1-877-253-0308

[email protected] www.alchemyapi.com

Thank you for attending!

#AlchemistHour