diff --git a/specification/ai/Face/models.common.tsp b/specification/ai/Face/models.common.tsp index 108b708ca048..05c908daad5f 100644 --- a/specification/ai/Face/models.common.tsp +++ b/specification/ai/Face/models.common.tsp @@ -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; @@ -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; @@ -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; @@ -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; @@ -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[][]; diff --git a/specification/ai/Face/models.session.tsp b/specification/ai/Face/models.session.tsp index 7c0e2a038e12..e9888bec32a9 100644 --- a/specification/ai/Face/models.session.tsp +++ b/specification/ai/Face/models.session.tsp @@ -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") @@ -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, diff --git a/specification/ai/Face/routes.common.tsp b/specification/ai/Face/routes.common.tsp index 24aad045d0a6..8cfa458f9127 100644 --- a/specification/ai/Face/routes.common.tsp +++ b/specification/ai/Face/routes.common.tsp @@ -135,7 +135,7 @@ op IdentifyOperation 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, + Body, ServiceTraits >; @@ -149,7 +149,7 @@ op VerifyOperation is Azure.Core.RpcOperati ...T; }, - VerifyResult, + FaceVerificationResult, ServiceTraits >; @@ -170,7 +170,7 @@ op FindSimilarOperation is Azure.Core ...Ttarget; }, - Body, + Body, ServiceTraits >; @@ -231,7 +231,7 @@ op verify is Azure.Core.RpcOperation< @doc("faceId of the face, comes from Face - Detect.") faceId2: string; }, - VerifyResult, + FaceVerificationResult, ServiceTraits >; @@ -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 >; diff --git a/specification/ai/data-plane/Face/preview/v1.1-preview.1/Face.json b/specification/ai/data-plane/Face/preview/v1.1-preview.1/Face.json index 915d683e1d8b..68a7f2a609cd 100644 --- a/specification/ai/data-plane/Face/preview/v1.1-preview.1/Face.json +++ b/specification/ai/data-plane/Face/preview/v1.1-preview.1/Face.json @@ -1137,7 +1137,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/FindSimilarResult" + "$ref": "#/definitions/FaceFindSimilarResult" }, "x-ms-identifiers": [] } @@ -1190,7 +1190,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/GroupResult" + "$ref": "#/definitions/FaceGroupingResult" } }, "default": { @@ -1261,7 +1261,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/IdentifyResult" + "$ref": "#/definitions/FaceIdentificationResult" }, "x-ms-identifiers": [] } @@ -3994,7 +3994,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/VerifyResult" + "$ref": "#/definitions/FaceVerificationResult" } }, "default": { @@ -4229,7 +4229,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/FindSimilarResult" + "$ref": "#/definitions/FaceFindSimilarResult" }, "x-ms-identifiers": [] } @@ -4295,7 +4295,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/FindSimilarResult" + "$ref": "#/definitions/FaceFindSimilarResult" }, "x-ms-identifiers": [] } @@ -4365,7 +4365,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/IdentifyResult" + "$ref": "#/definitions/FaceIdentificationResult" }, "x-ms-identifiers": [] } @@ -4435,7 +4435,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/IdentifyResult" + "$ref": "#/definitions/FaceIdentificationResult" }, "x-ms-identifiers": [] } @@ -4505,7 +4505,7 @@ "schema": { "type": "array", "items": { - "$ref": "#/definitions/IdentifyResult" + "$ref": "#/definitions/FaceIdentificationResult" }, "x-ms-identifiers": [] } @@ -4866,7 +4866,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/VerifyResult" + "$ref": "#/definitions/FaceVerificationResult" } }, "default": { @@ -4919,7 +4919,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/VerifyResult" + "$ref": "#/definitions/FaceVerificationResult" } }, "default": { @@ -4977,7 +4977,7 @@ "200": { "description": "The request has succeeded.", "schema": { - "$ref": "#/definitions/VerifyResult" + "$ref": "#/definitions/FaceVerificationResult" } }, "default": { @@ -5578,6 +5578,97 @@ "faceId" ] }, + "FaceFindSimilarResult": { + "type": "object", + "description": "Response body for find similar face operation.", + "properties": { + "confidence": { + "type": "number", + "format": "float", + "description": "Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]." + }, + "faceId": { + "type": "string", + "description": "faceId of candidate face when find by faceIds." + }, + "persistedFaceId": { + "type": "string", + "description": "PersistedFaceId of candidate face when find by faceListId." + } + }, + "required": [ + "confidence" + ] + }, + "FaceGroupingResult": { + "type": "object", + "description": "Response body for group face operation.", + "properties": { + "groups": { + "type": "array", + "description": "A partition of the original faces based on face similarity. Groups are ranked by number of faces.", + "items": { + "type": "array", + "items": { + "type": "string" + } + }, + "x-ms-identifiers": [] + }, + "messyGroup": { + "type": "array", + "description": "Face ids array of faces that cannot find any similar faces from original faces.", + "items": { + "type": "string" + } + } + }, + "required": [ + "groups", + "messyGroup" + ] + }, + "FaceIdentificationCandidate": { + "type": "object", + "description": "Candidate for identify call.", + "properties": { + "personId": { + "type": "string", + "description": "PersonId of the candidate." + }, + "confidence": { + "type": "number", + "format": "float", + "description": "Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]." + } + }, + "required": [ + "personId", + "confidence" + ] + }, + "FaceIdentificationResult": { + "type": "object", + "description": "Identify result.", + "properties": { + "faceId": { + "type": "string", + "description": "Face ID of the query face." + }, + "candidates": { + "type": "array", + "description": "The top candidate returned from the database.", + "items": { + "$ref": "#/definitions/FaceIdentificationCandidate" + }, + "x-ms-identifiers": [] + } + }, + "required": [ + "faceId", + "candidates" + ] + }, "FaceLandmarks": { "type": "object", "description": "A collection of 27-point face landmarks pointing to the important positions of face components.", @@ -5856,6 +5947,55 @@ "height" ] }, + "FaceSessionStatus": { + "type": "string", + "description": "The current status of the session.", + "enum": [ + "NotStarted", + "Started", + "ResultAvailable" + ], + "x-ms-enum": { + "name": "FaceSessionStatus", + "modelAsString": true, + "values": [ + { + "name": "NotStarted", + "value": "NotStarted", + "description": "Session has not started." + }, + { + "name": "Started", + "value": "Started", + "description": "Session has started." + }, + { + "name": "ResultAvailable", + "value": "ResultAvailable", + "description": "Session has available result." + } + ] + } + }, + "FaceVerificationResult": { + "type": "object", + "description": "Verify result.", + "properties": { + "isIdentical": { + "type": "boolean", + "description": "True if the two faces belong to the same person or the face belongs to the person, otherwise false." + }, + "confidence": { + "type": "number", + "format": "float", + "description": "Confidence score of whether the two faces belong to the same person or whether the face belongs to the person. The range is [0, 1]." + } + }, + "required": [ + "isIdentical", + "confidence" + ] + }, "FacialHair": { "type": "object", "description": "Properties describing facial hair attributes.", @@ -5906,28 +6046,6 @@ ] } }, - "FindSimilarResult": { - "type": "object", - "description": "Response body for find similar face operation.", - "properties": { - "confidence": { - "type": "number", - "format": "float", - "description": "Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]." - }, - "faceId": { - "type": "string", - "description": "faceId of candidate face when find by faceIds." - }, - "persistedFaceId": { - "type": "string", - "description": "PersistedFaceId of candidate face when find by faceListId." - } - }, - "required": [ - "confidence" - ] - }, "GlassesType": { "type": "string", "description": "Glasses type of the face.", @@ -5964,34 +6082,6 @@ ] } }, - "GroupResult": { - "type": "object", - "description": "Response body for group face operation.", - "properties": { - "groups": { - "type": "array", - "description": "A partition of the original faces based on face similarity. Groups are ranked by number of faces.", - "items": { - "type": "array", - "items": { - "type": "string" - } - }, - "x-ms-identifiers": [] - }, - "messyGroup": { - "type": "array", - "description": "Face ids array of faces that cannot find any similar faces from original faces.", - "items": { - "type": "string" - } - } - }, - "required": [ - "groups", - "messyGroup" - ] - }, "HairColor": { "type": "object", "description": "An array of candidate colors and confidence level in the presence of each.", @@ -6125,47 +6215,6 @@ "yaw" ] }, - "IdentifyCandidate": { - "type": "object", - "description": "Candidate for identify call.", - "properties": { - "personId": { - "type": "string", - "description": "PersonId of the candidate." - }, - "confidence": { - "type": "number", - "format": "float", - "description": "Confidence value of the candidate. The higher confidence, the more similar. Range between [0,1]." - } - }, - "required": [ - "personId", - "confidence" - ] - }, - "IdentifyResult": { - "type": "object", - "description": "Identify result.", - "properties": { - "faceId": { - "type": "string", - "description": "Face ID of the query face." - }, - "candidates": { - "type": "array", - "description": "The top candidate returned from the database.", - "items": { - "$ref": "#/definitions/IdentifyCandidate" - }, - "x-ms-identifiers": [] - } - }, - "required": [ - "faceId", - "candidates" - ] - }, "KeyAuth": { "type": "object", "description": "The secret key for your Azure AI Face subscription.", @@ -6495,7 +6544,7 @@ "description": "Session length in seconds. Range is 60 to 86400 seconds." }, "status": { - "$ref": "#/definitions/SessionStatus", + "$ref": "#/definitions/FaceSessionStatus", "description": "The session status.", "readOnly": true }, @@ -6666,7 +6715,7 @@ "description": "Session details data.", "properties": { "status": { - "$ref": "#/definitions/SessionStatus", + "$ref": "#/definitions/FaceSessionStatus", "description": "The session status.", "readOnly": true }, @@ -6778,7 +6827,7 @@ "description": "Session length in seconds. Range is 60 to 86400 seconds." }, "status": { - "$ref": "#/definitions/SessionStatus", + "$ref": "#/definitions/FaceSessionStatus", "description": "The session status.", "readOnly": true }, @@ -7261,42 +7310,12 @@ "latencyInMilliseconds" ] }, - "SessionStatus": { - "type": "string", - "description": "Session status.", - "enum": [ - "NotStarted", - "Started", - "ResultAvailable" - ], - "x-ms-enum": { - "name": "SessionStatus", - "modelAsString": true, - "values": [ - { - "name": "NotStarted", - "value": "NotStarted", - "description": "Session has not started." - }, - { - "name": "Started", - "value": "Started", - "description": "Session has started." - }, - { - "name": "ResultAvailable", - "value": "ResultAvailable", - "description": "Session has available result." - } - ] - } - }, "TrainingStatus": { "type": "object", "description": "Training status of a container", "properties": { "status": { - "$ref": "#/definitions/TrainingStatusType", + "$ref": "#/definitions/Azure.Core.Foundations.OperationState", "description": "Training status of the container." }, "createdDateTime": { @@ -7326,42 +7345,6 @@ "lastSuccessfulTrainingDateTime" ] }, - "TrainingStatusType": { - "type": "string", - "description": "Type of training status.", - "enum": [ - "nonstarted", - "running", - "succeeded", - "failed" - ], - "x-ms-enum": { - "name": "TrainingStatusType", - "modelAsString": true, - "values": [ - { - "name": "nonstarted", - "value": "nonstarted", - "description": "If the training process is waiting to perform, the status is notstarted." - }, - { - "name": "running", - "value": "running", - "description": "If the training is ongoing, the status is running." - }, - { - "name": "succeeded", - "value": "succeeded", - "description": "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." - }, - { - "name": "failed", - "value": "failed", - "description": "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." - } - ] - } - }, "UpdateDynamicPersonGroupContent": { "type": "object", "description": "Request of update dynamic person group.", @@ -7390,25 +7373,6 @@ } } }, - "VerifyResult": { - "type": "object", - "description": "Verify result.", - "properties": { - "isIdentical": { - "type": "boolean", - "description": "True if the two faces belong to the same person or the face belongs to the person, otherwise false." - }, - "confidence": { - "type": "number", - "format": "float", - "description": "Confidence score of whether the two faces belong to the same person or whether the face belongs to the person. The range is [0, 1]." - } - }, - "required": [ - "isIdentical", - "confidence" - ] - }, "Versions": { "type": "string", "enum": [