Skip to main content
Version: 1.3.1

Configuration

Set Modules

Module is an implementation variant of Image API service. For example, face-detector-liveness-estimator has three modules available for selection:

  • liveness-anti-spoofing
  • quality-liveness-anti-spoofing
  • face-detector-liveness-estimator

Modules liveness-anti-spoofing and face-detector-liveness-estimator use different liveness algorithms. In quality-liveness-anti-spoofing module, before calculating the liveliness, the image quality is additionally estimated, while the quality threshold (default value is 30) allows excluding images with insufficient quality from processing.

To change the module, find a certain service config in processing.services in ./cfg/image-api.values.yaml and change the value for module field.

Example: config of quality-assessment-estimator:

quality-assessment-estimator:
…………
module: quality-assessment-estimator
…………

List of available modules for each Image API service:

ServiceModules
face-detector-face-fitter
  • face-detector-face-fitter - standard module
body-detector
  • body-detector - standard module
age-estimator
  • age-estimator - standard module
emotion-estimator
  • emotion-estimator - standard module
gender-estimator
  • gender-estimator - standard module
mask-estimator
  • mask-estimator - standard module
face-detector-liveness-estimator
  • face-detector-liveness-estimator - standard module
  • liveness-anti-spoofing - module with lower speed but higher accuracy in comparison with a standard module.
  • quality-liveness-anti-spoofing - liveness-anti-spoofing module with additional quality check before calculating liveness.
verify-matcher
  • verify-matcher - standard module
face-detector-template-extractor
  • face-detector-template-extractor - standard module
quality-assessment-estimator
  • quality-assessment-estimator - standard module

Set Configuration Objects

Image API services use a set of configuration objects that implement 3DiVi Face SDK functionality:

  • capturer: face detection
  • recognizer: face comparison
  • liveness-estimator: liveness estimation

For example, for the face-detector-liveness-estimator service, there are 2 configuration objects: capturer and liveness-estimator.

You can configure the configuration object in the ./cfg/image-api.values.yaml file in the specific service block in the configs attribute.

The configuration object has 2 fields defined:

  • name: name of Face SDK configuration file.
  • params: parameters to be overridden in this configuration.

Scalability

When the load increases, for stable operation of Image API you can manually scale the deployments described in para. Install Image API to the Cluster.

To scale the installed release, run the command below:

$ kubectl scale deployment <deployment_name> --replicas <count>

where <deployment_name> is a deployment name (for example, face-detector-dep), and <count> is a number of deployment replicas (pods).

To save the scaling state, set the value for replicas key in processing.services in ./cfg/image-api.values.yaml file and restart the deployment using a command below:

$ ./cli.sh image-api install