Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refine Face existing spec #29064

Merged
merged 5 commits into from
May 13, 2024
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
2 changes: 1 addition & 1 deletion specification/ai/Face/models.common.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ alias AddFaceDescriptionInList = """
* "targetFace" rectangle should contain one face. Zero or multiple faces will be regarded as an error. If the provided "targetFace" rectangle is not returned from \"Detect\", there's no guarantee to detect and add the face successfully.
* Out of detectable face size (36x36 - 4096x4096 pixels), large head-pose, or large occlusions will cause failures.
* The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
* Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model
* Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-detection-model
""";

alias ListRequestOptionsDescriptionInList = """
Expand Down
22 changes: 8 additions & 14 deletions specification/ai/Face/models.session.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -116,13 +116,13 @@ union LivenessDecision {
string,

@doc("The algorithm could not classify the target face as either real or spoof.")
"uncertain",
uncertain: "uncertain",

@doc("The algorithm has classified the target face as real.")
"realface",
realFace: "realface",

@doc("The algorithm has classified the target face as a spoof.")
"spoofface",
spoofFace: "spoofface",
}

@doc("The type of image.")
Expand Down Expand Up @@ -159,10 +159,10 @@ model LivenessOutputsTarget {
@doc("The model version used for liveness classification.")
union LivenessModel {
string,
"2020-02-15-preview.01",
"2021-11-12-preview.03",
"2022-10-15-preview.04",
"2023-03-02-preview.05",
v2020_02_15_preview_01: "2020-02-15-preview.01",
v2021_11_12_preview_03: "2021-11-12-preview.03",
v2022_10_15_preview_04: "2022-10-15-preview.04",
v2023_03_02_preview_05: "2023-03-02-preview.05",
}

@doc("The detail of face for verification.")
Expand Down Expand Up @@ -262,12 +262,6 @@ model LivenessSessionAuditEntry {
digest: string;
}

#suppress "@azure-tools/typespec-autorest/unsupported-multipart-type" "Provide convenient interface for multipart/form-data in SDK"
@doc("Dedicated parameter model for multipart/form-data.")
model CreateLivenessSessionContentForMultipart {
...CreateLivenessSessionContent;
}

@doc("Request of liveness with verify session creation.")
model CreateLivenessWithVerifySessionContent {
@doc("The content type for the operation. Always multipart/form-data for this operation.")
Expand All @@ -276,7 +270,7 @@ model CreateLivenessWithVerifySessionContent {

#suppress "@azure-tools/typespec-azure-core/casing-style"
@doc("The parameters for creating session.")
Parameters: CreateLivenessSessionContentForMultipart;
Parameters: CreateLivenessSessionContent;

#suppress "@azure-tools/typespec-azure-core/casing-style"
@doc("The image stream for verify. Content-Disposition header field for this part must have filename.")
Expand Down
6 changes: 3 additions & 3 deletions specification/ai/Face/routes.detection.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ namespace Face;
@summary("Detect human faces in an image, return face rectangles, and optionally with faceIds, landmarks, and attributes.")
@doc("""
> [!IMPORTANT]
> To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/en-us/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/.
> To mitigate potential misuse that can subject people to stereotyping, discrimination, or unfair denial of services, we are retiring Face API attributes that predict emotion, gender, age, smile, facial hair, hair, and makeup. Read more about this decision https://azure.microsoft.com/blog/responsible-ai-investments-and-safeguards-for-facial-recognition/.

*
* No image will be stored. Only the extracted face feature(s) will be stored on server. The faceId is an identifier of the face feature and will be used in \"Identify\", \"Verify\", and \"Find Similar\". The stored face features will expire and be deleted at the time specified by faceIdTimeToLive after the original detection call.
Expand All @@ -24,10 +24,10 @@ namespace Face;
* The minimum detectable face size is 36x36 pixels in an image no larger than 1920x1080 pixels. Images with dimensions higher than 1920x1080 pixels will need a proportionally larger minimum face size.
* Up to 100 faces can be returned for an image. Faces are ranked by face rectangle size from large to small.
* For optimal results when querying \"Identify\", \"Verify\", and \"Find Similar\" ('returnFaceId' is true), please use faces that are: frontal, clear, and with a minimum size of 200x200 pixels (100 pixels between eyes).
* Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-detection-model
* Different 'detectionModel' values can be provided. To use and compare different detection models, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-detection-model
* 'detection_02': Face attributes and landmarks are disabled if you choose this detection model.
* 'detection_03': Face attributes (mask and headPose only) and landmarks are supported if you choose this detection model.
* Different 'recognitionModel' values are provided. If follow-up operations like \"Verify\", \"Identify\", \"Find Similar\" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/how-to/specify-recognition-model.
* Different 'recognitionModel' values are provided. If follow-up operations like \"Verify\", \"Identify\", \"Find Similar\" are needed, please specify the recognition model with 'recognitionModel' parameter. The default value for 'recognitionModel' is 'recognition_01', if latest model needed, please explicitly specify the model you need in this parameter. Once specified, the detected faceIds will be associated with the specified recognition model. More details, please refer to https://learn.microsoft.com/azure/ai-services/computer-vision/how-to/specify-recognition-model.
""")
@returnsDoc("A successful call returns an array of face entries ranked by face rectangle size in descending order. An empty response indicates no faces detected.")
@post
Expand Down
1 change: 1 addition & 0 deletions specification/ai/Face/routes.recognition.tsp
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ interface FaceRecognitionOperations {
@doc(
"""
For each face in the faceIds array, Face Identify will compute similarities between the query face and all the faces in the Person Directory Persons (given by personIds), and return candidate person(s) for that face ranked by similarity confidence.
Passing personIds with an array with one element "*" can perform the operation over entire person directory.
${IdentifyDocumentNote}
> * The Identify operation can only match faces obtained with the same recognition model, that is associated with the query faces.
"""
Expand Down
1 change: 1 addition & 0 deletions specification/ai/Face/tspconfig.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ options:
package-dir: "azure-ai-vision-face"
namespace: com.azure.ai.vision.face
partial-update: true
stream-style-serialization: false
flavor: azure
linter:
extends:
Expand Down
Loading