Skip to content

Commit e9b6c35

Browse files
author
Han Chiang
committed
rename model
1 parent daae2c3 commit e9b6c35

4 files changed

Lines changed: 171 additions & 224 deletions

File tree

specification/ai/Face/models.common.tsp

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,7 @@ model ReturnRecognitionModelOptions {
113113
model TrainingStatus {
114114
@doc("Training status of the container.")
115115
@lroStatus
116-
status: TrainingStatusType;
116+
status: Foundations.OperationState;
117117

118118
@doc("A combined UTC date and time string that describes the created time of the person group, large person group or large face list.")
119119
createdDateTime: utcDateTime;
@@ -128,34 +128,17 @@ model TrainingStatus {
128128
message?: string;
129129
}
130130

131-
@doc("Type of training status.")
132-
enum TrainingStatusType {
133-
@doc("If the training process is waiting to perform, the status is notstarted.")
134-
nonstarted,
135-
136-
@doc("If the training is ongoing, the status is running.")
137-
running,
138-
139-
@lroSucceeded
140-
@doc("Status succeed means this person group or large person group is ready for Face - Identify, or this large face list is ready for Face - Find Similar.")
141-
succeeded,
142-
143-
@lroFailed
144-
@doc("Status failed is often caused by no person or no persisted face exist in the person group or large person group, or no persisted face exist in the large face list.")
145-
failed,
146-
}
147-
148131
@doc("Identify result.")
149-
model IdentifyResult {
132+
model FaceIdentificationResult {
150133
@doc("Face ID of the query face.")
151134
faceId: string;
152135

153136
@doc("The top candidate returned from the database.")
154-
candidates: IdentifyCandidate[];
137+
candidates: FaceIdentificationCandidate[];
155138
}
156139

157140
@doc("Candidate for identify call.")
158-
model IdentifyCandidate {
141+
model FaceIdentificationCandidate {
159142
@doc("PersonId of the candidate.")
160143
personId: string;
161144

@@ -164,7 +147,7 @@ model IdentifyCandidate {
164147
}
165148

166149
@doc("Verify result.")
167-
model VerifyResult {
150+
model FaceVerificationResult {
168151
@doc("True if the two faces belong to the same person or the face belongs to the person, otherwise false.")
169152
isIdentical: boolean;
170153

@@ -182,7 +165,7 @@ enum FindSimilarMatchMode {
182165
}
183166

184167
@doc("Response body for find similar face operation.")
185-
model FindSimilarResult {
168+
model FaceFindSimilarResult {
186169
@doc("Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1].")
187170
confidence: float32;
188171

@@ -194,7 +177,7 @@ model FindSimilarResult {
194177
}
195178

196179
@doc("Response body for group face operation.")
197-
model GroupResult {
180+
model FaceGroupingResult {
198181
@doc("A partition of the original faces based on face similarity. Groups are ranked by number of faces.")
199182
groups: string[][];
200183

specification/ai/Face/models.session.tsp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ model LivenessSessionItem {
5858
model LivenessSessionDetails {
5959
@doc("The session status.")
6060
@visibility("read")
61-
status: SessionStatus;
61+
status: FaceSessionStatus;
6262

6363
@doc("The last result of session.")
6464
@visibility("read")
@@ -86,8 +86,8 @@ model LivenessSessionCreationResult {
8686
authToken: string;
8787
}
8888

89-
@doc("Session status.")
90-
enum SessionStatus {
89+
@doc("The current status of the session.")
90+
enum FaceSessionStatus {
9191
@doc("Session has not started.")
9292
NotStarted,
9393

specification/ai/Face/routes.common.tsp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ op IdentifyOperation<T extends TypeSpec.Reflection.Model> is Azure.Core.RpcOpera
135135
@doc("Customized identification confidence threshold, in the range of [0, 1]. Advanced user can tweak this value to override default internal threshold for better precision on their scenario data. Note there is no guarantee of this threshold value working on other data and after algorithm updates.")
136136
confidenceThreshold?: float32;
137137
},
138-
Body<IdentifyResult[]>,
138+
Body<FaceIdentificationResult[]>,
139139
ServiceTraits
140140
>;
141141

@@ -149,7 +149,7 @@ op VerifyOperation<T extends TypeSpec.Reflection.Model> is Azure.Core.RpcOperati
149149

150150
...T;
151151
},
152-
VerifyResult,
152+
FaceVerificationResult,
153153
ServiceTraits
154154
>;
155155

@@ -170,7 +170,7 @@ op FindSimilarOperation<Ttarget extends TypeSpec.Reflection.Model> is Azure.Core
170170

171171
...Ttarget;
172172
},
173-
Body<FindSimilarResult[]>,
173+
Body<FaceFindSimilarResult[]>,
174174
ServiceTraits
175175
>;
176176

@@ -231,7 +231,7 @@ op verify is Azure.Core.RpcOperation<
231231
@doc("faceId of the face, comes from Face - Detect.")
232232
faceId2: string;
233233
},
234-
VerifyResult,
234+
FaceVerificationResult,
235235
ServiceTraits
236236
>;
237237

@@ -244,6 +244,6 @@ op group is Azure.Core.RpcOperation<
244244
@doc("Array of candidate faceId created by Face - Detect. The maximum is 1000 faces.")
245245
faceIds: string[];
246246
},
247-
GroupResult,
247+
FaceGroupingResult,
248248
ServiceTraits
249249
>;

0 commit comments

Comments
 (0)