This commit is contained in:
mazengfei
2026-01-21 15:53:53 +08:00
parent 176c555860
commit aad4f299aa
3 changed files with 62 additions and 45 deletions
@@ -652,9 +652,16 @@ public class FaceHelper implements FaceListener {
});
}
private int failCount = 0;
private void searchFace(final FaceFeature faceFeature, final Integer trackId) {
CompareResult compareResult = FaceServer.getInstance().searchFaceFeature(faceFeature, frEngine);
if (compareResult == null || compareResult.getFaceEntity() == null) {
failCount++;
Log.d(TAG, "collectFace,searchFace查询失败"+failCount+"");
if (failCount >= 2) {
recognizeCallback.onRecognized(null, LivenessInfo.UNKNOWN, false);
return;
}
retryRecognizeDelayed(trackId);
return;
}
@@ -505,7 +505,7 @@ public class RecognizeViewModel extends ViewModel implements RecognizeCallback {
}
}
} else {
// recognizeUserId.postValue(new CompareResult(null, 0f));
recognizeUserId.postValue(new CompareResult(null, -1f));
}
});
}