Face List Operations - Add Large Face List Face

指定した大きな顔リスト (最大 1,000,000 面) に面を追加します。
複数の顔を含む画像を処理するために、入力面を targetFace 四角形を持つ画像として指定できます。 追加された顔を表す persistedFaceId を返します。 イメージは保存されません。 抽出された顔機能のみが、"大きな顔リストの顔の削除" または "大きな顔リストの削除" が呼び出されるまで、サーバーに格納されます。

persistedFaceId は、"Detect" によって生成された faceId とは異なっています。

    • 顔の画質が高いほど、認識精度が向上します。 正面、透明、顔のサイズは 200 x 200 ピクセル (目の間に 100 ピクセル) 以上の高品質の顔を検討してください。
    • 各人のエントリは、最大 248 の顔を保持できます。
    • JPEG、PNG、GIF (最初のフレーム)、BMP 形式がサポートされています。 許可されるイメージ ファイルのサイズは 1 KB から 6 MB です。
    • "targetFace" 四角形には、1 つの面が含まれている必要があります。 ゼロまたは複数の顔はエラーと見なされます。 指定された "targetFace" 四角形が "Detect" から返されない場合、顔を検出して正常に追加する保証はありません。
    • 検出可能な顔サイズ (36 x 36 ~ 4096 x 4096 ピクセル)、大きな頭部姿勢、または大きなオクルージョンでは、エラーが発生します。
    • 検出可能な顔の最小サイズは、1920 x 1080 ピクセル以下の画像では 36 x 36 ピクセルです。 サイズが 1920 x 1080 ピクセルを超える画像では、顔の最小サイズが比例して大きくなる必要があります。
    • 異なる 'detectionModel' 値を指定できます。 さまざまな検出モデルを使用して比較するには、https://video2.skills-academy.com/azure/ai-services/computer-vision/how-to/specify-detection-model を参照してください

手記

    • Free レベルのサブスクリプション クォータ: Large Face List あたり 1,000 顔。
    • S0 レベルのサブスクリプション クォータ: Large Face List あたり 1,000,000 顔。
POST {endpoint}/face/{apiVersion}/largefacelists/{largeFaceListId}/persistedfaces
POST {endpoint}/face/{apiVersion}/largefacelists/{largeFaceListId}/persistedfaces?_overload=addLargeFaceListFace&targetFace={targetFace}&detectionModel={detectionModel}&userData={userData}

URI パラメーター

名前 / 必須 説明
apiVersion
path True

string

API バージョン

endpoint
path True

string

uri

サポートされている Cognitive Services エンドポイント (プロトコルとホスト名。例: https://{resource-name}.cognitiveservices.azure.com)。

largeFaceListId
path True

string

有効な文字は小文字、数字、'-' または '_' の文字で、最大長は 64 です。

正規表現パターン: ^[a-z0-9-_]+$

detectionModel
query

DetectionModel

検出された faceId に関連付けられている 'detectionModel' です。 サポートされている 'detectionModel' 値には、'detection_01'、'detection_02'、'detection_03' があります。 既定値は 'detection_01' です。

targetFace
query

integer[]

"targetFace=left,top,width,height" の形式で、ユーザーに追加する対象の顔を指定する顔の四角形。

userData
query

string

顔にアタッチされたユーザー指定のデータ。 サイズ制限は 1K です。

要求本文

Media Types: "application/octet-stream"

名前 説明
imageContent

string

分析する画像

応答

名前 説明
200 OK

AddFaceResult

呼び出しが成功すると、新しい persistedFaceId が返されます。

Other Status Codes

FaceErrorResponse

予期しないエラー応答。

ヘッダー

x-ms-error-code: string

セキュリティ

Ocp-Apim-Subscription-Key

Azure AI Face サブスクリプションの秘密鍵。

型: apiKey
/: header

AADToken

Azure Active Directory OAuth2 フロー

型: oauth2
フロー: accessCode
Authorization URL (承認 URL): https://api.example.com/oauth2/authorize
Token URL (トークン URL): https://api.example.com/oauth2/token

スコープ

名前 説明
https://cognitiveservices.azure.com/.default

Add Face to LargeFaceList

要求のサンプル

POST {endpoint}/face/v1.2-preview.1/largefacelists/your_large_face_list_id/persistedfaces?_overload=addLargeFaceListFace&targetFace=10,10,100,100&detectionModel=detection_01&userData=your_user_data

"<your-image-bytes-here>"

応答のサンプル

{
  "persistedFaceId": "43897a75-8d6f-42cf-885e-74832febb055"
}

定義

名前 説明
AddFaceResult

顔を追加するための応答本文。

DetectionModel

検出された faceId に関連付けられている 'detectionModel' です。 サポートされている 'detectionModel' 値には、'detection_01'、'detection_02'、'detection_03' があります。 既定値は 'detection_01' です。

FaceError

エラー オブジェクト。 Face サービスによって返されるエラー コードとメッセージの詳細については、次のリンクを参照してください: https://aka.ms/face-error-codes-and-messages

FaceErrorResponse

エラーの詳細を含む応答。

AddFaceResult

顔を追加するための応答本文。

名前 説明
persistedFaceId

string

追加された顔の永続化された顔 ID。これは永続化され、期限切れになりません。 "Detect" で作成され、検出呼び出しの後 24 時間以内に期限切れになる faceId とは異なります。

DetectionModel

検出された faceId に関連付けられている 'detectionModel' です。 サポートされている 'detectionModel' 値には、'detection_01'、'detection_02'、'detection_03' があります。 既定値は 'detection_01' です。

名前 説明
detection_01

string

既定の検出モデル。 正面近くの顔検出にお勧めします。 非常に大きな角度 (頭部姿勢) の顔、隠れた顔、または間違った画像の向きのシナリオでは、そのような場合は顔が検出されない可能性があります。

detection_02

string

2019 年 5 月にリリースされた検出モデルで、特に小さい顔、側面、ぼやけた顔の精度が向上しました。

detection_03

string

2021 年 2 月にリリースされた検出モデルで、特に小さい顔の精度が向上しました。

FaceError

エラー オブジェクト。 Face サービスによって返されるエラー コードとメッセージの詳細については、次のリンクを参照してください: https://aka.ms/face-error-codes-and-messages

名前 説明
code

string

サーバー定義の一連のエラー コードの 1 つ。

message

string

エラーの人間が判読できる表現。

FaceErrorResponse

エラーの詳細を含む応答。

名前 説明
error

FaceError

エラー オブジェクト。