方法 identify() 中的 Microsoft Face API 错误
Microsoft Face API error in method identify()
我在 JavaScript 中为 Microsoft Face API 使用牛津项目,当我使用函数 "identify" 时,我收到 "Invalid request body."
client.face.identify({
faces: arrayFaceId,
personGroupId: "groupId",
maxNumOfCandidatesReturned: 1,
confidenceThreshold: 0.8
}).then(function(response){
console.log('Response ' + JSON.stringify(response.personId));
}, function(error){
console.log("Error2"+JSON.stringify(error));
});
有人知道我该如何解决吗?
有问题的 API 采用常规参数,而不是您指定的对象。所以:
client.face.identify(arrayFaceId, "groupId", 1, 0.8)
.then(function(response) {
console.log('Response ' + JSON.stringify(response.personId));
})
.catch(function(error) {
console.log("Error " + JSON.stringify(error));
});
我在 JavaScript 中为 Microsoft Face API 使用牛津项目,当我使用函数 "identify" 时,我收到 "Invalid request body."
client.face.identify({
faces: arrayFaceId,
personGroupId: "groupId",
maxNumOfCandidatesReturned: 1,
confidenceThreshold: 0.8
}).then(function(response){
console.log('Response ' + JSON.stringify(response.personId));
}, function(error){
console.log("Error2"+JSON.stringify(error));
});
有人知道我该如何解决吗?
有问题的 API 采用常规参数,而不是您指定的对象。所以:
client.face.identify(arrayFaceId, "groupId", 1, 0.8)
.then(function(response) {
console.log('Response ' + JSON.stringify(response.personId));
})
.catch(function(error) {
console.log("Error " + JSON.stringify(error));
});