Skip to content

Liveness check result

The result of the liveness check consists of two parts, a liveness result and a quality result:

facesdk::PipelineResult result = pipeline->checkLiveness(image);

std::cout << result.liveness_result << std::endl;
std::cout << result.quality_result << std::endl;
result = pipeline.checkLiveness(image)

print(result.liveness_result)
print(result.quality_result)
PipelineResult result = pipeline.checkLiveness(image);

System.out.println(result.getLivenessResult());
System.out.println(result.getQualityResult());
PipelineResult result = pipeline.CheckLiveness(image);

Console.WriteLine(result.LivenessResult);
Console.WriteLine(result.QualityResult);

The liveness result contains the probability field which is the main factor to decide if the image is live or spoofed. It ranges from 0 (spoofed) to 1 (live). The threshold for the image to be considered live is 0.5.

The score in the liveness result is a raw liveness score, provided mostly for calibration purposes. The value is unbounded, the bigger the score the higher the image's liveness.

Additionally we provide the quality result that helps to filter low-accuracy results caused by the low image's quality. The "quality" in this context is not about technical or aesthetic aspects of the image, but rather about how "appropriate" the image is for the liveness check. If the quality score is lower than 0.5 the image should generally be rejected. The score ranges from 0 (bad) to 1 (good).

The quality result also has the class_ field, which is the class of the image. 0 means a bad image and 1 means a good one. It is an obsolete field and we recommend using the score field and comparing it with the threshold.