18 дек. 2023

Geo-Distributed Face Template Storage in Face Recognition API

One of the key differences between the Face Recognition API and SDK is that the API provides geo-distributed storage for face templates. This storage is used to register people in the database and then search for them in photos using this database.

Examples include identifying individuals on your premises, searching for criminals, recognizing people at the checkout, two-factor authentication, and more.

The convenience of the API lies in the fact that this database is already available, eliminating the need to build this logic from scratch. You simply use the method to create a person in the database to populate it, and then use another method to search for these faces in photos.

What Are Face Templates

To compare two individuals, neural networks use what are called face templates. In simple terms, these are a set of numbers that, according to the logic of the neural network, create an image of a person for it.

This is different from a photograph, as the template is closely linked to the neural network's structure. In programming, this is referred to as one-way hashing or lossy data archiving.

You cannot retrieve a photograph from this template, making storing the face template in the cloud extremely secure. It does not violate any personal data requirements.

However, in Luxand's cloud, you can also store photographs for convenience. For example, if you have an internal system where you need to display the face of the recognized person. For this, when creating a person, specify the parameter store=1.

We will upload this face to the CDN, and it will be accessible via a specific URL, which you will receive after uploading the person's image.

How Many Face Templates Can Be Stored for One Person

You can upload as many face templates for one person as you wish. We do not limit you in this regard. The more templates of the same person you upload, the more accurately the system can identify the person in a photograph.

We recommend uploading 3 photographs of one person. You can do this using a single call to enroll a person method or first enroll a person with one photograph and then add more photos using the face-adding method.


Performance is directly linked to the number of people's faces in your database because our system compares photos with all templates. Therefore, we recommend keeping your database up-to-date.

We parallelize computations to speed up recognition even with a large number of uploaded faces, but we cannot defy the laws of physics :)

People Collections

To speed up recognition or narrow down the search to specific groups, you can categorize people when adding them to the database. For your convenience, we have developed a special method for creating these groups. But you can create collections simply by listing them separated by commas in the collections variable.

Each person in the database can be in an unlimited number of collections, just as the number of collections in the database is also unlimited.

Storage Limits and Exceeding Them

We limit the number of faces according to the tariff. This is necessary to ensure maximum performance for all users.

Don't worry about this limit; you don't need to monitor it regularly. If you exceed it, nothing terrible will happen. We use soft limits, meaning we won't bother you with a slight excess. If you exceed by more than 20%, we will send you a notification and suggest either reducing the number of faces in storage or moving to the next tariff plan.

We can also simply deduct the excess number of faces if you do not want to switch to the next tariff. For this, contact us at info@luxand.cloud.

The Essence of Geo-Distribution

Our storage is geographically distributed. This means that creating a face template in the USA, we automatically synchronize it with all our locations worldwide so that your applications and services can operate as quickly as possible globally.

This is especially convenient if your clients are geographically distributed or use remote access. If you chose the option of storing photographs, they would be placed on a CDN, which is also geographically distributed and will load equally quickly from any point in the world.


The face template storage in the Face Recognition API is a convenient feature for quickly launching your application or service that uses face search and recognition functions.