Using the facial detection model

Take a look at this photo:

Tanmay and Rob at IBM's Astor Place office

Let's say you wanted to crop out the faces from this image and predict the ages based on the faces. You would use very similar code to what you used for your own classifierthe only difference is that you're going to use the faces classifier ID.

This is the code you used last time:

[code_1_classify_dogs.py]1.   from ibm_watson.visual_recognition_v3 \2.       import VisualRecognitionV33.    4.   visual_recognition = VisualRecognitionV3(5.       api_key="unBcJ-zq5gaguq7g6rQnpu9K-1ue8yKvoclgqMf7wMLx",6.       version="2018-03-19")7.    8.   with open('./example_goldenretriever.jpg', ...

Get Cognitive Computing with IBM Watson now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.