Skip to content

Commit

Permalink
rename model
Browse files Browse the repository at this point in the history
  • Loading branch information
Han Chiang committed Mar 4, 2024
1 parent f1b24fe commit 4093ed6
Show file tree
Hide file tree
Showing 4 changed files with 171 additions and 224 deletions.
31 changes: 7 additions & 24 deletions specification/ai/Face/models.common.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ model ReturnRecognitionModelOptions {
model TrainingStatus {
@doc("Training status of the container.")
@lroStatus
status: TrainingStatusType;
status: Foundations.OperationState;

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

@doc("Type of training status.")
enum TrainingStatusType {
@doc("If the training process is waiting to perform, the status is notstarted.")
nonstarted,

@doc("If the training is ongoing, the status is running.")
running,

@lroSucceeded
@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.")
succeeded,

@lroFailed
@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.")
failed,
}

@doc("Identify result.")
model IdentifyResult {
model FaceIdentificationResult {
@doc("Face ID of the query face.")
faceId: string;

@doc("The top candidate returned from the database.")
candidates: IdentifyCandidate[];
candidates: FaceIdentificationCandidate[];
}

@doc("Candidate for identify call.")
model IdentifyCandidate {
model FaceIdentificationCandidate {
@doc("PersonId of the candidate.")
personId: string;

Expand All @@ -164,7 +147,7 @@ model IdentifyCandidate {
}

@doc("Verify result.")
model VerifyResult {
model FaceVerificationResult {
@doc("True if the two faces belong to the same person or the face belongs to the person, otherwise false.")
isIdentical: boolean;

Expand All @@ -182,7 +165,7 @@ enum FindSimilarMatchMode {
}

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

Expand All @@ -194,7 +177,7 @@ model FindSimilarResult {
}

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

Expand Down
6 changes: 3 additions & 3 deletions specification/ai/Face/models.session.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ model LivenessSessionItem {
model LivenessSessionDetails {
@doc("The session status.")
@visibility("read")
status: SessionStatus;
status: FaceSessionStatus;

@doc("The last result of session.")
@visibility("read")
Expand Down Expand Up @@ -86,8 +86,8 @@ model LivenessSessionCreationResult {
authToken: string;
}

@doc("Session status.")
enum SessionStatus {
@doc("The current status of the session.")
enum FaceSessionStatus {
@doc("Session has not started.")
NotStarted,

Expand Down
10 changes: 5 additions & 5 deletions specification/ai/Face/routes.common.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ op IdentifyOperation<T extends TypeSpec.Reflection.Model> is Azure.Core.RpcOpera
@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.")
confidenceThreshold?: float32;
},
Body<IdentifyResult[]>,
Body<FaceIdentificationResult[]>,
ServiceTraits
>;

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

...T;
},
VerifyResult,
FaceVerificationResult,
ServiceTraits
>;

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

...Ttarget;
},
Body<FindSimilarResult[]>,
Body<FaceFindSimilarResult[]>,
ServiceTraits
>;

Expand Down Expand Up @@ -231,7 +231,7 @@ op verify is Azure.Core.RpcOperation<
@doc("faceId of the face, comes from Face - Detect.")
faceId2: string;
},
VerifyResult,
FaceVerificationResult,
ServiceTraits
>;

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

0 comments on commit 4093ed6

Please sign in to comment.