Person Group Operations - Train Person Group
提交人員群組訓練工作。 訓練是一個重要步驟,只有已訓練的人員群組可供「從人員群組識別」使用。
定型工作是異步工作。 訓練時間取決於人員項目數目,以及其臉部在人員群組中。 這可能需要數秒到幾分鐘的時間。 若要檢查訓練狀態,請使用「取得人員群組訓練狀態」。
POST {endpoint}/face/{apiVersion}/persongroups/{personGroupId}/train
URI 參數
名稱 | 位於 | 必要 | 類型 | Description |
---|---|---|---|---|
api
|
path | True |
string |
API 版本 |
endpoint
|
path | True |
string uri |
支持的認知服務端點 (通訊協定和主機名,例如:https://{resource-name}.cognitiveservices.azure.com) 。 |
person
|
path | True |
string |
容器的標識碼。 Regex pattern: |
回應
名稱 | 類型 | Description |
---|---|---|
202 Accepted |
成功的呼叫會傳回空的回應本文。 Headers operation-Location: string |
|
Other Status Codes |
未預期的錯誤回應。 Headers x-ms-error-code: string |
安全性
Ocp-Apim-Subscription-Key
Azure AI 臉部訂用帳戶的秘密密鑰。
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
名稱 | Description |
---|---|
https://cognitiveservices.azure.com/.default |
範例
Train PersonGroup
Sample Request
POST {endpoint}/face/v1.1-preview.1/persongroups/your_person_group_id/train
Sample Response
operation-Location: https://contoso.com/operationstatus
定義
名稱 | Description |
---|---|
Face |
錯誤物件。 如需臉部服務所傳回錯誤碼和訊息的完整詳細數據,請參閱下列連結: https://aka.ms/face-error-codes-and-messages。 |
Face |
包含錯誤詳細數據的回應。 |
FaceError
錯誤物件。 如需臉部服務所傳回錯誤碼和訊息的完整詳細數據,請參閱下列連結: https://aka.ms/face-error-codes-and-messages。
名稱 | 類型 | Description |
---|---|---|
code |
string |
其中一組伺服器定義的錯誤碼。 |
message |
string |
人類看得懂的錯誤表示法。 |
FaceErrorResponse
包含錯誤詳細數據的回應。
名稱 | 類型 | Description |
---|---|---|
error |
錯誤物件。 |