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
30 changes: 30 additions & 0 deletions azure-cognitiveservices-vision-face/HISTORY.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,36 @@
Release History
===============

0.3.0 (2019-03-28)
++++++++++++++++++

**Features**

- Model PersonGroup has a new parameter recognition_model
- Model FaceList has a new parameter recognition_model
- Model LargePersonGroup has a new parameter recognition_model
- Model LargeFaceList has a new parameter recognition_model
- Model DetectedFace has a new parameter recognition_model

**Breaking changes**

- Operation FaceListOperations.create has a new signature
- Operation FaceListOperations.get has a new signature
- Operation FaceOperations.detect_with_stream has a new signature
- Operation FaceOperations.detect_with_stream has a new signature
- Operation FaceOperations.detect_with_url has a new signature
- Operation FaceOperations.detect_with_url has a new signature
- Operation LargeFaceListOperations.create has a new signature
- Operation LargeFaceListOperations.get has a new signature
- Operation LargePersonGroupOperations.create has a new signature
- Operation LargePersonGroupOperations.get has a new signature
- Operation LargePersonGroupOperations.list has a new signature
- Operation PersonGroupOperations.create has a new signature
- Operation PersonGroupOperations.get has a new signature
- Operation PersonGroupOperations.list has a new signature
- Operation FaceListOperations.list has a new signature
- Operation LargeFaceListOperations.list has a new signature

0.2.0 (2019-03-07)
++++++++++++++++++

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@
from .update_face_request_py3 import UpdateFaceRequest
from .training_status_py3 import TrainingStatus
from .name_and_user_data_contract_py3 import NameAndUserDataContract
from .meta_data_contract_py3 import MetaDataContract
from .apply_snapshot_request_py3 import ApplySnapshotRequest
from .snapshot_py3 import Snapshot
from .take_snapshot_request_py3 import TakeSnapshotRequest
Expand Down Expand Up @@ -91,13 +92,15 @@
from .update_face_request import UpdateFaceRequest
from .training_status import TrainingStatus
from .name_and_user_data_contract import NameAndUserDataContract
from .meta_data_contract import MetaDataContract
from .apply_snapshot_request import ApplySnapshotRequest
from .snapshot import Snapshot
from .take_snapshot_request import TakeSnapshotRequest
from .update_snapshot_request import UpdateSnapshotRequest
from .operation_status import OperationStatus
from .image_url import ImageUrl
from .face_client_enums import (
RecognitionModel,
Gender,
GlassesType,
HairColorType,
Expand Down Expand Up @@ -151,12 +154,14 @@
'UpdateFaceRequest',
'TrainingStatus',
'NameAndUserDataContract',
'MetaDataContract',
'ApplySnapshotRequest',
'Snapshot',
'TakeSnapshotRequest',
'UpdateSnapshotRequest',
'OperationStatus',
'ImageUrl',
'RecognitionModel',
'Gender',
'GlassesType',
'HairColorType',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class DetectedFace(Model):

:param face_id:
:type face_id: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param face_rectangle: Required.
:type face_rectangle:
~azure.cognitiveservices.vision.face.models.FaceRectangle
Expand All @@ -36,6 +40,7 @@ class DetectedFace(Model):

_attribute_map = {
'face_id': {'key': 'faceId', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'face_rectangle': {'key': 'faceRectangle', 'type': 'FaceRectangle'},
'face_landmarks': {'key': 'faceLandmarks', 'type': 'FaceLandmarks'},
'face_attributes': {'key': 'faceAttributes', 'type': 'FaceAttributes'},
Expand All @@ -44,6 +49,7 @@ class DetectedFace(Model):
def __init__(self, **kwargs):
super(DetectedFace, self).__init__(**kwargs)
self.face_id = kwargs.get('face_id', None)
self.recognition_model = kwargs.get('recognition_model', "recognition_01")
self.face_rectangle = kwargs.get('face_rectangle', None)
self.face_landmarks = kwargs.get('face_landmarks', None)
self.face_attributes = kwargs.get('face_attributes', None)
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,10 @@ class DetectedFace(Model):

:param face_id:
:type face_id: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param face_rectangle: Required.
:type face_rectangle:
~azure.cognitiveservices.vision.face.models.FaceRectangle
Expand All @@ -36,14 +40,16 @@ class DetectedFace(Model):

_attribute_map = {
'face_id': {'key': 'faceId', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'face_rectangle': {'key': 'faceRectangle', 'type': 'FaceRectangle'},
'face_landmarks': {'key': 'faceLandmarks', 'type': 'FaceLandmarks'},
'face_attributes': {'key': 'faceAttributes', 'type': 'FaceAttributes'},
}

def __init__(self, *, face_rectangle, face_id: str=None, face_landmarks=None, face_attributes=None, **kwargs) -> None:
def __init__(self, *, face_rectangle, face_id: str=None, recognition_model="recognition_01", face_landmarks=None, face_attributes=None, **kwargs) -> None:
super(DetectedFace, self).__init__(**kwargs)
self.face_id = face_id
self.recognition_model = recognition_model
self.face_rectangle = face_rectangle
self.face_landmarks = face_landmarks
self.face_attributes = face_attributes
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,12 @@
from enum import Enum


class RecognitionModel(str, Enum):

recognition_01 = "recognition_01"
recognition_02 = "recognition_02"


class Gender(str, Enum):

male = "male"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .name_and_user_data_contract import NameAndUserDataContract
from .meta_data_contract import MetaDataContract


class FaceList(NameAndUserDataContract):
class FaceList(MetaDataContract):
"""Face list object.

All required parameters must be populated in order to send to Azure.
Expand All @@ -21,6 +21,10 @@ class FaceList(NameAndUserDataContract):
:type name: str
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param face_list_id: Required. FaceListId of the target face list.
:type face_list_id: str
:param persisted_faces: Persisted faces within the face list.
Expand All @@ -37,6 +41,7 @@ class FaceList(NameAndUserDataContract):
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'user_data': {'key': 'userData', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'face_list_id': {'key': 'faceListId', 'type': 'str'},
'persisted_faces': {'key': 'persistedFaces', 'type': '[PersistedFace]'},
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .name_and_user_data_contract_py3 import NameAndUserDataContract
from .meta_data_contract_py3 import MetaDataContract


class FaceList(NameAndUserDataContract):
class FaceList(MetaDataContract):
"""Face list object.

All required parameters must be populated in order to send to Azure.
Expand All @@ -21,6 +21,10 @@ class FaceList(NameAndUserDataContract):
:type name: str
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param face_list_id: Required. FaceListId of the target face list.
:type face_list_id: str
:param persisted_faces: Persisted faces within the face list.
Expand All @@ -37,11 +41,12 @@ class FaceList(NameAndUserDataContract):
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'user_data': {'key': 'userData', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'face_list_id': {'key': 'faceListId', 'type': 'str'},
'persisted_faces': {'key': 'persistedFaces', 'type': '[PersistedFace]'},
}

def __init__(self, *, face_list_id: str, name: str=None, user_data: str=None, persisted_faces=None, **kwargs) -> None:
super(FaceList, self).__init__(name=name, user_data=user_data, **kwargs)
def __init__(self, *, face_list_id: str, name: str=None, user_data: str=None, recognition_model="recognition_01", persisted_faces=None, **kwargs) -> None:
super(FaceList, self).__init__(name=name, user_data=user_data, recognition_model=recognition_model, **kwargs)
self.face_list_id = face_list_id
self.persisted_faces = persisted_faces
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .name_and_user_data_contract import NameAndUserDataContract
from .meta_data_contract import MetaDataContract


class LargeFaceList(NameAndUserDataContract):
class LargeFaceList(MetaDataContract):
"""Large face list object.

All required parameters must be populated in order to send to Azure.
Expand All @@ -21,6 +21,10 @@ class LargeFaceList(NameAndUserDataContract):
:type name: str
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param large_face_list_id: Required. LargeFaceListId of the target large
face list.
:type large_face_list_id: str
Expand All @@ -35,6 +39,7 @@ class LargeFaceList(NameAndUserDataContract):
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'user_data': {'key': 'userData', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'large_face_list_id': {'key': 'largeFaceListId', 'type': 'str'},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .name_and_user_data_contract_py3 import NameAndUserDataContract
from .meta_data_contract_py3 import MetaDataContract


class LargeFaceList(NameAndUserDataContract):
class LargeFaceList(MetaDataContract):
"""Large face list object.

All required parameters must be populated in order to send to Azure.
Expand All @@ -21,6 +21,10 @@ class LargeFaceList(NameAndUserDataContract):
:type name: str
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param large_face_list_id: Required. LargeFaceListId of the target large
face list.
:type large_face_list_id: str
Expand All @@ -35,9 +39,10 @@ class LargeFaceList(NameAndUserDataContract):
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'user_data': {'key': 'userData', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'large_face_list_id': {'key': 'largeFaceListId', 'type': 'str'},
}

def __init__(self, *, large_face_list_id: str, name: str=None, user_data: str=None, **kwargs) -> None:
super(LargeFaceList, self).__init__(name=name, user_data=user_data, **kwargs)
def __init__(self, *, large_face_list_id: str, name: str=None, user_data: str=None, recognition_model="recognition_01", **kwargs) -> None:
super(LargeFaceList, self).__init__(name=name, user_data=user_data, recognition_model=recognition_model, **kwargs)
self.large_face_list_id = large_face_list_id
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .name_and_user_data_contract import NameAndUserDataContract
from .meta_data_contract import MetaDataContract


class LargePersonGroup(NameAndUserDataContract):
class LargePersonGroup(MetaDataContract):
"""Large person group object.

All required parameters must be populated in order to send to Azure.
Expand All @@ -21,6 +21,10 @@ class LargePersonGroup(NameAndUserDataContract):
:type name: str
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param large_person_group_id: Required. LargePersonGroupId of the target
large person groups
:type large_person_group_id: str
Expand All @@ -35,6 +39,7 @@ class LargePersonGroup(NameAndUserDataContract):
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'user_data': {'key': 'userData', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'large_person_group_id': {'key': 'largePersonGroupId', 'type': 'str'},
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@
# regenerated.
# --------------------------------------------------------------------------

from .name_and_user_data_contract_py3 import NameAndUserDataContract
from .meta_data_contract_py3 import MetaDataContract


class LargePersonGroup(NameAndUserDataContract):
class LargePersonGroup(MetaDataContract):
"""Large person group object.

All required parameters must be populated in order to send to Azure.
Expand All @@ -21,6 +21,10 @@ class LargePersonGroup(NameAndUserDataContract):
:type name: str
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
:param large_person_group_id: Required. LargePersonGroupId of the target
large person groups
:type large_person_group_id: str
Expand All @@ -35,9 +39,10 @@ class LargePersonGroup(NameAndUserDataContract):
_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'user_data': {'key': 'userData', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
'large_person_group_id': {'key': 'largePersonGroupId', 'type': 'str'},
}

def __init__(self, *, large_person_group_id: str, name: str=None, user_data: str=None, **kwargs) -> None:
super(LargePersonGroup, self).__init__(name=name, user_data=user_data, **kwargs)
def __init__(self, *, large_person_group_id: str, name: str=None, user_data: str=None, recognition_model="recognition_01", **kwargs) -> None:
super(LargePersonGroup, self).__init__(name=name, user_data=user_data, recognition_model=recognition_model, **kwargs)
self.large_person_group_id = large_person_group_id
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
# 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 .name_and_user_data_contract import NameAndUserDataContract


class MetaDataContract(NameAndUserDataContract):
"""A combination of user defined name and user specified data and recognition
model name for largePersonGroup/personGroup, and largeFaceList/faceList.

:param name: User defined name, maximum length is 128.
:type name: str
:param user_data: User specified data. Length should not exceed 16KB.
:type user_data: str
:param recognition_model: Possible values include: 'recognition_01',
'recognition_02'. Default value: "recognition_01" .
:type recognition_model: str or
~azure.cognitiveservices.vision.face.models.RecognitionModel
"""

_validation = {
'name': {'max_length': 128},
'user_data': {'max_length': 16384},
}

_attribute_map = {
'name': {'key': 'name', 'type': 'str'},
'user_data': {'key': 'userData', 'type': 'str'},
'recognition_model': {'key': 'recognitionModel', 'type': 'str'},
}

def __init__(self, **kwargs):
super(MetaDataContract, self).__init__(**kwargs)
self.recognition_model = kwargs.get('recognition_model', "recognition_01")
Loading