0

我正在使用 ms github 项目:Facial-Recognition-Door Facial-Recognition-Door

private async Task<bool> TrainingWhitelistAsync()
    {
        bool isSuccess = true;

        // Train whitelist after add all person
        Debug.WriteLine("Start training whitelist: " + WhitelistId);
        await _faceApiClient.TrainPersonGroupAsync(WhitelistId);

        TrainingStatus status;


        while(true)
        {
            status = await _faceApiClient.GetPersonGroupTrainingStatusAsync(WhitelistId);

            // wait for training to complete
            if (status.Status != Status.Running)
            {
                Debug.WriteLine("GetPersonGroupTrainingStatusAsync stopped running:" + status.Message);
                if (status.Status == Status.Failed)
                {
                    isSuccess = false;
                }
                break;
            }

            await Task.Delay(1000);
            Debug.WriteLine("GetPersonGroupTrainingStatusAsync still running:" + status.Message);
        }

        Debug.WriteLine("GetPersonGroupTrainingStatusAsync end result: " + isSuccess);
        return isSuccess;
    }

每次我跑到 status = await _faceApiClient.GetPersonGroupTrainingStatusAsync(WhitelistId);

它返回我失败,并说 GetPersonGroupTrainingStatusAsync 停止运行:组 f473519e-452b-4a65-8e11-85ccdb02063e 中没有人的持久面孔。

有什么问题还是我使用的是免费密钥? 我的关键截图

谁能帮我?

4

0 回答 0