Skip to content

Face analysis

There are two parameters that can affect the face analysis result: the domain and tolerance.

The domain defines a subset of characteristics that the face analysis should be sensitive to. There are two available domains: GENERAL, suitable for most cases, and DESKTOP, which is calibrated for images taken via a desktop web-camera. If the domain is not explicitly set, a set of heuristics is used to select the appropriate one.

The tolerance defines how strict the face analysis should be, which in return affects APCER / BPCER balance. There are three available options:

  • REGULAR targets low APCER. Used by default.
  • SOFT achieves lower BPCER while still having acceptable APCER.
  • HARDENED targets extra low APCER with higher BPCER.

The domain or tolerance can be selected via the blueprint, before you create the face analyzer:

idliveface::Blueprint blueprint(...);

blueprint.SetDomain(idliveface::Domain::kDesktop);
blueprint.SetTolerance(idliveface::Tolerance::kSoft);

idliveface::FaceAnalyzer analyzer = blueprint.CreateFaceAnalyzer();
blueprint = idliveface.Blueprint(...)

blueprint.set_domain(idliveface.Domain.DESKTOP)
blueprint.set_tolerance(idliveface.Tolerance.SOFT)

analyzer = blueprint.create_face_analyzer()
Blueprint blueprint = new Blueprint(...);

blueprint.setDomain(Domain.DESKTOP);
blueprint.setTolerance(Tolerance.SOFT);

FaceAnalyzer analyzer = blueprint.createFaceAnalyzer();

You can also specify the required domain or tolerance for a single image only:

idliveface::FaceAnalysisParameters parameters;
parameters.domain = idliveface::Domain::kGeneral;
parameters.tolerance = idliveface::Tolerance::kHardened;

idliveface::FaceAnalysisResult result = analyzer.Analyze(image, parameters);
result = analyzer.analyze(image,
                          domain=idliveface.Domain.GENERAL,
                          tolerance=idliveface.Tolerance.HARDENED)
FaceAnalysisResult result = analyzer.analyze(image,
        new FaceAnalysisParameters()
                .setDomain(Domain.GENERAL)
                .setTolerance(Tolerance.HARDENED));