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:
Service | Modules |
face-detector-face-fitter |
|
body-detector |
|
age-estimator |
|
emotion-estimator |
|
gender-estimator |
|
mask-estimator |
|
face-detector-liveness-estimator |
|
verify-matcher |
|
face-detector-template-extractor |
|
quality-assessment-estimator |
|
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