public class VisualRecognition extends WatsonService
defaultHeaders, JSON_MIME_PATTERN, JSON_PATCH_MIME_PATTERN, MESSAGE_CODE, MESSAGE_ERROR, skipAuthentication, VERSION| Constructor and Description |
|---|
VisualRecognition(java.lang.String versionDate)
Instantiates a new `VisualRecognition`.
|
VisualRecognition(java.lang.String versionDate,
IamOptions iamOptions)
Instantiates a new `VisualRecognition` with IAM.
|
VisualRecognition(java.lang.String versionDate,
java.lang.String apiKey)
Deprecated.
This form of authentication is deprecated and will be removed in the next major release. Please
authenticate using IAM credentials, using either the (String, IamOptions) constructor or with the
setIamCredentials() method.
|
| Modifier and Type | Method and Description |
|---|---|
ServiceCall<ClassifiedImages> |
classify()
Classify images.
|
ServiceCall<ClassifiedImages> |
classify(ClassifyOptions classifyOptions)
Classify images.
|
ServiceCall<Classifier> |
createClassifier(CreateClassifierOptions createClassifierOptions)
Create a classifier.
|
ServiceCall<java.lang.Void> |
deleteClassifier(DeleteClassifierOptions deleteClassifierOptions)
Delete a classifier.
|
ServiceCall<java.lang.Void> |
deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
Delete labeled data.
|
ServiceCall<DetectedFaces> |
detectFaces()
Detect faces in images.
|
ServiceCall<DetectedFaces> |
detectFaces(DetectFacesOptions detectFacesOptions)
Detect faces in images.
|
ServiceCall<Classifier> |
getClassifier(GetClassifierOptions getClassifierOptions)
Retrieve classifier details.
|
ServiceCall<java.io.InputStream> |
getCoreMlModel(GetCoreMlModelOptions getCoreMlModelOptions)
Retrieve a Core ML model of a classifier.
|
ServiceCall<Classifiers> |
listClassifiers()
Retrieve a list of classifiers.
|
ServiceCall<Classifiers> |
listClassifiers(ListClassifiersOptions listClassifiersOptions)
Retrieve a list of classifiers.
|
protected void |
setAuthentication(okhttp3.Request.Builder builder)
Sets the authentication.
|
ServiceCall<Classifier> |
updateClassifier(UpdateClassifierOptions updateClassifierOptions)
Update a classifier.
|
configureClient, configureHttpClient, createServiceCall, getApiKey, getEndPoint, getName, getPassword, getToken, getUsername, isJsonMimeType, isJsonPatchMimeType, isTokenManagerSet, processServiceCall, setApiKey, setDefaultHeaders, setDefaultHeaders, setEndPoint, setIamCredentials, setSkipAuthentication, setUsernameAndPassword, 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,
java.lang.String apiKey)
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.apiKey - the API Keypublic VisualRecognition(java.lang.String versionDate,
IamOptions iamOptions)
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.iamOptions - the options for authenticating through IAMprotected void setAuthentication(okhttp3.Request.Builder builder)
WatsonServicesetAuthentication in class WatsonServicebuilder - the new authenticationpublic ServiceCall<ClassifiedImages> classify(ClassifyOptions classifyOptions)
classifyOptions - the ClassifyOptions containing the options for the callServiceCall with a response type of ClassifiedImagespublic ServiceCall<ClassifiedImages> classify()
ServiceCall with a response type of ClassifiedImagespublic ServiceCall<DetectedFaces> detectFaces(DetectFacesOptions detectFacesOptions)
detectFacesOptions - the DetectFacesOptions containing the options for the callServiceCall with a response type of DetectedFacespublic ServiceCall<DetectedFaces> detectFaces()
ServiceCall with a response type of DetectedFacespublic ServiceCall<Classifier> createClassifier(CreateClassifierOptions createClassifierOptions)
createClassifierOptions - the CreateClassifierOptions containing the options for the callServiceCall with a response type of Classifierpublic ServiceCall<java.lang.Void> deleteClassifier(DeleteClassifierOptions deleteClassifierOptions)
deleteClassifierOptions - the DeleteClassifierOptions containing the options for the callServiceCall with a response type of Voidpublic ServiceCall<Classifier> getClassifier(GetClassifierOptions getClassifierOptions)
getClassifierOptions - the GetClassifierOptions containing the options for the callServiceCall with a response type of Classifierpublic ServiceCall<Classifiers> listClassifiers(ListClassifiersOptions listClassifiersOptions)
listClassifiersOptions - the ListClassifiersOptions containing the options for the callServiceCall with a response type of Classifierspublic ServiceCall<Classifiers> listClassifiers()
ServiceCall with a response type of Classifierspublic ServiceCall<Classifier> updateClassifier(UpdateClassifierOptions updateClassifierOptions)
updateClassifierOptions - the UpdateClassifierOptions containing the options for the callServiceCall with a response type of Classifierpublic ServiceCall<java.io.InputStream> getCoreMlModel(GetCoreMlModelOptions getCoreMlModelOptions)
getCoreMlModelOptions - the GetCoreMlModelOptions containing the options for the callServiceCall with a response type of InputStreampublic ServiceCall<java.lang.Void> deleteUserData(DeleteUserDataOptions deleteUserDataOptions)
deleteUserDataOptions - the DeleteUserDataOptions containing the options for the callServiceCall with a response type of Void