Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions azure-cognitiveservices-vision-customvision/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,25 @@
Release History
===============

0.2.0 (2018-05-07)
++++++++++++++++++

**Breaking changes**

- Expect many breaking changes. As a preview package, we don't detail, but updated samples are available at:
https://github.com/Azure-Samples/cognitive-services-python-sdk-samples

**Features**

- Adding support for object detection projects and expanded export functionality for image classification projects
- Client class can be used as a context manager to keep the underlying HTTP session open for performance

**Bugfixes**

- Compatibility of the sdist with wheel 0.31.0

Internal API version moved from 1.2 to 2.0

0.1.0 (2018-04-05)
++++++++++++++++++

Expand Down
10 changes: 2 additions & 8 deletions azure-cognitiveservices-vision-customvision/README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,8 @@ Microsoft Azure SDK for Python

This is the Microsoft Azure Custom Vision Client Library.

Azure Resource Manager (ARM) is the next generation of management APIs that
replace the old Azure Service Management (ASM).

This package has been tested with Python 2.7, 3.4, 3.5 and 3.6.

For the older Azure Service Management (ASM) libraries, see
`azure-servicemanagement-legacy <https://pypi.python.org/pypi/azure-servicemanagement-legacy>`__ library.

For a more complete set of Azure libraries, see the `azure <https://pypi.python.org/pypi/azure>`__ bundle package.


Expand All @@ -37,8 +31,8 @@ Usage
=====

For code examples, see `Custom Vision
<https://azure-sdk-for-python.readthedocs.org/en/latest/sample_azure-cognitiveservices-vision-customvision.html>`__
on readthedocs.org.
<https://docs.microsoft.com/python/api/overview/azure/cognitive-services>`__
on docs.microsoft.com.


Provide Feedback
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,18 @@

try:
from .image_url_py3 import ImageUrl
from .image_tag_prediction_model_py3 import ImageTagPredictionModel
from .image_prediction_result_model_py3 import ImagePredictionResultModel
from .bounding_box_py3 import BoundingBox
from .prediction_py3 import Prediction
from .image_prediction_py3 import ImagePrediction
except (SyntaxError, ImportError):
from .image_url import ImageUrl
from .image_tag_prediction_model import ImageTagPredictionModel
from .image_prediction_result_model import ImagePredictionResultModel
from .bounding_box import BoundingBox
from .prediction import Prediction
from .image_prediction import ImagePrediction

__all__ = [
'ImageUrl',
'ImageTagPredictionModel',
'ImagePredictionResultModel',
'BoundingBox',
'Prediction',
'ImagePrediction',
]
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class BoundingBox(Model):
"""BoundingBox.

:param left:
:type left: float
:param top:
:type top: float
:param width:
:type width: float
:param height:
:type height: float
"""

_attribute_map = {
'left': {'key': 'left', 'type': 'float'},
'top': {'key': 'top', 'type': 'float'},
'width': {'key': 'width', 'type': 'float'},
'height': {'key': 'height', 'type': 'float'},
}

def __init__(self, **kwargs):
super(BoundingBox, self).__init__(**kwargs)
self.left = kwargs.get('left', None)
self.top = kwargs.get('top', None)
self.width = kwargs.get('width', None)
self.height = kwargs.get('height', None)
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for
# license information.
#
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is
# regenerated.
# --------------------------------------------------------------------------

from msrest.serialization import Model


class BoundingBox(Model):
"""BoundingBox.

:param left:
:type left: float
:param top:
:type top: float
:param width:
:type width: float
:param height:
:type height: float
"""

_attribute_map = {
'left': {'key': 'left', 'type': 'float'},
'top': {'key': 'top', 'type': 'float'},
'width': {'key': 'width', 'type': 'float'},
'height': {'key': 'height', 'type': 'float'},
}

def __init__(self, *, left: float=None, top: float=None, width: float=None, height: float=None, **kwargs) -> None:
super(BoundingBox, self).__init__(**kwargs)
self.left = left
self.top = top
self.width = width
self.height = height
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from msrest.serialization import Model


class ImagePredictionResultModel(Model):
"""result of an image prediction request.
class ImagePrediction(Model):
"""ImagePrediction.

Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -28,7 +28,7 @@ class ImagePredictionResultModel(Model):
:vartype created: datetime
:ivar predictions:
:vartype predictions:
list[~azure.cognitiveservices.vision.customvision.prediction.models.ImageTagPredictionModel]
list[~azure.cognitiveservices.vision.customvision.prediction.models.Prediction]
"""

_validation = {
Expand All @@ -40,15 +40,15 @@ class ImagePredictionResultModel(Model):
}

_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'project': {'key': 'Project', 'type': 'str'},
'iteration': {'key': 'Iteration', 'type': 'str'},
'created': {'key': 'Created', 'type': 'iso-8601'},
'predictions': {'key': 'Predictions', 'type': '[ImageTagPredictionModel]'},
'id': {'key': 'id', 'type': 'str'},
'project': {'key': 'project', 'type': 'str'},
'iteration': {'key': 'iteration', 'type': 'str'},
'created': {'key': 'created', 'type': 'iso-8601'},
'predictions': {'key': 'predictions', 'type': '[Prediction]'},
}

def __init__(self, **kwargs):
super(ImagePredictionResultModel, self).__init__(**kwargs)
super(ImagePrediction, self).__init__(**kwargs)
self.id = None
self.project = None
self.iteration = None
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
from msrest.serialization import Model


class ImagePredictionResultModel(Model):
"""result of an image prediction request.
class ImagePrediction(Model):
"""ImagePrediction.

Variables are only populated by the server, and will be ignored when
sending a request.
Expand All @@ -28,7 +28,7 @@ class ImagePredictionResultModel(Model):
:vartype created: datetime
:ivar predictions:
:vartype predictions:
list[~azure.cognitiveservices.vision.customvision.prediction.models.ImageTagPredictionModel]
list[~azure.cognitiveservices.vision.customvision.prediction.models.Prediction]
"""

_validation = {
Expand All @@ -40,15 +40,15 @@ class ImagePredictionResultModel(Model):
}

_attribute_map = {
'id': {'key': 'Id', 'type': 'str'},
'project': {'key': 'Project', 'type': 'str'},
'iteration': {'key': 'Iteration', 'type': 'str'},
'created': {'key': 'Created', 'type': 'iso-8601'},
'predictions': {'key': 'Predictions', 'type': '[ImageTagPredictionModel]'},
'id': {'key': 'id', 'type': 'str'},
'project': {'key': 'project', 'type': 'str'},
'iteration': {'key': 'iteration', 'type': 'str'},
'created': {'key': 'created', 'type': 'iso-8601'},
'predictions': {'key': 'predictions', 'type': '[Prediction]'},
}

def __init__(self, **kwargs) -> None:
super(ImagePredictionResultModel, self).__init__(**kwargs)
super(ImagePrediction, self).__init__(**kwargs)
self.id = None
self.project = None
self.iteration = None
Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ImageUrl(Model):
"""

_attribute_map = {
'url': {'key': 'Url', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
}

def __init__(self, **kwargs):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class ImageUrl(Model):
"""

_attribute_map = {
'url': {'key': 'Url', 'type': 'str'},
'url': {'key': 'url', 'type': 'str'},
}

def __init__(self, *, url: str=None, **kwargs) -> None:
Expand Down
Loading