Face - Find Similar Faces的示例代码不起作用 [英] sample code for Face - Find Similar Faces does not work
问题描述
https://dev.projectoxford.ai/docs/services/54d85c1d5eefd00dc474a0ef/operations/5519015d3d8a4b22aca91579
javascript代码不起作用
var params = {
//指定您的订阅密钥
'subscription-key':'asdf',
//根据需要指定可选参数的值
headers:{'Content-Type':" application / json" }
};
var jsonRequestBody = {
faceId:faceId,
faceIds:faceIds
};
var url ='https://api.projectoxford.ai/face/v0/findsimilars?'+ $ .param(params);
$ http.post(url,jsonRequestBody,{headers:{'Content-Type':'application / json'}})
我正在尝试确定捕获的当前faceId是否与PersonX.faceIds中的faceId匹配,因此我从该人那里获得了face id并且它失败了。
对象{code:" FaceNotFound",message:" Face'0979a5a1-2e98-4db8-85a7-afd5a09c02de'未找到。"}
它看起来像person faceId中的FaceId超过24小时,因此无法进行搜索。
此时只需使用faceId函数?
Face - Identification
Ken
https://dev.projectoxford.ai/docs/services/54d85c1d5eefd00dc474a0ef/operations/5519015d3d8a4b22aca91579 The javascript code doesn't work I'm trying to determine if the current faceId captured matches the faceIds from a PersonX.faceIds, so I get the array of face ids from that person and it fails. Object {code: "FaceNotFound", message: "Face '0979a5a1-2e98-4db8-85a7-afd5a09c02de' is not found."} It looks like the FaceIds in the person faceId are older than 24 hours and thus are not available for searching. At this point just use the faceId function? Ken 这篇关于Face - Find Similar Faces的示例代码不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
var params = {
// Specify your subscription key
'subscription-key': 'asdf',
//Specify values for optional parameters, as needed
headers: { 'Content-Type': "application/json" }
};
var jsonRequestBody = {
faceId: faceId,
faceIds: faceIds
};
var url = 'https://api.projectoxford.ai/face/v0/findsimilars?' + $.param(params);
$http.post(url, jsonRequestBody, { headers: { 'Content-Type': 'application/json' } })
Face - Identification
yes, faceid will expire 24 hours after detection.So if you use faceid that not found, it should be detected again.