UNPKG

@azure/cognitiveservices-customvision-training

Version:
1,562 lines (1,502 loc) 90.6 kB
/* * Copyright (c) Microsoft Corporation. * Licensed under the MIT License. * * Code generated by Microsoft (R) AutoRest Code Generator. * Changes may cause incorrect behavior and will be lost if the code is regenerated. */ import * as msRest from "@azure/ms-rest-js"; /** * Bounding box that defines a region of an image. */ export interface BoundingBox { /** * Coordinate of the left boundary. */ left: number; /** * Coordinate of the top boundary. */ top: number; /** * Width. */ width: number; /** * Height. */ height: number; } /** * Options used for createProject. */ export interface CreateProjectOptions { /** * The uri to the Azure Storage container that will be used to store exported models. */ exportModelContainerUri?: string; /** * The uri to the Azure Storage queue that will be used to send project-related notifications. * See <a href="https://go.microsoft.com/fwlink/?linkid=2144149">Storage notifications</a> * documentation for setup and message format. */ notificationQueueUri?: string; } /** * An interface representing CustomBaseModelInfo. */ export interface CustomBaseModelInfo { /** * Project Id of the previously trained project to be used for current iteration's training. */ projectId: string; /** * Iteration Id of the previously trained project to be used for current iteration's training. */ iterationId: string; } /** * An interface representing CustomVisionError. */ export interface CustomVisionError { /** * The error code. Possible values include: 'NoError', 'BadRequest', * 'BadRequestExceededBatchSize', 'BadRequestNotSupported', 'BadRequestInvalidIds', * 'BadRequestProjectName', 'BadRequestProjectNameNotUnique', 'BadRequestProjectDescription', * 'BadRequestProjectUnknownDomain', 'BadRequestProjectUnknownClassification', * 'BadRequestProjectUnsupportedDomainTypeChange', 'BadRequestProjectUnsupportedExportPlatform', * 'BadRequestProjectImagePreprocessingSettings', 'BadRequestProjectDuplicated', * 'BadRequestIterationName', 'BadRequestIterationNameNotUnique', * 'BadRequestIterationDescription', 'BadRequestIterationIsNotTrained', * 'BadRequestIterationValidationFailed', 'BadRequestWorkspaceCannotBeModified', * 'BadRequestWorkspaceNotDeletable', 'BadRequestTagName', 'BadRequestTagNameNotUnique', * 'BadRequestTagDescription', 'BadRequestTagType', 'BadRequestMultipleNegativeTag', * 'BadRequestMultipleGeneralProductTag', 'BadRequestImageTags', 'BadRequestImageRegions', * 'BadRequestNegativeAndRegularTagOnSameImage', 'BadRequestUnsupportedDomain', * 'BadRequestRequiredParamIsNull', 'BadRequestIterationIsPublished', * 'BadRequestInvalidPublishName', 'BadRequestInvalidPublishTarget', 'BadRequestUnpublishFailed', * 'BadRequestIterationNotPublished', 'BadRequestSubscriptionApi', * 'BadRequestExceedProjectLimit', 'BadRequestExceedIterationPerProjectLimit', * 'BadRequestExceedTagPerProjectLimit', 'BadRequestExceedTagPerImageLimit', * 'BadRequestExceededQuota', 'BadRequestCannotMigrateProjectWithName', * 'BadRequestNotLimitedTrial', 'BadRequestImageBatch', 'BadRequestImageStream', * 'BadRequestImageUrl', 'BadRequestImageFormat', 'BadRequestImageSizeBytes', * 'BadRequestImageDimensions', 'BadRequestImageAspectRatio', 'BadRequestImageExceededCount', * 'BadRequestTrainingNotNeeded', 'BadRequestTrainingNotNeededButTrainingPipelineUpdated', * 'BadRequestTrainingValidationFailed', 'BadRequestClassificationTrainingValidationFailed', * 'BadRequestMultiClassClassificationTrainingValidationFailed', * 'BadRequestMultiLabelClassificationTrainingValidationFailed', * 'BadRequestDetectionTrainingValidationFailed', 'BadRequestTrainingAlreadyInProgress', * 'BadRequestDetectionTrainingNotAllowNegativeTag', 'BadRequestInvalidEmailAddress', * 'BadRequestRetiredDomainNotSupportedForTraining', * 'BadRequestDomainNotSupportedForAdvancedTraining', * 'BadRequestExportPlatformNotSupportedForAdvancedTraining', * 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining', * 'BadRequestCustomBaseModelIterationStatusNotCompleted', * 'BadRequestCustomBaseModelDomainNotCompatible', * 'BadRequestCustomBaseModelArchitectureRetired', 'BadRequestExportValidationFailed', * 'BadRequestExportAlreadyInProgress', 'BadRequestPredictionIdsMissing', * 'BadRequestPredictionIdsExceededCount', 'BadRequestPredictionTagsExceededCount', * 'BadRequestPredictionResultsExceededCount', 'BadRequestPredictionInvalidApplicationName', * 'BadRequestPredictionInvalidQueryParameters', 'BadRequestInvalidImportToken', * 'BadRequestExportWhileTraining', 'BadRequestImageMetadataKey', 'BadRequestImageMetadataValue', * 'BadRequestOperationNotSupported', 'BadRequestInvalidArtifactUri', * 'BadRequestCustomerManagedKeyRevoked', 'BadRequestInvalidUri', 'BadRequestInvalid', * 'UnsupportedMediaType', 'Forbidden', 'ForbiddenUser', 'ForbiddenUserResource', * 'ForbiddenUserSignupDisabled', 'ForbiddenUserSignupAllowanceExceeded', * 'ForbiddenUserDoesNotExist', 'ForbiddenUserDisabled', 'ForbiddenUserInsufficientCapability', * 'ForbiddenDRModeEnabled', 'ForbiddenInvalid', 'NotFound', 'NotFoundProject', * 'NotFoundProjectDefaultIteration', 'NotFoundIteration', 'NotFoundIterationPerformance', * 'NotFoundTag', 'NotFoundImage', 'NotFoundDomain', 'NotFoundApimSubscription', * 'NotFoundInvalid', 'Conflict', 'ConflictInvalid', 'ErrorUnknown', 'ErrorIterationCopyFailed', * 'ErrorPreparePerformanceMigrationFailed', 'ErrorProjectInvalidWorkspace', * 'ErrorProjectInvalidPipelineConfiguration', 'ErrorProjectInvalidDomain', * 'ErrorProjectTrainingRequestFailed', 'ErrorProjectImportRequestFailed', * 'ErrorProjectExportRequestFailed', 'ErrorFeaturizationServiceUnavailable', * 'ErrorFeaturizationQueueTimeout', 'ErrorFeaturizationInvalidFeaturizer', * 'ErrorFeaturizationAugmentationUnavailable', 'ErrorFeaturizationUnrecognizedJob', * 'ErrorFeaturizationAugmentationError', 'ErrorExporterInvalidPlatform', * 'ErrorExporterInvalidFeaturizer', 'ErrorExporterInvalidClassifier', * 'ErrorPredictionServiceUnavailable', 'ErrorPredictionModelNotFound', * 'ErrorPredictionModelNotCached', 'ErrorPrediction', 'ErrorPredictionStorage', * 'ErrorRegionProposal', 'ErrorUnknownBaseModel', 'ErrorServerTimeOut', 'ErrorInvalid' */ code: CustomVisionErrorCodes; /** * A message explaining the error reported by the service. */ message: string; } /** * Model information. */ export interface ModelInformation { /** * Estimation of the exported FP32 Onnx model size (2 tags) in megabytes. This information is not * present if the model cannot be exported. */ estimatedModelSizeInMegabytes?: number; /** * Model description. */ description: string; } /** * Domains are used as the starting point for your project. Each domain is optimized for specific * types of images. Domains with compact in their name can be exported. For more information visit * the <a href="https://go.microsoft.com/fwlink/?linkid=2117014">domain documentation</a>. */ export interface Domain { /** * Domain id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Name of the domain, describing the types of images used to train it. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** * Domain type: Classification or ObjectDetection. Possible values include: 'Classification', * 'ObjectDetection' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly type?: DomainType; /** * Indicating if the domain is exportable. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly exportable?: boolean; /** * Indicating if the domain is enabled. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly enabled?: boolean; /** * Platforms that the domain can be exported to. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly exportablePlatforms?: string[]; /** * Model information. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly modelInformation?: ModelInformation; } /** * An interface representing ExportModel. */ export interface ExportModel { /** * Platform of the export. Possible values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX', * 'VAIDK', 'OpenVino' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly platform?: ExportPlatform; /** * Status of the export. Possible values include: 'Exporting', 'Failed', 'Done' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: ExportStatus; /** * URI used to download the model. If VNET feature is enabled this will be a relative path to be * used with GetArtifact, otherwise this will be an absolute URI to the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly downloadUri?: string; /** * Flavor of the export. These are specializations of the export platform. * Docker platform has valid flavors: Linux, Windows, ARM. * Tensorflow platform has valid flavors: TensorFlowNormal, TensorFlowLite. * ONNX platform has valid flavors: ONNX10, ONNX12. Possible values include: 'Linux', 'Windows', * 'ONNX10', 'ONNX12', 'ARM', 'TensorFlowNormal', 'TensorFlowLite' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly flavor?: ExportFlavor; /** * Indicates an updated version of the export package is available and should be re-exported for * the latest changes. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly newerVersionAvailable?: boolean; } /** * An interface representing ImageTag. */ export interface ImageTag { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagName?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; } /** * An interface representing ImageRegion. */ export interface ImageRegion { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly regionId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagName?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * Id of the tag associated with this region. */ tagId: string; /** * Coordinate of the left boundary. */ left: number; /** * Coordinate of the top boundary. */ top: number; /** * Width. */ width: number; /** * Height. */ height: number; } /** * Image model to be sent as JSON. */ export interface Image { /** * Id of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Date the image was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * Width of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly width?: number; /** * Height of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly height?: number; /** * The URI to the (resized) image used for training. If VNET feature is enabled this will be a * relative path to be used with GetArtifact, otherwise this will be an absolute URI to the * resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resizedImageUri?: string; /** * The URI to the thumbnail of the original image. If VNET feature is enabled this will be a * relative path to be used with GetArtifact, otherwise this will be an absolute URI to the * resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbnailUri?: string; /** * The URI to the original uploaded image. If VNET feature is enabled this will be a relative * path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly originalImageUri?: string; /** * Tags associated with this image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: ImageTag[]; /** * Regions associated with this image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly regions?: ImageRegion[]; /** * Metadata associated with this image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly metadata?: { [propertyName: string]: string }; } /** * An interface representing ImageCreateResult. */ export interface ImageCreateResult { /** * Source URL of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly sourceUrl?: string; /** * Status of the image creation. Possible values include: 'OK', 'OKDuplicate', 'ErrorSource', * 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', * 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown', * 'ErrorNegativeAndRegularTagOnSameImage', 'ErrorImageDimensions', 'ErrorInvalidTag' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: ImageCreateStatus; /** * The image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly image?: Image; } /** * An interface representing ImageCreateSummary. */ export interface ImageCreateSummary { /** * True if all of the images in the batch were created successfully, otherwise false. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isBatchSuccessful?: boolean; /** * List of the image creation results. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly images?: ImageCreateResult[]; } /** * An interface representing Region. */ export interface Region { /** * Id of the tag associated with this region. */ tagId: string; /** * Coordinate of the left boundary. */ left: number; /** * Coordinate of the top boundary. */ top: number; /** * Width. */ width: number; /** * Height. */ height: number; } /** * An interface representing ImageFileCreateEntry. */ export interface ImageFileCreateEntry { name?: string; contents?: Uint8Array; tagIds?: string[]; regions?: Region[]; } /** * An interface representing ImageFileCreateBatch. */ export interface ImageFileCreateBatch { images?: ImageFileCreateEntry[]; tagIds?: string[]; /** * The metadata of image. Limited to 10 key-value pairs per image. The length of key is limited * to 128. The length of value is limited to 256. */ metadata?: { [propertyName: string]: string }; } /** * An interface representing ImageIdCreateEntry. */ export interface ImageIdCreateEntry { /** * Id of the image. */ id?: string; tagIds?: string[]; regions?: Region[]; } /** * An interface representing ImageIdCreateBatch. */ export interface ImageIdCreateBatch { images?: ImageIdCreateEntry[]; tagIds?: string[]; /** * The metadata of image. Limited to 10 key-value pairs per image. The length of key is limited * to 128. The length of value is limited to 256. */ metadata?: { [propertyName: string]: string }; } /** * Entry associating a metadata to an image. */ export interface ImageMetadataUpdateEntry { /** * Id of the image. */ imageId?: string; /** * Status of the metadata update. Possible values include: 'OK', 'ErrorImageNotFound', * 'ErrorLimitExceed', 'ErrorUnknown' */ status?: ImageMetadataUpdateStatus; /** * Metadata of the image. */ metadata?: { [propertyName: string]: string }; } /** * An interface representing ImageMetadataUpdateSummary. */ export interface ImageMetadataUpdateSummary { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly isBatchSuccessful?: boolean; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly images?: ImageMetadataUpdateEntry[]; } /** * Prediction result. */ export interface Prediction { /** * Probability of the tag. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly probability?: number; /** * Id of the predicted tag. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagId?: string; /** * Name of the predicted tag. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagName?: string; /** * Bounding box of the prediction. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly boundingBox?: BoundingBox; /** * Type of the predicted tag. Possible values include: 'Regular', 'Negative', 'GeneralProduct' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagType?: TagType; } /** * Image performance model. */ export interface ImagePerformance { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly predictions?: Prediction[]; /** * Id of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Date the image was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * Width of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly width?: number; /** * Height of the image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly height?: number; /** * The URI to the image used for training. If VNET feature is enabled this will be a relative * path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly imageUri?: string; /** * The URI to the thumbnail of the original image. If VNET feature is enabled this will be a * relative path to be used with GetArtifact, otherwise this will be an absolute URI to the * resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbnailUri?: string; /** * Tags associated with this image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tags?: ImageTag[]; /** * Regions associated with this image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly regions?: ImageRegion[]; } /** * Result of an image prediction request. */ export interface ImagePrediction { /** * Prediction Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Project Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly project?: string; /** * Iteration Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly iteration?: string; /** * Date this prediction was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * List of predictions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly predictions?: Prediction[]; } /** * Represents image preprocessing settings used by image augmentation. */ export interface ImageProcessingSettings { /** * Gets or sets enabled image transforms. The key corresponds to the transform name. If value is * set to true, then correspondent transform is enabled. Otherwise this transform will not be * used. * Augmentation will be uniformly distributed among enabled transforms. */ augmentationMethods?: { [propertyName: string]: boolean }; } /** * Entry associating a region to an image. */ export interface ImageRegionCreateEntry { /** * Id of the image. */ imageId: string; /** * Id of the tag associated with this region. */ tagId: string; /** * Coordinate of the left boundary. */ left: number; /** * Coordinate of the top boundary. */ top: number; /** * Width. */ width: number; /** * Height. */ height: number; } /** * Batch of image region information to create. */ export interface ImageRegionCreateBatch { regions?: ImageRegionCreateEntry[]; } /** * An interface representing ImageRegionCreateResult. */ export interface ImageRegionCreateResult { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly imageId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly regionId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagName?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * Id of the tag associated with this region. */ tagId: string; /** * Coordinate of the left boundary. */ left: number; /** * Coordinate of the top boundary. */ top: number; /** * Width. */ width: number; /** * Height. */ height: number; } /** * An interface representing ImageRegionCreateSummary. */ export interface ImageRegionCreateSummary { created?: ImageRegionCreateResult[]; duplicated?: ImageRegionCreateEntry[]; exceeded?: ImageRegionCreateEntry[]; } /** * An interface representing RegionProposal. */ export interface RegionProposal { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly confidence?: number; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly boundingBox?: BoundingBox; } /** * An interface representing ImageRegionProposal. */ export interface ImageRegionProposal { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly projectId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly imageId?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly proposals?: RegionProposal[]; } /** * Entry associating a tag to an image. */ export interface ImageTagCreateEntry { /** * Id of the image. */ imageId?: string; /** * Id of the tag. */ tagId?: string; } /** * Batch of image tags. */ export interface ImageTagCreateBatch { /** * Image Tag entries to include in this batch. */ tags?: ImageTagCreateEntry[]; } /** * An interface representing ImageTagCreateSummary. */ export interface ImageTagCreateSummary { created?: ImageTagCreateEntry[]; duplicated?: ImageTagCreateEntry[]; exceeded?: ImageTagCreateEntry[]; } /** * Image url. */ export interface ImageUrl { /** * Url of the image. */ url: string; } /** * An interface representing ImageUrlCreateEntry. */ export interface ImageUrlCreateEntry { /** * Url of the image. */ url: string; tagIds?: string[]; regions?: Region[]; } /** * An interface representing ImageUrlCreateBatch. */ export interface ImageUrlCreateBatch { images?: ImageUrlCreateEntry[]; tagIds?: string[]; /** * The metadata of image. Limited to 10 key-value pairs per image. The length of key is limited * to 128. The length of value is limited to 256. */ metadata?: { [propertyName: string]: string }; } /** * Iteration model to be sent over JSON. */ export interface Iteration { /** * Gets the id of the iteration. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Gets or sets the name of the iteration. */ name: string; /** * Gets the current iteration status. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly status?: string; /** * Gets the time this iteration was completed. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * Gets the time this iteration was last modified. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastModified?: Date; /** * Gets the time this iteration was last modified. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly trainedAt?: Date; /** * Gets the project id of the iteration. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly projectId?: string; /** * Whether the iteration can be exported to another format for download. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly exportable?: boolean; /** * A set of platforms this iteration can export to. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly exportableTo?: string[]; /** * Get or sets a guid of the domain the iteration has been trained on. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly domainId?: string; /** * Gets the classification type of the project. Possible values include: 'Multiclass', * 'Multilabel' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly classificationType?: Classifier; /** * Gets the training type of the iteration. Possible values include: 'Regular', 'Advanced' * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly trainingType?: TrainingType; /** * Gets the reserved advanced training budget for the iteration. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly reservedBudgetInHours?: number; /** * Gets the training time for the iteration. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly trainingTimeInMinutes?: number; /** * Name of the published model. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly publishName?: string; /** * Resource Provider Id this iteration was originally published to. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly originalPublishResourceId?: string; /** * Information of the previously trained iteration which provides the base model for current * iteration's training. * Default value of null specifies that no previously trained iteration will be used for * incremental learning. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly customBaseModelInfo?: CustomBaseModelInfo; /** * Training error details, when training fails. * Value is null when training succeeds. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly trainingErrorDetails?: string; } /** * Represents performance data for a particular tag in a trained iteration. */ export interface TagPerformance { /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly name?: string; /** * Gets the precision. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly precision?: number; /** * Gets the standard deviation for the precision. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly precisionStdDeviation?: number; /** * Gets the recall. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recall?: number; /** * Gets the standard deviation for the recall. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recallStdDeviation?: number; /** * Gets the average precision when applicable. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly averagePrecision?: number; } /** * Represents the detailed performance data for a trained iteration. */ export interface IterationPerformance { /** * Gets the per-tag performance details for this iteration. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly perTagPerformance?: TagPerformance[]; /** * Gets the precision. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly precision?: number; /** * Gets the standard deviation for the precision. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly precisionStdDeviation?: number; /** * Gets the recall. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recall?: number; /** * Gets the standard deviation for the recall. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly recallStdDeviation?: number; /** * Gets the average precision when applicable. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly averagePrecision?: number; } /** * An interface representing PredictionQueryTag. */ export interface PredictionQueryTag { id?: string; minThreshold?: number; maxThreshold?: number; } /** * An interface representing PredictionQueryToken. */ export interface PredictionQueryToken { session?: string; continuation?: string; maxCount?: number; /** * Possible values include: 'Newest', 'Oldest', 'Suggested' */ orderBy?: OrderBy; tags?: PredictionQueryTag[]; iterationId?: string; startTime?: Date; endTime?: Date; application?: string; } /** * Result of an image prediction request. */ export interface StoredImagePrediction { /** * The URI to the (resized) prediction image. If VNET feature is enabled this will be a relative * path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resizedImageUri?: string; /** * The URI to the thumbnail of the original prediction image. If VNET feature is enabled this * will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to * the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbnailUri?: string; /** * The URI to the original prediction image. If VNET feature is enabled this will be a relative * path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly originalImageUri?: string; /** * Domain used for the prediction. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly domain?: string; /** * Prediction Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Project Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly project?: string; /** * Iteration Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly iteration?: string; /** * Date this prediction was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * List of predictions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly predictions?: Prediction[]; } /** * Query result of the prediction images that were sent to your prediction endpoint. */ export interface PredictionQueryResult { /** * Prediction Query Token. */ token?: PredictionQueryToken; /** * Result of an image prediction request. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly results?: StoredImagePrediction[]; } /** * Represents settings associated with a project. */ export interface ProjectSettings { /** * Gets or sets the id of the Domain to use with this project. */ domainId?: string; /** * Gets or sets the classification type of the project. Possible values include: 'Multiclass', * 'Multilabel' */ classificationType?: Classifier; /** * A list of ExportPlatform that the trained model should be able to support. */ targetExportPlatforms?: string[]; /** * Indicates if negative set is being used. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly useNegativeSet?: boolean; /** * Detection parameters in use, if any. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly detectionParameters?: string; /** * Gets or sets image preprocessing settings. */ imageProcessingSettings?: ImageProcessingSettings; /** * The uri to the Azure Storage container that will be used to store exported models. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly exportModelContainerUri?: string; /** * The uri to the Azure Storage queue that will be used to send project-related notifications. * See <a href="https://go.microsoft.com/fwlink/?linkid=2144149">Storage notifications</a> * documentation for setup and message format. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly notificationQueueUri?: string; } /** * Represents a project. */ export interface Project { /** * Gets the project id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Gets or sets the name of the project. */ name: string; /** * Gets or sets the description of the project. */ description: string; /** * Gets or sets the project settings. */ settings: ProjectSettings; /** * Gets the date this project was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * Gets the date this project was last modified. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly lastModified?: Date; /** * Gets the thumbnail url representing the image. If VNET feature is enabled this will be a * relative path to be used with GetArtifact, otherwise this will be an absolute URI to the * resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbnailUri?: string; /** * Gets if the Disaster Recovery (DR) mode is on, indicating the project is temporarily * read-only. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly drModeEnabled?: boolean; /** * Gets the status of the project. Possible values include: 'Succeeded', 'Importing', 'Failed' */ status?: ProjectStatus; } /** * Represents information about a project export. */ export interface ProjectExport { /** * Count of iterations that will be exported. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly iterationCount?: number; /** * Count of images that will be exported. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly imageCount?: number; /** * Count of tags that will be exported. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly tagCount?: number; /** * Count of regions that will be exported. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly regionCount?: number; /** * Estimated time this project will take to import, can change based on network connectivity and * load between * source and destination regions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly estimatedImportTimeInMS?: number; /** * Opaque token that should be passed to ImportProject to perform the import. This token grants * access to import this * project to all that have the token. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly token?: string; } /** * Result of a suggested tags and regions request of the untagged image. */ export interface StoredSuggestedTagAndRegion { /** * Width of the resized image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly width?: number; /** * Height of the resized image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly height?: number; /** * The URI to the (resized) prediction image. If VNET feature is enabled this will be a relative * path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly resizedImageUri?: string; /** * The URI to the thumbnail of the original prediction image. If VNET feature is enabled this * will be a relative path to be used with GetArtifact, otherwise this will be an absolute URI to * the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly thumbnailUri?: string; /** * The URI to the original prediction image. If VNET feature is enabled this will be a relative * path to be used with GetArtifact, otherwise this will be an absolute URI to the resource. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly originalImageUri?: string; /** * Domain used for the prediction. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly domain?: string; /** * Prediction Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Project Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly project?: string; /** * Iteration Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly iteration?: string; /** * Date this prediction was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * List of predictions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly predictions?: Prediction[]; /** * Uncertainty (entropy) of suggested tags or regions per image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly predictionUncertainty?: number; } /** * Result of a suggested tags and regions request. */ export interface SuggestedTagAndRegion { /** * Prediction Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Project Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly project?: string; /** * Iteration Id. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly iteration?: string; /** * Date this prediction was created. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly created?: Date; /** * List of predictions. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly predictions?: Prediction[]; /** * Uncertainty (entropy) of suggested tags or regions per image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly predictionUncertainty?: number; } /** * Contains properties we need to fetch suggested tags for. For the first call, Session and * continuation set to null. * Then on subsequent calls, uses the session/continuation from the previous * SuggestedTagAndRegionQuery result to fetch additional results. */ export interface SuggestedTagAndRegionQueryToken { /** * Existing TagIds in project to filter suggested tags on. */ tagIds?: string[]; /** * Confidence threshold to filter suggested tags on. */ threshold?: number; /** * SessionId for database query. Initially set to null but later used to paginate. */ session?: string; /** * Continuation Id for database pagination. Initially null but later used to paginate. */ continuation?: string; /** * Maximum number of results you want to be returned in the response. */ maxCount?: number; /** * OrderBy. Ordering mechanism for your results. Possible values include: 'UncertaintyAscending', * 'UncertaintyDescending' */ sortBy?: SortBy; } /** * The array of result images and token containing session and continuation Ids for the next query. */ export interface SuggestedTagAndRegionQuery { /** * Contains properties we need to fetch suggested tags for. */ token?: SuggestedTagAndRegionQueryToken; /** * Result of a suggested tags and regions request of the untagged image. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly results?: StoredSuggestedTagAndRegion[]; } /** * Represents a Tag. */ export interface Tag { /** * Gets the Tag ID. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly id?: string; /** * Gets or sets the name of the tag. */ name: string; /** * Gets or sets the description of the tag. */ description: string; /** * Gets or sets the type of the tag. Possible values include: 'Regular', 'Negative', * 'GeneralProduct' */ type: TagType; /** * Gets the number of images with this tag. * **NOTE: This property will not be serialized. It can only be populated by the server.** */ readonly imageCount?: number; } /** * Model that query for counting of images whose suggested tags match given tags and their * probability are greater than or equal to the given threshold. */ export interface TagFilter { /** * Existing TagIds in project to get suggested tags count for. */ tagIds?: string[]; /** * Confidence threshold to filter suggested tags on. */ threshold?: number; } /** * Parameters used for training. */ export interface TrainingParameters { /** * List of tags selected for this training session, other tags in the project will be ignored. */ selectedTags?: string[]; /** * Information of the previously trained iteration which provides the base model for current * iteration's training. */ customBaseModelInfo?: CustomBaseModelInfo; } /** * Optional Parameters. */ export interface TrainingAPIClientCreateProjectOptionalParams extends msRest.RequestOptionsBase { /** * The description of the project. */ description?: string; /** * The id of the domain to use for this project. Defaults to General. */ domainId?: string; /** * The type of classifier to create for this project. Possible values include: 'Multiclass', * 'Multilabel' */ classificationType?: ClassificationType; /** * List of platforms the trained model is intending exporting to. */ targetExportPlatforms?: string[]; /** * Additional project creation options. */ options?: CreateProjectOptions; } /** * Optional Parameters. */ export interface TrainingAPIClientGetImagesOptionalParams extends msRest.RequestOptionsBase { /** * The iteration id. Defaults to workspace. */ iterationId?: string; /** * A list of tags ids to filter the images. Defaults to all tagged images when null. Limited to * 20. */ tagIds?: string[]; /** * The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. Defaults to 'All'. * Possible values include: 'All', 'Tagged', 'Untagged' */ taggingStatus?: TaggingStatus; /** * An expression to filter the images against image metadata. Only images where the expression * evaluates to true are included in the response. * The expression supports eq (Equal), ne (Not equal), and (Logical and), or (Logical or) * operators. * Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. */ filter?: string; /** * The ordering. Defaults to newest. Possible values include: 'Newest', 'Oldest' */ orderBy?: OrderBy1; /** * Maximum number of images to return. Defaults to 50, limited to 256. Default value: 50. */ take?: number; /** * Number of images to skip before beginning the image batch. Defaults to 0. Default value: 0. */ skip?: number; } /** * Optional Parameters. */ export interface TrainingAPIClientCreateImagesFromDataOptionalParams extends msRest.RequestOptionsBase { /** * The tags ids with which to tag each image. Limited to 20. */ tagIds?: string[]; } /** * Optional Parameters. */ export interface TrainingAPIClientDeleteImagesOptionalParams extends msRest.RequestOptionsBase { /** * Ids of the images to be deleted. Limited to 256 images per batch. */ imageIds?: string[]; /** * Flag to specify delete all images, specify this flag or a list of images. Using this flag will * return a 202 response to indicate the images are being deleted. */ allImages?: boolean; /** * Removes these images from all iterations, not just the current workspace. Using this flag will * return a 202 response to indicate the images are being deleted. */ allIterations?: boolean; } /** * Optional Parameters. */ export interface TrainingAPIClientGetImageCountOptionalParams extends msRest.RequestOptionsBase { /** * The iteration id. Defaults to workspace. */ iterationId?: string; /** * The tagging status filter. It can be 'All', 'Tagged', or 'Untagged'. Defaults to 'All'. * Possible values include: 'All', 'Tagged', 'Untagged' */ taggingStatus?: TaggingStatus1; /** * An expression to filter the images against image metadata. Only images where the expression * evaluates to true are included in the response. * The expression supports eq (Equal), ne (Not equal), and (Logical and), or (Logical or) * operators. * Here is an example, metadata=key1 eq 'value1' and key2 ne 'value2'. */ filter?: string; /** * A list of tags ids to filter the images to count. Defaults to all tags when null. */ tagIds?: string[]; } /** * Optional Parameters. */ export inter