Skip to main content
Version: 2.4.0 (latest)

Basic settings

The values of all Image API configuration parameters listed in this section are configured in the configuration file ./cfg/image-api.values.yaml.

ATTENTION!

After editing the file, save it and update Image API in the cluster using the command:

./cli.sh image-api install

Settings

Field nameFunctions
image_pull_policyThe parameter affects pulling (downloading) container images from registry to deploy an Image API deployment instance. The following field values are available:
  • Always – kubelet (node agent in Kubernetes) pulls an image from registry.
  • Never – image pulling from registry is not applicable. If the image is already present locally, kubelet attempts to launch a container, otherwise, startup fails.
  • IfNotPresent – image is pulled only if it isn’t present locally.
processing.services[*].configs[*].use_avx2Using the AVX2 instructions allows to speed up the recognizers.
processing.services[*].configs[*].use_cudaThe field value indicates the graphics card usage by the service. This option is available for face-detector-template-extractor.
processing.services.[*].replicasValue of service replicas
processing.services[*].configs[*].downscale_ rawsamples_to_preferred_sizeWhen field is enabled, each sample is downscaled to the suitable size to reduce memory consumption. However, the system performance decreases. It is recommended to leave this field disabled.
processing.enable_ingressThis parameter enables proxying to image-api services via ingress.
processing.enable_resource_managementThis parameter enables the use of pod resource management in the cluster.
processing.enable_hpaThis parameter enables Horizontal Pod Autoscaler for deployments. Needs metric-server to be installed.
processing.enable_node_selectorThis parameter activates the use of designated nodeSelectors in pods. The labels must be assigned to cluster nodes using the command:
kubectl label nodes <node_name> type=<type>
  • "type": "processing" – node for calculations
  • "type": "generic" – generic node

Module Selection

Module is an implementation variant of Image API service. Some services will have multiple modules available for selection in the future.

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
verify-matcher
  • verify-matcher – standard module
face-detector-template-extractor
  • face-detector-template-extractor – standard module
quality-assessment-estimator
  • quality-assessment-estimator – standard module
template-extractor
  • template-extractor – standard module
liveness-estimator
  • spoofing-estimator – liveness estimation module used to accurately detect spoofing attacks
  • liveness-estimator – standard module

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-face-fitter-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