本文介绍了人 - 更新人员代码:“FaceNotFound”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

尝试更新人员userData值。 

trying to update a persons userData value. 

但已经存在超过24小时的faceID。无法为PATCH重新更新。 

But the faceIDs that already there for more than 24 hrs. can not be re-updated for the PATCH. 

对象{code:" FaceNotFound",message:" Face'342323a6-9b3d-4828-a183-390c20cc56c7'不是找到。"}

Object {code: "FaceNotFound", message: "Face '342323a6-9b3d-4828-a183-390c20cc56c7' is not found."}

显然,Face对象仍然存在于与Person连接的地方。 

Obviously the Face object is still there somewhere connected to the Person. 

您如何期待人们更新a PERSON如果每次都要为数组中的所有元素重新提交facedetect。加上每分钟限制20次,所以如果你有一个人的32个面孔,那么将
重新更新faceid进入检测需要等待一分钟。 

How do you expect folks to update a PERSON if each and everytime, they have to re-submit the facedetect for all the elements in the array. plus there's a 20 per minute limit, so if you have 32 faces for a person, it will take waiting for a minute for the reupdating the faceids into the detection. 

面已经注册锚定到Person faceId []数组。  我真正想做的就是更新userData属性,为什么我必须包含faceIds。 

The faces are already registered anchored to the Person faceId[] array.   All I really want to do is update the userData attribute anyway, why do I have to include the faceIds. 

这使复制和udpating变得难以置信。 

This makes copying and udpating incredible difficult. 

是否有机会修复此问题?  或者我做错了什么: 

Any chance of getting this fixed?  Or am I doing something wrong: 

我尝试删除 e   faceIds:faceIds,来自JSON主体的参数,它使所有用户的faceID数组都无效。   Argh。 

I tried removing the faceIds: faceIds, parameter from the JSON body and it nulled all the user's array of faceIDs.  Argh. 

    $scope.updatePerson = function () {
        var userpersonId = $scope.user.personId;
        var faceIds = $scope.user.faceIds;
        var name = $scope.user.name;
        var userData = $scope.user.userData;
        var params = {
            // Specify your subscription key
            'subscription-key': $scope.subscriptionKey 
        };
        var jsonRequestBody = {
            name: name,
            //faceIds: faceIds,
            userData: userData
        };
        console.log(jsonRequestBody);
        var url = "https://api.projectoxford.ai/face/v0/persongroups/pgid/persons/" + userpersonId + "?" + $.param(params);
        console.log(url);
        $http.patch(url, jsonRequestBody, { headers: { 'Content-Type': 'application/json' } }).success(function (response) {

            console.log(response);
            $scope.imageUpdateChange = true;
            return response;
        }).error(function (error) {
            console.log(error);
            $scope.helpText = error;
            return error;
        });
    };

Ken

推荐答案

var jsonRequestBody = {

           姓名
名称

            
faceIds:'',

            userData
userData

       
};

var jsonRequestBody = {
            name
: name,
           
faceIds: '',
            userData
: userData
       
};


这篇关于人 - 更新人员代码:“FaceNotFound”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-16 14:15