watson_developer_cloud.visual_recognition_v3 module

The v3 Visual Recognition service (https://www.ibm.com/watson/developercloud/visual-recognition.html)

class VisualRecognitionV3(version, url='https://gateway-a.watsonplatform.net/visual-recognition/api', **kwargs)[source]

Bases: watson_developer_cloud.watson_developer_cloud_service.WatsonDeveloperCloudService

Client for the Visual Recognition service

default_url = 'https://gateway-a.watsonplatform.net/visual-recognition/api'
latest_version = '2016-05-20'
get_classifier(classifier_id)[source]

Retrieves information about a specific classifier. :param classifier_id: The classifier id

delete_classifier(classifier_id)[source]

Deletes a custom classifier with the specified classifier id. :param classifier_id: The classifier id

list_classifiers(verbose=False)[source]

Returns a list of user-created and built-in classifiers. (May change in the future to only user-created.) :param verbose: Specifies whether to return more information about each classifier, such as the author

create_classifier(name, **kwargs)[source]

Train a new classifier from example images which are uploaded. :param name: The desired short name of the new classifier. :param <NAME>_positive_examples: zip files of images that depict the subject of the new classifier. :param negative_examples: A zip file of images that do not depict the subject of the new classifier. :return:

update_classifier(classifier_id, **kwargs)[source]

Updates an existing classifier by adding images to existing or new classes. :param classifier_id: The id of the classifier to update. :param <NAME>_positive_examples: zip files of images that depict the subject of the class. :param negative_examples: A zip file of images that do not depict the subject of any of the classes. :return:

classify(images_file=None, images_url=None, classifier_ids=None, owners=None, threshold=None)[source]

Returns a list of classification scores for one or more input images. :param images_file: An image file or zip file of image files to analyze. :param images_url: The url for an image file or zip file of images to analyze. :param classifier_ids: The ids of classifiers to consider. When absent, considers all classifiers. :return:

detect_faces(images_file=None, images_url=None)[source]

Returns a list of faces detected. This includes identities for famous people. :param images_file: An image file or zip file of image files to analyze. :param images_url: The url for an image file or zip file of images to analyze. :return:

recognize_text(images_file=None, images_url=None)[source]

Returns a list of recognized text :param images_file: An image file or zip file of image files to analyze. :param images_url: The url for an image file or zip file of images to analyze. :return: