Skip to content
This repository has been archived by the owner on May 5, 2023. It is now read-only.

[AutoPR cognitiveservices/data-plane/Face] [Cogs Face] Align with latest released version of Face API with million-scale features. #3265

Merged
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
3 changes: 3 additions & 0 deletions lib/services/face/lib/faceClient.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export default class FaceClient extends ServiceClient {
personGroupPerson: operations.PersonGroupPerson;
personGroupOperations: operations.PersonGroupOperations;
faceListOperations: operations.FaceListOperations;
largePersonGroupPerson: operations.LargePersonGroupPerson;
largePersonGroupOperations: operations.LargePersonGroupOperations;
largeFaceListOperations: operations.LargeFaceListOperations;
}

export { FaceClient, models as FaceModels };
3 changes: 3 additions & 0 deletions lib/services/face/lib/faceClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,9 @@ class FaceClient extends ServiceClient {
this.personGroupPerson = new operations.PersonGroupPerson(this);
this.personGroupOperations = new operations.PersonGroupOperations(this);
this.faceListOperations = new operations.FaceListOperations(this);
this.largePersonGroupPerson = new operations.LargePersonGroupPerson(this);
this.largePersonGroupOperations = new operations.LargePersonGroupOperations(this);
this.largeFaceListOperations = new operations.LargeFaceListOperations(this);
this.models = models;
msRest.addSerializationMixin(this);
}
Expand Down
2 changes: 2 additions & 0 deletions lib/services/face/lib/models/accessory.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class Accessory {
modelProperties: {
type: {
required: false,
nullable: false,
serializedName: 'type',
type: {
name: 'Enum',
Expand All @@ -48,6 +49,7 @@ class Accessory {
},
confidence: {
required: false,
nullable: false,
serializedName: 'confidence',
type: {
name: 'Number'
Expand Down
2 changes: 2 additions & 0 deletions lib/services/face/lib/models/blur.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Blur {
modelProperties: {
blurLevel: {
required: false,
nullable: false,
serializedName: 'blurLevel',
type: {
name: 'Enum',
Expand All @@ -49,6 +50,7 @@ class Blur {
},
value: {
required: false,
nullable: false,
serializedName: 'value',
type: {
name: 'Number'
Expand Down
8 changes: 8 additions & 0 deletions lib/services/face/lib/models/emotion.js
Original file line number Diff line number Diff line change
Expand Up @@ -46,55 +46,63 @@ class Emotion {
modelProperties: {
anger: {
required: false,
nullable: false,
serializedName: 'anger',
type: {
name: 'Number'
}
},
contempt: {
required: false,
nullable: false,
serializedName: 'contempt',
type: {
name: 'Number'
}
},
disgust: {
required: false,
nullable: false,
serializedName: 'disgust',
type: {
name: 'Number'
}
},
fear: {
required: false,
nullable: false,
serializedName: 'fear',
type: {
name: 'Number'
}
},
happiness: {
required: false,
nullable: false,
serializedName: 'happiness',
type: {
name: 'Number'
}
},
neutral: {
required: false,
nullable: false,
serializedName: 'neutral',
type: {
name: 'Number'
}
},
sadness: {
required: false,
nullable: false,
serializedName: 'sadness',
type: {
name: 'Number'
}
},
surprise: {
required: false,
nullable: false,
serializedName: 'surprise',
type: {
name: 'Number'
Expand Down
2 changes: 2 additions & 0 deletions lib/services/face/lib/models/exposure.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ class Exposure {
modelProperties: {
exposureLevel: {
required: false,
nullable: false,
serializedName: 'exposureLevel',
type: {
name: 'Enum',
Expand All @@ -51,6 +52,7 @@ class Exposure {
},
value: {
required: false,
nullable: false,
serializedName: 'value',
type: {
name: 'Number'
Expand Down
3 changes: 3 additions & 0 deletions lib/services/face/lib/models/facialHair.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,23 @@ class FacialHair {
modelProperties: {
moustache: {
required: false,
nullable: false,
serializedName: 'moustache',
type: {
name: 'Number'
}
},
beard: {
required: false,
nullable: false,
serializedName: 'beard',
type: {
name: 'Number'
}
},
sideburns: {
required: false,
nullable: false,
serializedName: 'sideburns',
type: {
name: 'Number'
Expand Down
24 changes: 22 additions & 2 deletions lib/services/face/lib/models/findSimilarRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,18 @@ class FindSimilarRequest {
* @member {string} [faceListId] An existing user-specified unique candidate
* face list, created in Face List - Create a Face List. Face list contains a
* set of persistedFaceIds which are persisted and will never expire.
* Parameter faceListId and faceIds should not be provided at the same time
* Parameter faceListId, largeFaceListId and faceIds should not be provided
* at the same time。
* @member {string} [largeFaceListId] An existing user-specified unique
* candidate large face list, created in LargeFaceList - Create. Large face
* list contains a set of persistedFaceIds which are persisted and will never
* expire. Parameter faceListId, largeFaceListId and faceIds should not be
* provided at the same time.
* @member {array} [faceIds] An array of candidate faceIds. All of them are
* created by Face - Detect and the faceIds will expire 24 hours after the
* detection call.
* detection call. The number of faceIds is limited to 1000. Parameter
* faceListId, largeFaceListId and faceIds should not be provided at the same
* time.
* @member {number} [maxNumOfCandidatesReturned] The number of top similar
* faces returned. The valid range is [1, 1000]. Default value: 20 .
* @member {string} [mode] Similar face searching mode. It can be
Expand Down Expand Up @@ -68,6 +76,17 @@ class FindSimilarRequest {
name: 'String'
}
},
largeFaceListId: {
required: false,
serializedName: 'largeFaceListId',
constraints: {
MaxLength: 64,
Pattern: '^[a-z0-9-_]+$'
},
type: {
name: 'String'
}
},
faceIds: {
required: false,
serializedName: 'faceIds',
Expand Down Expand Up @@ -99,6 +118,7 @@ class FindSimilarRequest {
},
mode: {
required: false,
nullable: false,
serializedName: 'mode',
defaultValue: 'matchPerson',
type: {
Expand Down
2 changes: 2 additions & 0 deletions lib/services/face/lib/models/hair.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,15 @@ class Hair {
modelProperties: {
bald: {
required: false,
nullable: false,
serializedName: 'bald',
type: {
name: 'Number'
}
},
invisible: {
required: false,
nullable: false,
serializedName: 'invisible',
type: {
name: 'Boolean'
Expand Down
2 changes: 2 additions & 0 deletions lib/services/face/lib/models/hairColor.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ class HairColor {
modelProperties: {
color: {
required: false,
nullable: false,
serializedName: 'color',
type: {
name: 'Enum',
Expand All @@ -48,6 +49,7 @@ class HairColor {
},
confidence: {
required: false,
nullable: false,
serializedName: 'confidence',
type: {
name: 'Number'
Expand Down
3 changes: 3 additions & 0 deletions lib/services/face/lib/models/headPose.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,23 @@ class HeadPose {
modelProperties: {
roll: {
required: false,
nullable: false,
serializedName: 'roll',
type: {
name: 'Number'
}
},
yaw: {
required: false,
nullable: false,
serializedName: 'yaw',
type: {
name: 'Number'
}
},
pitch: {
required: false,
nullable: false,
serializedName: 'pitch',
type: {
name: 'Number'
Expand Down
42 changes: 29 additions & 13 deletions lib/services/face/lib/models/identifyRequest.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,16 @@
class IdentifyRequest {
/**
* Create a IdentifyRequest.
* @member {string} personGroupId PersonGroupId of the target person group,
* created by PersonGroups.Create
* @member {array} faceIds Array of query faces faceIds, created by the Face
* - Detect. Each of the faces are identified independently. The valid number
* of faceIds is between [1, 10].
* @member {string} [personGroupId] PersonGroupId of the target person group,
* created by PersonGroup - Create. Parameter personGroupId and
* largePersonGroupId should not be provided at the same time.
* @member {string} [largePersonGroupId] LargePersonGroupId of the target
* large person group, created by LargePersonGroup - Create. Parameter
* personGroupId and largePersonGroupId should not be provided at the same
* time.
* @member {number} [maxNumOfCandidatesReturned] The range of
* maxNumOfCandidatesReturned is between 1 and 5 (default is 1). Default
* value: 1 .
Expand All @@ -46,17 +51,6 @@ class IdentifyRequest {
name: 'Composite',
className: 'IdentifyRequest',
modelProperties: {
personGroupId: {
required: true,
serializedName: 'personGroupId',
constraints: {
MaxLength: 64,
Pattern: '^[a-z0-9-_]+$'
},
type: {
name: 'String'
}
},
faceIds: {
required: true,
serializedName: 'faceIds',
Expand All @@ -74,6 +68,28 @@ class IdentifyRequest {
}
}
},
personGroupId: {
required: false,
serializedName: 'personGroupId',
constraints: {
MaxLength: 64,
Pattern: '^[a-z0-9-_]+$'
},
type: {
name: 'String'
}
},
largePersonGroupId: {
required: false,
serializedName: 'largePersonGroupId',
constraints: {
MaxLength: 64,
Pattern: '^[a-z0-9-_]+$'
},
type: {
name: 'String'
}
},
maxNumOfCandidatesReturned: {
required: false,
serializedName: 'maxNumOfCandidatesReturned',
Expand Down
Loading