Architecture

Though you mostly interact with FindFace Multi through its web interface, be sure to take a minute to learn the FindFace Multi architecture. This knowledge is essential for the FindFace Multi deployment, integration, maintenance, and troubleshooting.

In this chapter:

Recognition Objects and Recognition Process

FindFace Multi can recognize the following objects and their features:

  • human faces

  • human bodies (silhouettes)

  • cars

Note

The face recognition functionality is enabled by default. Make changes to configuration files to enable the body and car recognition.

FindFace Multi detects an object in the photo or video and prepares its image through normalization. The normalized image is then used for extracting the object’s feature vector (an n-dimensional vector of numerical features that represent the object). Object feature vectors are stored in the database and further used for verification and identification purposes.

Architectural Elements

FindFace Multi consists of the following fundamental architectural elements:

  • FindFace core, a cutting-edge AI-based recognition technology that can be used as a separate product FindFace Enterprise Server.

  • FindFace Multi, which is a turnkey application module for FindFace Enterprise Server.

FindFace Core

The FindFace core includes the following components:

Component

Ports in use

Description

Vendor

findface-extraction-api

18666

Service that uses neural networks to detect an object in an image and extract its feature vector. It also recognizes object attributes (for example, gender, age, emotions, beard, glasses, face mask - for face objects). CPU- or GPU-acceleration.

NtechLab own deployment

findface-sf-api

18411

Service that implements the internal HTTP API for object detection and recognition.

findface-tarantool-server

32001, shard ports (default 330xx, 81xx)

Service that provides interaction between the findface-sf-api service and the feature vector database (the Tarantool-powered database that stores object feature vectors.

findface-upload

3333

NginX-based web server used as a storage for original images, thumbnails and normalized object images.

findface-facerouter

18820

Service used to define processing directives for detected objects. In FindFace Multi, its functions are performed by findface-security (see FindFace Multi Application Module). If necessary, you can still deploy and enable this component for integration purposes (see findface-facerouter and Custom Plugins).

findface-video-manager

18810, 18811

Service, part of the video object detection module, that is used for managing the video object detection functionality, configuring the video object detector settings and specifying the list of to-be-processed video streams.

findface-video-worker

18999

Service, part of the video object detection module, that recognizes an object in the video and posts its normalized image, full frame and metadata (such as detection time) to the findface-facerouter service for further processing according to given directives. Provides face liveness detection if enabled. CPU- or GPU-acceleration.

findface-ntls

443 (TCP), 3133, 3185

License server which interfaces with the NtechLab Global License Server or a USB dongle to verify the license of your FindFace Multi instance.

Tarantool

Shard ports (default 330xx, 81xx)

Third-party software which implements the feature vector database that stores extracted object feature vectors and identification events. The system data, dossiers, user accounts, and camera settings are stored in PostgreSQL (part of the FindFace Multi application module).

Tarantool

etcd

2379

Third-party software that implements a distributed key-value store for findface-video-manager. Used as a coordination service in the distributed system, providing the video object detector with fault tolerance.

etcd

NginX

80; SSL: 8002, 8003, 443, 80

Third-party software which implements the system web interfaces.

nginx

memcached

11211

Third-party software which implements a distributed memory caching system. Used by findface-extraction-api as a temporary storage for extracted object feature vectors before they are written to the feature vector database powered by Tarantool.

memcached

FindFace Multi Application Module

The FindFace Multi application module includes the following components:

Component

Ports in use

Description

Vendor

findface-security

Configurable

Component that serves as a gateway to the FindFace core. Provides interaction between the FindFace Core and the web interface, the system functioning as a whole, HTTP and web socket, object monitoring, event notifications, episodes, webhooks, and counters. Includes the following internal services: NTLS checker, Counter manager, Webhooks manager, Persons clusterizator, Event episodes manager, and Video archive queue manager. The last four can be enabled and disabled via the /etc/findface-security/config.py configuration file.

NtechLab own deployment

findface-security-ui

Configurable

Main web interface that is used to interact with FindFace Multi. Allows you to work with object identification events, search for objects, manage cameras, users, dossiers, and watch lists, collect real-time statistics, and many more.

findface-counter

18300

Service used for event deduplication.

findface-liveness-api

18301

Besides the embedded functionality provided by findface-video-worker, face liveness detection can also be harnessed as a standalone service findface-liveness-api. The service takes a specific number of frames from a video fragment and returns the best quality face, and decimal liveness result averaged across the taken frames. The service is also used for authentication based on facial recognition. See Liveness Detection as Standalone Service and Authentication and Session Monitoring.

PostgreSQL

5432

Third-party software which implements the main system database that stores detailed and categorized dossiers on particular objects (faces, bodies, cars), and data for internal use such as user accounts and camera settings. The object feature vectors and object identification events are stored in Tarantool (part of the FindFace core).

PostgreSQL

Pgbouncer

5439

Third-party software, a lightweight connection pooler for PostgreSQL. Optional, used to increase the database performance under high load.

PgBouncer

Redis

6379

Third-party software which implements a message broker inside findface-security.

Redis

Django

5439

Third-party software which implements a web framework for the FindFace Multi web interface.

Django

Single- and Multi-Host Deployment

You can deploy FindFace Multi on a single host or in a cluster environment. If you opt for the latter, we offer you one of the following deployment schemes:

  • Deploy FindFace Multi standalone and distribute additional findface-video-worker components across multiple hosts.

  • Distribute the FindFace Multi components across multiple hosts. If necessary, set up load balancing.

See Guide to Typical Cluster Installation for details.

CPU- and GPU-acceleration

The findface-extraction-api and findface-video-worker services can be either CPU- or GPU-based. During installation from the developer-friendly installer, you will have an opportunity to choose the acceleration type you need.

If you opt to install FindFace Multi from the repository package, deploy the findface-extraction-api and findface-video-worker-cpu packages on a CPU-based server, and the findface-extraction-api-gpu and/or findface-video-worker-gpu packages on a GPU-based server.

Important

Refer to Requirements when choosing hardware configuration.

Important

If the resolution of a camera(s) in use is more than 1280x720px, it is strongly recommended to use the GPU-accelerated package findface-video-worker-gpu.

Note

The liveness detector is much slower on CPU than on GPU.