azure.cognitiveservices.vision.customvision.training.models module

exception azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorException(deserialize, response, *args)[source]

Bases: msrest.exceptions.HttpOperationError

Server responsed with exception of type: ‘CustomVisionError’.

Parameters
  • deserialize – A deserializer

  • response – Server response to be deserialized.

class azure.cognitiveservices.vision.customvision.training.models.BoundingBox(*, left: float, top: float, width: float, height: float, **kwargs)[source]

Bases: msrest.serialization.Model

Bounding box that defines a region of an image.

All required parameters must be populated in order to send to Azure.

Parameters
  • left (float) – Required. Coordinate of the left boundary.

  • top (float) – Required. Coordinate of the top boundary.

  • width (float) – Required. Width.

  • height (float) – Required. Height.

class azure.cognitiveservices.vision.customvision.training.models.Classifier(value)[source]

Bases: str, enum.Enum

An enumeration.

multiclass = 'Multiclass'
multilabel = 'Multilabel'
class azure.cognitiveservices.vision.customvision.training.models.CustomVisionError(*, code, message: str, **kwargs)[source]

Bases: msrest.serialization.Model

CustomVisionError.

All required parameters must be populated in order to send to Azure.

Parameters
  • code (str or CustomVisionErrorCodes) – Required. 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’, ‘BadRequestImageExceededCount’, ‘BadRequestTrainingNotNeeded’, ‘BadRequestTrainingNotNeededButTrainingPipelineUpdated’, ‘BadRequestTrainingValidationFailed’, ‘BadRequestClassificationTrainingValidationFailed’, ‘BadRequestMultiClassClassificationTrainingValidationFailed’, ‘BadRequestMultiLabelClassificationTrainingValidationFailed’, ‘BadRequestDetectionTrainingValidationFailed’, ‘BadRequestTrainingAlreadyInProgress’, ‘BadRequestDetectionTrainingNotAllowNegativeTag’, ‘BadRequestInvalidEmailAddress’, ‘BadRequestDomainNotSupportedForAdvancedTraining’, ‘BadRequestExportPlatformNotSupportedForAdvancedTraining’, ‘BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining’, ‘BadRequestExportValidationFailed’, ‘BadRequestExportAlreadyInProgress’, ‘BadRequestPredictionIdsMissing’, ‘BadRequestPredictionIdsExceededCount’, ‘BadRequestPredictionTagsExceededCount’, ‘BadRequestPredictionResultsExceededCount’, ‘BadRequestPredictionInvalidApplicationName’, ‘BadRequestPredictionInvalidQueryParameters’, ‘BadRequestInvalidImportToken’, ‘BadRequestExportWhileTraining’, ‘BadRequestImageMetadataKey’, ‘BadRequestImageMetadataValue’, ‘BadRequestOperationNotSupported’, ‘BadRequestInvalidArtifactUri’, ‘BadRequestCustomerManagedKeyRevoked’, ‘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’, ‘ErrorInvalid’

  • message (str) – Required. A message explaining the error reported by the service.

class azure.cognitiveservices.vision.customvision.training.models.CustomVisionErrorCodes(value)[source]

Bases: str, enum.Enum

An enumeration.

bad_request = 'BadRequest'
bad_request_cannot_migrate_project_with_name = 'BadRequestCannotMigrateProjectWithName'
bad_request_classification_training_validation_failed = 'BadRequestClassificationTrainingValidationFailed'
bad_request_customer_managed_key_revoked = 'BadRequestCustomerManagedKeyRevoked'
bad_request_detection_training_not_allow_negative_tag = 'BadRequestDetectionTrainingNotAllowNegativeTag'
bad_request_detection_training_validation_failed = 'BadRequestDetectionTrainingValidationFailed'
bad_request_domain_not_supported_for_advanced_training = 'BadRequestDomainNotSupportedForAdvancedTraining'
bad_request_exceed_iteration_per_project_limit = 'BadRequestExceedIterationPerProjectLimit'
bad_request_exceed_project_limit = 'BadRequestExceedProjectLimit'
bad_request_exceed_tag_per_image_limit = 'BadRequestExceedTagPerImageLimit'
bad_request_exceed_tag_per_project_limit = 'BadRequestExceedTagPerProjectLimit'
bad_request_exceeded_batch_size = 'BadRequestExceededBatchSize'
bad_request_exceeded_quota = 'BadRequestExceededQuota'
bad_request_export_already_in_progress = 'BadRequestExportAlreadyInProgress'
bad_request_export_platform_not_supported_for_advanced_training = 'BadRequestExportPlatformNotSupportedForAdvancedTraining'
bad_request_export_validation_failed = 'BadRequestExportValidationFailed'
bad_request_export_while_training = 'BadRequestExportWhileTraining'
bad_request_image_batch = 'BadRequestImageBatch'
bad_request_image_dimensions = 'BadRequestImageDimensions'
bad_request_image_exceeded_count = 'BadRequestImageExceededCount'
bad_request_image_format = 'BadRequestImageFormat'
bad_request_image_metadata_key = 'BadRequestImageMetadataKey'
bad_request_image_metadata_value = 'BadRequestImageMetadataValue'
bad_request_image_regions = 'BadRequestImageRegions'
bad_request_image_size_bytes = 'BadRequestImageSizeBytes'
bad_request_image_stream = 'BadRequestImageStream'
bad_request_image_tags = 'BadRequestImageTags'
bad_request_image_url = 'BadRequestImageUrl'
bad_request_invalid = 'BadRequestInvalid'
bad_request_invalid_artifact_uri = 'BadRequestInvalidArtifactUri'
bad_request_invalid_email_address = 'BadRequestInvalidEmailAddress'
bad_request_invalid_ids = 'BadRequestInvalidIds'
bad_request_invalid_import_token = 'BadRequestInvalidImportToken'
bad_request_invalid_publish_name = 'BadRequestInvalidPublishName'
bad_request_invalid_publish_target = 'BadRequestInvalidPublishTarget'
bad_request_iteration_description = 'BadRequestIterationDescription'
bad_request_iteration_is_not_trained = 'BadRequestIterationIsNotTrained'
bad_request_iteration_is_published = 'BadRequestIterationIsPublished'
bad_request_iteration_name = 'BadRequestIterationName'
bad_request_iteration_name_not_unique = 'BadRequestIterationNameNotUnique'
bad_request_iteration_not_published = 'BadRequestIterationNotPublished'
bad_request_iteration_validation_failed = 'BadRequestIterationValidationFailed'
bad_request_multi_class_classification_training_validation_failed = 'BadRequestMultiClassClassificationTrainingValidationFailed'
bad_request_multi_label_classification_training_validation_failed = 'BadRequestMultiLabelClassificationTrainingValidationFailed'
bad_request_multiple_general_product_tag = 'BadRequestMultipleGeneralProductTag'
bad_request_multiple_negative_tag = 'BadRequestMultipleNegativeTag'
bad_request_negative_and_regular_tag_on_same_image = 'BadRequestNegativeAndRegularTagOnSameImage'
bad_request_not_limited_trial = 'BadRequestNotLimitedTrial'
bad_request_not_supported = 'BadRequestNotSupported'
bad_request_operation_not_supported = 'BadRequestOperationNotSupported'
bad_request_prediction_ids_exceeded_count = 'BadRequestPredictionIdsExceededCount'
bad_request_prediction_ids_missing = 'BadRequestPredictionIdsMissing'
bad_request_prediction_invalid_application_name = 'BadRequestPredictionInvalidApplicationName'
bad_request_prediction_invalid_query_parameters = 'BadRequestPredictionInvalidQueryParameters'
bad_request_prediction_results_exceeded_count = 'BadRequestPredictionResultsExceededCount'
bad_request_prediction_tags_exceeded_count = 'BadRequestPredictionTagsExceededCount'
bad_request_project_description = 'BadRequestProjectDescription'
bad_request_project_duplicated = 'BadRequestProjectDuplicated'
bad_request_project_image_preprocessing_settings = 'BadRequestProjectImagePreprocessingSettings'
bad_request_project_name = 'BadRequestProjectName'
bad_request_project_name_not_unique = 'BadRequestProjectNameNotUnique'
bad_request_project_unknown_classification = 'BadRequestProjectUnknownClassification'
bad_request_project_unknown_domain = 'BadRequestProjectUnknownDomain'
bad_request_project_unsupported_domain_type_change = 'BadRequestProjectUnsupportedDomainTypeChange'
bad_request_project_unsupported_export_platform = 'BadRequestProjectUnsupportedExportPlatform'
bad_request_required_param_is_null = 'BadRequestRequiredParamIsNull'
bad_request_reserved_budget_in_hours_not_enough_for_advanced_training = 'BadRequestReservedBudgetInHoursNotEnoughForAdvancedTraining'
bad_request_subscription_api = 'BadRequestSubscriptionApi'
bad_request_tag_description = 'BadRequestTagDescription'
bad_request_tag_name = 'BadRequestTagName'
bad_request_tag_name_not_unique = 'BadRequestTagNameNotUnique'
bad_request_tag_type = 'BadRequestTagType'
bad_request_training_already_in_progress = 'BadRequestTrainingAlreadyInProgress'
bad_request_training_not_needed = 'BadRequestTrainingNotNeeded'
bad_request_training_not_needed_but_training_pipeline_updated = 'BadRequestTrainingNotNeededButTrainingPipelineUpdated'
bad_request_training_validation_failed = 'BadRequestTrainingValidationFailed'
bad_request_unpublish_failed = 'BadRequestUnpublishFailed'
bad_request_unsupported_domain = 'BadRequestUnsupportedDomain'
bad_request_workspace_cannot_be_modified = 'BadRequestWorkspaceCannotBeModified'
bad_request_workspace_not_deletable = 'BadRequestWorkspaceNotDeletable'
conflict = 'Conflict'
conflict_invalid = 'ConflictInvalid'
error_exporter_invalid_classifier = 'ErrorExporterInvalidClassifier'
error_exporter_invalid_featurizer = 'ErrorExporterInvalidFeaturizer'
error_exporter_invalid_platform = 'ErrorExporterInvalidPlatform'
error_featurization_augmentation_error = 'ErrorFeaturizationAugmentationError'
error_featurization_augmentation_unavailable = 'ErrorFeaturizationAugmentationUnavailable'
error_featurization_invalid_featurizer = 'ErrorFeaturizationInvalidFeaturizer'
error_featurization_queue_timeout = 'ErrorFeaturizationQueueTimeout'
error_featurization_service_unavailable = 'ErrorFeaturizationServiceUnavailable'
error_featurization_unrecognized_job = 'ErrorFeaturizationUnrecognizedJob'
error_invalid = 'ErrorInvalid'
error_iteration_copy_failed = 'ErrorIterationCopyFailed'
error_prediction = 'ErrorPrediction'
error_prediction_model_not_cached = 'ErrorPredictionModelNotCached'
error_prediction_model_not_found = 'ErrorPredictionModelNotFound'
error_prediction_service_unavailable = 'ErrorPredictionServiceUnavailable'
error_prediction_storage = 'ErrorPredictionStorage'
error_prepare_performance_migration_failed = 'ErrorPreparePerformanceMigrationFailed'
error_project_export_request_failed = 'ErrorProjectExportRequestFailed'
error_project_import_request_failed = 'ErrorProjectImportRequestFailed'
error_project_invalid_domain = 'ErrorProjectInvalidDomain'
error_project_invalid_pipeline_configuration = 'ErrorProjectInvalidPipelineConfiguration'
error_project_invalid_workspace = 'ErrorProjectInvalidWorkspace'
error_project_training_request_failed = 'ErrorProjectTrainingRequestFailed'
error_region_proposal = 'ErrorRegionProposal'
error_unknown = 'ErrorUnknown'
error_unknown_base_model = 'ErrorUnknownBaseModel'
forbidden = 'Forbidden'
forbidden_dr_mode_enabled = 'ForbiddenDRModeEnabled'
forbidden_invalid = 'ForbiddenInvalid'
forbidden_user = 'ForbiddenUser'
forbidden_user_disabled = 'ForbiddenUserDisabled'
forbidden_user_does_not_exist = 'ForbiddenUserDoesNotExist'
forbidden_user_insufficient_capability = 'ForbiddenUserInsufficientCapability'
forbidden_user_resource = 'ForbiddenUserResource'
forbidden_user_signup_allowance_exceeded = 'ForbiddenUserSignupAllowanceExceeded'
forbidden_user_signup_disabled = 'ForbiddenUserSignupDisabled'
no_error = 'NoError'
not_found = 'NotFound'
not_found_apim_subscription = 'NotFoundApimSubscription'
not_found_domain = 'NotFoundDomain'
not_found_image = 'NotFoundImage'
not_found_invalid = 'NotFoundInvalid'
not_found_iteration = 'NotFoundIteration'
not_found_iteration_performance = 'NotFoundIterationPerformance'
not_found_project = 'NotFoundProject'
not_found_project_default_iteration = 'NotFoundProjectDefaultIteration'
not_found_tag = 'NotFoundTag'
unsupported_media_type = 'UnsupportedMediaType'
class azure.cognitiveservices.vision.customvision.training.models.Domain(**kwargs)[source]

Bases: msrest.serialization.Model

Domain.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) –

  • name (str) –

  • type (str or DomainType) – Possible values include: ‘Classification’, ‘ObjectDetection’

  • exportable (bool) –

  • enabled (bool) –

class azure.cognitiveservices.vision.customvision.training.models.DomainType(value)[source]

Bases: str, enum.Enum

An enumeration.

classification = 'Classification'
object_detection = 'ObjectDetection'
class azure.cognitiveservices.vision.customvision.training.models.Export(**kwargs)[source]

Bases: msrest.serialization.Model

Export.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • platform (str or ExportPlatform) – Platform of the export. Possible values include: ‘CoreML’, ‘TensorFlow’, ‘DockerFile’, ‘ONNX’, ‘VAIDK’

  • status (str or ExportStatus) – Status of the export. Possible values include: ‘Exporting’, ‘Failed’, ‘Done’

  • download_uri (str) – 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.

  • flavor (str or ExportFlavor) – 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’

  • newer_version_available (bool) – Indicates an updated version of the export package is available and should be re-exported for the latest changes.

class azure.cognitiveservices.vision.customvision.training.models.ExportFlavor(value)[source]

Bases: str, enum.Enum

An enumeration.

arm = 'ARM'
linux = 'Linux'
onnx10 = 'ONNX10'
onnx12 = 'ONNX12'
tensor_flow_lite = 'TensorFlowLite'
tensor_flow_normal = 'TensorFlowNormal'
windows = 'Windows'
class azure.cognitiveservices.vision.customvision.training.models.ExportPlatform(value)[source]

Bases: str, enum.Enum

An enumeration.

core_ml = 'CoreML'
docker_file = 'DockerFile'
onnx = 'ONNX'
tensor_flow = 'TensorFlow'
vaidk = 'VAIDK'
class azure.cognitiveservices.vision.customvision.training.models.ExportStatus(value)[source]

Bases: str, enum.Enum

An enumeration.

done = 'Done'
exporting = 'Exporting'
failed = 'Failed'
class azure.cognitiveservices.vision.customvision.training.models.Image(**kwargs)[source]

Bases: msrest.serialization.Model

Image model to be sent as JSON.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Id of the image.

  • created (datetime) – Date the image was created.

  • width (int) – Width of the image.

  • height (int) – Height of the image.

  • resized_image_uri (str) – 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.

  • thumbnail_uri (str) – 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.

  • original_image_uri (str) – 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.

  • tags (list[ImageTag]) – Tags associated with this image.

  • regions (list[ImageRegion]) – Regions associated with this image.

  • metadata (dict[str, str]) – Metadata associated with this image.

class azure.cognitiveservices.vision.customvision.training.models.ImageCreateResult(**kwargs)[source]

Bases: msrest.serialization.Model

ImageCreateResult.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • source_url (str) – Source URL of the image.

  • status (str or ImageCreateStatus) – Status of the image creation. Possible values include: ‘OK’, ‘OKDuplicate’, ‘ErrorSource’, ‘ErrorImageFormat’, ‘ErrorImageSize’, ‘ErrorStorage’, ‘ErrorLimitExceed’, ‘ErrorTagLimitExceed’, ‘ErrorRegionLimitExceed’, ‘ErrorUnknown’, ‘ErrorNegativeAndRegularTagOnSameImage’

  • image (Image) – The image.

class azure.cognitiveservices.vision.customvision.training.models.ImageCreateStatus(value)[source]

Bases: str, enum.Enum

An enumeration.

error_image_format = 'ErrorImageFormat'
error_image_size = 'ErrorImageSize'
error_limit_exceed = 'ErrorLimitExceed'
error_negative_and_regular_tag_on_same_image = 'ErrorNegativeAndRegularTagOnSameImage'
error_region_limit_exceed = 'ErrorRegionLimitExceed'
error_source = 'ErrorSource'
error_storage = 'ErrorStorage'
error_tag_limit_exceed = 'ErrorTagLimitExceed'
error_unknown = 'ErrorUnknown'
ok = 'OK'
ok_duplicate = 'OKDuplicate'
class azure.cognitiveservices.vision.customvision.training.models.ImageCreateSummary(**kwargs)[source]

Bases: msrest.serialization.Model

ImageCreateSummary.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • is_batch_successful (bool) – True if all of the images in the batch were created successfully, otherwise false.

  • images (list[ImageCreateResult]) – List of the image creation results.

class azure.cognitiveservices.vision.customvision.training.models.ImageFileCreateBatch(*, images=None, tag_ids=None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageFileCreateBatch.

Parameters
  • images (list[ImageFileCreateEntry]) –

  • tag_ids (list[str]) –

  • metadata (dict[str, str]) – The metadata of image. Limited to 50 key-value pairs per image. The length of key is limited to 256. The length of value is limited to 512.

class azure.cognitiveservices.vision.customvision.training.models.ImageFileCreateEntry(*, name: str = None, contents: bytearray = None, tag_ids=None, regions=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageFileCreateEntry.

Parameters
class azure.cognitiveservices.vision.customvision.training.models.ImageIdCreateBatch(*, images=None, tag_ids=None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageIdCreateBatch.

Parameters
  • images (list[ImageIdCreateEntry]) –

  • tag_ids (list[str]) –

  • metadata (dict[str, str]) – The metadata of image. Limited to 50 key-value pairs per image. The length of key is limited to 256. The length of value is limited to 512.

class azure.cognitiveservices.vision.customvision.training.models.ImageIdCreateEntry(*, id: str = None, tag_ids=None, regions=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageIdCreateEntry.

Parameters
class azure.cognitiveservices.vision.customvision.training.models.ImageMetadataUpdateEntry(*, image_id: str = None, status=None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

Entry associating a metadata to an image.

Parameters
  • image_id (str) – Id of the image.

  • status (str or ImageMetadataUpdateStatus) – Status of the metadata update. Possible values include: ‘OK’, ‘ErrorImageNotFound’, ‘ErrorLimitExceed’, ‘ErrorUnknown’

  • metadata (dict[str, str]) – Metadata of the image.

class azure.cognitiveservices.vision.customvision.training.models.ImageMetadataUpdateStatus(value)[source]

Bases: str, enum.Enum

An enumeration.

error_image_not_found = 'ErrorImageNotFound'
error_limit_exceed = 'ErrorLimitExceed'
error_unknown = 'ErrorUnknown'
ok = 'OK'
class azure.cognitiveservices.vision.customvision.training.models.ImageMetadataUpdateSummary(**kwargs)[source]

Bases: msrest.serialization.Model

ImageMetadataUpdateSummary.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
class azure.cognitiveservices.vision.customvision.training.models.ImagePerformance(**kwargs)[source]

Bases: msrest.serialization.Model

Image performance model.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
class azure.cognitiveservices.vision.customvision.training.models.ImagePrediction(**kwargs)[source]

Bases: msrest.serialization.Model

Result of an image prediction request.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Prediction Id.

  • project (str) – Project Id.

  • iteration (str) – Iteration Id.

  • created (datetime) – Date this prediction was created.

  • predictions (list[Prediction]) – List of predictions.

class azure.cognitiveservices.vision.customvision.training.models.ImageProcessingSettings(*, augmentation_methods=None, **kwargs)[source]

Bases: msrest.serialization.Model

Represents image preprocessing settings used by image augmentation.

Parameters

augmentation_methods (dict[str, bool]) – 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.

class azure.cognitiveservices.vision.customvision.training.models.ImageRegion(*, tag_id: str, left: float, top: float, width: float, height: float, **kwargs)[source]

Bases: msrest.serialization.Model

ImageRegion.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • region_id (str) –

  • tag_name (str) –

  • created (datetime) –

Parameters
  • tag_id (str) – Required. Id of the tag associated with this region.

  • left (float) – Required. Coordinate of the left boundary.

  • top (float) – Required. Coordinate of the top boundary.

  • width (float) – Required. Width.

  • height (float) – Required. Height.

class azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateBatch(*, regions=None, **kwargs)[source]

Bases: msrest.serialization.Model

Batch of image region information to create.

Parameters

regions (list[ImageRegionCreateEntry]) –

class azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateEntry(*, image_id: str, tag_id: str, left: float, top: float, width: float, height: float, **kwargs)[source]

Bases: msrest.serialization.Model

Entry associating a region to an image.

All required parameters must be populated in order to send to Azure.

Parameters
  • image_id (str) – Required. Id of the image.

  • tag_id (str) – Required. Id of the tag associated with this region.

  • left (float) – Required. Coordinate of the left boundary.

  • top (float) – Required. Coordinate of the top boundary.

  • width (float) – Required. Width.

  • height (float) – Required. Height.

class azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateResult(*, tag_id: str, left: float, top: float, width: float, height: float, **kwargs)[source]

Bases: msrest.serialization.Model

ImageRegionCreateResult.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • image_id (str) –

  • region_id (str) –

  • tag_name (str) –

  • created (datetime) –

Parameters
  • tag_id (str) – Required. Id of the tag associated with this region.

  • left (float) – Required. Coordinate of the left boundary.

  • top (float) – Required. Coordinate of the top boundary.

  • width (float) – Required. Width.

  • height (float) – Required. Height.

class azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateSummary(*, created=None, duplicated=None, exceeded=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageRegionCreateSummary.

Parameters
class azure.cognitiveservices.vision.customvision.training.models.ImageRegionProposal(**kwargs)[source]

Bases: msrest.serialization.Model

ImageRegionProposal.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
class azure.cognitiveservices.vision.customvision.training.models.ImageTag(**kwargs)[source]

Bases: msrest.serialization.Model

ImageTag.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • tag_id (str) –

  • tag_name (str) –

  • created (datetime) –

class azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateBatch(*, tags=None, **kwargs)[source]

Bases: msrest.serialization.Model

Batch of image tags.

Parameters

tags (list[ImageTagCreateEntry]) – Image Tag entries to include in this batch.

class azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateEntry(*, image_id: str = None, tag_id: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

Entry associating a tag to an image.

Parameters
  • image_id (str) – Id of the image.

  • tag_id (str) – Id of the tag.

class azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateSummary(*, created=None, duplicated=None, exceeded=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageTagCreateSummary.

Parameters
class azure.cognitiveservices.vision.customvision.training.models.ImageUrl(*, url: str, **kwargs)[source]

Bases: msrest.serialization.Model

Image url.

All required parameters must be populated in order to send to Azure.

Parameters

url (str) – Required. Url of the image.

class azure.cognitiveservices.vision.customvision.training.models.ImageUrlCreateBatch(*, images=None, tag_ids=None, metadata=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageUrlCreateBatch.

Parameters
  • images (list[ImageUrlCreateEntry]) –

  • tag_ids (list[str]) –

  • metadata (dict[str, str]) – The metadata of image. Limited to 50 key-value pairs per image. The length of key is limited to 256. The length of value is limited to 512.

class azure.cognitiveservices.vision.customvision.training.models.ImageUrlCreateEntry(*, url: str, tag_ids=None, regions=None, **kwargs)[source]

Bases: msrest.serialization.Model

ImageUrlCreateEntry.

All required parameters must be populated in order to send to Azure.

Parameters
class azure.cognitiveservices.vision.customvision.training.models.Iteration(*, name: str, **kwargs)[source]

Bases: msrest.serialization.Model

Iteration model to be sent over JSON.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • id (str) – Gets the id of the iteration.

  • status (str) – Gets the current iteration status.

  • created (datetime) – Gets the time this iteration was completed.

  • last_modified (datetime) – Gets the time this iteration was last modified.

  • trained_at (datetime) – Gets the time this iteration was last modified.

  • project_id (str) – Gets the project id of the iteration.

  • exportable (bool) – Whether the iteration can be exported to another format for download.

  • exportable_to (list[str]) – A set of platforms this iteration can export to.

  • domain_id (str) – Get or sets a guid of the domain the iteration has been trained on.

  • classification_type (str or Classifier) – Gets the classification type of the project. Possible values include: ‘Multiclass’, ‘Multilabel’

  • training_type (str or TrainingType) – Gets the training type of the iteration. Possible values include: ‘Regular’, ‘Advanced’

  • reserved_budget_in_hours (int) – Gets the reserved advanced training budget for the iteration.

  • training_time_in_minutes (int) – Gets the training time for the iteration.

  • publish_name (str) – Name of the published model.

  • original_publish_resource_id (str) – Resource Provider Id this iteration was originally published to.

Parameters

name (str) – Required. Gets or sets the name of the iteration.

class azure.cognitiveservices.vision.customvision.training.models.IterationPerformance(**kwargs)[source]

Bases: msrest.serialization.Model

Represents the detailed performance data for a trained iteration.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • per_tag_performance (list[TagPerformance]) – Gets the per-tag performance details for this iteration.

  • precision (float) – Gets the precision.

  • precision_std_deviation (float) – Gets the standard deviation for the precision.

  • recall (float) – Gets the recall.

  • recall_std_deviation (float) – Gets the standard deviation for the recall.

  • average_precision (float) – Gets the average precision when applicable.

class azure.cognitiveservices.vision.customvision.training.models.OrderBy(value)[source]

Bases: str, enum.Enum

An enumeration.

newest = 'Newest'
oldest = 'Oldest'
suggested = 'Suggested'
class azure.cognitiveservices.vision.customvision.training.models.Prediction(**kwargs)[source]

Bases: msrest.serialization.Model

Prediction result.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • probability (float) – Probability of the tag.

  • tag_id (str) – Id of the predicted tag.

  • tag_name (str) – Name of the predicted tag.

  • bounding_box (BoundingBox) – Bounding box of the prediction.

  • tag_type (str or TagType) – Type of the predicted tag. Possible values include: ‘Regular’, ‘Negative’, ‘GeneralProduct’

class azure.cognitiveservices.vision.customvision.training.models.PredictionQueryResult(*, token=None, **kwargs)[source]

Bases: msrest.serialization.Model

Query result of the prediction images that were sent to your prediction endpoint.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters

token (PredictionQueryToken) – Prediction Query Token.

Variables

results (list[StoredImagePrediction]) – Result of an image prediction request.

class azure.cognitiveservices.vision.customvision.training.models.PredictionQueryTag(*, id: str = None, min_threshold: float = None, max_threshold: float = None, **kwargs)[source]

Bases: msrest.serialization.Model

PredictionQueryTag.

Parameters
  • id (str) –

  • min_threshold (float) –

  • max_threshold (float) –

class azure.cognitiveservices.vision.customvision.training.models.PredictionQueryToken(*, session: str = None, continuation: str = None, max_count: int = None, order_by=None, tags=None, iteration_id: str = None, start_time=None, end_time=None, application: str = None, **kwargs)[source]

Bases: msrest.serialization.Model

PredictionQueryToken.

Parameters
  • session (str) –

  • continuation (str) –

  • max_count (int) –

  • order_by (str or OrderBy) – Possible values include: ‘Newest’, ‘Oldest’, ‘Suggested’

  • tags (list[PredictionQueryTag]) –

  • iteration_id (str) –

  • start_time (datetime) –

  • end_time (datetime) –

  • application (str) –

class azure.cognitiveservices.vision.customvision.training.models.Project(*, name: str, description: str, settings, status=None, **kwargs)[source]

Bases: msrest.serialization.Model

Represents a project.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • id (str) – Gets the project id.

  • created (datetime) – Gets the date this project was created.

  • last_modified (datetime) – Gets the date this project was last modified.

  • thumbnail_uri (str) – 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.

  • dr_mode_enabled (bool) – Gets if the Disaster Recovery (DR) mode is on, indicating the project is temporarily read-only.

Parameters
  • name (str) – Required. Gets or sets the name of the project.

  • description (str) – Required. Gets or sets the description of the project.

  • settings (ProjectSettings) – Required. Gets or sets the project settings.

  • status (str or ProjectStatus) – Gets the status of the project. Possible values include: ‘Succeeded’, ‘Importing’, ‘Failed’

class azure.cognitiveservices.vision.customvision.training.models.ProjectExport(**kwargs)[source]

Bases: msrest.serialization.Model

Represents information about a project export.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • iteration_count (int) – Count of iterations that will be exported.

  • image_count (int) – Count of images that will be exported.

  • tag_count (int) – Count of tags that will be exported.

  • region_count (int) – Count of regions that will be exported.

  • estimated_import_time_in_ms (int) – Estimated time this project will take to import, can change based on network connectivity and load between source and destination regions.

  • token (str) – 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.

class azure.cognitiveservices.vision.customvision.training.models.ProjectSettings(*, domain_id: str = None, classification_type=None, target_export_platforms=None, image_processing_settings=None, **kwargs)[source]

Bases: msrest.serialization.Model

Represents settings associated with a project.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters
  • domain_id (str) – Gets or sets the id of the Domain to use with this project.

  • classification_type (str or Classifier) – Gets or sets the classification type of the project. Possible values include: ‘Multiclass’, ‘Multilabel’

  • target_export_platforms (list[str]) – A list of ExportPlatform that the trained model should be able to support.

  • image_processing_settings (ImageProcessingSettings) – Gets or sets image preprocessing settings.

Variables
  • use_negative_set (bool) – Indicates if negative set is being used.

  • detection_parameters (str) – Detection parameters in use, if any.

class azure.cognitiveservices.vision.customvision.training.models.ProjectStatus(value)[source]

Bases: str, enum.Enum

An enumeration.

failed = 'Failed'
importing = 'Importing'
succeeded = 'Succeeded'
class azure.cognitiveservices.vision.customvision.training.models.Region(*, tag_id: str, left: float, top: float, width: float, height: float, **kwargs)[source]

Bases: msrest.serialization.Model

Region.

All required parameters must be populated in order to send to Azure.

Parameters
  • tag_id (str) – Required. Id of the tag associated with this region.

  • left (float) – Required. Coordinate of the left boundary.

  • top (float) – Required. Coordinate of the top boundary.

  • width (float) – Required. Width.

  • height (float) – Required. Height.

class azure.cognitiveservices.vision.customvision.training.models.RegionProposal(**kwargs)[source]

Bases: msrest.serialization.Model

RegionProposal.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
class azure.cognitiveservices.vision.customvision.training.models.SortBy(value)[source]

Bases: str, enum.Enum

An enumeration.

uncertainty_ascending = 'UncertaintyAscending'
uncertainty_descending = 'UncertaintyDescending'
class azure.cognitiveservices.vision.customvision.training.models.StoredImagePrediction(**kwargs)[source]

Bases: msrest.serialization.Model

Result of an image prediction request.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • resized_image_uri (str) – 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.

  • thumbnail_uri (str) – 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.

  • original_image_uri (str) – 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.

  • domain (str) – Domain used for the prediction.

  • id (str) – Prediction Id.

  • project (str) – Project Id.

  • iteration (str) – Iteration Id.

  • created (datetime) – Date this prediction was created.

  • predictions (list[Prediction]) – List of predictions.

class azure.cognitiveservices.vision.customvision.training.models.StoredSuggestedTagAndRegion(**kwargs)[source]

Bases: msrest.serialization.Model

Result of a suggested tags and regions request of the untagged image.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • width (int) – Width of the resized image.

  • height (int) – Height of the resized image.

  • resized_image_uri (str) – 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.

  • thumbnail_uri (str) – 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.

  • original_image_uri (str) – 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.

  • domain (str) – Domain used for the prediction.

  • id (str) – Prediction Id.

  • project (str) – Project Id.

  • iteration (str) – Iteration Id.

  • created (datetime) – Date this prediction was created.

  • predictions (list[Prediction]) – List of predictions.

  • prediction_uncertainty (float) – Uncertainty (entropy) of suggested tags or regions per image.

class azure.cognitiveservices.vision.customvision.training.models.SuggestedTagAndRegion(**kwargs)[source]

Bases: msrest.serialization.Model

Result of a suggested tags and regions request.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) – Prediction Id.

  • project (str) – Project Id.

  • iteration (str) – Iteration Id.

  • created (datetime) – Date this prediction was created.

  • predictions (list[Prediction]) – List of predictions.

  • prediction_uncertainty (float) – Uncertainty (entropy) of suggested tags or regions per image.

class azure.cognitiveservices.vision.customvision.training.models.SuggestedTagAndRegionQuery(*, token=None, **kwargs)[source]

Bases: msrest.serialization.Model

The array of result images and token containing session and continuation Ids for the next query.

Variables are only populated by the server, and will be ignored when sending a request.

Parameters

token (SuggestedTagAndRegionQueryToken) – Contains properties we need to fetch suggested tags for.

Variables

results (list[StoredSuggestedTagAndRegion]) – Result of a suggested tags and regions request of the untagged image.

class azure.cognitiveservices.vision.customvision.training.models.SuggestedTagAndRegionQueryToken(*, tag_ids=None, threshold: float = None, session: str = None, continuation: str = None, max_count: int = None, sort_by=None, **kwargs)[source]

Bases: msrest.serialization.Model

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.

Parameters
  • tag_ids (list[str]) – Existing TagIds in project to filter suggested tags on.

  • threshold (float) – Confidence threshold to filter suggested tags on.

  • session (str) – SessionId for database query. Initially set to null but later used to paginate.

  • continuation (str) – Continuation Id for database pagination. Initially null but later used to paginate.

  • max_count (int) – Maximum number of results you want to be returned in the response.

  • sort_by (str or SortBy) – OrderBy. Ordering mechanism for your results. Possible values include: ‘UncertaintyAscending’, ‘UncertaintyDescending’

class azure.cognitiveservices.vision.customvision.training.models.Tag(*, name: str, description: str, type, **kwargs)[source]

Bases: msrest.serialization.Model

Represents a Tag.

Variables are only populated by the server, and will be ignored when sending a request.

All required parameters must be populated in order to send to Azure.

Variables
  • id (str) – Gets the Tag ID.

  • image_count (int) – Gets the number of images with this tag.

Parameters
  • name (str) – Required. Gets or sets the name of the tag.

  • description (str) – Required. Gets or sets the description of the tag.

  • type (str or TagType) – Required. Gets or sets the type of the tag. Possible values include: ‘Regular’, ‘Negative’, ‘GeneralProduct’

class azure.cognitiveservices.vision.customvision.training.models.TagFilter(*, tag_ids=None, threshold: float = None, **kwargs)[source]

Bases: msrest.serialization.Model

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.

Parameters
  • tag_ids (list[str]) – Existing TagIds in project to get suggested tags count for.

  • threshold (float) – Confidence threshold to filter suggested tags on.

class azure.cognitiveservices.vision.customvision.training.models.TagPerformance(**kwargs)[source]

Bases: msrest.serialization.Model

Represents performance data for a particular tag in a trained iteration.

Variables are only populated by the server, and will be ignored when sending a request.

Variables
  • id (str) –

  • name (str) –

  • precision (float) – Gets the precision.

  • precision_std_deviation (float) – Gets the standard deviation for the precision.

  • recall (float) – Gets the recall.

  • recall_std_deviation (float) – Gets the standard deviation for the recall.

  • average_precision (float) – Gets the average precision when applicable.

class azure.cognitiveservices.vision.customvision.training.models.TagType(value)[source]

Bases: str, enum.Enum

An enumeration.

general_product = 'GeneralProduct'
negative = 'Negative'
regular = 'Regular'
class azure.cognitiveservices.vision.customvision.training.models.TrainingParameters(*, selected_tags=None, **kwargs)[source]

Bases: msrest.serialization.Model

Parameters used for training.

Parameters

selected_tags (list[str]) – List of tags selected for this training session, other tags in the project will be ignored.

class azure.cognitiveservices.vision.customvision.training.models.TrainingType(value)[source]

Bases: str, enum.Enum

An enumeration.

advanced = 'Advanced'
regular = 'Regular'