Beginner’s Guide to Using Microsoft Cognitive Services Face API: Part 3

Kiva lenders have lent over a billion dollars to entrepreneurs around the world
<Response [200]>Response:[{'faceId': '0b830588-049b-4399-85e1-b1b53bc78c0a', 'faceRectangle': {'top': 187, 'left': 313, 'width': 266, 'height': 266}, 'faceAttributes': {'smile': 0.997}}]

Step 1: Planning

Step 2: Mise-en-Place for data and fetching tools

[‘cal_tech_faces/image_0051.jpg’, ‘cal_tech_faces/image_0052.jpg’, ‘cal_tech_faces/image_0053.jpg’, ‘cal_tech_faces/image_0054.jpg’, ‘cal_tech_faces/image_0055.jpg’, ‘cal_tech_faces/image_0056.jpg’, ‘cal_tech_faces/image_0057.jpg’, ‘cal_tech_faces/image_0058.jpg’, ‘cal_tech_faces/image_0059.jpg’, ‘cal_tech_faces/image_0060.jpg’]
cal_tech_faces/image_0051.jpg
cal_tech_faces/image_0052.jpg
cal_tech_faces/image_0053.jpg
cal_tech_faces/image_0054.jpg
cal_tech_faces/image_0055.jpg
cal_tech_faces/image_0056.jpg
cal_tech_faces/image_0057.jpg
cal_tech_faces/image_0058.jpg
cal_tech_faces/image_0059.jpg
cal_tech_faces/image_0060.jpg
Turning face_detect.py into a function

Step 3: Coding it all together

putting all the piece together
[{'faceId': 'ce069d3c-fe7b-461f-bc94-5a70afeaf167', 'faceRectangle': {'top': 213, 'left': 325, 'width': 258, 'height': 258}, 'faceAttributes': {'smile': 0.026}}]<Response [429]>Response:{'error': {'code': 'RateLimitExceeded', 'message': 'Rate limit is exceeded. Try again later.'}}
The whole working shebang

curiouser and curiouser | melissa fabros is a software engineer at www.kiva.org