创建 FaceListId FaceAPI Microsoft Azure
Create FaceListId FaceAPI Microsoft Azure
我在用什么
FaceAPI,AngularFire2,FireStore,Angular v6
我想做什么
我想在 Firebase 存储中查找与照片相似的面孔,我有要比较的下载网址。
问题
我不知道如何创建 FaceListId,我不了解文档。
观察结果
一开始我还不知道。我正在使用 FaceAPI - Detect,但我需要 Find Similar。
根据Create FaceListId RestAPI,我们可以使用它来创建一个空的人脸列表,其中包含用户指定的人脸列表 ID、名称和可选的用户数据。
put https://[location].api.cognitive.microsoft.com/face/v1.0/facelists/{faceListId}
如果您想创建一个面孔列表,您可以使用 API 文档进行测试。
PUT https://westus.api.cognitive.microsoft.com/face/v1.0/facelists/tomtest HTTP/1.1
Host: westus.api.cognitive.microsoft.com
Content-Type: application/json
Ocp-Apim-Subscription-Key: xxxx
{
"name": "tomtestlist",
"userData": "it is optional"
}
测试结果:
如果您需要查找相似,您可以按照以下步骤操作:
1.The create facelistid RestAPI 只是创建空列表。我们还需要add face进入facelist。
2.Usedetect api获取faceid
3.use 查找相似API
https://[location].api.cognitive.microsoft.com/face/v1.0/findsimilars
{
"faceId": "faceid get from detect api",
"largeFaceListId": "tomtest",
"maxNumOfCandidatesReturned": 10,
"mode": "matchPerson"
}
注意:人脸列表为人脸列表,最多1000张人脸,人脸数量较大时请考虑LargeFaceList。它最多可以支持 1,000,000 张人脸。
我在用什么
FaceAPI,AngularFire2,FireStore,Angular v6
我想做什么
我想在 Firebase 存储中查找与照片相似的面孔,我有要比较的下载网址。
问题
我不知道如何创建 FaceListId,我不了解文档。
观察结果
一开始我还不知道。我正在使用 FaceAPI - Detect,但我需要 Find Similar。
根据Create FaceListId RestAPI,我们可以使用它来创建一个空的人脸列表,其中包含用户指定的人脸列表 ID、名称和可选的用户数据。
put https://[location].api.cognitive.microsoft.com/face/v1.0/facelists/{faceListId}
如果您想创建一个面孔列表,您可以使用 API 文档进行测试。
PUT https://westus.api.cognitive.microsoft.com/face/v1.0/facelists/tomtest HTTP/1.1
Host: westus.api.cognitive.microsoft.com
Content-Type: application/json
Ocp-Apim-Subscription-Key: xxxx
{
"name": "tomtestlist",
"userData": "it is optional"
}
测试结果:
如果您需要查找相似,您可以按照以下步骤操作:
1.The create facelistid RestAPI 只是创建空列表。我们还需要add face进入facelist。
2.Usedetect api获取faceid
3.use 查找相似API
https://[location].api.cognitive.microsoft.com/face/v1.0/findsimilars
{
"faceId": "faceid get from detect api",
"largeFaceListId": "tomtest",
"maxNumOfCandidatesReturned": 10,
"mode": "matchPerson"
}
注意:人脸列表为人脸列表,最多1000张人脸,人脸数量较大时请考虑LargeFaceList。它最多可以支持 1,000,000 张人脸。