Documentation ¶
Overview ¶
Package visualrecognitionv4 : Operations and models for the VisualRecognitionV4 service
Index ¶
- Constants
- type AddImageTrainingDataOptions
- func (options *AddImageTrainingDataOptions) SetCollectionID(collectionID string) *AddImageTrainingDataOptions
- func (options *AddImageTrainingDataOptions) SetHeaders(param map[string]string) *AddImageTrainingDataOptions
- func (options *AddImageTrainingDataOptions) SetImageID(imageID string) *AddImageTrainingDataOptions
- func (options *AddImageTrainingDataOptions) SetObjects(objects []TrainingDataObject) *AddImageTrainingDataOptions
- type AddImagesOptions
- func (options *AddImagesOptions) SetCollectionID(collectionID string) *AddImagesOptions
- func (options *AddImagesOptions) SetHeaders(param map[string]string) *AddImagesOptions
- func (options *AddImagesOptions) SetImageURL(imageURL []string) *AddImagesOptions
- func (options *AddImagesOptions) SetImagesFile(imagesFile []FileWithMetadata) *AddImagesOptions
- func (options *AddImagesOptions) SetTrainingData(trainingData string) *AddImagesOptions
- type AnalyzeOptions
- func (options *AnalyzeOptions) SetCollectionIds(collectionIds []string) *AnalyzeOptions
- func (options *AnalyzeOptions) SetFeatures(features []string) *AnalyzeOptions
- func (options *AnalyzeOptions) SetHeaders(param map[string]string) *AnalyzeOptions
- func (options *AnalyzeOptions) SetImageURL(imageURL []string) *AnalyzeOptions
- func (options *AnalyzeOptions) SetImagesFile(imagesFile []FileWithMetadata) *AnalyzeOptions
- func (options *AnalyzeOptions) SetThreshold(threshold float32) *AnalyzeOptions
- type AnalyzeResponse
- type Collection
- type CollectionObjects
- type CollectionsList
- type CreateCollectionOptions
- type DeleteCollectionOptions
- type DeleteImageOptions
- type DeleteObjectOptions
- type DeleteUserDataOptions
- type DetectedObjects
- type Error
- type ErrorTarget
- type FileWithMetadata
- type GetCollectionOptions
- type GetImageDetailsOptions
- type GetJpegImageOptions
- func (options *GetJpegImageOptions) SetCollectionID(collectionID string) *GetJpegImageOptions
- func (options *GetJpegImageOptions) SetHeaders(param map[string]string) *GetJpegImageOptions
- func (options *GetJpegImageOptions) SetImageID(imageID string) *GetJpegImageOptions
- func (options *GetJpegImageOptions) SetSize(size string) *GetJpegImageOptions
- type GetModelFileOptions
- func (options *GetModelFileOptions) SetCollectionID(collectionID string) *GetModelFileOptions
- func (options *GetModelFileOptions) SetFeature(feature string) *GetModelFileOptions
- func (options *GetModelFileOptions) SetHeaders(param map[string]string) *GetModelFileOptions
- func (options *GetModelFileOptions) SetModelFormat(modelFormat string) *GetModelFileOptions
- type GetObjectMetadataOptions
- type GetTrainingUsageOptions
- type Image
- type ImageDetails
- type ImageDetailsList
- type ImageDimensions
- type ImageSource
- type ImageSummary
- type ImageSummaryList
- type ListCollectionsOptions
- type ListImagesOptions
- type ListObjectMetadataOptions
- type Location
- type ObjectDetail
- type ObjectMetadata
- type ObjectMetadataList
- type ObjectTrainingStatus
- type TrainOptions
- type TrainingDataObject
- type TrainingDataObjects
- type TrainingEvent
- type TrainingEvents
- type TrainingStatus
- type UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetCollectionID(collectionID string) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetDescription(description string) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetHeaders(param map[string]string) *UpdateCollectionOptions
- func (options *UpdateCollectionOptions) SetName(name string) *UpdateCollectionOptions
- type UpdateObjectMetadata
- type UpdateObjectMetadataOptions
- func (options *UpdateObjectMetadataOptions) SetCollectionID(collectionID string) *UpdateObjectMetadataOptions
- func (options *UpdateObjectMetadataOptions) SetHeaders(param map[string]string) *UpdateObjectMetadataOptions
- func (options *UpdateObjectMetadataOptions) SetNewObject(newObject string) *UpdateObjectMetadataOptions
- func (options *UpdateObjectMetadataOptions) SetObject(object string) *UpdateObjectMetadataOptions
- type VisualRecognitionV4
- func (visualRecognition *VisualRecognitionV4) AddImageTrainingData(addImageTrainingDataOptions *AddImageTrainingDataOptions) (result *TrainingDataObjects, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) AddImages(addImagesOptions *AddImagesOptions) (result *ImageDetailsList, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) Analyze(analyzeOptions *AnalyzeOptions) (result *AnalyzeResponse, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) CreateCollection(createCollectionOptions *CreateCollectionOptions) (result *Collection, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) DeleteCollection(deleteCollectionOptions *DeleteCollectionOptions) (response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) DeleteImage(deleteImageOptions *DeleteImageOptions) (response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) DeleteObject(deleteObjectOptions *DeleteObjectOptions) (response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) DeleteUserData(deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) DisableSSLVerification()
- func (visualRecognition *VisualRecognitionV4) GetCollection(getCollectionOptions *GetCollectionOptions) (result *Collection, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) GetImageDetails(getImageDetailsOptions *GetImageDetailsOptions) (result *ImageDetails, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) GetJpegImage(getJpegImageOptions *GetJpegImageOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) GetModelFile(getModelFileOptions *GetModelFileOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) GetObjectMetadata(getObjectMetadataOptions *GetObjectMetadataOptions) (result *ObjectMetadata, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) GetTrainingUsage(getTrainingUsageOptions *GetTrainingUsageOptions) (result *TrainingEvents, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) ListCollections(listCollectionsOptions *ListCollectionsOptions) (result *CollectionsList, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) ListImages(listImagesOptions *ListImagesOptions) (result *ImageSummaryList, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) ListObjectMetadata(listObjectMetadataOptions *ListObjectMetadataOptions) (result *ObjectMetadataList, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) NewAddImageTrainingDataOptions(collectionID string, imageID string) *AddImageTrainingDataOptions
- func (visualRecognition *VisualRecognitionV4) NewAddImagesOptions(collectionID string) *AddImagesOptions
- func (visualRecognition *VisualRecognitionV4) NewAnalyzeOptions(collectionIds []string, features []string) *AnalyzeOptions
- func (visualRecognition *VisualRecognitionV4) NewCreateCollectionOptions() *CreateCollectionOptions
- func (visualRecognition *VisualRecognitionV4) NewDeleteCollectionOptions(collectionID string) *DeleteCollectionOptions
- func (visualRecognition *VisualRecognitionV4) NewDeleteImageOptions(collectionID string, imageID string) *DeleteImageOptions
- func (visualRecognition *VisualRecognitionV4) NewDeleteObjectOptions(collectionID string, object string) *DeleteObjectOptions
- func (visualRecognition *VisualRecognitionV4) NewDeleteUserDataOptions(customerID string) *DeleteUserDataOptions
- func (visualRecognition *VisualRecognitionV4) NewFileWithMetadata(data io.ReadCloser) (model *FileWithMetadata, err error)
- func (visualRecognition *VisualRecognitionV4) NewGetCollectionOptions(collectionID string) *GetCollectionOptions
- func (visualRecognition *VisualRecognitionV4) NewGetImageDetailsOptions(collectionID string, imageID string) *GetImageDetailsOptions
- func (visualRecognition *VisualRecognitionV4) NewGetJpegImageOptions(collectionID string, imageID string) *GetJpegImageOptions
- func (visualRecognition *VisualRecognitionV4) NewGetModelFileOptions(collectionID string, feature string, modelFormat string) *GetModelFileOptions
- func (visualRecognition *VisualRecognitionV4) NewGetObjectMetadataOptions(collectionID string, object string) *GetObjectMetadataOptions
- func (visualRecognition *VisualRecognitionV4) NewGetTrainingUsageOptions() *GetTrainingUsageOptions
- func (visualRecognition *VisualRecognitionV4) NewListCollectionsOptions() *ListCollectionsOptions
- func (visualRecognition *VisualRecognitionV4) NewListImagesOptions(collectionID string) *ListImagesOptions
- func (visualRecognition *VisualRecognitionV4) NewListObjectMetadataOptions(collectionID string) *ListObjectMetadataOptions
- func (visualRecognition *VisualRecognitionV4) NewLocation(top int64, left int64, width int64, height int64) (model *Location, err error)
- func (visualRecognition *VisualRecognitionV4) NewObjectTrainingStatus(ready bool, inProgress bool, dataChanged bool, latestFailed bool, ...) (model *ObjectTrainingStatus, err error)
- func (visualRecognition *VisualRecognitionV4) NewTrainOptions(collectionID string) *TrainOptions
- func (visualRecognition *VisualRecognitionV4) NewTrainingStatus(objects *ObjectTrainingStatus) (model *TrainingStatus, err error)
- func (visualRecognition *VisualRecognitionV4) NewUpdateCollectionOptions(collectionID string) *UpdateCollectionOptions
- func (visualRecognition *VisualRecognitionV4) NewUpdateObjectMetadata(object string, count int64) (model *UpdateObjectMetadata, err error)
- func (visualRecognition *VisualRecognitionV4) NewUpdateObjectMetadataOptions(collectionID string, object string, newObject string) *UpdateObjectMetadataOptions
- func (visualRecognition *VisualRecognitionV4) SetServiceURL(url string) error
- func (visualRecognition *VisualRecognitionV4) Train(trainOptions *TrainOptions) (result *Collection, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) UpdateCollection(updateCollectionOptions *UpdateCollectionOptions) (result *Collection, response *core.DetailedResponse, err error)
- func (visualRecognition *VisualRecognitionV4) UpdateObjectMetadata(updateObjectMetadataOptions *UpdateObjectMetadataOptions) (result *UpdateObjectMetadata, response *core.DetailedResponse, err error)
- type VisualRecognitionV4Options
- type Warning
Constants ¶
const ( Error_Code_InvalidField = "invalid_field" Error_Code_InvalidHeader = "invalid_header" Error_Code_InvalidMethod = "invalid_method" Error_Code_MissingField = "missing_field" Error_Code_ServerError = "server_error" )
Constants associated with the Error.Code property. Identifier of the problem.
const ( ErrorTarget_Type_Field = "field" ErrorTarget_Type_Header = "header" ErrorTarget_Type_Parameter = "parameter" )
Constants associated with the ErrorTarget.Type property. The parameter or property that is the focus of the problem.
const ( GetJpegImageOptions_Size_Full = "full" GetJpegImageOptions_Size_Thumbnail = "thumbnail" )
Constants associated with the GetJpegImageOptions.Size property. The image size. Specify `thumbnail` to return a version that maintains the original aspect ratio but is no larger than 200 pixels in the larger dimension. For example, an original 800 x 1000 image is resized to 160 x 200 pixels.
const ( ImageSource_Type_File = "file" ImageSource_Type_URL = "url" )
Constants associated with the ImageSource.Type property. The source type of the image.
const ( TrainingEvent_Status_Failed = "failed" TrainingEvent_Status_Succeeded = "succeeded" )
Constants associated with the TrainingEvent.Status property. Training status of the training event.
const ( Warning_Code_InvalidField = "invalid_field" Warning_Code_InvalidHeader = "invalid_header" Warning_Code_InvalidMethod = "invalid_method" Warning_Code_MissingField = "missing_field" Warning_Code_ServerError = "server_error" )
Constants associated with the Warning.Code property. Identifier of the problem.
const (
AnalyzeOptions_Features_Objects = "objects"
)
Constants associated with the AnalyzeOptions.Features property.
const DefaultServiceName = "watson_vision_combined"
DefaultServiceName is the default key used to find external configuration information.
const DefaultServiceURL = "https://api.us-south.visual-recognition.watson.cloud.ibm.com"
DefaultServiceURL is the default URL to make service requests to.
const (
GetModelFileOptions_Feature_Objects = "objects"
)
Constants associated with the GetModelFileOptions.Feature property. The feature for the model.
const (
GetModelFileOptions_ModelFormat_Rscnn = "rscnn"
)
Constants associated with the GetModelFileOptions.ModelFormat property. The format of the returned model.
const (
TrainingEvent_Type_Objects = "objects"
)
Constants associated with the TrainingEvent.Type property. Trained object type. Only `objects` is currently supported.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddImageTrainingDataOptions ¶
type AddImageTrainingDataOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The identifier of the image. ImageID *string `json:"image_id" validate:"required"` // Training data for specific objects. Objects []TrainingDataObject `json:"objects,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
AddImageTrainingDataOptions : The AddImageTrainingData options.
func (*AddImageTrainingDataOptions) SetCollectionID ¶
func (options *AddImageTrainingDataOptions) SetCollectionID(collectionID string) *AddImageTrainingDataOptions
SetCollectionID : Allow user to set CollectionID
func (*AddImageTrainingDataOptions) SetHeaders ¶
func (options *AddImageTrainingDataOptions) SetHeaders(param map[string]string) *AddImageTrainingDataOptions
SetHeaders : Allow user to set Headers
func (*AddImageTrainingDataOptions) SetImageID ¶
func (options *AddImageTrainingDataOptions) SetImageID(imageID string) *AddImageTrainingDataOptions
SetImageID : Allow user to set ImageID
func (*AddImageTrainingDataOptions) SetObjects ¶
func (options *AddImageTrainingDataOptions) SetObjects(objects []TrainingDataObject) *AddImageTrainingDataOptions
SetObjects : Allow user to set Objects
type AddImagesOptions ¶
type AddImagesOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // An array of image files (.jpg or .png) or .zip files with images. // - Include a maximum of 20 images in a request. // - Limit the .zip file to 100 MB. // - Limit each image file to 10 MB. // // You can also include an image with the **image_url** parameter. ImagesFile []FileWithMetadata `json:"images_file,omitempty"` // The array of URLs of image files (.jpg or .png). // - Include a maximum of 20 images in a request. // - Limit each image file to 10 MB. // - Minimum width and height is 30 pixels, but the service tends to perform better with images that are at least 300 x // 300 pixels. Maximum is 5400 pixels for either height or width. // // You can also include images with the **images_file** parameter. ImageURL []string `json:"image_url,omitempty"` // Training data for a single image. Include training data only if you add one image with the request. // // The `object` property can contain alphanumeric, underscore, hyphen, space, and dot characters. It cannot begin with // the reserved prefix `sys-` and must be no longer than 32 characters. TrainingData *string `json:"training_data,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
AddImagesOptions : The AddImages options.
func (*AddImagesOptions) SetCollectionID ¶
func (options *AddImagesOptions) SetCollectionID(collectionID string) *AddImagesOptions
SetCollectionID : Allow user to set CollectionID
func (*AddImagesOptions) SetHeaders ¶
func (options *AddImagesOptions) SetHeaders(param map[string]string) *AddImagesOptions
SetHeaders : Allow user to set Headers
func (*AddImagesOptions) SetImageURL ¶
func (options *AddImagesOptions) SetImageURL(imageURL []string) *AddImagesOptions
SetImageURL : Allow user to set ImageURL
func (*AddImagesOptions) SetImagesFile ¶
func (options *AddImagesOptions) SetImagesFile(imagesFile []FileWithMetadata) *AddImagesOptions
SetImagesFile : Allow user to set ImagesFile
func (*AddImagesOptions) SetTrainingData ¶
func (options *AddImagesOptions) SetTrainingData(trainingData string) *AddImagesOptions
SetTrainingData : Allow user to set TrainingData
type AnalyzeOptions ¶
type AnalyzeOptions struct { // The IDs of the collections to analyze. CollectionIds []string `json:"collection_ids" validate:"required"` // The features to analyze. Features []string `json:"features" validate:"required"` // An array of image files (.jpg or .png) or .zip files with images. // - Include a maximum of 20 images in a request. // - Limit the .zip file to 100 MB. // - Limit each image file to 10 MB. // // You can also include an image with the **image_url** parameter. ImagesFile []FileWithMetadata `json:"images_file,omitempty"` // An array of URLs of image files (.jpg or .png). // - Include a maximum of 20 images in a request. // - Limit each image file to 10 MB. // - Minimum width and height is 30 pixels, but the service tends to perform better with images that are at least 300 x // 300 pixels. Maximum is 5400 pixels for either height or width. // // You can also include images with the **images_file** parameter. ImageURL []string `json:"image_url,omitempty"` // The minimum score a feature must have to be returned. Threshold *float32 `json:"threshold,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
AnalyzeOptions : The Analyze options.
func (*AnalyzeOptions) SetCollectionIds ¶
func (options *AnalyzeOptions) SetCollectionIds(collectionIds []string) *AnalyzeOptions
SetCollectionIds : Allow user to set CollectionIds
func (*AnalyzeOptions) SetFeatures ¶
func (options *AnalyzeOptions) SetFeatures(features []string) *AnalyzeOptions
SetFeatures : Allow user to set Features
func (*AnalyzeOptions) SetHeaders ¶
func (options *AnalyzeOptions) SetHeaders(param map[string]string) *AnalyzeOptions
SetHeaders : Allow user to set Headers
func (*AnalyzeOptions) SetImageURL ¶
func (options *AnalyzeOptions) SetImageURL(imageURL []string) *AnalyzeOptions
SetImageURL : Allow user to set ImageURL
func (*AnalyzeOptions) SetImagesFile ¶
func (options *AnalyzeOptions) SetImagesFile(imagesFile []FileWithMetadata) *AnalyzeOptions
SetImagesFile : Allow user to set ImagesFile
func (*AnalyzeOptions) SetThreshold ¶
func (options *AnalyzeOptions) SetThreshold(threshold float32) *AnalyzeOptions
SetThreshold : Allow user to set Threshold
type AnalyzeResponse ¶
type AnalyzeResponse struct { // Analyzed images. Images []Image `json:"images" validate:"required"` // Information about what might cause less than optimal output. Warnings []Warning `json:"warnings,omitempty"` // A unique identifier of the request. Included only when an error or warning is returned. Trace *string `json:"trace,omitempty"` }
AnalyzeResponse : Results for all images.
type Collection ¶
type Collection struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The name of the collection. Name *string `json:"name" validate:"required"` // The description of the collection. Description *string `json:"description" validate:"required"` // Date and time in Coordinated Universal Time (UTC) that the collection was created. Created *strfmt.DateTime `json:"created" validate:"required"` // Date and time in Coordinated Universal Time (UTC) that the collection was most recently updated. Updated *strfmt.DateTime `json:"updated" validate:"required"` // Number of images in the collection. ImageCount *int64 `json:"image_count" validate:"required"` // Training status information for the collection. TrainingStatus *TrainingStatus `json:"training_status" validate:"required"` }
Collection : Details about a collection.
type CollectionObjects ¶
type CollectionObjects struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The identified objects in a collection. Objects []ObjectDetail `json:"objects" validate:"required"` }
CollectionObjects : The objects in a collection that are detected in an image.
type CollectionsList ¶
type CollectionsList struct { // The collections in this service instance. Collections []Collection `json:"collections" validate:"required"` }
CollectionsList : A container for the list of collections.
type CreateCollectionOptions ¶
type CreateCollectionOptions struct { // The name of the collection. The name can contain alphanumeric, underscore, hyphen, and dot characters. It cannot // begin with the reserved prefix `sys-`. Name *string `json:"name,omitempty"` // The description of the collection. Description *string `json:"description,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
CreateCollectionOptions : The CreateCollection options.
func (*CreateCollectionOptions) SetDescription ¶
func (options *CreateCollectionOptions) SetDescription(description string) *CreateCollectionOptions
SetDescription : Allow user to set Description
func (*CreateCollectionOptions) SetHeaders ¶
func (options *CreateCollectionOptions) SetHeaders(param map[string]string) *CreateCollectionOptions
SetHeaders : Allow user to set Headers
func (*CreateCollectionOptions) SetName ¶
func (options *CreateCollectionOptions) SetName(name string) *CreateCollectionOptions
SetName : Allow user to set Name
type DeleteCollectionOptions ¶
type DeleteCollectionOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
DeleteCollectionOptions : The DeleteCollection options.
func (*DeleteCollectionOptions) SetCollectionID ¶
func (options *DeleteCollectionOptions) SetCollectionID(collectionID string) *DeleteCollectionOptions
SetCollectionID : Allow user to set CollectionID
func (*DeleteCollectionOptions) SetHeaders ¶
func (options *DeleteCollectionOptions) SetHeaders(param map[string]string) *DeleteCollectionOptions
SetHeaders : Allow user to set Headers
type DeleteImageOptions ¶
type DeleteImageOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The identifier of the image. ImageID *string `json:"image_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
DeleteImageOptions : The DeleteImage options.
func (*DeleteImageOptions) SetCollectionID ¶
func (options *DeleteImageOptions) SetCollectionID(collectionID string) *DeleteImageOptions
SetCollectionID : Allow user to set CollectionID
func (*DeleteImageOptions) SetHeaders ¶
func (options *DeleteImageOptions) SetHeaders(param map[string]string) *DeleteImageOptions
SetHeaders : Allow user to set Headers
func (*DeleteImageOptions) SetImageID ¶
func (options *DeleteImageOptions) SetImageID(imageID string) *DeleteImageOptions
SetImageID : Allow user to set ImageID
type DeleteObjectOptions ¶ added in v1.4.0
type DeleteObjectOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The name of the object. Object *string `json:"object" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
DeleteObjectOptions : The DeleteObject options.
func (*DeleteObjectOptions) SetCollectionID ¶ added in v1.4.0
func (options *DeleteObjectOptions) SetCollectionID(collectionID string) *DeleteObjectOptions
SetCollectionID : Allow user to set CollectionID
func (*DeleteObjectOptions) SetHeaders ¶ added in v1.4.0
func (options *DeleteObjectOptions) SetHeaders(param map[string]string) *DeleteObjectOptions
SetHeaders : Allow user to set Headers
func (*DeleteObjectOptions) SetObject ¶ added in v1.4.0
func (options *DeleteObjectOptions) SetObject(object string) *DeleteObjectOptions
SetObject : Allow user to set Object
type DeleteUserDataOptions ¶
type DeleteUserDataOptions struct { // The customer ID for which all data is to be deleted. CustomerID *string `json:"customer_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
DeleteUserDataOptions : The DeleteUserData options.
func (*DeleteUserDataOptions) SetCustomerID ¶
func (options *DeleteUserDataOptions) SetCustomerID(customerID string) *DeleteUserDataOptions
SetCustomerID : Allow user to set CustomerID
func (*DeleteUserDataOptions) SetHeaders ¶
func (options *DeleteUserDataOptions) SetHeaders(param map[string]string) *DeleteUserDataOptions
SetHeaders : Allow user to set Headers
type DetectedObjects ¶
type DetectedObjects struct { // The collections with identified objects. Collections []CollectionObjects `json:"collections,omitempty"` }
DetectedObjects : Container for the list of collections that have objects detected in an image.
type Error ¶
type Error struct { // Identifier of the problem. Code *string `json:"code" validate:"required"` // An explanation of the problem with possible solutions. Message *string `json:"message" validate:"required"` // A URL for more information about the solution. MoreInfo *string `json:"more_info,omitempty"` // Details about the specific area of the problem. Target *ErrorTarget `json:"target,omitempty"` }
Error : Details about an error.
type ErrorTarget ¶
type ErrorTarget struct { // The parameter or property that is the focus of the problem. Type *string `json:"type" validate:"required"` // The property that is identified with the problem. Name *string `json:"name" validate:"required"` }
ErrorTarget : Details about the specific area of the problem.
type FileWithMetadata ¶
type FileWithMetadata struct { // The data / content for the file. Data io.ReadCloser `json:"data" validate:"required"` // The filename of the file. Filename *string `json:"filename,omitempty"` // The content type of the file. ContentType *string `json:"content_type,omitempty"` }
FileWithMetadata : A file with its associated metadata.
type GetCollectionOptions ¶
type GetCollectionOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetCollectionOptions : The GetCollection options.
func (*GetCollectionOptions) SetCollectionID ¶
func (options *GetCollectionOptions) SetCollectionID(collectionID string) *GetCollectionOptions
SetCollectionID : Allow user to set CollectionID
func (*GetCollectionOptions) SetHeaders ¶
func (options *GetCollectionOptions) SetHeaders(param map[string]string) *GetCollectionOptions
SetHeaders : Allow user to set Headers
type GetImageDetailsOptions ¶
type GetImageDetailsOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The identifier of the image. ImageID *string `json:"image_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetImageDetailsOptions : The GetImageDetails options.
func (*GetImageDetailsOptions) SetCollectionID ¶
func (options *GetImageDetailsOptions) SetCollectionID(collectionID string) *GetImageDetailsOptions
SetCollectionID : Allow user to set CollectionID
func (*GetImageDetailsOptions) SetHeaders ¶
func (options *GetImageDetailsOptions) SetHeaders(param map[string]string) *GetImageDetailsOptions
SetHeaders : Allow user to set Headers
func (*GetImageDetailsOptions) SetImageID ¶
func (options *GetImageDetailsOptions) SetImageID(imageID string) *GetImageDetailsOptions
SetImageID : Allow user to set ImageID
type GetJpegImageOptions ¶
type GetJpegImageOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The identifier of the image. ImageID *string `json:"image_id" validate:"required"` // The image size. Specify `thumbnail` to return a version that maintains the original aspect ratio but is no larger // than 200 pixels in the larger dimension. For example, an original 800 x 1000 image is resized to 160 x 200 pixels. Size *string `json:"size,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetJpegImageOptions : The GetJpegImage options.
func (*GetJpegImageOptions) SetCollectionID ¶
func (options *GetJpegImageOptions) SetCollectionID(collectionID string) *GetJpegImageOptions
SetCollectionID : Allow user to set CollectionID
func (*GetJpegImageOptions) SetHeaders ¶
func (options *GetJpegImageOptions) SetHeaders(param map[string]string) *GetJpegImageOptions
SetHeaders : Allow user to set Headers
func (*GetJpegImageOptions) SetImageID ¶
func (options *GetJpegImageOptions) SetImageID(imageID string) *GetJpegImageOptions
SetImageID : Allow user to set ImageID
func (*GetJpegImageOptions) SetSize ¶
func (options *GetJpegImageOptions) SetSize(size string) *GetJpegImageOptions
SetSize : Allow user to set Size
type GetModelFileOptions ¶ added in v1.6.0
type GetModelFileOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The feature for the model. Feature *string `json:"feature" validate:"required"` // The format of the returned model. ModelFormat *string `json:"model_format" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetModelFileOptions : The GetModelFile options.
func (*GetModelFileOptions) SetCollectionID ¶ added in v1.6.0
func (options *GetModelFileOptions) SetCollectionID(collectionID string) *GetModelFileOptions
SetCollectionID : Allow user to set CollectionID
func (*GetModelFileOptions) SetFeature ¶ added in v1.6.0
func (options *GetModelFileOptions) SetFeature(feature string) *GetModelFileOptions
SetFeature : Allow user to set Feature
func (*GetModelFileOptions) SetHeaders ¶ added in v1.6.0
func (options *GetModelFileOptions) SetHeaders(param map[string]string) *GetModelFileOptions
SetHeaders : Allow user to set Headers
func (*GetModelFileOptions) SetModelFormat ¶ added in v1.6.0
func (options *GetModelFileOptions) SetModelFormat(modelFormat string) *GetModelFileOptions
SetModelFormat : Allow user to set ModelFormat
type GetObjectMetadataOptions ¶ added in v1.4.0
type GetObjectMetadataOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The name of the object. Object *string `json:"object" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetObjectMetadataOptions : The GetObjectMetadata options.
func (*GetObjectMetadataOptions) SetCollectionID ¶ added in v1.4.0
func (options *GetObjectMetadataOptions) SetCollectionID(collectionID string) *GetObjectMetadataOptions
SetCollectionID : Allow user to set CollectionID
func (*GetObjectMetadataOptions) SetHeaders ¶ added in v1.4.0
func (options *GetObjectMetadataOptions) SetHeaders(param map[string]string) *GetObjectMetadataOptions
SetHeaders : Allow user to set Headers
func (*GetObjectMetadataOptions) SetObject ¶ added in v1.4.0
func (options *GetObjectMetadataOptions) SetObject(object string) *GetObjectMetadataOptions
SetObject : Allow user to set Object
type GetTrainingUsageOptions ¶ added in v1.2.0
type GetTrainingUsageOptions struct { // The earliest day to include training events. Specify dates in YYYY-MM-DD format. If empty or not specified, the // earliest training event is included. StartTime *string `json:"start_time,omitempty"` // The most recent day to include training events. Specify dates in YYYY-MM-DD format. All events for the day are // included. If empty or not specified, the current day is used. Specify the same value as `start_time` to request // events for a single day. EndTime *string `json:"end_time,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
GetTrainingUsageOptions : The GetTrainingUsage options.
func (*GetTrainingUsageOptions) SetEndTime ¶ added in v1.2.0
func (options *GetTrainingUsageOptions) SetEndTime(endTime string) *GetTrainingUsageOptions
SetEndTime : Allow user to set EndTime
func (*GetTrainingUsageOptions) SetHeaders ¶ added in v1.2.0
func (options *GetTrainingUsageOptions) SetHeaders(param map[string]string) *GetTrainingUsageOptions
SetHeaders : Allow user to set Headers
func (*GetTrainingUsageOptions) SetStartTime ¶ added in v1.2.0
func (options *GetTrainingUsageOptions) SetStartTime(startTime string) *GetTrainingUsageOptions
SetStartTime : Allow user to set StartTime
type Image ¶
type Image struct { // The source type of the image. Source *ImageSource `json:"source" validate:"required"` // Height and width of an image. Dimensions *ImageDimensions `json:"dimensions" validate:"required"` // Container for the list of collections that have objects detected in an image. Objects *DetectedObjects `json:"objects" validate:"required"` // A container for the problems in the request. Errors []Error `json:"errors,omitempty"` }
Image : Details about an image.
type ImageDetails ¶
type ImageDetails struct { // The identifier of the image. ImageID *string `json:"image_id,omitempty"` // Date and time in Coordinated Universal Time (UTC) that the image was most recently updated. Updated *strfmt.DateTime `json:"updated,omitempty"` // Date and time in Coordinated Universal Time (UTC) that the image was created. Created *strfmt.DateTime `json:"created,omitempty"` // The source type of the image. Source *ImageSource `json:"source" validate:"required"` // Height and width of an image. Dimensions *ImageDimensions `json:"dimensions,omitempty"` // Details about the errors. Errors []Error `json:"errors,omitempty"` // Training data for all objects. TrainingData *TrainingDataObjects `json:"training_data,omitempty"` }
ImageDetails : Details about an image.
type ImageDetailsList ¶
type ImageDetailsList struct { // The images in the collection. Images []ImageDetails `json:"images,omitempty"` // Information about what might cause less than optimal output. Warnings []Warning `json:"warnings,omitempty"` // A unique identifier of the request. Included only when an error or warning is returned. Trace *string `json:"trace,omitempty"` }
ImageDetailsList : List of information about the images.
type ImageDimensions ¶
type ImageDimensions struct { // Height in pixels of the image. Height *int64 `json:"height,omitempty"` // Width in pixels of the image. Width *int64 `json:"width,omitempty"` }
ImageDimensions : Height and width of an image.
type ImageSource ¶
type ImageSource struct { // The source type of the image. Type *string `json:"type" validate:"required"` // Name of the image file if uploaded. Not returned when the image is passed by URL. Filename *string `json:"filename,omitempty"` // Name of the .zip file of images if uploaded. Not returned when the image is passed directly or by URL. ArchiveFilename *string `json:"archive_filename,omitempty"` // Source of the image before any redirects. Not returned when the image is uploaded. SourceURL *string `json:"source_url,omitempty"` // Fully resolved URL of the image after redirects are followed. Not returned when the image is uploaded. ResolvedURL *string `json:"resolved_url,omitempty"` }
ImageSource : The source type of the image.
type ImageSummary ¶
type ImageSummary struct { // The identifier of the image. ImageID *string `json:"image_id,omitempty"` // Date and time in Coordinated Universal Time (UTC) that the image was most recently updated. Updated *strfmt.DateTime `json:"updated,omitempty"` }
ImageSummary : Basic information about an image.
type ImageSummaryList ¶
type ImageSummaryList struct { // The images in the collection. Images []ImageSummary `json:"images" validate:"required"` }
ImageSummaryList : List of images.
type ListCollectionsOptions ¶
type ListCollectionsOptions struct { // Allows users to set headers to be GDPR compliant Headers map[string]string }
ListCollectionsOptions : The ListCollections options.
func (*ListCollectionsOptions) SetHeaders ¶
func (options *ListCollectionsOptions) SetHeaders(param map[string]string) *ListCollectionsOptions
SetHeaders : Allow user to set Headers
type ListImagesOptions ¶
type ListImagesOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
ListImagesOptions : The ListImages options.
func (*ListImagesOptions) SetCollectionID ¶
func (options *ListImagesOptions) SetCollectionID(collectionID string) *ListImagesOptions
SetCollectionID : Allow user to set CollectionID
func (*ListImagesOptions) SetHeaders ¶
func (options *ListImagesOptions) SetHeaders(param map[string]string) *ListImagesOptions
SetHeaders : Allow user to set Headers
type ListObjectMetadataOptions ¶ added in v1.4.0
type ListObjectMetadataOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
ListObjectMetadataOptions : The ListObjectMetadata options.
func (*ListObjectMetadataOptions) SetCollectionID ¶ added in v1.4.0
func (options *ListObjectMetadataOptions) SetCollectionID(collectionID string) *ListObjectMetadataOptions
SetCollectionID : Allow user to set CollectionID
func (*ListObjectMetadataOptions) SetHeaders ¶ added in v1.4.0
func (options *ListObjectMetadataOptions) SetHeaders(param map[string]string) *ListObjectMetadataOptions
SetHeaders : Allow user to set Headers
type Location ¶
type Location struct { // Y-position of top-left pixel of the bounding box. Top *int64 `json:"top" validate:"required"` // X-position of top-left pixel of the bounding box. Left *int64 `json:"left" validate:"required"` // Width in pixels of of the bounding box. Width *int64 `json:"width" validate:"required"` // Height in pixels of the bounding box. Height *int64 `json:"height" validate:"required"` }
Location : Defines the location of the bounding box around the object.
type ObjectDetail ¶
type ObjectDetail struct { // The label for the object. Object *string `json:"object" validate:"required"` // Defines the location of the bounding box around the object. Location *Location `json:"location" validate:"required"` // Confidence score for the object in the range of 0 to 1. A higher score indicates greater likelihood that the object // is depicted at this location in the image. Score *float32 `json:"score" validate:"required"` }
ObjectDetail : Details about an object in the collection.
type ObjectMetadata ¶ added in v1.4.0
type ObjectMetadata struct { // The name of the object. Object *string `json:"object,omitempty"` // Number of bounding boxes with this object name in the collection. Count *int64 `json:"count,omitempty"` }
ObjectMetadata : Basic information about an object.
type ObjectMetadataList ¶ added in v1.4.0
type ObjectMetadataList struct { // Number of unique named objects in the collection. ObjectCount *int64 `json:"object_count" validate:"required"` // The objects in the collection. Objects []ObjectMetadata `json:"objects,omitempty"` }
ObjectMetadataList : List of objects.
type ObjectTrainingStatus ¶
type ObjectTrainingStatus struct { // Whether you can analyze images in the collection with the **objects** feature. Ready *bool `json:"ready" validate:"required"` // Whether training is in progress. InProgress *bool `json:"in_progress" validate:"required"` // Whether there are changes to the training data since the most recent training. DataChanged *bool `json:"data_changed" validate:"required"` // Whether the most recent training failed. LatestFailed *bool `json:"latest_failed" validate:"required"` // Whether the model can be downloaded after the training status is `ready`. RscnnReady *bool `json:"rscnn_ready" validate:"required"` // Details about the training. If training is in progress, includes information about the status. If training is not in // progress, includes a success message or information about why training failed. Description *string `json:"description" validate:"required"` }
ObjectTrainingStatus : Training status for the objects in the collection.
type TrainOptions ¶
type TrainOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
TrainOptions : The Train options.
func (*TrainOptions) SetCollectionID ¶
func (options *TrainOptions) SetCollectionID(collectionID string) *TrainOptions
SetCollectionID : Allow user to set CollectionID
func (*TrainOptions) SetHeaders ¶
func (options *TrainOptions) SetHeaders(param map[string]string) *TrainOptions
SetHeaders : Allow user to set Headers
type TrainingDataObject ¶
type TrainingDataObject struct { // The name of the object. Object *string `json:"object,omitempty"` // Defines the location of the bounding box around the object. Location *Location `json:"location,omitempty"` }
TrainingDataObject : Details about the training data.
type TrainingDataObjects ¶
type TrainingDataObjects struct { // Training data for specific objects. Objects []TrainingDataObject `json:"objects,omitempty"` }
TrainingDataObjects : Training data for all objects.
type TrainingEvent ¶ added in v1.2.0
type TrainingEvent struct { // Trained object type. Only `objects` is currently supported. Type *string `json:"type,omitempty"` // Identifier of the trained collection. CollectionID *string `json:"collection_id,omitempty"` // Date and time in Coordinated Universal Time (UTC) that training on the collection finished. CompletionTime *strfmt.DateTime `json:"completion_time,omitempty"` // Training status of the training event. Status *string `json:"status,omitempty"` // The total number of images that were used in training for this training event. ImageCount *int64 `json:"image_count,omitempty"` }
TrainingEvent : Details about the training event.
type TrainingEvents ¶ added in v1.2.0
type TrainingEvents struct { // The starting day for the returned training events in Coordinated Universal Time (UTC). If not specified in the // request, it identifies the earliest training event. StartTime *strfmt.DateTime `json:"start_time,omitempty"` // The ending day for the returned training events in Coordinated Universal Time (UTC). If not specified in the // request, it lists the current time. EndTime *strfmt.DateTime `json:"end_time,omitempty"` // The total number of training events in the response for the start and end times. CompletedEvents *int64 `json:"completed_events,omitempty"` // The total number of images that were used in training for the start and end times. TrainedImages *int64 `json:"trained_images,omitempty"` // The completed training events for the start and end time. Events []TrainingEvent `json:"events,omitempty"` }
TrainingEvents : Details about the training events.
type TrainingStatus ¶
type TrainingStatus struct { // Training status for the objects in the collection. Objects *ObjectTrainingStatus `json:"objects" validate:"required"` }
TrainingStatus : Training status information for the collection.
type UpdateCollectionOptions ¶
type UpdateCollectionOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The name of the collection. The name can contain alphanumeric, underscore, hyphen, and dot characters. It cannot // begin with the reserved prefix `sys-`. Name *string `json:"name,omitempty"` // The description of the collection. Description *string `json:"description,omitempty"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
UpdateCollectionOptions : The UpdateCollection options.
func (*UpdateCollectionOptions) SetCollectionID ¶
func (options *UpdateCollectionOptions) SetCollectionID(collectionID string) *UpdateCollectionOptions
SetCollectionID : Allow user to set CollectionID
func (*UpdateCollectionOptions) SetDescription ¶
func (options *UpdateCollectionOptions) SetDescription(description string) *UpdateCollectionOptions
SetDescription : Allow user to set Description
func (*UpdateCollectionOptions) SetHeaders ¶
func (options *UpdateCollectionOptions) SetHeaders(param map[string]string) *UpdateCollectionOptions
SetHeaders : Allow user to set Headers
func (*UpdateCollectionOptions) SetName ¶
func (options *UpdateCollectionOptions) SetName(name string) *UpdateCollectionOptions
SetName : Allow user to set Name
type UpdateObjectMetadata ¶ added in v1.4.0
type UpdateObjectMetadata struct { // The updated name of the object. The name can contain alphanumeric, underscore, hyphen, space, and dot characters. It // cannot begin with the reserved prefix `sys-`. Object *string `json:"object" validate:"required"` // Number of bounding boxes in the collection with the updated object name. Count *int64 `json:"count,omitempty"` }
UpdateObjectMetadata : Basic information about an updated object.
type UpdateObjectMetadataOptions ¶ added in v1.4.0
type UpdateObjectMetadataOptions struct { // The identifier of the collection. CollectionID *string `json:"collection_id" validate:"required"` // The name of the object. Object *string `json:"object" validate:"required"` // The updated name of the object. The name can contain alphanumeric, underscore, hyphen, space, and dot characters. It // cannot begin with the reserved prefix `sys-`. NewObject *string `json:"new_object" validate:"required"` // Allows users to set headers to be GDPR compliant Headers map[string]string }
UpdateObjectMetadataOptions : The UpdateObjectMetadata options.
func (*UpdateObjectMetadataOptions) SetCollectionID ¶ added in v1.4.0
func (options *UpdateObjectMetadataOptions) SetCollectionID(collectionID string) *UpdateObjectMetadataOptions
SetCollectionID : Allow user to set CollectionID
func (*UpdateObjectMetadataOptions) SetHeaders ¶ added in v1.4.0
func (options *UpdateObjectMetadataOptions) SetHeaders(param map[string]string) *UpdateObjectMetadataOptions
SetHeaders : Allow user to set Headers
func (*UpdateObjectMetadataOptions) SetNewObject ¶ added in v1.4.0
func (options *UpdateObjectMetadataOptions) SetNewObject(newObject string) *UpdateObjectMetadataOptions
SetNewObject : Allow user to set NewObject
func (*UpdateObjectMetadataOptions) SetObject ¶ added in v1.4.0
func (options *UpdateObjectMetadataOptions) SetObject(object string) *UpdateObjectMetadataOptions
SetObject : Allow user to set Object
type VisualRecognitionV4 ¶
type VisualRecognitionV4 struct { Service *core.BaseService Version string }
VisualRecognitionV4 : Provide images to the IBM Watson™ Visual Recognition service for analysis. The service detects objects based on a set of images with training data.
Version: 4.0 See: https://cloud.ibm.com/docs/visual-recognition?topic=visual-recognition-object-detection-overview
func NewVisualRecognitionV4 ¶
func NewVisualRecognitionV4(options *VisualRecognitionV4Options) (service *VisualRecognitionV4, err error)
NewVisualRecognitionV4 : constructs an instance of VisualRecognitionV4 with passed in options.
func (*VisualRecognitionV4) AddImageTrainingData ¶
func (visualRecognition *VisualRecognitionV4) AddImageTrainingData(addImageTrainingDataOptions *AddImageTrainingDataOptions) (result *TrainingDataObjects, response *core.DetailedResponse, err error)
AddImageTrainingData : 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.
func (*VisualRecognitionV4) AddImages ¶
func (visualRecognition *VisualRecognitionV4) AddImages(addImagesOptions *AddImagesOptions) (result *ImageDetailsList, response *core.DetailedResponse, err error)
AddImages : 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.
func (*VisualRecognitionV4) Analyze ¶
func (visualRecognition *VisualRecognitionV4) Analyze(analyzeOptions *AnalyzeOptions) (result *AnalyzeResponse, response *core.DetailedResponse, err error)
Analyze : 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.
func (*VisualRecognitionV4) CreateCollection ¶
func (visualRecognition *VisualRecognitionV4) CreateCollection(createCollectionOptions *CreateCollectionOptions) (result *Collection, response *core.DetailedResponse, err error)
CreateCollection : 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.
func (*VisualRecognitionV4) DeleteCollection ¶
func (visualRecognition *VisualRecognitionV4) DeleteCollection(deleteCollectionOptions *DeleteCollectionOptions) (response *core.DetailedResponse, err error)
DeleteCollection : Delete a collection Delete a collection from the service instance.
func (*VisualRecognitionV4) DeleteImage ¶
func (visualRecognition *VisualRecognitionV4) DeleteImage(deleteImageOptions *DeleteImageOptions) (response *core.DetailedResponse, err error)
DeleteImage : Delete an image Delete one image from a collection.
func (*VisualRecognitionV4) DeleteObject ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) DeleteObject(deleteObjectOptions *DeleteObjectOptions) (response *core.DetailedResponse, err error)
DeleteObject : Delete an object Delete one object from a collection. A successful request deletes the training data from all images that use the object.
func (*VisualRecognitionV4) DeleteUserData ¶
func (visualRecognition *VisualRecognitionV4) DeleteUserData(deleteUserDataOptions *DeleteUserDataOptions) (response *core.DetailedResponse, err error)
DeleteUserData : 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).
func (*VisualRecognitionV4) DisableSSLVerification ¶
func (visualRecognition *VisualRecognitionV4) DisableSSLVerification()
DisableSSLVerification bypasses verification of the server's SSL certificate
func (*VisualRecognitionV4) GetCollection ¶
func (visualRecognition *VisualRecognitionV4) GetCollection(getCollectionOptions *GetCollectionOptions) (result *Collection, response *core.DetailedResponse, err error)
GetCollection : Get collection details Get details of one collection.
func (*VisualRecognitionV4) GetImageDetails ¶
func (visualRecognition *VisualRecognitionV4) GetImageDetails(getImageDetailsOptions *GetImageDetailsOptions) (result *ImageDetails, response *core.DetailedResponse, err error)
GetImageDetails : Get image details Get the details of an image in a collection.
func (*VisualRecognitionV4) GetJpegImage ¶
func (visualRecognition *VisualRecognitionV4) GetJpegImage(getJpegImageOptions *GetJpegImageOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
GetJpegImage : Get a JPEG file of an image Download a JPEG representation of an image.
func (*VisualRecognitionV4) GetModelFile ¶ added in v1.6.0
func (visualRecognition *VisualRecognitionV4) GetModelFile(getModelFileOptions *GetModelFileOptions) (result io.ReadCloser, response *core.DetailedResponse, err error)
GetModelFile : 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.
func (*VisualRecognitionV4) GetObjectMetadata ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) GetObjectMetadata(getObjectMetadataOptions *GetObjectMetadataOptions) (result *ObjectMetadata, response *core.DetailedResponse, err error)
GetObjectMetadata : Get object metadata Get the number of bounding boxes for a single object in a collection.
func (*VisualRecognitionV4) GetTrainingUsage ¶ added in v1.2.0
func (visualRecognition *VisualRecognitionV4) GetTrainingUsage(getTrainingUsageOptions *GetTrainingUsageOptions) (result *TrainingEvents, response *core.DetailedResponse, err error)
GetTrainingUsage : 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.
func (*VisualRecognitionV4) ListCollections ¶
func (visualRecognition *VisualRecognitionV4) ListCollections(listCollectionsOptions *ListCollectionsOptions) (result *CollectionsList, response *core.DetailedResponse, err error)
ListCollections : List collections Retrieves a list of collections for the service instance.
func (*VisualRecognitionV4) ListImages ¶
func (visualRecognition *VisualRecognitionV4) ListImages(listImagesOptions *ListImagesOptions) (result *ImageSummaryList, response *core.DetailedResponse, err error)
ListImages : List images Retrieves a list of images in a collection.
func (*VisualRecognitionV4) ListObjectMetadata ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) ListObjectMetadata(listObjectMetadataOptions *ListObjectMetadataOptions) (result *ObjectMetadataList, response *core.DetailedResponse, err error)
ListObjectMetadata : List object metadata Retrieves a list of object names in a collection.
func (*VisualRecognitionV4) NewAddImageTrainingDataOptions ¶
func (visualRecognition *VisualRecognitionV4) NewAddImageTrainingDataOptions(collectionID string, imageID string) *AddImageTrainingDataOptions
NewAddImageTrainingDataOptions : Instantiate AddImageTrainingDataOptions
func (*VisualRecognitionV4) NewAddImagesOptions ¶
func (visualRecognition *VisualRecognitionV4) NewAddImagesOptions(collectionID string) *AddImagesOptions
NewAddImagesOptions : Instantiate AddImagesOptions
func (*VisualRecognitionV4) NewAnalyzeOptions ¶
func (visualRecognition *VisualRecognitionV4) NewAnalyzeOptions(collectionIds []string, features []string) *AnalyzeOptions
NewAnalyzeOptions : Instantiate AnalyzeOptions
func (*VisualRecognitionV4) NewCreateCollectionOptions ¶
func (visualRecognition *VisualRecognitionV4) NewCreateCollectionOptions() *CreateCollectionOptions
NewCreateCollectionOptions : Instantiate CreateCollectionOptions
func (*VisualRecognitionV4) NewDeleteCollectionOptions ¶
func (visualRecognition *VisualRecognitionV4) NewDeleteCollectionOptions(collectionID string) *DeleteCollectionOptions
NewDeleteCollectionOptions : Instantiate DeleteCollectionOptions
func (*VisualRecognitionV4) NewDeleteImageOptions ¶
func (visualRecognition *VisualRecognitionV4) NewDeleteImageOptions(collectionID string, imageID string) *DeleteImageOptions
NewDeleteImageOptions : Instantiate DeleteImageOptions
func (*VisualRecognitionV4) NewDeleteObjectOptions ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) NewDeleteObjectOptions(collectionID string, object string) *DeleteObjectOptions
NewDeleteObjectOptions : Instantiate DeleteObjectOptions
func (*VisualRecognitionV4) NewDeleteUserDataOptions ¶
func (visualRecognition *VisualRecognitionV4) NewDeleteUserDataOptions(customerID string) *DeleteUserDataOptions
NewDeleteUserDataOptions : Instantiate DeleteUserDataOptions
func (*VisualRecognitionV4) NewFileWithMetadata ¶ added in v1.3.0
func (visualRecognition *VisualRecognitionV4) NewFileWithMetadata(data io.ReadCloser) (model *FileWithMetadata, err error)
NewFileWithMetadata : Instantiate FileWithMetadata (Generic Model Constructor)
func (*VisualRecognitionV4) NewGetCollectionOptions ¶
func (visualRecognition *VisualRecognitionV4) NewGetCollectionOptions(collectionID string) *GetCollectionOptions
NewGetCollectionOptions : Instantiate GetCollectionOptions
func (*VisualRecognitionV4) NewGetImageDetailsOptions ¶
func (visualRecognition *VisualRecognitionV4) NewGetImageDetailsOptions(collectionID string, imageID string) *GetImageDetailsOptions
NewGetImageDetailsOptions : Instantiate GetImageDetailsOptions
func (*VisualRecognitionV4) NewGetJpegImageOptions ¶
func (visualRecognition *VisualRecognitionV4) NewGetJpegImageOptions(collectionID string, imageID string) *GetJpegImageOptions
NewGetJpegImageOptions : Instantiate GetJpegImageOptions
func (*VisualRecognitionV4) NewGetModelFileOptions ¶ added in v1.6.0
func (visualRecognition *VisualRecognitionV4) NewGetModelFileOptions(collectionID string, feature string, modelFormat string) *GetModelFileOptions
NewGetModelFileOptions : Instantiate GetModelFileOptions
func (*VisualRecognitionV4) NewGetObjectMetadataOptions ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) NewGetObjectMetadataOptions(collectionID string, object string) *GetObjectMetadataOptions
NewGetObjectMetadataOptions : Instantiate GetObjectMetadataOptions
func (*VisualRecognitionV4) NewGetTrainingUsageOptions ¶ added in v1.2.0
func (visualRecognition *VisualRecognitionV4) NewGetTrainingUsageOptions() *GetTrainingUsageOptions
NewGetTrainingUsageOptions : Instantiate GetTrainingUsageOptions
func (*VisualRecognitionV4) NewListCollectionsOptions ¶
func (visualRecognition *VisualRecognitionV4) NewListCollectionsOptions() *ListCollectionsOptions
NewListCollectionsOptions : Instantiate ListCollectionsOptions
func (*VisualRecognitionV4) NewListImagesOptions ¶
func (visualRecognition *VisualRecognitionV4) NewListImagesOptions(collectionID string) *ListImagesOptions
NewListImagesOptions : Instantiate ListImagesOptions
func (*VisualRecognitionV4) NewListObjectMetadataOptions ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) NewListObjectMetadataOptions(collectionID string) *ListObjectMetadataOptions
NewListObjectMetadataOptions : Instantiate ListObjectMetadataOptions
func (*VisualRecognitionV4) NewLocation ¶ added in v1.3.0
func (visualRecognition *VisualRecognitionV4) NewLocation(top int64, left int64, width int64, height int64) (model *Location, err error)
NewLocation : Instantiate Location (Generic Model Constructor)
func (*VisualRecognitionV4) NewObjectTrainingStatus ¶ added in v1.3.0
func (visualRecognition *VisualRecognitionV4) NewObjectTrainingStatus(ready bool, inProgress bool, dataChanged bool, latestFailed bool, rscnnReady bool, description string) (model *ObjectTrainingStatus, err error)
NewObjectTrainingStatus : Instantiate ObjectTrainingStatus (Generic Model Constructor)
func (*VisualRecognitionV4) NewTrainOptions ¶
func (visualRecognition *VisualRecognitionV4) NewTrainOptions(collectionID string) *TrainOptions
NewTrainOptions : Instantiate TrainOptions
func (*VisualRecognitionV4) NewTrainingStatus ¶ added in v1.3.0
func (visualRecognition *VisualRecognitionV4) NewTrainingStatus(objects *ObjectTrainingStatus) (model *TrainingStatus, err error)
NewTrainingStatus : Instantiate TrainingStatus (Generic Model Constructor)
func (*VisualRecognitionV4) NewUpdateCollectionOptions ¶
func (visualRecognition *VisualRecognitionV4) NewUpdateCollectionOptions(collectionID string) *UpdateCollectionOptions
NewUpdateCollectionOptions : Instantiate UpdateCollectionOptions
func (*VisualRecognitionV4) NewUpdateObjectMetadata ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) NewUpdateObjectMetadata(object string, count int64) (model *UpdateObjectMetadata, err error)
NewUpdateObjectMetadata : Instantiate UpdateObjectMetadata (Generic Model Constructor)
func (*VisualRecognitionV4) NewUpdateObjectMetadataOptions ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) NewUpdateObjectMetadataOptions(collectionID string, object string, newObject string) *UpdateObjectMetadataOptions
NewUpdateObjectMetadataOptions : Instantiate UpdateObjectMetadataOptions
func (*VisualRecognitionV4) SetServiceURL ¶
func (visualRecognition *VisualRecognitionV4) SetServiceURL(url string) error
SetServiceURL sets the service URL
func (*VisualRecognitionV4) Train ¶
func (visualRecognition *VisualRecognitionV4) Train(trainOptions *TrainOptions) (result *Collection, response *core.DetailedResponse, err error)
Train : 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.
func (*VisualRecognitionV4) UpdateCollection ¶
func (visualRecognition *VisualRecognitionV4) UpdateCollection(updateCollectionOptions *UpdateCollectionOptions) (result *Collection, response *core.DetailedResponse, err error)
UpdateCollection : 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.
func (*VisualRecognitionV4) UpdateObjectMetadata ¶ added in v1.4.0
func (visualRecognition *VisualRecognitionV4) UpdateObjectMetadata(updateObjectMetadataOptions *UpdateObjectMetadataOptions) (result *UpdateObjectMetadata, response *core.DetailedResponse, err error)
UpdateObjectMetadata : Update an object name Update the name of an object. A successful request updates the training data for all images that use the object.
type VisualRecognitionV4Options ¶
type VisualRecognitionV4Options struct { ServiceName string URL string Authenticator core.Authenticator Version string }
VisualRecognitionV4Options : Service options
type Warning ¶
type Warning struct { // Identifier of the problem. Code *string `json:"code" validate:"required"` // An explanation of the problem with possible solutions. Message *string `json:"message" validate:"required"` // A URL for more information about the solution. MoreInfo *string `json:"more_info,omitempty"` }
Warning : Details about a problem.