Aracılığıyla paylaş


CustomVisionTrainingClient.CreateImagesFromDataWithHttpMessagesAsync Method

Definition

Add the provided images to the set of training images.

public System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.ImageCreateSummary>> CreateImagesFromDataWithHttpMessagesAsync (Guid projectId, System.IO.Stream imageData, System.Collections.Generic.IList<Guid> tagIds = default, System.Collections.Generic.Dictionary<string,System.Collections.Generic.List<string>> customHeaders = default, System.Threading.CancellationToken cancellationToken = default);
abstract member CreateImagesFromDataWithHttpMessagesAsync : Guid * System.IO.Stream * System.Collections.Generic.IList<Guid> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.ImageCreateSummary>>
override this.CreateImagesFromDataWithHttpMessagesAsync : Guid * System.IO.Stream * System.Collections.Generic.IList<Guid> * System.Collections.Generic.Dictionary<string, System.Collections.Generic.List<string>> * System.Threading.CancellationToken -> System.Threading.Tasks.Task<Microsoft.Rest.HttpOperationResponse<Microsoft.Azure.CognitiveServices.Vision.CustomVision.Training.Models.ImageCreateSummary>>
Public Function CreateImagesFromDataWithHttpMessagesAsync (projectId As Guid, imageData As Stream, Optional tagIds As IList(Of Guid) = Nothing, Optional customHeaders As Dictionary(Of String, List(Of String)) = Nothing, Optional cancellationToken As CancellationToken = Nothing) As Task(Of HttpOperationResponse(Of ImageCreateSummary))

Parameters

projectId
Guid

The project id.

imageData
Stream

Binary image data. Supported formats are JPEG, GIF, PNG, and BMP. Supports images up to 6MB.

tagIds
IList<Guid>

The tags ids with which to tag each image. Limited to 20.

customHeaders
Dictionary<String,List<String>>

Headers that will be added to request.

cancellationToken
CancellationToken

The cancellation token.

Returns

Implements

Exceptions

Thrown when the operation returned an invalid status code

Thrown when unable to deserialize the response

Thrown when a required parameter is null

Thrown when a required parameter is null

Remarks

This API accepts body content as multipart/form-data and application/octet-stream. When using multipart multiple image files can be sent at once, with a maximum of 64 files

Applies to