次の方法で共有


Person Group Operations - Create Person Group

指定した personGroupId、名前、ユーザー指定の userData、recognitionModel を使用して、新しい Person Group をCreateします。
人物グループは、顔認識機能を含む、アップロードされた人物データを保持するコンテナーです。

作成後、"Create Person Group Person" を使用してグループにユーザーを追加し、"Train Person Group" を呼び出して、このグループを "ユーザー グループから識別" する準備をします。

イメージは保存されません。 "Delete Person Group Person" または "Delete Person Group" が呼び出されるまで、ユーザーの抽出された顔機能と userData のみがサーバーに格納されます。

このユーザー グループに関連付けるには、'recognitionModel' を指定する必要があります。 'recognitionModel' の既定値は 'recognition_01' です。最新のモデルが必要な場合は、このパラメーターで必要なモデルを明示的に指定してください。 既存の人物グループに追加された新しい顔は、コレクションに既に関連付けられている認識モデルを使用します。 人物グループ内の既存の顔の特徴を、別のバージョンの認識モデルによって抽出された特徴に更新することはできません。

注意

    • Free レベルのサブスクリプション クォータ: 1,000 人グループ。 それぞれ最大 1,000 人を収容できます。
    • S0 レベルのサブスクリプション クォータ: 1,000,000 人グループ。 それぞれが最大 10,000 人を収容します。
    • 大規模な顔識別の問題に対処するには、Large Person Group の使用を検討してください。
PUT {endpoint}/face/{apiVersion}/persongroups/{personGroupId}

URI パラメーター

名前 / 必須 説明
apiVersion
path True

string

API バージョン

endpoint
path True

string

uri

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

personGroupId
path True

string

コンテナーの ID。

Regex pattern: ^[a-z0-9-_]+$

要求本文

名前 必須 説明
name True

string

ユーザー定義の名前。最大長は 128 です。

recognitionModel

RecognitionModel

この顔リストに関連付けられている 'recognitionModel'。 サポートされている 'recognitionModel' 値には、'recognition_01'、'recognition_02、'recognition_03'、および 'recognition_04' が含まれます。 既定値は 'recognition_01' です。 'recognition_03' と比較してマスクを装着している顔の精度が向上し、"recognition_01" や "recognition_02" と比較して全体的な精度が向上するため、'recognition_04' をお勧めします。

userData

string

省略可能なユーザー定義データ。 長さは 16,000 を超えないようにしてください。

応答

名前 説明
200 OK

要求は成功しました。

Other Status Codes

FaceErrorResponse

予期しないエラー応答。

Headers

x-ms-error-code: string

セキュリティ

Ocp-Apim-Subscription-Key

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

Type: apiKey
In: header

AADToken

Azure Active Directory OAuth2 フロー

Type: oauth2
Flow: accessCode
Authorization URL: https://api.example.com/oauth2/authorize
Token URL: https://api.example.com/oauth2/token

Scopes

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

Create PersonGroup

Sample Request

PUT {endpoint}/face/v1.1-preview.1/persongroups/your_person_group_id

{
  "name": "your_person_group_name",
  "userData": "your_user_data",
  "recognitionModel": "recognition_01"
}

Sample Response

定義

名前 説明
FaceError

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

FaceErrorResponse

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

FaceError

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

名前 説明
code

string

サーバー定義のエラー コードのセットの 1 つ。

message

string

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

FaceErrorResponse

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

名前 説明
error

FaceError

error オブジェクト。