Class VisualRecognition

java.lang.Object
com.ibm.cloud.sdk.core.service.BaseService
com.ibm.watson.visual_recognition.v3.VisualRecognition

@Deprecated
public class VisualRecognition
extends com.ibm.cloud.sdk.core.service.BaseService
Deprecated.
On 1 December 2021, Visual Recognition will no longer be available. For more information, see Visual Recognition Deprecation (https://github.com/watson-developer-cloud/java-sdk/tree/master#visual-recognition-deprecation).
  • Field Details

  • Constructor Details

    • VisualRecognition

      public VisualRecognition​(String version)
      Deprecated.
      Constructs an instance of the `VisualRecognition` client. The default service name is used to configure the client instance.
      Parameters:
      version - Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2018-03-19`.
    • VisualRecognition

      public VisualRecognition​(String version, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Deprecated.
      Constructs an instance of the `VisualRecognition` client. The default service name and specified authenticator are used to configure the client instance.
      Parameters:
      version - Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2018-03-19`.
      authenticator - the Authenticator instance to be configured for this client
    • VisualRecognition

      public VisualRecognition​(String version, String serviceName)
      Deprecated.
      Constructs an instance of the `VisualRecognition` client. The specified service name is used to configure the client instance.
      Parameters:
      version - Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2018-03-19`.
      serviceName - the service name to be used when configuring the client instance
    • VisualRecognition

      public VisualRecognition​(String version, String serviceName, com.ibm.cloud.sdk.core.security.Authenticator authenticator)
      Deprecated.
      Constructs an instance of the `VisualRecognition` client. The specified service name and authenticator are used to configure the client instance.
      Parameters:
      version - Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2018-03-19`.
      serviceName - the service name to be used when configuring the client instance
      authenticator - the Authenticator instance to be configured for this client
  • Method Details

    • getVersion

      public String getVersion()
      Deprecated.
      Gets the version.

      Release date of the API version you want to use. Specify dates in YYYY-MM-DD format. The current version is `2018-03-19`.

      Returns:
      the version
    • setVersion

      public void setVersion​(String version)
      Deprecated.
      Sets the version.
      Parameters:
      version - the new version
    • classify

      public com.ibm.cloud.sdk.core.http.ServiceCall<ClassifiedImages> classify​(ClassifyOptions classifyOptions)
      Deprecated.
      Classify images.

      Classify images with built-in or custom classifiers.

      Parameters:
      classifyOptions - the ClassifyOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ClassifiedImages
    • classify

      public com.ibm.cloud.sdk.core.http.ServiceCall<ClassifiedImages> classify()
      Deprecated.
      Classify images.

      Classify images with built-in or custom classifiers.

      Returns:
      a ServiceCall with a result of type ClassifiedImages
    • createClassifier

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classifier> createClassifier​(CreateClassifierOptions createClassifierOptions)
      Deprecated.
      Create a classifier.

      Train a new multi-faceted classifier on the uploaded image data. Create your custom classifier with positive or negative example training images. Include at least two sets of examples, either two positive example files or one positive and one negative file. You can upload a maximum of 256 MB per call.

      **Tips when creating:**

      - If you set the **X-Watson-Learning-Opt-Out** header parameter to `true` when you create a classifier, the example training images are not stored. Save your training images locally. For more information, see [Data collection](#data-collection).

      - Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image file names, and classifier and class names). The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      Parameters:
      createClassifierOptions - the CreateClassifierOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Classifier
    • listClassifiers

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classifiers> listClassifiers​(ListClassifiersOptions listClassifiersOptions)
      Deprecated.
      Retrieve a list of classifiers.
      Parameters:
      listClassifiersOptions - the ListClassifiersOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Classifiers
    • listClassifiers

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classifiers> listClassifiers()
      Deprecated.
      Retrieve a list of classifiers.
      Returns:
      a ServiceCall with a result of type Classifiers
    • getClassifier

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classifier> getClassifier​(GetClassifierOptions getClassifierOptions)
      Deprecated.
      Retrieve classifier details.

      Retrieve information about a custom classifier.

      Parameters:
      getClassifierOptions - the GetClassifierOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Classifier
    • updateClassifier

      public com.ibm.cloud.sdk.core.http.ServiceCall<Classifier> updateClassifier​(UpdateClassifierOptions updateClassifierOptions)
      Deprecated.
      Update a classifier.

      Update a custom classifier by adding new positive or negative classes or by adding new images to existing classes. You must supply at least one set of positive or negative examples. For details, see [Updating custom classifiers](https://cloud.ibm.com/docs/visual-recognition?topic=visual-recognition-customizing#updating-custom-classifiers).

      Encode all names in UTF-8 if they contain non-ASCII characters (.zip and image file names, and classifier and class names). The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      **Tips about retraining:**

      - You can't update the classifier if the **X-Watson-Learning-Opt-Out** header parameter was set to `true` when the classifier was created. Training images are not stored in that case. Instead, create another classifier. For more information, see [Data collection](#data-collection).

      - Don't make retraining calls on a classifier until the status is ready. When you submit retraining requests in parallel, the last request overwrites the previous requests. The `retrained` property shows the last time the classifier retraining finished.

      Parameters:
      updateClassifierOptions - the UpdateClassifierOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Classifier
    • deleteClassifier

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteClassifier​(DeleteClassifierOptions deleteClassifierOptions)
      Deprecated.
      Delete a classifier.
      Parameters:
      deleteClassifierOptions - the DeleteClassifierOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • getCoreMlModel

      public com.ibm.cloud.sdk.core.http.ServiceCall<InputStream> getCoreMlModel​(GetCoreMlModelOptions getCoreMlModelOptions)
      Deprecated.
      Retrieve a Core ML model of a classifier.

      Download a Core ML model file (.mlmodel) of a custom classifier that returns <tt>"core_ml_enabled": true</tt> in the classifier details.

      Parameters:
      getCoreMlModelOptions - the GetCoreMlModelOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type InputStream
    • deleteUserData

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteUserData​(DeleteUserDataOptions deleteUserDataOptions)
      Deprecated.
      Delete labeled data.

      Deletes all data associated with a specified customer ID. The method has no effect if no data is associated with the customer ID.

      You associate a customer ID with data by passing the `X-Watson-Metadata` header with a request that passes data. For more information about personal data and customer IDs, see [Information security](https://cloud.ibm.com/docs/visual-recognition?topic=visual-recognition-information-security).

      Parameters:
      deleteUserDataOptions - the DeleteUserDataOptions containing the options for the call
      Returns:
      a ServiceCall with a void result