diff --git a/azure-cognitiveservices-vision-customvision/HISTORY.rst b/azure-cognitiveservices-vision-customvision/HISTORY.rst index 181f72c68829..7cafbc26e477 100644 --- a/azure-cognitiveservices-vision-customvision/HISTORY.rst +++ b/azure-cognitiveservices-vision-customvision/HISTORY.rst @@ -3,6 +3,14 @@ Release History =============== +0.4.0 (2018-11-13) +++++++++++++++++++ + +- The API client name was changed from TrainingAPI to CustomVisionTrainingClient, in keeping with other Azure SDKs. +- The way the Azure region is specfied has changed. Specifically, the AzureRegion property was dropped in favor of an Endpoint property. If you were previously specifying an AzureRegion value, you should now specify Endpoint='https://{AzureRegion}.api.cognitive.microsoft.com' instead. This change ensures better global coverage. +- Added ONNX 1.2 as an export option +- Added negative tag support. + 0.3.0 (2018-07-12) ++++++++++++++++++ diff --git a/azure-cognitiveservices-vision-customvision/MANIFEST.in b/azure-cognitiveservices-vision-customvision/MANIFEST.in index bb37a2723dae..e437a6594c1b 100644 --- a/azure-cognitiveservices-vision-customvision/MANIFEST.in +++ b/azure-cognitiveservices-vision-customvision/MANIFEST.in @@ -1 +1,5 @@ include *.rst +include azure/__init__.py +include azure/cognitiveservices/__init__.py +include azure/cognitiveservices/vision/__init__.py + diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/__init__.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/__init__.py index a2dcdd80e0b3..fd2fe8a0a828 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/__init__.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/__init__.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .prediction_endpoint import PredictionEndpoint +from .custom_vision_prediction_client import CustomVisionPredictionClient from .version import VERSION -__all__ = ['PredictionEndpoint'] +__all__ = ['CustomVisionPredictionClient'] __version__ = VERSION diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/prediction_endpoint.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/custom_vision_prediction_client.py similarity index 84% rename from azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/prediction_endpoint.py rename to azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/custom_vision_prediction_client.py index 7738f826a388..7b93a403d1e4 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/prediction_endpoint.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/prediction/custom_vision_prediction_client.py @@ -17,47 +17,51 @@ from . import models -class PredictionEndpointConfiguration(Configuration): - """Configuration for PredictionEndpoint +class CustomVisionPredictionClientConfiguration(Configuration): + """Configuration for CustomVisionPredictionClient Note that all parameters used to create this instance are saved as instance attributes. :param api_key: :type api_key: str - :param str base_url: Service URL + :param endpoint: Supported Cognitive Services endpoints + :type endpoint: str """ def __init__( - self, api_key, base_url=None): + self, api_key, endpoint): if api_key is None: raise ValueError("Parameter 'api_key' must not be None.") - if not base_url: - base_url = 'https://southcentralus.api.cognitive.microsoft.com/customvision/v2.0/Prediction' + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + base_url = '{Endpoint}/customvision/v2.0/Prediction' - super(PredictionEndpointConfiguration, self).__init__(base_url) + super(CustomVisionPredictionClientConfiguration, self).__init__(base_url) self.add_user_agent('azure-cognitiveservices-vision-customvision/{}'.format(VERSION)) self.api_key = api_key + self.endpoint = endpoint -class PredictionEndpoint(SDKClient): - """PredictionEndpoint +class CustomVisionPredictionClient(SDKClient): + """CustomVisionPredictionClient :ivar config: Configuration for client. - :vartype config: PredictionEndpointConfiguration + :vartype config: CustomVisionPredictionClientConfiguration :param api_key: :type api_key: str - :param str base_url: Service URL + :param endpoint: Supported Cognitive Services endpoints + :type endpoint: str """ def __init__( - self, api_key, base_url=None): + self, api_key, endpoint): - self.config = PredictionEndpointConfiguration(api_key, base_url) - super(PredictionEndpoint, self).__init__(None, self.config) + self.config = CustomVisionPredictionClientConfiguration(api_key, endpoint) + super(CustomVisionPredictionClient, self).__init__(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} self.api_version = '2.0' @@ -97,6 +101,7 @@ def predict_image_url( # Construct URL url = self.predict_image_url.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -110,6 +115,7 @@ def predict_image_url( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -119,9 +125,8 @@ def predict_image_url( body_content = self._serialize.body(image_url, 'ImageUrl') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -168,6 +173,7 @@ def predict_image( # Construct URL url = self.predict_image.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -181,6 +187,7 @@ def predict_image( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'multipart/form-data' if custom_headers: header_parameters.update(custom_headers) @@ -192,9 +199,8 @@ def predict_image( } # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send_formdata( - request, header_parameters, form_data_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, form_content=form_data_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -243,6 +249,7 @@ def predict_image_url_with_no_store( # Construct URL url = self.predict_image_url_with_no_store.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -256,6 +263,7 @@ def predict_image_url_with_no_store( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -265,9 +273,8 @@ def predict_image_url_with_no_store( body_content = self._serialize.body(image_url, 'ImageUrl') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -314,6 +321,7 @@ def predict_image_with_no_store( # Construct URL url = self.predict_image_with_no_store.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -327,6 +335,7 @@ def predict_image_with_no_store( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'multipart/form-data' if custom_headers: header_parameters.update(custom_headers) @@ -338,9 +347,8 @@ def predict_image_with_no_store( } # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send_formdata( - request, header_parameters, form_data_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, form_content=form_data_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/__init__.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/__init__.py index 74d5a252789a..724dda495fae 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/__init__.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/__init__.py @@ -9,10 +9,10 @@ # regenerated. # -------------------------------------------------------------------------- -from .training_api import TrainingApi +from .custom_vision_training_client import CustomVisionTrainingClient from .version import VERSION -__all__ = ['TrainingApi'] +__all__ = ['CustomVisionTrainingClient'] __version__ = VERSION diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/training_api.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/custom_vision_training_client.py similarity index 83% rename from azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/training_api.py rename to azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/custom_vision_training_client.py index 40b74db707b3..452809e9db2e 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/training_api.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/custom_vision_training_client.py @@ -17,50 +17,54 @@ from . import models -class TrainingApiConfiguration(Configuration): - """Configuration for TrainingApi +class CustomVisionTrainingClientConfiguration(Configuration): + """Configuration for CustomVisionTrainingClient Note that all parameters used to create this instance are saved as instance attributes. :param api_key: :type api_key: str - :param str base_url: Service URL + :param endpoint: Supported Cognitive Services endpoints + :type endpoint: str """ def __init__( - self, api_key, base_url=None): + self, api_key, endpoint): if api_key is None: raise ValueError("Parameter 'api_key' must not be None.") - if not base_url: - base_url = 'https://southcentralus.api.cognitive.microsoft.com/customvision/v2.1/Training' + if endpoint is None: + raise ValueError("Parameter 'endpoint' must not be None.") + base_url = '{Endpoint}/customvision/v2.2/Training' - super(TrainingApiConfiguration, self).__init__(base_url) + super(CustomVisionTrainingClientConfiguration, self).__init__(base_url) self.add_user_agent('azure-cognitiveservices-vision-customvision/{}'.format(VERSION)) self.api_key = api_key + self.endpoint = endpoint -class TrainingApi(SDKClient): - """TrainingApi +class CustomVisionTrainingClient(SDKClient): + """CustomVisionTrainingClient :ivar config: Configuration for client. - :vartype config: TrainingApiConfiguration + :vartype config: CustomVisionTrainingClientConfiguration :param api_key: :type api_key: str - :param str base_url: Service URL + :param endpoint: Supported Cognitive Services endpoints + :type endpoint: str """ def __init__( - self, api_key, base_url=None): + self, api_key, endpoint): - self.config = TrainingApiConfiguration(api_key, base_url) - super(TrainingApi, self).__init__(None, self.config) + self.config = CustomVisionTrainingClientConfiguration(api_key, endpoint) + super(CustomVisionTrainingClient, self).__init__(None, self.config) client_models = {k: v for k, v in models.__dict__.items() if isinstance(v, type)} - self.api_version = '2.1' + self.api_version = '2.2' self._serialize = Serializer(client_models) self._deserialize = Deserializer(client_models) @@ -83,20 +87,24 @@ def get_domains( """ # Construct URL url = self.get_domains.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -117,7 +125,7 @@ def get_domain( self, domain_id, custom_headers=None, raw=False, **operation_config): """Get information about a specific domain. - :param domain_id: The id of the domain to get information about + :param domain_id: The id of the domain to get information about. :type domain_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -134,6 +142,7 @@ def get_domain( # Construct URL url = self.get_domain.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'domainId': self._serialize.url("domain_id", domain_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -143,14 +152,14 @@ def get_domain( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -167,50 +176,36 @@ def get_domain( return deserialized get_domain.metadata = {'url': '/domains/{domainId}'} - def get_tagged_images( - self, project_id, iteration_id=None, tag_ids=None, order_by=None, take=50, skip=0, custom_headers=None, raw=False, **operation_config): - """Get tagged images for a given project iteration. + def get_tagged_image_count( + self, project_id, iteration_id=None, tag_ids=None, custom_headers=None, raw=False, **operation_config): + """Gets the number of images tagged with the provided {tagIds}. - This API supports batching and range selection. By default it will only - return first 50 images matching images. - Use the {take} and {skip} parameters to control how many images to - return in a given batch. The filtering is on an and/or relationship. For example, if the provided tag ids are for the "Dog" and "Cat" tags, then only images tagged with Dog and/or Cat will be returned. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id. Defaults to workspace + :param iteration_id: The iteration id. Defaults to workspace. :type iteration_id: str - :param tag_ids: A list of tags ids to filter the images. Defaults to - all tagged images when null. Limited to 20 + :param tag_ids: A list of tags ids to filter the images to count. + Defaults to all tags when null. :type tag_ids: list[str] - :param order_by: The ordering. Defaults to newest. Possible values - include: 'Newest', 'Oldest' - :type order_by: str - :param take: Maximum number of images to return. Defaults to 50, - limited to 256 - :type take: int - :param skip: Number of images to skip before beginning the image - batch. Defaults to 0 - :type skip: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.cognitiveservices.vision.customvision.training.models.Image] - or ~msrest.pipeline.ClientRawResponse + :return: int or ClientRawResponse if raw=true + :rtype: int or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.get_tagged_images.metadata['url'] + url = self.get_tagged_image_count.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -221,23 +216,17 @@ def get_tagged_images( query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') if tag_ids is not None: query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') - if order_by is not None: - query_parameters['orderBy'] = self._serialize.query("order_by", order_by, 'str') - if take is not None: - query_parameters['take'] = self._serialize.query("take", take, 'int') - if skip is not None: - query_parameters['skip'] = self._serialize.query("skip", skip, 'int') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -245,52 +234,41 @@ def get_tagged_images( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[Image]', response) + deserialized = self._deserialize('int', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_tagged_images.metadata = {'url': '/projects/{projectId}/images/tagged'} + get_tagged_image_count.metadata = {'url': '/projects/{projectId}/images/tagged/count'} - def get_untagged_images( - self, project_id, iteration_id=None, order_by=None, take=50, skip=0, custom_headers=None, raw=False, **operation_config): - """Get untagged images for a given project iteration. + def get_untagged_image_count( + self, project_id, iteration_id=None, custom_headers=None, raw=False, **operation_config): + """Gets the number of untagged images. - This API supports batching and range selection. By default it will only - return first 50 images matching images. - Use the {take} and {skip} parameters to control how many images to - return in a given batch. + This API returns the images which have no tags for a given project and + optionally an iteration. If no iteration is specified the + current workspace is used. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id. Defaults to workspace + :param iteration_id: The iteration id. Defaults to workspace. :type iteration_id: str - :param order_by: The ordering. Defaults to newest. Possible values - include: 'Newest', 'Oldest' - :type order_by: str - :param take: Maximum number of images to return. Defaults to 50, - limited to 256 - :type take: int - :param skip: Number of images to skip before beginning the image - batch. Defaults to 0 - :type skip: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list or ClientRawResponse if raw=true - :rtype: - list[~azure.cognitiveservices.vision.customvision.training.models.Image] - or ~msrest.pipeline.ClientRawResponse + :return: int or ClientRawResponse if raw=true + :rtype: int or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.get_untagged_images.metadata['url'] + url = self.get_untagged_image_count.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -299,23 +277,17 @@ def get_untagged_images( query_parameters = {} if iteration_id is not None: query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') - if order_by is not None: - query_parameters['orderBy'] = self._serialize.query("order_by", order_by, 'str') - if take is not None: - query_parameters['take'] = self._serialize.query("take", take, 'int') - if skip is not None: - query_parameters['skip'] = self._serialize.query("skip", skip, 'int') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -323,65 +295,63 @@ def get_untagged_images( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('[Image]', response) + deserialized = self._deserialize('int', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_untagged_images.metadata = {'url': '/projects/{projectId}/images/untagged'} - - def get_tagged_image_count( - self, project_id, iteration_id=None, tag_ids=None, custom_headers=None, raw=False, **operation_config): - """Gets the number of images tagged with the provided {tagIds}. + get_untagged_image_count.metadata = {'url': '/projects/{projectId}/images/untagged/count'} - The filtering is on an and/or relationship. For example, if the - provided tag ids are for the "Dog" and - "Cat" tags, then only images tagged with Dog and/or Cat will be - returned. + def create_image_tags( + self, project_id, tags=None, custom_headers=None, raw=False, **operation_config): + """Associate a set of images with a set of tags. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id. Defaults to workspace - :type iteration_id: str - :param tag_ids: A list of tags ids to filter the images to count. - Defaults to all tags when null. - :type tag_ids: list[str] + :param tags: Image Tag entries to include in this batch. + :type tags: + list[~azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateEntry] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: int or ClientRawResponse if raw=true - :rtype: int or ~msrest.pipeline.ClientRawResponse + :return: ImageTagCreateSummary or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateSummary + or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ + batch = models.ImageTagCreateBatch(tags=tags) + # Construct URL - url = self.get_tagged_image_count.metadata['url'] + url = self.create_image_tags.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if iteration_id is not None: - query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') - if tag_ids is not None: - query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') + # Construct body + body_content = self._serialize.body(batch, 'ImageTagCreateBatch') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -389,59 +359,119 @@ def get_tagged_image_count( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('int', response) + deserialized = self._deserialize('ImageTagCreateSummary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_tagged_image_count.metadata = {'url': '/projects/{projectId}/images/tagged/count'} + create_image_tags.metadata = {'url': '/projects/{projectId}/images/tags'} - def get_untagged_image_count( - self, project_id, iteration_id=None, custom_headers=None, raw=False, **operation_config): - """Gets the number of untagged images. + def delete_image_tags( + self, project_id, image_ids, tag_ids, custom_headers=None, raw=False, **operation_config): + """Remove a set of tags from a set of images. - This API returns the images which have no tags for a given project and - optionally an iteration. If no iteration is specified the - current workspace is used. + :param project_id: The project id. + :type project_id: str + :param image_ids: Image ids. Limited to 64 images. + :type image_ids: list[str] + :param tag_ids: Tags to be deleted from the specified images. Limted + to 20 tags. + :type tag_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`HttpOperationError` + """ + # Construct URL + url = self.delete_image_tags.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) - :param project_id: The project id + # Construct parameters + query_parameters = {} + query_parameters['imageIds'] = self._serialize.query("image_ids", image_ids, '[str]', div=',') + query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise HttpOperationError(self._deserialize, response) + + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_image_tags.metadata = {'url': '/projects/{projectId}/images/tags'} + + def create_image_regions( + self, project_id, regions=None, custom_headers=None, raw=False, **operation_config): + """Create a set of image regions. + + This API accepts a batch of image regions, and optionally tags, to + update existing images with region information. + There is a limit of 64 entries in the batch. + + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id. Defaults to workspace - :type iteration_id: str + :param regions: + :type regions: + list[~azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateEntry] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: int or ClientRawResponse if raw=true - :rtype: int or ~msrest.pipeline.ClientRawResponse + :return: ImageRegionCreateSummary or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateSummary + or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ + batch = models.ImageRegionCreateBatch(regions=regions) + # Construct URL - url = self.get_untagged_image_count.metadata['url'] + url = self.create_image_regions.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if iteration_id is not None: - query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') + # Construct body + body_content = self._serialize.body(batch, 'ImageRegionCreateBatch') + # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -449,29 +479,92 @@ def get_untagged_image_count( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('int', response) + deserialized = self._deserialize('ImageRegionCreateSummary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_untagged_image_count.metadata = {'url': '/projects/{projectId}/images/untagged/count'} + create_image_regions.metadata = {'url': '/projects/{projectId}/images/regions'} - def get_images_by_ids( - self, project_id, image_ids=None, iteration_id=None, custom_headers=None, raw=False, **operation_config): - """Get images by id for a given project iteration. + def delete_image_regions( + self, project_id, region_ids, custom_headers=None, raw=False, **operation_config): + """Delete a set of image regions. - This API will return a set of Images for the specified tags and - optionally iteration. If no iteration is specified the - current workspace is used. + :param project_id: The project id. + :type project_id: str + :param region_ids: Regions to delete. Limited to 64. + :type region_ids: list[str] + :param dict custom_headers: headers that will be added to the request + :param bool raw: returns the direct response alongside the + deserialized response + :param operation_config: :ref:`Operation configuration + overrides`. + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse + :raises: + :class:`HttpOperationError` + """ + # Construct URL + url = self.delete_image_regions.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str') + } + url = self._client.format_url(url, **path_format_arguments) + + # Construct parameters + query_parameters = {} + query_parameters['regionIds'] = self._serialize.query("region_ids", region_ids, '[str]', div=',') + + # Construct headers + header_parameters = {} + if custom_headers: + header_parameters.update(custom_headers) + header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') + + # Construct and send request + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) + + if response.status_code not in [204]: + raise HttpOperationError(self._deserialize, response) - :param project_id: The project id + if raw: + client_raw_response = ClientRawResponse(None, response) + return client_raw_response + delete_image_regions.metadata = {'url': '/projects/{projectId}/images/regions'} + + def get_tagged_images( + self, project_id, iteration_id=None, tag_ids=None, order_by=None, take=50, skip=0, custom_headers=None, raw=False, **operation_config): + """Get tagged images for a given project iteration. + + This API supports batching and range selection. By default it will only + return first 50 images matching images. + Use the {take} and {skip} parameters to control how many images to + return in a given batch. + The filtering is on an and/or relationship. For example, if the + provided tag ids are for the "Dog" and + "Cat" tags, then only images tagged with Dog and/or Cat will be + returned. + + :param project_id: The project id. :type project_id: str - :param image_ids: The list of image ids to retrieve. Limited to 256 - :type image_ids: list[str] - :param iteration_id: The iteration id. Defaults to workspace + :param iteration_id: The iteration id. Defaults to workspace. :type iteration_id: str + :param tag_ids: A list of tags ids to filter the images. Defaults to + all tagged images when null. Limited to 20. + :type tag_ids: list[str] + :param order_by: The ordering. Defaults to newest. Possible values + include: 'Newest', 'Oldest' + :type order_by: str + :param take: Maximum number of images to return. Defaults to 50, + limited to 256. + :type take: int + :param skip: Number of images to skip before beginning the image + batch. Defaults to 0. + :type skip: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -485,29 +578,36 @@ def get_images_by_ids( :class:`HttpOperationError` """ # Construct URL - url = self.get_images_by_ids.metadata['url'] + url = self.get_tagged_images.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if image_ids is not None: - query_parameters['imageIds'] = self._serialize.query("image_ids", image_ids, '[str]', div=',') if iteration_id is not None: query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') + if tag_ids is not None: + query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') + if order_by is not None: + query_parameters['orderBy'] = self._serialize.query("order_by", order_by, 'str') + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int') + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -522,63 +622,71 @@ def get_images_by_ids( return client_raw_response return deserialized - get_images_by_ids.metadata = {'url': '/projects/{projectId}/images/id'} + get_tagged_images.metadata = {'url': '/projects/{projectId}/images/tagged'} - def create_images_from_data( - self, project_id, image_data, tag_ids=None, custom_headers=None, raw=False, **operation_config): - """Add the provided images to the set of training images. + def get_untagged_images( + self, project_id, iteration_id=None, order_by=None, take=50, skip=0, custom_headers=None, raw=False, **operation_config): + """Get untagged images for a given project iteration. - This API accepts body content as multipart/form-data and - application/octet-stream. When using multipart - multiple image files can be sent at once, with a maximum of 64 files. + This API supports batching and range selection. By default it will only + return first 50 images matching images. + Use the {take} and {skip} parameters to control how many images to + return in a given batch. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param image_data: - :type image_data: Generator - :param tag_ids: The tags ids with which to tag each image. Limited to - 20 - :type tag_ids: list[str] + :param iteration_id: The iteration id. Defaults to workspace. + :type iteration_id: str + :param order_by: The ordering. Defaults to newest. Possible values + include: 'Newest', 'Oldest' + :type order_by: str + :param take: Maximum number of images to return. Defaults to 50, + limited to 256. + :type take: int + :param skip: Number of images to skip before beginning the image + batch. Defaults to 0. + :type skip: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ImageCreateSummary or ClientRawResponse if raw=true + :return: list or ClientRawResponse if raw=true :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.ImageCreateSummary + list[~azure.cognitiveservices.vision.customvision.training.models.Image] or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.create_images_from_data.metadata['url'] + url = self.get_untagged_images.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if tag_ids is not None: - query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') + if order_by is not None: + query_parameters['orderBy'] = self._serialize.query("order_by", order_by, 'str') + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int') + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'multipart/form-data' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - # Construct form data - form_data_content = { - 'imageData': image_data, - } - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send_formdata( - request, header_parameters, form_data_content, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -586,77 +694,96 @@ def create_images_from_data( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImageCreateSummary', response) + deserialized = self._deserialize('[Image]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_images_from_data.metadata = {'url': '/projects/{projectId}/images'} + get_untagged_images.metadata = {'url': '/projects/{projectId}/images/untagged'} - def delete_images( - self, project_id, image_ids, custom_headers=None, raw=False, **operation_config): - """Delete images from the set of training images. + def get_images_by_ids( + self, project_id, image_ids=None, iteration_id=None, custom_headers=None, raw=False, **operation_config): + """Get images by id for a given project iteration. - :param project_id: The project id + This API will return a set of Images for the specified tags and + optionally iteration. If no iteration is specified the + current workspace is used. + + :param project_id: The project id. :type project_id: str - :param image_ids: Ids of the images to be deleted. Limted to 256 - images per batch + :param image_ids: The list of image ids to retrieve. Limited to 256. :type image_ids: list[str] + :param iteration_id: The iteration id. Defaults to workspace. + :type iteration_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: list or ClientRawResponse if raw=true + :rtype: + list[~azure.cognitiveservices.vision.customvision.training.models.Image] + or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.delete_images.metadata['url'] + url = self.get_images_by_ids.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['imageIds'] = self._serialize.query("image_ids", image_ids, '[str]', div=',') + if image_ids is not None: + query_parameters['imageIds'] = self._serialize.query("image_ids", image_ids, '[str]', div=',') + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('[Image]', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - delete_images.metadata = {'url': '/projects/{projectId}/images'} - def create_images_from_files( - self, project_id, images=None, tag_ids=None, custom_headers=None, raw=False, **operation_config): - """Add the provided batch of images to the set of training images. + return deserialized + get_images_by_ids.metadata = {'url': '/projects/{projectId}/images/id'} - This API accepts a batch of files, and optionally tags, to create - images. There is a limit of 64 images and 20 tags. + def create_images_from_data( + self, project_id, image_data, tag_ids=None, custom_headers=None, raw=False, **operation_config): + """Add the provided images to the set of training images. + + This API accepts body content as multipart/form-data and + application/octet-stream. When using multipart + multiple image files can be sent at once, with a maximum of 64 files. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param images: - :type images: - list[~azure.cognitiveservices.vision.customvision.training.models.ImageFileCreateEntry] - :param tag_ids: + :param image_data: Binary image data. + :type image_data: Generator + :param tag_ids: The tags ids with which to tag each image. Limited to + 20. :type tag_ids: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -670,32 +797,35 @@ def create_images_from_files( :raises: :class:`HttpOperationError` """ - batch = models.ImageFileCreateBatch(images=images, tag_ids=tag_ids) - # Construct URL - url = self.create_images_from_files.metadata['url'] + url = self.create_images_from_data.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} + if tag_ids is not None: + query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'multipart/form-data' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - # Construct body - body_content = self._serialize.body(batch, 'ImageFileCreateBatch') + # Construct form data + form_data_content = { + 'imageData': image_data, + } # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, form_content=form_data_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -710,88 +840,69 @@ def create_images_from_files( return client_raw_response return deserialized - create_images_from_files.metadata = {'url': '/projects/{projectId}/images/files'} - - def create_images_from_urls( - self, project_id, images=None, tag_ids=None, custom_headers=None, raw=False, **operation_config): - """Add the provided images urls to the set of training images. + create_images_from_data.metadata = {'url': '/projects/{projectId}/images'} - This API accepts a batch of urls, and optionally tags, to create - images. There is a limit of 64 images and 20 tags. + def delete_images( + self, project_id, image_ids, custom_headers=None, raw=False, **operation_config): + """Delete images from the set of training images. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param images: - :type images: - list[~azure.cognitiveservices.vision.customvision.training.models.ImageUrlCreateEntry] - :param tag_ids: - :type tag_ids: list[str] + :param image_ids: Ids of the images to be deleted. Limted to 256 + images per batch. + :type image_ids: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ImageCreateSummary or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.ImageCreateSummary - or ~msrest.pipeline.ClientRawResponse + :return: None or ClientRawResponse if raw=true + :rtype: None or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ - batch = models.ImageUrlCreateBatch(images=images, tag_ids=tag_ids) - # Construct URL - url = self.create_images_from_urls.metadata['url'] + url = self.delete_images.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} + query_parameters['imageIds'] = self._serialize.query("image_ids", image_ids, '[str]', div=',') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - # Construct body - body_content = self._serialize.body(batch, 'ImageUrlCreateBatch') - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [200]: + if response.status_code not in [204]: raise HttpOperationError(self._deserialize, response) - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('ImageCreateSummary', response) - if raw: - client_raw_response = ClientRawResponse(deserialized, response) + client_raw_response = ClientRawResponse(None, response) return client_raw_response + delete_images.metadata = {'url': '/projects/{projectId}/images'} - return deserialized - create_images_from_urls.metadata = {'url': '/projects/{projectId}/images/urls'} - - def create_images_from_predictions( + def create_images_from_files( self, project_id, images=None, tag_ids=None, custom_headers=None, raw=False, **operation_config): - """Add the specified predicted images to the set of training images. + """Add the provided batch of images to the set of training images. - This API creates a batch of images from predicted images specified. - There is a limit of 64 images and 20 tags. + This API accepts a batch of files, and optionally tags, to create + images. There is a limit of 64 images and 20 tags. - :param project_id: The project id + :param project_id: The project id. :type project_id: str :param images: :type images: - list[~azure.cognitiveservices.vision.customvision.training.models.ImageIdCreateEntry] + list[~azure.cognitiveservices.vision.customvision.training.models.ImageFileCreateEntry] :param tag_ids: :type tag_ids: list[str] :param dict custom_headers: headers that will be added to the request @@ -806,11 +917,12 @@ def create_images_from_predictions( :raises: :class:`HttpOperationError` """ - batch = models.ImageIdCreateBatch(images=images, tag_ids=tag_ids) + batch = models.ImageFileCreateBatch(images=images, tag_ids=tag_ids) # Construct URL - url = self.create_images_from_predictions.metadata['url'] + url = self.create_images_from_files.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -820,18 +932,18 @@ def create_images_from_predictions( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct body - body_content = self._serialize.body(batch, 'ImageIdCreateBatch') + body_content = self._serialize.body(batch, 'ImageFileCreateBatch') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -846,34 +958,40 @@ def create_images_from_predictions( return client_raw_response return deserialized - create_images_from_predictions.metadata = {'url': '/projects/{projectId}/images/predictions'} + create_images_from_files.metadata = {'url': '/projects/{projectId}/images/files'} - def create_image_tags( - self, project_id, tags=None, custom_headers=None, raw=False, **operation_config): - """Associate a set of images with a set of tags. + def create_images_from_urls( + self, project_id, images=None, tag_ids=None, custom_headers=None, raw=False, **operation_config): + """Add the provided images urls to the set of training images. + + This API accepts a batch of urls, and optionally tags, to create + images. There is a limit of 64 images and 20 tags. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param tags: - :type tags: - list[~azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateEntry] + :param images: + :type images: + list[~azure.cognitiveservices.vision.customvision.training.models.ImageUrlCreateEntry] + :param tag_ids: + :type tag_ids: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ImageTagCreateSummary or ClientRawResponse if raw=true + :return: ImageCreateSummary or ClientRawResponse if raw=true :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateSummary + ~azure.cognitiveservices.vision.customvision.training.models.ImageCreateSummary or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ - batch = models.ImageTagCreateBatch(tags=tags) + batch = models.ImageUrlCreateBatch(images=images, tag_ids=tag_ids) # Construct URL - url = self.create_image_tags.metadata['url'] + url = self.create_images_from_urls.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -883,18 +1001,18 @@ def create_image_tags( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct body - body_content = self._serialize.body(batch, 'ImageTagCreateBatch') + body_content = self._serialize.body(batch, 'ImageUrlCreateBatch') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -902,98 +1020,114 @@ def create_image_tags( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImageTagCreateSummary', response) + deserialized = self._deserialize('ImageCreateSummary', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_image_tags.metadata = {'url': '/projects/{projectId}/images/tags'} + create_images_from_urls.metadata = {'url': '/projects/{projectId}/images/urls'} - def delete_image_tags( - self, project_id, image_ids, tag_ids, custom_headers=None, raw=False, **operation_config): - """Remove a set of tags from a set of images. + def create_images_from_predictions( + self, project_id, images=None, tag_ids=None, custom_headers=None, raw=False, **operation_config): + """Add the specified predicted images to the set of training images. - :param project_id: The project id + This API creates a batch of images from predicted images specified. + There is a limit of 64 images and 20 tags. + + :param project_id: The project id. :type project_id: str - :param image_ids: Image ids. Limited to 64 images - :type image_ids: list[str] - :param tag_ids: Tags to be deleted from the specified images. Limted - to 20 tags + :param images: + :type images: + list[~azure.cognitiveservices.vision.customvision.training.models.ImageIdCreateEntry] + :param tag_ids: :type tag_ids: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: ImageCreateSummary or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.vision.customvision.training.models.ImageCreateSummary + or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ + batch = models.ImageIdCreateBatch(images=images, tag_ids=tag_ids) + # Construct URL - url = self.delete_image_tags.metadata['url'] + url = self.create_images_from_predictions.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['imageIds'] = self._serialize.query("image_ids", image_ids, '[str]', div=',') - query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') + # Construct body + body_content = self._serialize.body(batch, 'ImageIdCreateBatch') + # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ImageCreateSummary', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - delete_image_tags.metadata = {'url': '/projects/{projectId}/images/tags'} - def create_image_regions( - self, project_id, regions=None, custom_headers=None, raw=False, **operation_config): - """Create a set of image regions. + return deserialized + create_images_from_predictions.metadata = {'url': '/projects/{projectId}/images/predictions'} - This API accepts a batch of image regions, and optionally tags, to - update existing images with region information. - There is a limit of 64 entries in the batch. + def get_image_region_proposals( + self, project_id, image_id, custom_headers=None, raw=False, **operation_config): + """Get region proposals for an image. Returns empty array if no proposals + are found. + + This API will get region proposals for an image along with confidences + for the region. It returns an empty array if no proposals are found. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param regions: - :type regions: - list[~azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateEntry] + :param image_id: The image id. + :type image_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ImageRegionCreateSummary or ClientRawResponse if raw=true + :return: ImageRegionProposal or ClientRawResponse if raw=true :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.ImageRegionCreateSummary + ~azure.cognitiveservices.vision.customvision.training.models.ImageRegionProposal or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ - batch = models.ImageRegionCreateBatch(regions=regions) - # Construct URL - url = self.create_image_regions.metadata['url'] + url = self.get_image_region_proposals.metadata['url'] path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str') + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str'), + 'imageId': self._serialize.url("image_id", image_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1002,18 +1136,14 @@ def create_image_regions( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - # Construct body - body_content = self._serialize.body(batch, 'ImageRegionCreateBatch') - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1021,23 +1151,24 @@ def create_image_regions( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImageRegionCreateSummary', response) + deserialized = self._deserialize('ImageRegionProposal', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - create_image_regions.metadata = {'url': '/projects/{projectId}/images/regions'} + get_image_region_proposals.metadata = {'url': '/{projectId}/images/{imageId}/regionproposals'} - def delete_image_regions( - self, project_id, region_ids, custom_headers=None, raw=False, **operation_config): - """Delete a set of image regions. + def delete_prediction( + self, project_id, ids, custom_headers=None, raw=False, **operation_config): + """Delete a set of predicted images and their associated prediction + results. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param region_ids: Regions to delete. Limited to 64 - :type region_ids: list[str] + :param ids: The prediction ids. Limited to 64. + :type ids: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -1049,26 +1180,26 @@ def delete_image_regions( :class:`HttpOperationError` """ # Construct URL - url = self.delete_image_regions.metadata['url'] + url = self.delete_prediction.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['regionIds'] = self._serialize.query("region_ids", region_ids, '[str]', div=',') + query_parameters['ids'] = self._serialize.query("ids", ids, '[str]', div=',') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: raise HttpOperationError(self._deserialize, response) @@ -1076,53 +1207,61 @@ def delete_image_regions( if raw: client_raw_response = ClientRawResponse(None, response) return client_raw_response - delete_image_regions.metadata = {'url': '/projects/{projectId}/images/regions'} - - def get_image_region_proposals( - self, project_id, image_id, custom_headers=None, raw=False, **operation_config): - """Get region proposals for an image. Returns empty array if no proposals - are found. + delete_prediction.metadata = {'url': '/projects/{projectId}/predictions'} - This API will get region proposals for an image along with confidences - for the region. It returns an empty array if no proposals are found. + def quick_test_image_url( + self, project_id, iteration_id=None, url=None, custom_headers=None, raw=False, **operation_config): + """Quick test an image url. - :param project_id: The project id + :param project_id: The project to evaluate against. :type project_id: str - :param image_id: The image id - :type image_id: str + :param iteration_id: Optional. Specifies the id of a particular + iteration to evaluate against. + The default iteration for the project will be used when not specified. + :type iteration_id: str + :param url: + :type url: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ImageRegionProposal or ClientRawResponse if raw=true + :return: ImagePrediction or ClientRawResponse if raw=true :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.ImageRegionProposal + ~azure.cognitiveservices.vision.customvision.training.models.ImagePrediction or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ + image_url = models.ImageUrl(url=url) + # Construct URL - url = self.get_image_region_proposals.metadata['url'] + url = self.quick_test_image_url.metadata['url'] path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str'), - 'imageId': self._serialize.url("image_id", image_id, 'str') + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') + # Construct body + body_content = self._serialize.body(image_url, 'ImageUrl') + # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1130,72 +1269,92 @@ def get_image_region_proposals( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImageRegionProposal', response) + deserialized = self._deserialize('ImagePrediction', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_region_proposals.metadata = {'url': '/{projectId}/images/{imageId}/regionproposals'} + quick_test_image_url.metadata = {'url': '/projects/{projectId}/quicktest/url'} - def delete_prediction( - self, project_id, ids, custom_headers=None, raw=False, **operation_config): - """Delete a set of predicted images and their associated prediction - results. + def quick_test_image( + self, project_id, image_data, iteration_id=None, custom_headers=None, raw=False, **operation_config): + """Quick test an image. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param ids: The prediction ids. Limited to 64 - :type ids: list[str] + :param image_data: Binary image data. + :type image_data: Generator + :param iteration_id: Optional. Specifies the id of a particular + iteration to evaluate against. + The default iteration for the project will be used when not specified. + :type iteration_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: None or ClientRawResponse if raw=true - :rtype: None or ~msrest.pipeline.ClientRawResponse + :return: ImagePrediction or ClientRawResponse if raw=true + :rtype: + ~azure.cognitiveservices.vision.customvision.training.models.ImagePrediction + or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.delete_prediction.metadata['url'] + url = self.quick_test_image.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - query_parameters['ids'] = self._serialize.query("ids", ids, '[str]', div=',') + if iteration_id is not None: + query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' + header_parameters['Content-Type'] = 'multipart/form-data' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') + # Construct form data + form_data_content = { + 'imageData': image_data, + } + # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, form_content=form_data_content) + response = self._client.send(request, stream=False, **operation_config) - if response.status_code not in [204]: + if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) + deserialized = None + + if response.status_code == 200: + deserialized = self._deserialize('ImagePrediction', response) + if raw: - client_raw_response = ClientRawResponse(None, response) + client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response - delete_prediction.metadata = {'url': '/projects/{projectId}/predictions'} + + return deserialized + quick_test_image.metadata = {'url': '/projects/{projectId}/quicktest/image'} def query_predictions( self, project_id, query, custom_headers=None, raw=False, **operation_config): """Get images that were sent to your prediction endpoint. - :param project_id: The project id + :param project_id: The project id. :type project_id: str :param query: Parameters used to query the predictions. Limited to - combining 2 tags + combining 2 tags. :type query: ~azure.cognitiveservices.vision.customvision.training.models.PredictionQueryToken :param dict custom_headers: headers that will be added to the request @@ -1213,6 +1372,7 @@ def query_predictions( # Construct URL url = self.query_predictions.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1222,6 +1382,7 @@ def query_predictions( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -1231,9 +1392,8 @@ def query_predictions( body_content = self._serialize.body(query, 'PredictionQueryToken') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1250,58 +1410,57 @@ def query_predictions( return deserialized query_predictions.metadata = {'url': '/projects/{projectId}/predictions/query'} - def quick_test_image_url( - self, project_id, iteration_id=None, url=None, custom_headers=None, raw=False, **operation_config): - """Quick test an image url. + def get_iteration_performance( + self, project_id, iteration_id, threshold=None, overlap_threshold=None, custom_headers=None, raw=False, **operation_config): + """Get detailed performance information about an iteration. - :param project_id: The project to evaluate against + :param project_id: The id of the project the iteration belongs to. :type project_id: str - :param iteration_id: Optional. Specifies the id of a particular - iteration to evaluate against. - The default iteration for the project will be used when not specified. + :param iteration_id: The id of the iteration to get. :type iteration_id: str - :param url: - :type url: str + :param threshold: The threshold used to determine true predictions. + :type threshold: float + :param overlap_threshold: If applicable, the bounding box overlap + threshold used to determine true predictions. + :type overlap_threshold: float :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ImagePrediction or ClientRawResponse if raw=true + :return: IterationPerformance or ClientRawResponse if raw=true :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.ImagePrediction + ~azure.cognitiveservices.vision.customvision.training.models.IterationPerformance or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ - image_url = models.ImageUrl(url=url) - # Construct URL - url = self.quick_test_image_url.metadata['url'] + url = self.get_iteration_performance.metadata['url'] path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str') + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str'), + 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if iteration_id is not None: - query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') + if threshold is not None: + query_parameters['threshold'] = self._serialize.query("threshold", threshold, 'float') + if overlap_threshold is not None: + query_parameters['overlapThreshold'] = self._serialize.query("overlap_threshold", overlap_threshold, 'float') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - # Construct body - body_content = self._serialize.body(image_url, 'ImageUrl') - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1309,67 +1468,86 @@ def quick_test_image_url( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImagePrediction', response) + deserialized = self._deserialize('IterationPerformance', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - quick_test_image_url.metadata = {'url': '/projects/{projectId}/quicktest/url'} + get_iteration_performance.metadata = {'url': '/projects/{projectId}/iterations/{iterationId}/performance'} - def quick_test_image( - self, project_id, image_data, iteration_id=None, custom_headers=None, raw=False, **operation_config): - """Quick test an image. + def get_image_performances( + self, project_id, iteration_id, tag_ids=None, order_by=None, take=50, skip=0, custom_headers=None, raw=False, **operation_config): + """Get image with its prediction for a given project iteration. + + This API supports batching and range selection. By default it will only + return first 50 images matching images. + Use the {take} and {skip} parameters to control how many images to + return in a given batch. + The filtering is on an and/or relationship. For example, if the + provided tag ids are for the "Dog" and + "Cat" tags, then only images tagged with Dog and/or Cat will be + returned. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param image_data: - :type image_data: Generator - :param iteration_id: Optional. Specifies the id of a particular - iteration to evaluate against. - The default iteration for the project will be used when not specified. + :param iteration_id: The iteration id. Defaults to workspace. :type iteration_id: str + :param tag_ids: A list of tags ids to filter the images. Defaults to + all tagged images when null. Limited to 20. + :type tag_ids: list[str] + :param order_by: The ordering. Defaults to newest. Possible values + include: 'Newest', 'Oldest' + :type order_by: str + :param take: Maximum number of images to return. Defaults to 50, + limited to 256. + :type take: int + :param skip: Number of images to skip before beginning the image + batch. Defaults to 0. + :type skip: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: ImagePrediction or ClientRawResponse if raw=true + :return: list or ClientRawResponse if raw=true :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.ImagePrediction + list[~azure.cognitiveservices.vision.customvision.training.models.ImagePerformance] or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.quick_test_image.metadata['url'] + url = self.get_image_performances.metadata['url'] path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str') + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str'), + 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if iteration_id is not None: - query_parameters['iterationId'] = self._serialize.query("iteration_id", iteration_id, 'str') + if tag_ids is not None: + query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') + if order_by is not None: + query_parameters['orderBy'] = self._serialize.query("order_by", order_by, 'str') + if take is not None: + query_parameters['take'] = self._serialize.query("take", take, 'int') + if skip is not None: + query_parameters['skip'] = self._serialize.query("skip", skip, 'int') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'multipart/form-data' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - # Construct form data - form_data_content = { - 'imageData': image_data, - } - # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send_formdata( - request, header_parameters, form_data_content, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1377,53 +1555,67 @@ def quick_test_image( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('ImagePrediction', response) + deserialized = self._deserialize('[ImagePerformance]', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - quick_test_image.metadata = {'url': '/projects/{projectId}/quicktest/image'} + get_image_performances.metadata = {'url': '/projects/{projectId}/iterations/{iterationId}/performance/images'} - def train_project( - self, project_id, custom_headers=None, raw=False, **operation_config): - """Queues project for training. + def get_image_performance_count( + self, project_id, iteration_id, tag_ids=None, custom_headers=None, raw=False, **operation_config): + """Gets the number of images tagged with the provided {tagIds} that have + prediction results from + training for the provided iteration {iterationId}. + + The filtering is on an and/or relationship. For example, if the + provided tag ids are for the "Dog" and + "Cat" tags, then only images tagged with Dog and/or Cat will be + returned. - :param project_id: The project id + :param project_id: The project id. :type project_id: str + :param iteration_id: The iteration id. Defaults to workspace. + :type iteration_id: str + :param tag_ids: A list of tags ids to filter the images to count. + Defaults to all tags when null. + :type tag_ids: list[str] :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: Iteration or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.Iteration - or ~msrest.pipeline.ClientRawResponse + :return: int or ClientRawResponse if raw=true + :rtype: int or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.train_project.metadata['url'] + url = self.get_image_performance_count.metadata['url'] path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str') + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str'), + 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} + if tag_ids is not None: + query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1431,14 +1623,14 @@ def train_project( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('Iteration', response) + deserialized = self._deserialize('int', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - train_project.metadata = {'url': '/projects/{projectId}/train'} + get_image_performance_count.metadata = {'url': '/projects/{projectId}/iterations/{iterationId}/performance/images/count'} def get_projects( self, custom_headers=None, raw=False, **operation_config): @@ -1458,20 +1650,24 @@ def get_projects( """ # Construct URL url = self.get_projects.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1492,12 +1688,12 @@ def create_project( self, name, description=None, domain_id=None, classification_type=None, custom_headers=None, raw=False, **operation_config): """Create a project. - :param name: Name of the project + :param name: Name of the project. :type name: str - :param description: The description of the project + :param description: The description of the project. :type description: str :param domain_id: The id of the domain to use for this project. - Defaults to General + Defaults to General. :type domain_id: str :param classification_type: The type of classifier to create for this project. Possible values include: 'Multiclass', 'Multilabel' @@ -1516,6 +1712,10 @@ def create_project( """ # Construct URL url = self.create_project.metadata['url'] + path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True) + } + url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} @@ -1529,14 +1729,14 @@ def create_project( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1557,7 +1757,7 @@ def get_project( self, project_id, custom_headers=None, raw=False, **operation_config): """Get a specific project. - :param project_id: The id of the project to get + :param project_id: The id of the project to get. :type project_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -1574,6 +1774,7 @@ def get_project( # Construct URL url = self.get_project.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1583,14 +1784,14 @@ def get_project( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1611,7 +1812,7 @@ def delete_project( self, project_id, custom_headers=None, raw=False, **operation_config): """Delete a specific project. - :param project_id: The project id + :param project_id: The project id. :type project_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -1626,6 +1827,7 @@ def delete_project( # Construct URL url = self.delete_project.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1635,14 +1837,13 @@ def delete_project( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: raise HttpOperationError(self._deserialize, response) @@ -1656,9 +1857,9 @@ def update_project( self, project_id, updated_project, custom_headers=None, raw=False, **operation_config): """Update a specific project. - :param project_id: The id of the project to update + :param project_id: The id of the project to update. :type project_id: str - :param updated_project: The updated project model + :param updated_project: The updated project model. :type updated_project: ~azure.cognitiveservices.vision.customvision.training.models.Project :param dict custom_headers: headers that will be added to the request @@ -1676,6 +1877,7 @@ def update_project( # Construct URL url = self.update_project.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1685,6 +1887,7 @@ def update_project( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -1694,9 +1897,8 @@ def update_project( body_content = self._serialize.body(updated_project, 'Project') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1717,7 +1919,7 @@ def get_iterations( self, project_id, custom_headers=None, raw=False, **operation_config): """Get iterations for the project. - :param project_id: The project id + :param project_id: The project id. :type project_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -1734,6 +1936,7 @@ def get_iterations( # Construct URL url = self.get_iterations.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -1743,14 +1946,14 @@ def get_iterations( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1771,9 +1974,9 @@ def get_iteration( self, project_id, iteration_id, custom_headers=None, raw=False, **operation_config): """Get a specific iteration. - :param project_id: The id of the project the iteration belongs to + :param project_id: The id of the project the iteration belongs to. :type project_id: str - :param iteration_id: The id of the iteration to get + :param iteration_id: The id of the iteration to get. :type iteration_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -1790,6 +1993,7 @@ def get_iteration( # Construct URL url = self.get_iteration.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } @@ -1800,14 +2004,14 @@ def get_iteration( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1828,9 +2032,9 @@ def delete_iteration( self, project_id, iteration_id, custom_headers=None, raw=False, **operation_config): """Delete a specific iteration of a project. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id + :param iteration_id: The iteration id. :type iteration_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -1845,6 +2049,7 @@ def delete_iteration( # Construct URL url = self.delete_iteration.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } @@ -1855,14 +2060,13 @@ def delete_iteration( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: raise HttpOperationError(self._deserialize, response) @@ -1876,14 +2080,14 @@ def update_iteration( self, project_id, iteration_id, name=None, is_default=None, custom_headers=None, raw=False, **operation_config): """Update a specific iteration. - :param project_id: Project id + :param project_id: Project id. :type project_id: str - :param iteration_id: Iteration id + :param iteration_id: Iteration id. :type iteration_id: str - :param name: Gets or sets the name of the iteration + :param name: Gets or sets the name of the iteration. :type name: str :param is_default: Gets or sets a value indicating whether the - iteration is the default iteration for the project + iteration is the default iteration for the project. :type is_default: bool :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -1902,6 +2106,7 @@ def update_iteration( # Construct URL url = self.update_iteration.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } @@ -1912,6 +2117,7 @@ def update_iteration( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -1921,9 +2127,8 @@ def update_iteration( body_content = self._serialize.body(updated_iteration, 'Iteration') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -1940,209 +2145,45 @@ def update_iteration( return deserialized update_iteration.metadata = {'url': '/projects/{projectId}/iterations/{iterationId}'} - def get_iteration_performance( - self, project_id, iteration_id, threshold=None, overlap_threshold=None, custom_headers=None, raw=False, **operation_config): - """Get detailed performance information about an iteration. - - :param project_id: The id of the project the iteration belongs to - :type project_id: str - :param iteration_id: The id of the iteration to get - :type iteration_id: str - :param threshold: The threshold used to determine true predictions - :type threshold: float - :param overlap_threshold: If applicable, the bounding box overlap - threshold used to determine true predictions - :type overlap_threshold: float - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: IterationPerformance or ClientRawResponse if raw=true - :rtype: - ~azure.cognitiveservices.vision.customvision.training.models.IterationPerformance - or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`HttpOperationError` - """ - # Construct URL - url = self.get_iteration_performance.metadata['url'] - path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str'), - 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if threshold is not None: - query_parameters['threshold'] = self._serialize.query("threshold", threshold, 'float') - if overlap_threshold is not None: - query_parameters['overlapThreshold'] = self._serialize.query("overlap_threshold", overlap_threshold, 'float') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise HttpOperationError(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('IterationPerformance', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_iteration_performance.metadata = {'url': '/projects/{projectId}/iterations/{iterationId}/performance'} - - def get_image_performances( - self, project_id, iteration_id, tag_ids=None, order_by=None, take=50, skip=0, custom_headers=None, raw=False, **operation_config): - """Get image with its prediction for a given project iteration. - - This API supports batching and range selection. By default it will only - return first 50 images matching images. - Use the {take} and {skip} parameters to control how many images to - return in a given batch. - The filtering is on an and/or relationship. For example, if the - provided tag ids are for the "Dog" and - "Cat" tags, then only images tagged with Dog and/or Cat will be - returned. + def train_project( + self, project_id, custom_headers=None, raw=False, **operation_config): + """Queues project for training. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id. Defaults to workspace - :type iteration_id: str - :param tag_ids: A list of tags ids to filter the images. Defaults to - all tagged images when null. Limited to 20 - :type tag_ids: list[str] - :param order_by: The ordering. Defaults to newest. Possible values - include: 'Newest', 'Oldest' - :type order_by: str - :param take: Maximum number of images to return. Defaults to 50, - limited to 256 - :type take: int - :param skip: Number of images to skip before beginning the image - batch. Defaults to 0 - :type skip: int :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response :param operation_config: :ref:`Operation configuration overrides`. - :return: list or ClientRawResponse if raw=true + :return: Iteration or ClientRawResponse if raw=true :rtype: - list[~azure.cognitiveservices.vision.customvision.training.models.ImagePerformance] + ~azure.cognitiveservices.vision.customvision.training.models.Iteration or ~msrest.pipeline.ClientRawResponse :raises: :class:`HttpOperationError` """ # Construct URL - url = self.get_image_performances.metadata['url'] - path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str'), - 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') - } - url = self._client.format_url(url, **path_format_arguments) - - # Construct parameters - query_parameters = {} - if tag_ids is not None: - query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') - if order_by is not None: - query_parameters['orderBy'] = self._serialize.query("order_by", order_by, 'str') - if take is not None: - query_parameters['take'] = self._serialize.query("take", take, 'int') - if skip is not None: - query_parameters['skip'] = self._serialize.query("skip", skip, 'int') - - # Construct headers - header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' - if custom_headers: - header_parameters.update(custom_headers) - header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') - - # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) - - if response.status_code not in [200]: - raise HttpOperationError(self._deserialize, response) - - deserialized = None - - if response.status_code == 200: - deserialized = self._deserialize('[ImagePerformance]', response) - - if raw: - client_raw_response = ClientRawResponse(deserialized, response) - return client_raw_response - - return deserialized - get_image_performances.metadata = {'url': '/projects/{projectId}/iterations/{iterationId}/performance/images'} - - def get_image_performance_count( - self, project_id, iteration_id, tag_ids=None, custom_headers=None, raw=False, **operation_config): - """Gets the number of images tagged with the provided {tagIds} that have - prediction results from - training for the provided iteration {iterationId}. - - The filtering is on an and/or relationship. For example, if the - provided tag ids are for the "Dog" and - "Cat" tags, then only images tagged with Dog and/or Cat will be - returned. - - :param project_id: The project id - :type project_id: str - :param iteration_id: The iteration id. Defaults to workspace - :type iteration_id: str - :param tag_ids: A list of tags ids to filter the images to count. - Defaults to all tags when null. - :type tag_ids: list[str] - :param dict custom_headers: headers that will be added to the request - :param bool raw: returns the direct response alongside the - deserialized response - :param operation_config: :ref:`Operation configuration - overrides`. - :return: int or ClientRawResponse if raw=true - :rtype: int or ~msrest.pipeline.ClientRawResponse - :raises: - :class:`HttpOperationError` - """ - # Construct URL - url = self.get_image_performance_count.metadata['url'] + url = self.train_project.metadata['url'] path_format_arguments = { - 'projectId': self._serialize.url("project_id", project_id, 'str'), - 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), + 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) # Construct parameters query_parameters = {} - if tag_ids is not None: - query_parameters['tagIds'] = self._serialize.query("tag_ids", tag_ids, '[str]', div=',') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -2150,22 +2191,22 @@ def get_image_performance_count( deserialized = None if response.status_code == 200: - deserialized = self._deserialize('int', response) + deserialized = self._deserialize('Iteration', response) if raw: client_raw_response = ClientRawResponse(deserialized, response) return client_raw_response return deserialized - get_image_performance_count.metadata = {'url': '/projects/{projectId}/iterations/{iterationId}/performance/images/count'} + train_project.metadata = {'url': '/projects/{projectId}/train'} def get_exports( self, project_id, iteration_id, custom_headers=None, raw=False, **operation_config): """Get the list of exports for a specific iteration. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id + :param iteration_id: The iteration id. :type iteration_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -2182,6 +2223,7 @@ def get_exports( # Construct URL url = self.get_exports.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } @@ -2192,14 +2234,14 @@ def get_exports( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -2220,15 +2262,15 @@ def export_iteration( self, project_id, iteration_id, platform, flavor=None, custom_headers=None, raw=False, **operation_config): """Export a trained iteration. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id + :param iteration_id: The iteration id. :type iteration_id: str - :param platform: The target platform (coreml or tensorflow). Possible - values include: 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' + :param platform: The target platform. Possible values include: + 'CoreML', 'TensorFlow', 'DockerFile', 'ONNX' :type platform: str - :param flavor: The flavor of the target platform (Windows, Linux, ARM, - or GPU). Possible values include: 'Linux', 'Windows' + :param flavor: The flavor of the target platform. Possible values + include: 'Linux', 'Windows', 'ONNX10', 'ONNX12' :type flavor: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -2245,6 +2287,7 @@ def export_iteration( # Construct URL url = self.export_iteration.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'iterationId': self._serialize.url("iteration_id", iteration_id, 'str') } @@ -2258,14 +2301,14 @@ def export_iteration( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -2286,12 +2329,12 @@ def get_tag( self, project_id, tag_id, iteration_id=None, custom_headers=None, raw=False, **operation_config): """Get information about a specific tag. - :param project_id: The project this tag belongs to + :param project_id: The project this tag belongs to. :type project_id: str - :param tag_id: The tag id + :param tag_id: The tag id. :type tag_id: str :param iteration_id: The iteration to retrieve this tag from. - Optional, defaults to current training set + Optional, defaults to current training set. :type iteration_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -2308,6 +2351,7 @@ def get_tag( # Construct URL url = self.get_tag.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'tagId': self._serialize.url("tag_id", tag_id, 'str') } @@ -2320,14 +2364,14 @@ def get_tag( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -2348,9 +2392,9 @@ def delete_tag( self, project_id, tag_id, custom_headers=None, raw=False, **operation_config): """Delete a tag from the project. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param tag_id: Id of the tag to be deleted + :param tag_id: Id of the tag to be deleted. :type tag_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -2365,6 +2409,7 @@ def delete_tag( # Construct URL url = self.delete_tag.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'tagId': self._serialize.url("tag_id", tag_id, 'str') } @@ -2375,14 +2420,13 @@ def delete_tag( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.delete(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.delete(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [204]: raise HttpOperationError(self._deserialize, response) @@ -2393,17 +2437,16 @@ def delete_tag( delete_tag.metadata = {'url': '/projects/{projectId}/tags/{tagId}'} def update_tag( - self, project_id, tag_id, name=None, description=None, custom_headers=None, raw=False, **operation_config): + self, project_id, tag_id, updated_tag, custom_headers=None, raw=False, **operation_config): """Update a tag. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param tag_id: The id of the target tag + :param tag_id: The id of the target tag. :type tag_id: str - :param name: Gets or sets the name of the tag - :type name: str - :param description: Gets or sets the description of the tag - :type description: str + :param updated_tag: The updated tag model. + :type updated_tag: + ~azure.cognitiveservices.vision.customvision.training.models.Tag :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -2416,11 +2459,10 @@ def update_tag( :raises: :class:`HttpOperationError` """ - updated_tag = models.Tag(name=name, description=description) - # Construct URL url = self.update_tag.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str'), 'tagId': self._serialize.url("tag_id", tag_id, 'str') } @@ -2431,6 +2473,7 @@ def update_tag( # Construct headers header_parameters = {} + header_parameters['Accept'] = 'application/json' header_parameters['Content-Type'] = 'application/json; charset=utf-8' if custom_headers: header_parameters.update(custom_headers) @@ -2440,9 +2483,8 @@ def update_tag( body_content = self._serialize.body(updated_tag, 'Tag') # Construct and send request - request = self._client.patch(url, query_parameters) - response = self._client.send( - request, header_parameters, body_content, stream=False, **operation_config) + request = self._client.patch(url, query_parameters, header_parameters, body_content) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -2463,9 +2505,9 @@ def get_tags( self, project_id, iteration_id=None, custom_headers=None, raw=False, **operation_config): """Get the tags for a given project and iteration. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param iteration_id: The iteration id. Defaults to workspace + :param iteration_id: The iteration id. Defaults to workspace. :type iteration_id: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the @@ -2482,6 +2524,7 @@ def get_tags( # Construct URL url = self.get_tags.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2493,14 +2536,14 @@ def get_tags( # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.get(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.get(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) @@ -2518,15 +2561,18 @@ def get_tags( get_tags.metadata = {'url': '/projects/{projectId}/tags'} def create_tag( - self, project_id, name, description=None, custom_headers=None, raw=False, **operation_config): + self, project_id, name, description=None, type=None, custom_headers=None, raw=False, **operation_config): """Create a tag for the project. - :param project_id: The project id + :param project_id: The project id. :type project_id: str - :param name: The tag name + :param name: The tag name. :type name: str - :param description: Optional description for the tag + :param description: Optional description for the tag. :type description: str + :param type: Optional type for the tag. Possible values include: + 'Regular', 'Negative' + :type type: str :param dict custom_headers: headers that will be added to the request :param bool raw: returns the direct response alongside the deserialized response @@ -2542,6 +2588,7 @@ def create_tag( # Construct URL url = self.create_tag.metadata['url'] path_format_arguments = { + 'Endpoint': self._serialize.url("self.config.endpoint", self.config.endpoint, 'str', skip_quote=True), 'projectId': self._serialize.url("project_id", project_id, 'str') } url = self._client.format_url(url, **path_format_arguments) @@ -2551,17 +2598,19 @@ def create_tag( query_parameters['name'] = self._serialize.query("name", name, 'str') if description is not None: query_parameters['description'] = self._serialize.query("description", description, 'str') + if type is not None: + query_parameters['type'] = self._serialize.query("type", type, 'str') # Construct headers header_parameters = {} - header_parameters['Content-Type'] = 'application/json; charset=utf-8' + header_parameters['Accept'] = 'application/json' if custom_headers: header_parameters.update(custom_headers) header_parameters['Training-Key'] = self._serialize.header("self.config.api_key", self.config.api_key, 'str') # Construct and send request - request = self._client.post(url, query_parameters) - response = self._client.send(request, header_parameters, stream=False, **operation_config) + request = self._client.post(url, query_parameters, header_parameters) + response = self._client.send(request, stream=False, **operation_config) if response.status_code not in [200]: raise HttpOperationError(self._deserialize, response) diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/__init__.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/__init__.py index 8582b863463e..98850b04618d 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/__init__.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/__init__.py @@ -11,6 +11,13 @@ try: from .domain_py3 import Domain + from .image_tag_create_entry_py3 import ImageTagCreateEntry + from .image_tag_create_batch_py3 import ImageTagCreateBatch + from .image_tag_create_summary_py3 import ImageTagCreateSummary + from .image_region_create_entry_py3 import ImageRegionCreateEntry + from .image_region_create_batch_py3 import ImageRegionCreateBatch + from .image_region_create_result_py3 import ImageRegionCreateResult + from .image_region_create_summary_py3 import ImageRegionCreateSummary from .image_tag_py3 import ImageTag from .image_region_py3 import ImageRegion from .image_py3 import Image @@ -23,33 +30,33 @@ from .image_url_create_batch_py3 import ImageUrlCreateBatch from .image_id_create_entry_py3 import ImageIdCreateEntry from .image_id_create_batch_py3 import ImageIdCreateBatch - from .image_tag_create_entry_py3 import ImageTagCreateEntry - from .image_tag_create_batch_py3 import ImageTagCreateBatch - from .image_tag_create_summary_py3 import ImageTagCreateSummary - from .image_region_create_entry_py3 import ImageRegionCreateEntry - from .image_region_create_batch_py3 import ImageRegionCreateBatch - from .image_region_create_result_py3 import ImageRegionCreateResult - from .image_region_create_summary_py3 import ImageRegionCreateSummary from .bounding_box_py3 import BoundingBox from .region_proposal_py3 import RegionProposal from .image_region_proposal_py3 import ImageRegionProposal + from .image_url_py3 import ImageUrl + from .prediction_py3 import Prediction + from .image_prediction_py3 import ImagePrediction from .prediction_query_tag_py3 import PredictionQueryTag from .prediction_query_token_py3 import PredictionQueryToken - from .prediction_py3 import Prediction from .stored_image_prediction_py3 import StoredImagePrediction from .prediction_query_result_py3 import PredictionQueryResult - from .image_url_py3 import ImageUrl - from .image_prediction_py3 import ImagePrediction - from .iteration_py3 import Iteration - from .project_settings_py3 import ProjectSettings - from .project_py3 import Project from .tag_performance_py3 import TagPerformance from .iteration_performance_py3 import IterationPerformance from .image_performance_py3 import ImagePerformance + from .project_settings_py3 import ProjectSettings + from .project_py3 import Project + from .iteration_py3 import Iteration from .export_py3 import Export from .tag_py3 import Tag except (SyntaxError, ImportError): from .domain import Domain + from .image_tag_create_entry import ImageTagCreateEntry + from .image_tag_create_batch import ImageTagCreateBatch + from .image_tag_create_summary import ImageTagCreateSummary + from .image_region_create_entry import ImageRegionCreateEntry + from .image_region_create_batch import ImageRegionCreateBatch + from .image_region_create_result import ImageRegionCreateResult + from .image_region_create_summary import ImageRegionCreateSummary from .image_tag import ImageTag from .image_region import ImageRegion from .image import Image @@ -62,43 +69,44 @@ from .image_url_create_batch import ImageUrlCreateBatch from .image_id_create_entry import ImageIdCreateEntry from .image_id_create_batch import ImageIdCreateBatch - from .image_tag_create_entry import ImageTagCreateEntry - from .image_tag_create_batch import ImageTagCreateBatch - from .image_tag_create_summary import ImageTagCreateSummary - from .image_region_create_entry import ImageRegionCreateEntry - from .image_region_create_batch import ImageRegionCreateBatch - from .image_region_create_result import ImageRegionCreateResult - from .image_region_create_summary import ImageRegionCreateSummary from .bounding_box import BoundingBox from .region_proposal import RegionProposal from .image_region_proposal import ImageRegionProposal + from .image_url import ImageUrl + from .prediction import Prediction + from .image_prediction import ImagePrediction from .prediction_query_tag import PredictionQueryTag from .prediction_query_token import PredictionQueryToken - from .prediction import Prediction from .stored_image_prediction import StoredImagePrediction from .prediction_query_result import PredictionQueryResult - from .image_url import ImageUrl - from .image_prediction import ImagePrediction - from .iteration import Iteration - from .project_settings import ProjectSettings - from .project import Project from .tag_performance import TagPerformance from .iteration_performance import IterationPerformance from .image_performance import ImagePerformance + from .project_settings import ProjectSettings + from .project import Project + from .iteration import Iteration from .export import Export from .tag import Tag -from .training_api_enums import ( +from .custom_vision_training_client_enums import ( DomainType, - ImageUploadStatus, + ImageCreateStatus, OrderBy, Classifier, - ExportPlatform, + ExportPlatformModel, ExportStatusModel, - ExportFlavor, + ExportFlavorModel, + TagType, ) __all__ = [ 'Domain', + 'ImageTagCreateEntry', + 'ImageTagCreateBatch', + 'ImageTagCreateSummary', + 'ImageRegionCreateEntry', + 'ImageRegionCreateBatch', + 'ImageRegionCreateResult', + 'ImageRegionCreateSummary', 'ImageTag', 'ImageRegion', 'Image', @@ -111,36 +119,30 @@ 'ImageUrlCreateBatch', 'ImageIdCreateEntry', 'ImageIdCreateBatch', - 'ImageTagCreateEntry', - 'ImageTagCreateBatch', - 'ImageTagCreateSummary', - 'ImageRegionCreateEntry', - 'ImageRegionCreateBatch', - 'ImageRegionCreateResult', - 'ImageRegionCreateSummary', 'BoundingBox', 'RegionProposal', 'ImageRegionProposal', + 'ImageUrl', + 'Prediction', + 'ImagePrediction', 'PredictionQueryTag', 'PredictionQueryToken', - 'Prediction', 'StoredImagePrediction', 'PredictionQueryResult', - 'ImageUrl', - 'ImagePrediction', - 'Iteration', - 'ProjectSettings', - 'Project', 'TagPerformance', 'IterationPerformance', 'ImagePerformance', + 'ProjectSettings', + 'Project', + 'Iteration', 'Export', 'Tag', 'DomainType', - 'ImageUploadStatus', + 'ImageCreateStatus', 'OrderBy', 'Classifier', - 'ExportPlatform', + 'ExportPlatformModel', 'ExportStatusModel', - 'ExportFlavor', + 'ExportFlavorModel', + 'TagType', ] diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/training_api_enums.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/custom_vision_training_client_enums.py similarity index 81% rename from azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/training_api_enums.py rename to azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/custom_vision_training_client_enums.py index a505aae38978..e9ca1d7a58a4 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/training_api_enums.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/custom_vision_training_client_enums.py @@ -18,7 +18,7 @@ class DomainType(str, Enum): object_detection = "ObjectDetection" -class ImageUploadStatus(str, Enum): +class ImageCreateStatus(str, Enum): ok = "OK" ok_duplicate = "OKDuplicate" @@ -30,6 +30,7 @@ class ImageUploadStatus(str, Enum): error_tag_limit_exceed = "ErrorTagLimitExceed" error_region_limit_exceed = "ErrorRegionLimitExceed" error_unknown = "ErrorUnknown" + error_negative_and_regular_tag_on_same_image = "ErrorNegativeAndRegularTagOnSameImage" class OrderBy(str, Enum): @@ -45,7 +46,7 @@ class Classifier(str, Enum): multilabel = "Multilabel" -class ExportPlatform(str, Enum): +class ExportPlatformModel(str, Enum): core_ml = "CoreML" tensor_flow = "TensorFlow" @@ -60,7 +61,15 @@ class ExportStatusModel(str, Enum): done = "Done" -class ExportFlavor(str, Enum): +class ExportFlavorModel(str, Enum): linux = "Linux" windows = "Windows" + onnx10 = "ONNX10" + onnx12 = "ONNX12" + + +class TagType(str, Enum): + + regular = "Regular" + negative = "Negative" diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export.py index a5f736f0b91d..4de0a4e1de90 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export.py @@ -18,19 +18,22 @@ class Export(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar platform: Possible values include: 'CoreML', 'TensorFlow', - 'DockerFile', 'ONNX' + :ivar platform: Platform of the export. Possible values include: 'CoreML', + 'TensorFlow', 'DockerFile', 'ONNX' :vartype platform: str or - ~azure.cognitiveservices.vision.customvision.training.models.ExportPlatform - :ivar status: Possible values include: 'Exporting', 'Failed', 'Done' + ~azure.cognitiveservices.vision.customvision.training.models.ExportPlatformModel + :ivar status: Status of the export. Possible values include: 'Exporting', + 'Failed', 'Done' :vartype status: str or ~azure.cognitiveservices.vision.customvision.training.models.ExportStatusModel - :ivar download_uri: + :ivar download_uri: URI used to download the model. :vartype download_uri: str - :ivar flavor: Possible values include: 'Linux', 'Windows' + :ivar flavor: Flavor of the export. Possible values include: 'Linux', + 'Windows', 'ONNX10', 'ONNX12' :vartype flavor: str or - ~azure.cognitiveservices.vision.customvision.training.models.ExportFlavor - :ivar newer_version_available: + ~azure.cognitiveservices.vision.customvision.training.models.ExportFlavorModel + :ivar newer_version_available: Indicates an updated version of the export + package is available and should be re-exported for the latest changes. :vartype newer_version_available: bool """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export_py3.py index a854849fd4b4..0cdddf5a6b94 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/export_py3.py @@ -18,19 +18,22 @@ class Export(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar platform: Possible values include: 'CoreML', 'TensorFlow', - 'DockerFile', 'ONNX' + :ivar platform: Platform of the export. Possible values include: 'CoreML', + 'TensorFlow', 'DockerFile', 'ONNX' :vartype platform: str or - ~azure.cognitiveservices.vision.customvision.training.models.ExportPlatform - :ivar status: Possible values include: 'Exporting', 'Failed', 'Done' + ~azure.cognitiveservices.vision.customvision.training.models.ExportPlatformModel + :ivar status: Status of the export. Possible values include: 'Exporting', + 'Failed', 'Done' :vartype status: str or ~azure.cognitiveservices.vision.customvision.training.models.ExportStatusModel - :ivar download_uri: + :ivar download_uri: URI used to download the model. :vartype download_uri: str - :ivar flavor: Possible values include: 'Linux', 'Windows' + :ivar flavor: Flavor of the export. Possible values include: 'Linux', + 'Windows', 'ONNX10', 'ONNX12' :vartype flavor: str or - ~azure.cognitiveservices.vision.customvision.training.models.ExportFlavor - :ivar newer_version_available: + ~azure.cognitiveservices.vision.customvision.training.models.ExportFlavorModel + :ivar newer_version_available: Indicates an updated version of the export + package is available and should be re-exported for the latest changes. :vartype newer_version_available: bool """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image.py index f2102d0e4505..3a20de328099 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image.py @@ -18,22 +18,24 @@ class Image(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: + :ivar id: Id of the image. :vartype id: str - :ivar created: + :ivar created: Date the image was created. :vartype created: datetime - :ivar width: + :ivar width: Width of the image. :vartype width: int - :ivar height: + :ivar height: Height of the image. :vartype height: int - :ivar image_uri: - :vartype image_uri: str - :ivar thumbnail_uri: + :ivar resized_image_uri: The URI to the (resized) image used for training. + :vartype resized_image_uri: str + :ivar thumbnail_uri: The URI to the thumbnail of the original image. :vartype thumbnail_uri: str - :ivar tags: + :ivar original_image_uri: The URI to the original uploaded image. + :vartype original_image_uri: str + :ivar tags: Tags associated with this image. :vartype tags: list[~azure.cognitiveservices.vision.customvision.training.models.ImageTag] - :ivar regions: + :ivar regions: Regions associated with this image. :vartype regions: list[~azure.cognitiveservices.vision.customvision.training.models.ImageRegion] """ @@ -43,8 +45,9 @@ class Image(Model): 'created': {'readonly': True}, 'width': {'readonly': True}, 'height': {'readonly': True}, - 'image_uri': {'readonly': True}, + 'resized_image_uri': {'readonly': True}, 'thumbnail_uri': {'readonly': True}, + 'original_image_uri': {'readonly': True}, 'tags': {'readonly': True}, 'regions': {'readonly': True}, } @@ -54,8 +57,9 @@ class Image(Model): 'created': {'key': 'created', 'type': 'iso-8601'}, 'width': {'key': 'width', 'type': 'int'}, 'height': {'key': 'height', 'type': 'int'}, - 'image_uri': {'key': 'imageUri', 'type': 'str'}, + 'resized_image_uri': {'key': 'resizedImageUri', 'type': 'str'}, 'thumbnail_uri': {'key': 'thumbnailUri', 'type': 'str'}, + 'original_image_uri': {'key': 'originalImageUri', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '[ImageTag]'}, 'regions': {'key': 'regions', 'type': '[ImageRegion]'}, } @@ -66,7 +70,8 @@ def __init__(self, **kwargs): self.created = None self.width = None self.height = None - self.image_uri = None + self.resized_image_uri = None self.thumbnail_uri = None + self.original_image_uri = None self.tags = None self.regions = None diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result.py index 3b020ab7790b..f738ae6a93e0 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result.py @@ -18,14 +18,16 @@ class ImageCreateResult(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar source_url: + :ivar source_url: Source URL of the image. :vartype source_url: str - :ivar status: Possible values include: 'OK', 'OKDuplicate', 'ErrorSource', - 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', - 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown' + :ivar status: Status of the image creation. Possible values include: 'OK', + 'OKDuplicate', 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', + 'ErrorStorage', 'ErrorLimitExceed', 'ErrorTagLimitExceed', + 'ErrorRegionLimitExceed', 'ErrorUnknown', + 'ErrorNegativeAndRegularTagOnSameImage' :vartype status: str or - ~azure.cognitiveservices.vision.customvision.training.models.ImageUploadStatus - :ivar image: + ~azure.cognitiveservices.vision.customvision.training.models.ImageCreateStatus + :ivar image: The image. :vartype image: ~azure.cognitiveservices.vision.customvision.training.models.Image """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result_py3.py index ae5a586f37ed..34faadbf28a7 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_result_py3.py @@ -18,14 +18,16 @@ class ImageCreateResult(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar source_url: + :ivar source_url: Source URL of the image. :vartype source_url: str - :ivar status: Possible values include: 'OK', 'OKDuplicate', 'ErrorSource', - 'ErrorImageFormat', 'ErrorImageSize', 'ErrorStorage', 'ErrorLimitExceed', - 'ErrorTagLimitExceed', 'ErrorRegionLimitExceed', 'ErrorUnknown' + :ivar status: Status of the image creation. Possible values include: 'OK', + 'OKDuplicate', 'ErrorSource', 'ErrorImageFormat', 'ErrorImageSize', + 'ErrorStorage', 'ErrorLimitExceed', 'ErrorTagLimitExceed', + 'ErrorRegionLimitExceed', 'ErrorUnknown', + 'ErrorNegativeAndRegularTagOnSameImage' :vartype status: str or - ~azure.cognitiveservices.vision.customvision.training.models.ImageUploadStatus - :ivar image: + ~azure.cognitiveservices.vision.customvision.training.models.ImageCreateStatus + :ivar image: The image. :vartype image: ~azure.cognitiveservices.vision.customvision.training.models.Image """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary.py index c2b6a8a63db3..6ce395a7cfe1 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary.py @@ -18,9 +18,10 @@ class ImageCreateSummary(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar is_batch_successful: + :ivar is_batch_successful: True if all of the images in the batch were + created successfully, otherwise false. :vartype is_batch_successful: bool - :ivar images: + :ivar images: List of the image creation results. :vartype images: list[~azure.cognitiveservices.vision.customvision.training.models.ImageCreateResult] """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary_py3.py index 8a2d2f8fe809..45b8394ca064 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_create_summary_py3.py @@ -18,9 +18,10 @@ class ImageCreateSummary(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar is_batch_successful: + :ivar is_batch_successful: True if all of the images in the batch were + created successfully, otherwise false. :vartype is_batch_successful: bool - :ivar images: + :ivar images: List of the image creation results. :vartype images: list[~azure.cognitiveservices.vision.customvision.training.models.ImageCreateResult] """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_py3.py index 9bd8a2b67ece..79340062ce9e 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_py3.py @@ -18,22 +18,24 @@ class Image(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: + :ivar id: Id of the image. :vartype id: str - :ivar created: + :ivar created: Date the image was created. :vartype created: datetime - :ivar width: + :ivar width: Width of the image. :vartype width: int - :ivar height: + :ivar height: Height of the image. :vartype height: int - :ivar image_uri: - :vartype image_uri: str - :ivar thumbnail_uri: + :ivar resized_image_uri: The URI to the (resized) image used for training. + :vartype resized_image_uri: str + :ivar thumbnail_uri: The URI to the thumbnail of the original image. :vartype thumbnail_uri: str - :ivar tags: + :ivar original_image_uri: The URI to the original uploaded image. + :vartype original_image_uri: str + :ivar tags: Tags associated with this image. :vartype tags: list[~azure.cognitiveservices.vision.customvision.training.models.ImageTag] - :ivar regions: + :ivar regions: Regions associated with this image. :vartype regions: list[~azure.cognitiveservices.vision.customvision.training.models.ImageRegion] """ @@ -43,8 +45,9 @@ class Image(Model): 'created': {'readonly': True}, 'width': {'readonly': True}, 'height': {'readonly': True}, - 'image_uri': {'readonly': True}, + 'resized_image_uri': {'readonly': True}, 'thumbnail_uri': {'readonly': True}, + 'original_image_uri': {'readonly': True}, 'tags': {'readonly': True}, 'regions': {'readonly': True}, } @@ -54,8 +57,9 @@ class Image(Model): 'created': {'key': 'created', 'type': 'iso-8601'}, 'width': {'key': 'width', 'type': 'int'}, 'height': {'key': 'height', 'type': 'int'}, - 'image_uri': {'key': 'imageUri', 'type': 'str'}, + 'resized_image_uri': {'key': 'resizedImageUri', 'type': 'str'}, 'thumbnail_uri': {'key': 'thumbnailUri', 'type': 'str'}, + 'original_image_uri': {'key': 'originalImageUri', 'type': 'str'}, 'tags': {'key': 'tags', 'type': '[ImageTag]'}, 'regions': {'key': 'regions', 'type': '[ImageRegion]'}, } @@ -66,7 +70,8 @@ def __init__(self, **kwargs) -> None: self.created = None self.width = None self.height = None - self.image_uri = None + self.resized_image_uri = None self.thumbnail_uri = None + self.original_image_uri = None self.tags = None self.regions = None diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region.py index eaa617b793d0..d484ee56deb8 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region.py @@ -24,7 +24,7 @@ class ImageRegion(Model): :vartype tag_name: str :ivar created: :vartype created: datetime - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry.py index e931b48b2fa9..7d2718f7de54 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry.py @@ -13,11 +13,11 @@ class ImageRegionCreateEntry(Model): - """ImageRegionCreateEntry. + """Entry associating a region to an image. - :param image_id: + :param image_id: Id of the image. :type image_id: str - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry_py3.py index c427c9c8f837..512cf77a0141 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_entry_py3.py @@ -13,11 +13,11 @@ class ImageRegionCreateEntry(Model): - """ImageRegionCreateEntry. + """Entry associating a region to an image. - :param image_id: + :param image_id: Id of the image. :type image_id: str - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result.py index 83953c40cae2..794b6841029a 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result.py @@ -26,7 +26,7 @@ class ImageRegionCreateResult(Model): :vartype tag_name: str :ivar created: :vartype created: datetime - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result_py3.py index 0c8f63696947..3673a739099f 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_create_result_py3.py @@ -26,7 +26,7 @@ class ImageRegionCreateResult(Model): :vartype tag_name: str :ivar created: :vartype created: datetime - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_py3.py index ba74a11e579a..bb9ef2431379 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_region_py3.py @@ -24,7 +24,7 @@ class ImageRegion(Model): :vartype tag_name: str :ivar created: :vartype created: datetime - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch.py index d736caf2e4da..562e6ae367dd 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch.py @@ -13,9 +13,9 @@ class ImageTagCreateBatch(Model): - """ImageTagCreateBatch. + """Batch of image tags. - :param tags: + :param tags: Image Tag entries to include in this batch. :type tags: list[~azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateEntry] """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch_py3.py index a7e7408c9152..aade1c4e49c0 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_batch_py3.py @@ -13,9 +13,9 @@ class ImageTagCreateBatch(Model): - """ImageTagCreateBatch. + """Batch of image tags. - :param tags: + :param tags: Image Tag entries to include in this batch. :type tags: list[~azure.cognitiveservices.vision.customvision.training.models.ImageTagCreateEntry] """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry.py index 616b021d5f7a..82c5bb9ed7a6 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry.py @@ -13,11 +13,11 @@ class ImageTagCreateEntry(Model): - """ImageTagCreateEntry. + """Entry associating a tag to an image. - :param image_id: + :param image_id: Id of the image. :type image_id: str - :param tag_id: + :param tag_id: Id of the tag. :type tag_id: str """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry_py3.py index a0d11be222b6..3f8ed83c66f6 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/image_tag_create_entry_py3.py @@ -13,11 +13,11 @@ class ImageTagCreateEntry(Model): - """ImageTagCreateEntry. + """Entry associating a tag to an image. - :param image_id: + :param image_id: Id of the image. :type image_id: str - :param tag_id: + :param tag_id: Id of the tag. :type tag_id: str """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration.py index 0023777f3540..6f9794514401 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration.py @@ -18,28 +18,28 @@ class Iteration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets the id of the iteration + :ivar id: Gets the id of the iteration. :vartype id: str - :param name: Gets or sets the name of the iteration + :param name: Gets or sets the name of the iteration. :type name: str :param is_default: Gets or sets a value indicating whether the iteration - is the default iteration for the project + is the default iteration for the project. :type is_default: bool - :ivar status: Gets the current iteration status + :ivar status: Gets the current iteration status. :vartype status: str - :ivar created: Gets the time this iteration was completed + :ivar created: Gets the time this iteration was completed. :vartype created: datetime - :ivar last_modified: Gets the time this iteration was last modified + :ivar last_modified: Gets the time this iteration was last modified. :vartype last_modified: datetime - :ivar trained_at: Gets the time this iteration was last modified + :ivar trained_at: Gets the time this iteration was last modified. :vartype trained_at: datetime - :ivar project_id: Gets the project id of the iteration + :ivar project_id: Gets The project id. of the iteration. :vartype project_id: str :ivar exportable: Whether the iteration can be exported to another format - for download + for download. :vartype exportable: bool :ivar domain_id: Get or sets a guid of the domain the iteration has been - trained on + trained on. :vartype domain_id: str :ivar classification_type: Gets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel' diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance.py index a82a2fc5cd5e..40c0a075b44f 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance.py @@ -19,19 +19,19 @@ class IterationPerformance(Model): sending a request. :ivar per_tag_performance: Gets the per-tag performance details for this - iteration + iteration. :vartype per_tag_performance: list[~azure.cognitiveservices.vision.customvision.training.models.TagPerformance] - :ivar precision: Gets the precision + :ivar precision: Gets the precision. :vartype precision: float :ivar precision_std_deviation: Gets the standard deviation for the - precision + precision. :vartype precision_std_deviation: float - :ivar recall: Gets the recall + :ivar recall: Gets the recall. :vartype recall: float - :ivar recall_std_deviation: Gets the standard deviation for the recall + :ivar recall_std_deviation: Gets the standard deviation for the recall. :vartype recall_std_deviation: float - :ivar average_precision: Gets the average precision when applicable + :ivar average_precision: Gets the average precision when applicable. :vartype average_precision: float """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance_py3.py index d67113d95e1d..ab3e01f814b4 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_performance_py3.py @@ -19,19 +19,19 @@ class IterationPerformance(Model): sending a request. :ivar per_tag_performance: Gets the per-tag performance details for this - iteration + iteration. :vartype per_tag_performance: list[~azure.cognitiveservices.vision.customvision.training.models.TagPerformance] - :ivar precision: Gets the precision + :ivar precision: Gets the precision. :vartype precision: float :ivar precision_std_deviation: Gets the standard deviation for the - precision + precision. :vartype precision_std_deviation: float - :ivar recall: Gets the recall + :ivar recall: Gets the recall. :vartype recall: float - :ivar recall_std_deviation: Gets the standard deviation for the recall + :ivar recall_std_deviation: Gets the standard deviation for the recall. :vartype recall_std_deviation: float - :ivar average_precision: Gets the average precision when applicable + :ivar average_precision: Gets the average precision when applicable. :vartype average_precision: float """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_py3.py index e31e1d5da67c..96b79aaf130a 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/iteration_py3.py @@ -18,28 +18,28 @@ class Iteration(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets the id of the iteration + :ivar id: Gets the id of the iteration. :vartype id: str - :param name: Gets or sets the name of the iteration + :param name: Gets or sets the name of the iteration. :type name: str :param is_default: Gets or sets a value indicating whether the iteration - is the default iteration for the project + is the default iteration for the project. :type is_default: bool - :ivar status: Gets the current iteration status + :ivar status: Gets the current iteration status. :vartype status: str - :ivar created: Gets the time this iteration was completed + :ivar created: Gets the time this iteration was completed. :vartype created: datetime - :ivar last_modified: Gets the time this iteration was last modified + :ivar last_modified: Gets the time this iteration was last modified. :vartype last_modified: datetime - :ivar trained_at: Gets the time this iteration was last modified + :ivar trained_at: Gets the time this iteration was last modified. :vartype trained_at: datetime - :ivar project_id: Gets the project id of the iteration + :ivar project_id: Gets The project id. of the iteration. :vartype project_id: str :ivar exportable: Whether the iteration can be exported to another format - for download + for download. :vartype exportable: bool :ivar domain_id: Get or sets a guid of the domain the iteration has been - trained on + trained on. :vartype domain_id: str :ivar classification_type: Gets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel' diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project.py index a6d20553b0f2..f1697a7003c0 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project.py @@ -18,20 +18,20 @@ class Project(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets the project id + :ivar id: Gets The project id. :vartype id: str - :param name: Gets or sets the name of the project + :param name: Gets or sets the name of the project. :type name: str - :param description: Gets or sets the description of the project + :param description: Gets or sets the description of the project. :type description: str - :param settings: Gets or sets the project settings + :param settings: Gets or sets the project settings. :type settings: ~azure.cognitiveservices.vision.customvision.training.models.ProjectSettings - :ivar created: Gets the date this project was created + :ivar created: Gets the date this project was created. :vartype created: datetime - :ivar last_modified: Gets the date this project was last modifed + :ivar last_modified: Gets the date this project was last modifed. :vartype last_modified: datetime - :ivar thumbnail_uri: Gets the thumbnail url representing the project + :ivar thumbnail_uri: Gets the thumbnail url representing the project. :vartype thumbnail_uri: str """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_py3.py index b3d825dd643a..46710c2271d2 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_py3.py @@ -18,20 +18,20 @@ class Project(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets the project id + :ivar id: Gets The project id. :vartype id: str - :param name: Gets or sets the name of the project + :param name: Gets or sets the name of the project. :type name: str - :param description: Gets or sets the description of the project + :param description: Gets or sets the description of the project. :type description: str - :param settings: Gets or sets the project settings + :param settings: Gets or sets the project settings. :type settings: ~azure.cognitiveservices.vision.customvision.training.models.ProjectSettings - :ivar created: Gets the date this project was created + :ivar created: Gets the date this project was created. :vartype created: datetime - :ivar last_modified: Gets the date this project was last modifed + :ivar last_modified: Gets the date this project was last modifed. :vartype last_modified: datetime - :ivar thumbnail_uri: Gets the thumbnail url representing the project + :ivar thumbnail_uri: Gets the thumbnail url representing the project. :vartype thumbnail_uri: str """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings.py index c6754261ccc9..85e3471bf1c5 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings.py @@ -16,7 +16,7 @@ class ProjectSettings(Model): """Represents settings associated with a project. :param domain_id: Gets or sets the id of the Domain to use with this - project + project. :type domain_id: str :param classification_type: Gets or sets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel' diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings_py3.py index 2b5c687bf793..9b606ec7e48d 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/project_settings_py3.py @@ -16,7 +16,7 @@ class ProjectSettings(Model): """Represents settings associated with a project. :param domain_id: Gets or sets the id of the Domain to use with this - project + project. :type domain_id: str :param classification_type: Gets or sets the classification type of the project. Possible values include: 'Multiclass', 'Multilabel' diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region.py index a2d1b9e832d8..3c22f6edf524 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region.py @@ -15,7 +15,7 @@ class Region(Model): """Region. - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region_py3.py index a332c1e0ea8b..4a3154516666 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/region_py3.py @@ -15,7 +15,7 @@ class Region(Model): """Region. - :param tag_id: + :param tag_id: Id of the tag associated with this region. :type tag_id: str :param left: :type left: float diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction.py index 689371f20c01..0a90e700be17 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction.py @@ -18,11 +18,14 @@ class StoredImagePrediction(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar image_uri: - :vartype image_uri: str - :ivar thumbnail_uri: + :ivar resized_image_uri: The URI to the (resized) prediction image. + :vartype resized_image_uri: str + :ivar thumbnail_uri: The URI to the thumbnail of the original prediction + image. :vartype thumbnail_uri: str - :ivar domain: + :ivar original_image_uri: The URI to the original prediction image. + :vartype original_image_uri: str + :ivar domain: Domain used for the prediction. :vartype domain: str :ivar id: :vartype id: str @@ -38,8 +41,9 @@ class StoredImagePrediction(Model): """ _validation = { - 'image_uri': {'readonly': True}, + 'resized_image_uri': {'readonly': True}, 'thumbnail_uri': {'readonly': True}, + 'original_image_uri': {'readonly': True}, 'domain': {'readonly': True}, 'id': {'readonly': True}, 'project': {'readonly': True}, @@ -49,8 +53,9 @@ class StoredImagePrediction(Model): } _attribute_map = { - 'image_uri': {'key': 'imageUri', 'type': 'str'}, + 'resized_image_uri': {'key': 'resizedImageUri', 'type': 'str'}, 'thumbnail_uri': {'key': 'thumbnailUri', 'type': 'str'}, + 'original_image_uri': {'key': 'originalImageUri', 'type': 'str'}, 'domain': {'key': 'domain', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'project': {'key': 'project', 'type': 'str'}, @@ -61,8 +66,9 @@ class StoredImagePrediction(Model): def __init__(self, **kwargs): super(StoredImagePrediction, self).__init__(**kwargs) - self.image_uri = None + self.resized_image_uri = None self.thumbnail_uri = None + self.original_image_uri = None self.domain = None self.id = None self.project = None diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction_py3.py index 8d1782d2d849..cfe9432fdd85 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/stored_image_prediction_py3.py @@ -18,11 +18,14 @@ class StoredImagePrediction(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar image_uri: - :vartype image_uri: str - :ivar thumbnail_uri: + :ivar resized_image_uri: The URI to the (resized) prediction image. + :vartype resized_image_uri: str + :ivar thumbnail_uri: The URI to the thumbnail of the original prediction + image. :vartype thumbnail_uri: str - :ivar domain: + :ivar original_image_uri: The URI to the original prediction image. + :vartype original_image_uri: str + :ivar domain: Domain used for the prediction. :vartype domain: str :ivar id: :vartype id: str @@ -38,8 +41,9 @@ class StoredImagePrediction(Model): """ _validation = { - 'image_uri': {'readonly': True}, + 'resized_image_uri': {'readonly': True}, 'thumbnail_uri': {'readonly': True}, + 'original_image_uri': {'readonly': True}, 'domain': {'readonly': True}, 'id': {'readonly': True}, 'project': {'readonly': True}, @@ -49,8 +53,9 @@ class StoredImagePrediction(Model): } _attribute_map = { - 'image_uri': {'key': 'imageUri', 'type': 'str'}, + 'resized_image_uri': {'key': 'resizedImageUri', 'type': 'str'}, 'thumbnail_uri': {'key': 'thumbnailUri', 'type': 'str'}, + 'original_image_uri': {'key': 'originalImageUri', 'type': 'str'}, 'domain': {'key': 'domain', 'type': 'str'}, 'id': {'key': 'id', 'type': 'str'}, 'project': {'key': 'project', 'type': 'str'}, @@ -61,8 +66,9 @@ class StoredImagePrediction(Model): def __init__(self, **kwargs) -> None: super(StoredImagePrediction, self).__init__(**kwargs) - self.image_uri = None + self.resized_image_uri = None self.thumbnail_uri = None + self.original_image_uri = None self.domain = None self.id = None self.project = None diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag.py index 5f9c22511617..9abc57b95f1f 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag.py @@ -18,13 +18,17 @@ class Tag(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets the Tag ID + :ivar id: Gets the Tag ID. :vartype id: str - :param name: Gets or sets the name of the tag + :param name: Gets or sets the name of the tag. :type name: str - :param description: Gets or sets the description of the tag + :param description: Gets or sets the description of the tag. :type description: str - :ivar image_count: Gets the number of images with this tag + :param type: Gets or sets the type of the tag. Possible values include: + 'Regular', 'Negative' + :type type: str or + ~azure.cognitiveservices.vision.customvision.training.models.TagType + :ivar image_count: Gets the number of images with this tag. :vartype image_count: int """ @@ -37,6 +41,7 @@ class Tag(Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'image_count': {'key': 'imageCount', 'type': 'int'}, } @@ -45,4 +50,5 @@ def __init__(self, **kwargs): self.id = None self.name = kwargs.get('name', None) self.description = kwargs.get('description', None) + self.type = kwargs.get('type', None) self.image_count = None diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance.py index 3213a199428e..21f548d6a943 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance.py @@ -22,16 +22,16 @@ class TagPerformance(Model): :vartype id: str :ivar name: :vartype name: str - :ivar precision: Gets the precision + :ivar precision: Gets the precision. :vartype precision: float :ivar precision_std_deviation: Gets the standard deviation for the - precision + precision. :vartype precision_std_deviation: float - :ivar recall: Gets the recall + :ivar recall: Gets the recall. :vartype recall: float - :ivar recall_std_deviation: Gets the standard deviation for the recall + :ivar recall_std_deviation: Gets the standard deviation for the recall. :vartype recall_std_deviation: float - :ivar average_precision: Gets the average precision when applicable + :ivar average_precision: Gets the average precision when applicable. :vartype average_precision: float """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance_py3.py index 4936c37992a5..d469c924d7d2 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_performance_py3.py @@ -22,16 +22,16 @@ class TagPerformance(Model): :vartype id: str :ivar name: :vartype name: str - :ivar precision: Gets the precision + :ivar precision: Gets the precision. :vartype precision: float :ivar precision_std_deviation: Gets the standard deviation for the - precision + precision. :vartype precision_std_deviation: float - :ivar recall: Gets the recall + :ivar recall: Gets the recall. :vartype recall: float - :ivar recall_std_deviation: Gets the standard deviation for the recall + :ivar recall_std_deviation: Gets the standard deviation for the recall. :vartype recall_std_deviation: float - :ivar average_precision: Gets the average precision when applicable + :ivar average_precision: Gets the average precision when applicable. :vartype average_precision: float """ diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_py3.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_py3.py index c57dd836137f..bf98d2fcfcd4 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_py3.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/models/tag_py3.py @@ -18,13 +18,17 @@ class Tag(Model): Variables are only populated by the server, and will be ignored when sending a request. - :ivar id: Gets the Tag ID + :ivar id: Gets the Tag ID. :vartype id: str - :param name: Gets or sets the name of the tag + :param name: Gets or sets the name of the tag. :type name: str - :param description: Gets or sets the description of the tag + :param description: Gets or sets the description of the tag. :type description: str - :ivar image_count: Gets the number of images with this tag + :param type: Gets or sets the type of the tag. Possible values include: + 'Regular', 'Negative' + :type type: str or + ~azure.cognitiveservices.vision.customvision.training.models.TagType + :ivar image_count: Gets the number of images with this tag. :vartype image_count: int """ @@ -37,12 +41,14 @@ class Tag(Model): 'id': {'key': 'id', 'type': 'str'}, 'name': {'key': 'name', 'type': 'str'}, 'description': {'key': 'description', 'type': 'str'}, + 'type': {'key': 'type', 'type': 'str'}, 'image_count': {'key': 'imageCount', 'type': 'int'}, } - def __init__(self, *, name: str=None, description: str=None, **kwargs) -> None: + def __init__(self, *, name: str=None, description: str=None, type=None, **kwargs) -> None: super(Tag, self).__init__(**kwargs) self.id = None self.name = name self.description = description + self.type = type self.image_count = None diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/version.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/version.py index d447abf46db3..48ef1af13e90 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/version.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/training/version.py @@ -9,5 +9,5 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "2.1" +VERSION = "2.2" diff --git a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/version.py b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/version.py index fcb88654af0a..7e15bc578c31 100644 --- a/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/version.py +++ b/azure-cognitiveservices-vision-customvision/azure/cognitiveservices/vision/customvision/version.py @@ -9,4 +9,4 @@ # regenerated. # -------------------------------------------------------------------------- -VERSION = "0.3.0" +VERSION = "0.4.0" diff --git a/azure-cognitiveservices-vision-customvision/sdk_packaging.toml b/azure-cognitiveservices-vision-customvision/sdk_packaging.toml index f58f791d2f4d..e96e80c8e0f9 100644 --- a/azure-cognitiveservices-vision-customvision/sdk_packaging.toml +++ b/azure-cognitiveservices-vision-customvision/sdk_packaging.toml @@ -4,3 +4,4 @@ package_pprint_name = "Custom Vision" package_doc_id = "cognitive-services" is_stable = false is_arm = false +need_msrestazure = false