Class VisualRecognition

java.lang.Object
com.ibm.cloud.sdk.core.service.BaseService
com.ibm.watson.visual_recognition.v4.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 `2019-02-11`.
    • 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 `2019-02-11`.
      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 `2019-02-11`.
      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 `2019-02-11`.
      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 `2019-02-11`.

      Returns:
      the version
    • setVersion

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

      public com.ibm.cloud.sdk.core.http.ServiceCall<AnalyzeResponse> analyze​(AnalyzeOptions analyzeOptions)
      Deprecated.
      Analyze images.

      Analyze images by URL, by file, or both against your own collection. Make sure that **training_status.objects.ready** is `true` for the feature before you use a collection to analyze images.

      Encode the image and .zip file names in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      Parameters:
      analyzeOptions - the AnalyzeOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type AnalyzeResponse
    • createCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> createCollection​(CreateCollectionOptions createCollectionOptions)
      Deprecated.
      Create a collection.

      Create a collection that can be used to store images.

      To create a collection without specifying a name and description, include an empty JSON object in the request body.

      Encode the name and description in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      Parameters:
      createCollectionOptions - the CreateCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Collection
    • createCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> createCollection()
      Deprecated.
      Create a collection.

      Create a collection that can be used to store images.

      To create a collection without specifying a name and description, include an empty JSON object in the request body.

      Encode the name and description in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      Returns:
      a ServiceCall with a result of type Collection
    • listCollections

      public com.ibm.cloud.sdk.core.http.ServiceCall<CollectionsList> listCollections​(ListCollectionsOptions listCollectionsOptions)
      Deprecated.
      List collections.

      Retrieves a list of collections for the service instance.

      Parameters:
      listCollectionsOptions - the ListCollectionsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type CollectionsList
    • listCollections

      public com.ibm.cloud.sdk.core.http.ServiceCall<CollectionsList> listCollections()
      Deprecated.
      List collections.

      Retrieves a list of collections for the service instance.

      Returns:
      a ServiceCall with a result of type CollectionsList
    • getCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> getCollection​(GetCollectionOptions getCollectionOptions)
      Deprecated.
      Get collection details.

      Get details of one collection.

      Parameters:
      getCollectionOptions - the GetCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Collection
    • updateCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> updateCollection​(UpdateCollectionOptions updateCollectionOptions)
      Deprecated.
      Update a collection.

      Update the name or description of a collection.

      Encode the name and description in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      Parameters:
      updateCollectionOptions - the UpdateCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Collection
    • deleteCollection

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteCollection​(DeleteCollectionOptions deleteCollectionOptions)
      Deprecated.
      Delete a collection.

      Delete a collection from the service instance.

      Parameters:
      deleteCollectionOptions - the DeleteCollectionOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • getModelFile

      public com.ibm.cloud.sdk.core.http.ServiceCall<InputStream> getModelFile​(GetModelFileOptions getModelFileOptions)
      Deprecated.
      Get a model.

      Download a model that you can deploy to detect objects in images. The collection must include a generated model, which is indicated in the response for the collection details as `"rscnn_ready": true`. If the value is `false`, train or retrain the collection to generate the model.

      Currently, the model format is specific to Android apps. For more information about how to deploy the model to your app, see the [Watson Visual Recognition on Android](https://github.com/matt-ny/rscnn) project in GitHub.

      Parameters:
      getModelFileOptions - the GetModelFileOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type InputStream
    • addImages

      public com.ibm.cloud.sdk.core.http.ServiceCall<ImageDetailsList> addImages​(AddImagesOptions addImagesOptions)
      Deprecated.
      Add images.

      Add images to a collection by URL, by file, or both.

      Encode the image and .zip file names in UTF-8 if they contain non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      Parameters:
      addImagesOptions - the AddImagesOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ImageDetailsList
    • listImages

      public com.ibm.cloud.sdk.core.http.ServiceCall<ImageSummaryList> listImages​(ListImagesOptions listImagesOptions)
      Deprecated.
      List images.

      Retrieves a list of images in a collection.

      Parameters:
      listImagesOptions - the ListImagesOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ImageSummaryList
    • getImageDetails

      public com.ibm.cloud.sdk.core.http.ServiceCall<ImageDetails> getImageDetails​(GetImageDetailsOptions getImageDetailsOptions)
      Deprecated.
      Get image details.

      Get the details of an image in a collection.

      Parameters:
      getImageDetailsOptions - the GetImageDetailsOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ImageDetails
    • deleteImage

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteImage​(DeleteImageOptions deleteImageOptions)
      Deprecated.
      Delete an image.

      Delete one image from a collection.

      Parameters:
      deleteImageOptions - the DeleteImageOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • getJpegImage

      public com.ibm.cloud.sdk.core.http.ServiceCall<InputStream> getJpegImage​(GetJpegImageOptions getJpegImageOptions)
      Deprecated.
      Get a JPEG file of an image.

      Download a JPEG representation of an image.

      Parameters:
      getJpegImageOptions - the GetJpegImageOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type InputStream
    • listObjectMetadata

      public com.ibm.cloud.sdk.core.http.ServiceCall<ObjectMetadataList> listObjectMetadata​(ListObjectMetadataOptions listObjectMetadataOptions)
      Deprecated.
      List object metadata.

      Retrieves a list of object names in a collection.

      Parameters:
      listObjectMetadataOptions - the ListObjectMetadataOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ObjectMetadataList
    • updateObjectMetadata

      public com.ibm.cloud.sdk.core.http.ServiceCall<UpdateObjectMetadata> updateObjectMetadata​(UpdateObjectMetadataOptions updateObjectMetadataOptions)
      Deprecated.
      Update an object name.

      Update the name of an object. A successful request updates the training data for all images that use the object.

      Parameters:
      updateObjectMetadataOptions - the UpdateObjectMetadataOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type UpdateObjectMetadata
    • getObjectMetadata

      public com.ibm.cloud.sdk.core.http.ServiceCall<ObjectMetadata> getObjectMetadata​(GetObjectMetadataOptions getObjectMetadataOptions)
      Deprecated.
      Get object metadata.

      Get the number of bounding boxes for a single object in a collection.

      Parameters:
      getObjectMetadataOptions - the GetObjectMetadataOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type ObjectMetadata
    • deleteObject

      public com.ibm.cloud.sdk.core.http.ServiceCall<Void> deleteObject​(DeleteObjectOptions deleteObjectOptions)
      Deprecated.
      Delete an object.

      Delete one object from a collection. A successful request deletes the training data from all images that use the object.

      Parameters:
      deleteObjectOptions - the DeleteObjectOptions containing the options for the call
      Returns:
      a ServiceCall with a void result
    • train

      public com.ibm.cloud.sdk.core.http.ServiceCall<Collection> train​(TrainOptions trainOptions)
      Deprecated.
      Train a collection.

      Start training on images in a collection. The collection must have enough training data and untrained data (the **training_status.objects.data_changed** is `true`). If training is in progress, the request queues the next training job.

      Parameters:
      trainOptions - the TrainOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type Collection
    • addImageTrainingData

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingDataObjects> addImageTrainingData​(AddImageTrainingDataOptions addImageTrainingDataOptions)
      Deprecated.
      Add training data to an image.

      Add, update, or delete training data for an image. Encode the object name in UTF-8 if it contains non-ASCII characters. The service assumes UTF-8 encoding if it encounters non-ASCII characters.

      Elements in the request replace the existing elements.

      - To update the training data, provide both the unchanged and the new or changed values.

      - To delete the training data, provide an empty value for the training data.

      Parameters:
      addImageTrainingDataOptions - the AddImageTrainingDataOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingDataObjects
    • getTrainingUsage

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingEvents> getTrainingUsage​(GetTrainingUsageOptions getTrainingUsageOptions)
      Deprecated.
      Get training usage.

      Information about the completed training events. You can use this information to determine how close you are to the training limits for the month.

      Parameters:
      getTrainingUsageOptions - the GetTrainingUsageOptions containing the options for the call
      Returns:
      a ServiceCall with a result of type TrainingEvents
    • getTrainingUsage

      public com.ibm.cloud.sdk.core.http.ServiceCall<TrainingEvents> getTrainingUsage()
      Deprecated.
      Get training usage.

      Information about the completed training events. You can use this information to determine how close you are to the training limits for the month.

      Returns:
      a ServiceCall with a result of type TrainingEvents
    • 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