public class VisualRecognition
extends com.ibm.cloud.sdk.core.service.BaseService
| Constructor and Description |
|---|
VisualRecognition(java.lang.String versionDate)
Constructs a new `VisualRecognition` client using the DEFAULT_SERVICE_NAME.
|
VisualRecognition(java.lang.String versionDate,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs a new `VisualRecognition` client with the DEFAULT_SERVICE_NAME and the specified
Authenticator.
|
VisualRecognition(java.lang.String versionDate,
java.lang.String serviceName)
Constructs a new `VisualRecognition` client with the specified serviceName.
|
VisualRecognition(java.lang.String versionDate,
java.lang.String serviceName,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
Constructs a new `VisualRecognition` client with the specified Authenticator and serviceName.
|
| Modifier and Type | Method and Description |
|---|---|
com.ibm.cloud.sdk.core.http.ServiceCall<ImageDetailsList> |
addImages(AddImagesOptions addImagesOptions)
Add images.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingDataObjects> |
addImageTrainingData(AddImageTrainingDataOptions addImageTrainingDataOptions)
Add training data to an image.
|
com.ibm.cloud.sdk.core.http.ServiceCall<AnalyzeResponse> |
analyze(AnalyzeOptions analyzeOptions)
Analyze images.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
createCollection()
Create a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
createCollection(CreateCollectionOptions createCollectionOptions)
Create a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> |
deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
Delete a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> |
deleteImage(DeleteImageOptions deleteImageOptions)
Delete an image.
|
com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> |
deleteObject(DeleteObjectOptions deleteObjectOptions)
Delete an object.
|
com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> |
deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
Delete labeled data.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
getCollection(GetCollectionOptions getCollectionOptions)
Get collection details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ImageDetails> |
getImageDetails(GetImageDetailsOptions getImageDetailsOptions)
Get image details.
|
com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> |
getJpegImage(GetJpegImageOptions getJpegImageOptions)
Get a JPEG file of an image.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ObjectMetadata> |
getObjectMetadata(GetObjectMetadataOptions getObjectMetadataOptions)
Get object metadata.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingEvents> |
getTrainingUsage()
Get training usage.
|
com.ibm.cloud.sdk.core.http.ServiceCall<TrainingEvents> |
getTrainingUsage(GetTrainingUsageOptions getTrainingUsageOptions)
Get training usage.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CollectionsList> |
listCollections()
List collections.
|
com.ibm.cloud.sdk.core.http.ServiceCall<CollectionsList> |
listCollections(ListCollectionsOptions listCollectionsOptions)
List collections.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ImageSummaryList> |
listImages(ListImagesOptions listImagesOptions)
List images.
|
com.ibm.cloud.sdk.core.http.ServiceCall<ObjectMetadataList> |
listObjectMetadata(ListObjectMetadataOptions listObjectMetadataOptions)
List object metadata.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
train(TrainOptions trainOptions)
Train a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<Collection> |
updateCollection(UpdateCollectionOptions updateCollectionOptions)
Update a collection.
|
com.ibm.cloud.sdk.core.http.ServiceCall<UpdateObjectMetadata> |
updateObjectMetadata(UpdateObjectMetadataOptions updateObjectMetadataOptions)
Update an object name.
|
configureClient, configureHttpClient, configureService, createServiceCall, getAuthenticator, getClient, getEndPoint, getName, getServiceUrl, isJsonMimeType, isJsonPatchMimeType, processServiceCall, setAuthentication, setClient, setDefaultHeaders, setDefaultHeaders, setEndPoint, setServiceUrl, toStringpublic VisualRecognition(java.lang.String versionDate)
versionDate - The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
will keep your API calls from failing when the service introduces breaking changes.public VisualRecognition(java.lang.String versionDate,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
versionDate - The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
will keep your API calls from failing when the service introduces breaking changes.authenticator - the Authenticator instance to be configured for this servicepublic VisualRecognition(java.lang.String versionDate,
java.lang.String serviceName)
versionDate - The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
will keep your API calls from failing when the service introduces breaking changes.serviceName - The name of the service to configure.public VisualRecognition(java.lang.String versionDate,
java.lang.String serviceName,
com.ibm.cloud.sdk.core.security.Authenticator authenticator)
versionDate - The version date (yyyy-MM-dd) of the REST API to use. Specifying this value
will keep your API calls from failing when the service introduces breaking changes.serviceName - The name of the service to configure.authenticator - the Authenticator instance to be configured for this servicepublic com.ibm.cloud.sdk.core.http.ServiceCall<AnalyzeResponse> analyze(AnalyzeOptions analyzeOptions)
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.
analyzeOptions - the AnalyzeOptions containing the options for the callServiceCall with a response type of AnalyzeResponsepublic com.ibm.cloud.sdk.core.http.ServiceCall<Collection> createCollection(CreateCollectionOptions createCollectionOptions)
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.
createCollectionOptions - the CreateCollectionOptions containing the options for
the callServiceCall with a response type of Collectionpublic com.ibm.cloud.sdk.core.http.ServiceCall<Collection> createCollection()
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.
ServiceCall with a response type of Collectionpublic com.ibm.cloud.sdk.core.http.ServiceCall<CollectionsList> listCollections(ListCollectionsOptions listCollectionsOptions)
Retrieves a list of collections for the service instance.
listCollectionsOptions - the ListCollectionsOptions containing the options for the
callServiceCall with a response type of CollectionsListpublic com.ibm.cloud.sdk.core.http.ServiceCall<CollectionsList> listCollections()
Retrieves a list of collections for the service instance.
ServiceCall with a response type of CollectionsListpublic com.ibm.cloud.sdk.core.http.ServiceCall<Collection> getCollection(GetCollectionOptions getCollectionOptions)
Get details of one collection.
getCollectionOptions - the GetCollectionOptions containing the options for the
callServiceCall with a response type of Collectionpublic com.ibm.cloud.sdk.core.http.ServiceCall<Collection> updateCollection(UpdateCollectionOptions updateCollectionOptions)
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.
updateCollectionOptions - the UpdateCollectionOptions containing the options for
the callServiceCall with a response type of Collectionpublic com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteCollection(DeleteCollectionOptions deleteCollectionOptions)
Delete a collection from the service instance.
deleteCollectionOptions - the DeleteCollectionOptions containing the options for
the callServiceCall with a response type of Voidpublic com.ibm.cloud.sdk.core.http.ServiceCall<ImageDetailsList> addImages(AddImagesOptions addImagesOptions)
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.
addImagesOptions - the AddImagesOptions containing the options for the callServiceCall with a response type of ImageDetailsListpublic com.ibm.cloud.sdk.core.http.ServiceCall<ImageSummaryList> listImages(ListImagesOptions listImagesOptions)
Retrieves a list of images in a collection.
listImagesOptions - the ListImagesOptions containing the options for the callServiceCall with a response type of ImageSummaryListpublic com.ibm.cloud.sdk.core.http.ServiceCall<ImageDetails> getImageDetails(GetImageDetailsOptions getImageDetailsOptions)
Get the details of an image in a collection.
getImageDetailsOptions - the GetImageDetailsOptions containing the options for the
callServiceCall with a response type of ImageDetailspublic com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteImage(DeleteImageOptions deleteImageOptions)
Delete one image from a collection.
deleteImageOptions - the DeleteImageOptions containing the options for the callServiceCall with a response type of Voidpublic com.ibm.cloud.sdk.core.http.ServiceCall<java.io.InputStream> getJpegImage(GetJpegImageOptions getJpegImageOptions)
Download a JPEG representation of an image.
getJpegImageOptions - the GetJpegImageOptions containing the options for the callServiceCall with a response type of InputStreampublic com.ibm.cloud.sdk.core.http.ServiceCall<ObjectMetadataList> listObjectMetadata(ListObjectMetadataOptions listObjectMetadataOptions)
Retrieves a list of object names in a collection.
listObjectMetadataOptions - the ListObjectMetadataOptions containing the options
for the callServiceCall with a response type of ObjectMetadataListpublic com.ibm.cloud.sdk.core.http.ServiceCall<UpdateObjectMetadata> updateObjectMetadata(UpdateObjectMetadataOptions updateObjectMetadataOptions)
Update the name of an object. A successful request updates the training data for all images that use the object.
updateObjectMetadataOptions - the UpdateObjectMetadataOptions containing the
options for the callServiceCall with a response type of UpdateObjectMetadatapublic com.ibm.cloud.sdk.core.http.ServiceCall<ObjectMetadata> getObjectMetadata(GetObjectMetadataOptions getObjectMetadataOptions)
Get the number of bounding boxes for a single object in a collection.
getObjectMetadataOptions - the GetObjectMetadataOptions containing the options for
the callServiceCall with a response type of ObjectMetadatapublic com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteObject(DeleteObjectOptions deleteObjectOptions)
Delete one object from a collection. A successful request deletes the training data from all images that use the object.
deleteObjectOptions - the DeleteObjectOptions containing the options for the callServiceCall with a response type of Voidpublic com.ibm.cloud.sdk.core.http.ServiceCall<Collection> train(TrainOptions trainOptions)
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.
trainOptions - the TrainOptions containing the options for the callServiceCall with a response type of Collectionpublic com.ibm.cloud.sdk.core.http.ServiceCall<TrainingDataObjects> addImageTrainingData(AddImageTrainingDataOptions addImageTrainingDataOptions)
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.
addImageTrainingDataOptions - the AddImageTrainingDataOptions containing the
options for the callServiceCall with a response type of TrainingDataObjectspublic com.ibm.cloud.sdk.core.http.ServiceCall<TrainingEvents> getTrainingUsage(GetTrainingUsageOptions getTrainingUsageOptions)
Information about the completed training events. You can use this information to determine how close you are to the training limits for the month.
getTrainingUsageOptions - the GetTrainingUsageOptions containing the options for
the callServiceCall with a response type of TrainingEventspublic com.ibm.cloud.sdk.core.http.ServiceCall<TrainingEvents> getTrainingUsage()
Information about the completed training events. You can use this information to determine how close you are to the training limits for the month.
ServiceCall with a response type of TrainingEventspublic com.ibm.cloud.sdk.core.http.ServiceCall<java.lang.Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
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).
deleteUserDataOptions - the DeleteUserDataOptions containing the options for the
callServiceCall with a response type of Void