Skip to main content
Version: 3.15.0

Performance Parameters

List of abbreviations:

  • FAR (false accept rate) – the probability that the system incorrectly accepts a non-authorized person.
  • TAR (true accept rate) – the probability that the system correctly accepts an authorized person.
  • FRR (false reject rate) – the probability that the system incorrectly rejects an authorized person.
  • IR (identification rate) – identification rate.

Capturer Characteristics

Capturer Configuration Files

Click here to see the list of the capturer configuration files
FileDetectorSet of pointsAngles (roll/yaw/pitch)Description and use case
common_capturer4_fda.xmllbffda[-30;30][-60;60][-60;60]Frontal face detector.
common_capturer4_fda_with_angles.xmllbffda[-90;90][-60;60][-60;60]Frontal face detector. Adapted for a wide range of head rotation angles.
common_capturer4_fda_with_angles_noise.xmllbffda[-90;90][-60;60][-60;60]Frontal face detector. Adapted for a wide range of head rotation angles. Suitable for images with high noise level.
common_capturer4_fda_singleface.xmllbffda[-30;30][-60;60][-60;60]Only one frontal face is detected.
common_capturer4_fda_singleface_with_angles.xmllbffda[-90;90][-75;75][-60;60]Only one frontal face is detected. The detector is adapted for a wide range of head rotation angles.
common_capturer4_fda_singleface_with_angles_noise.xmllbffda[-90;90][-75;75][-60;60]Only one frontal face is detected. The detector is adapted for a wide range of head rotation angles. Suitable for images with high noise level.
common_capturer4_lbf.xmllbfdoublelbf[-30;30][-60;60][-60;60]Frontal face detector.
common_capturer4_lbf_singleface.xmllbfdoublelbf[-30;30][-60;60][-60;60]Only one frontal face is detected.
common_capturer4_mesh.xmllbfmesh[-30;30][-60;60][-60;60]Frontal face detector. Allows you to get a 3D face mask.
common_capturer4_mesh_with_angles.xmllbfmesh[-90;90][-60;60][-60;60]Frontal face detector. Adapted for a wide range of head rotation angles. Allows you to get a 3D face mask.
common_capturer4_mesh_with_angles_noise.xmllbfmesh[-90;90][-60;60][-60;60]Frontal face detector. Adapted for a wide range of head rotation angles. Suitable for images with high noise level. Allows you to get a 3D face mask.
common_capturer4_mesh_singleface.xmllbfmesh[-30;30][-60;60][-60;60]Only one frontal face is detected. Allows you to get a 3D face mask.
common_capturer4_mesh_singleface_with_angles.xmllbfmesh[-90;90][-75;75][-60;60]Only one frontal face is detected. The detector is adapted for a wide range of head rotation angles. Allows you to get a 3D face mask.
common_capturer4_mesh_singleface_with_angles_noise.xmllbfmesh[-90;90][-75;75][-60;60]Only one frontal face is detected. The detector is adapted for a wide range of head rotation angles. Suitable for images with high noise level. Allows you to get a 3D face mask.
common_capturer_blf_fda_front.xmlblffda[-70;70][-90;90][-70;70]Detection of large face images (the face should take up most of the frame size). Suitable for detection of masked faces.
common_capturer_blf_fda_back.xmlblffda[-70;70][-90;90][-70;70]Detection of several faces or small face images. Suitable for detection of masked faces.
common_capturer_blf_fda_auto.xmlblffda[-70;70][-90;90][-70;70]Detection of large and small face images (the parameters `resolution_width` and `min_face_size` should be specified in the configuration file). Suitable for detection of masked faces.
common_capturer_refa_fda_a.xmlrefafda[-70;70][-90;90][-70;70]Face detector recommended for use in expert systems. Provides face detection with the largest coverage of rotation angles and maximum quality (including masked faces).
common_capturer_uld_fda.xml.xmluldfda[-70;70][-90;90][-70;70]Detection of large and small face images. Suitable for detection of masked faces.
common_video_capturer_fda.xmllbffda[-30;30][-60;60][-60;60]Frontal face video tracker (RGB only).
common_video_capturer_lbf.xmllbfsinglelbf[-30;30][-60;60][-60;60]Frontal face video tracker (RGB only).
common_video_capturer_mesh.xmllbfmesh[-30;30][-60;60][-60;60]Frontal face video tracker (RGB only). Allows you to get a 3D face mask.
fda_tracker_capturer.xmllbffda[-30;30][-60;60][-60;60]Frontal face video tracker.
fda_tracker_capturer.w.xmllbffda[-30;30][-60;60][-60;60]Frontal face video tracker. Can be used in case of insufficient lighting. Note that false detections can occur a bit more often in this case.
fda_tracker_capturer_mesh.xmllbffda[-30;30][-60;60][-60;60]Frontal face video tracker. Allows you to get a 3D face mask.
fda_tracker_capturer_fake_detector.xmllbffda[-30;30][-60;60][-60;60]Detection speed is higher because only fitter is used (no detector). Suitable only if a face takes up most of the image size.
fda_tracker_capturer_blf.xmlblffda[-30;30][-60;60][-60;60]Frontal face video tracker. Suitable for detection of masked faces.
fda_tracker_capturer_refa_a.xmlrefafda[-70;70][-90;90][-70;70]Frontal face video tracker. Recommended for use in expert systems. Provides face detection with the largest coverage of rotation angles and maximum quality (including masked faces).
fda_tracker_capturer_uld_fda.xml.xmluldfda[-70;70][-90;90][-70;70]Frontal face video tracker. Can be used to detect faces of different size. Suitable for detection of masked faces.
manual_capturer_fda.xmllbffda[-30;30][-60;60][-60;60]Eye points should be manually specified. The remaining points are calculated based on the eye points.
manual_capturer_mesh.xmllbfmesh[-30;30][-60;60][-60;60]Eye points should be manually specified. The remaining points are calculated based on the eye points. Allows you to get a 3D face mask.
video_worker_fdatracker_refa_fda.xmlrefafda[-70;70][-90;90][-70;70]Face detector recommended for use in expert systems. Provides face detection with the largest coverage of rotation angles and maximum quality (including masked faces).

Capturer Timing Characteristics

Core i7 4.5 GHz (Single-Core)

Configuration fileCapture time (ms)
640x480, 1 face640x480, 4 faces1280x720, 1 face1280x720, 4 faces1920x1080, 1 face1920x1080, 4 faces
common_capturer4_fda.xml13 25 34 49 81 103
common_capturer4_fda_with_angles.xml282 387 260 356 273 370
common_capturer4_mesh.xml18 47 39 72 87 735
common_capturer4_mesh_with_angles.xml291 415 268 383 281 398
common_capturer_blf_fda_auto.xml6-30 12-36 8-32 14-38 19-44 26-51
common_capturer_blf_fda_back.xml30 36 32 38 44 51
common_capturer_blf_fda_front.xml6 12 8 14 19 26
common_capturer_refa_fda_a.xml644 650 512 518 580 586
common_capturer_uld_fda.xml (min_size=150)12 18 13 19 21 28
common_capturer_uld_fda.xml (min_size=90)58 70 60 73 77 91
common_capturer_uld_fda.xml (min_size=50)253 272 253 273 281 302
common_capturer4_fda_singleface.xml16 - 51 - 123 -
common_capturer4_mesh_singleface.xml23 - 58 - 129 -

GPU

Configuration fileCapture time (ms)
640x480, 1 face640x480, 4 faces1280x720, 1 face1280x720, 4 faces1920x1080, 1 face1920x1080, 4 faces
common_capturer_blf_fda_auto.xml4-5 10-12 6-8 13-14 17-20 24-27
common_capturer_blf_fda_back.xml5 12 8 14 20 27
common_capturer_blf_fda_front.xml4 10 6 13 17 24
common_capturer_refa_fda_a.xml236 240 229 235 170 176
common_capturer_uld_fda.xml (min_size=150)4 10 5 11 13 20
common_capturer_uld_fda.xml (min_size=90)14 21 17 23 26 34
common_capturer_uld_fda.xml (min_size=50)27 34 27 35 47 49

Note: Actual capture time may vary depending on the image content.

Identification Performance

Timing Characteristics for Core i7 4.5 GHz*

Recognition methodTemplate generation (ms)Accelerated Matching 1:N (ms)Matching 1:1 (ms)
N = 104 N = 106 N = 107
6.7 40 (45**) 0.25 12.1 126 0.04
7.7 170 (180**) 0.25 12.1 126 0.04
8.7 20 (20**) 0.25 12.1 126 0.04
9.30 30 0.18 12.0 117 0.04
9.300 260 (125***) 0.18 12.0 117 0.04
9.1000 730 (305***) 0.18 12.0 117 0.04
9.30mask 20 0.18 12.0 117 0.04
9.300mask 160 (79***) 0.18 12.0 117 0.04
9.1000mask 290 (144***) 0.18 12.0 117 0.04
10.30 24 (16***) 0.18 12.0 117 0.04
10.100 40 (24***) 0.18 12.0 117 0.04
10.1000 690 (355***) 0.18 12.0 117 0.04
11.1000 865 (425***) 0.22 15.0 151 0.04

* – characteristics specified in this table are given for a single-core CPU.
** – template creation time when processing_less_memory_consumption was set to true in the FacerecService.createRecognizer call for recognizer creation.
*** – template creation time using the AVX2 instruction set (see Face identification).

Note:

  • Accelerated search time is given for k=1. As for larger values of k, the time will increase up to the search time without acceleration.
  • Accelerated search is implemented only for the recognition methods 6.5, 6.6, 6.7, 7.3, 7.6, 7.7, 8.6, 8.7, 9.30, 9.300, 9.1000, 10v30, 10v100, 10v1000, 11v1000.
  • To achieve this speed, the templates in the index must be located in order of creation (by using the Recognizer.processing or Recognizer.loadTemplate method).
  • To achieve higher speed, use GPU (see GPU Usage).

Memory Characteristics

Recognition methodSerialized template size (Bytes)Template size in RAM (Bytes)Memory consumption* (MB)
6.7536636105 (85**)
7.7536636195 (163**)
8.753663652 (40**)
9.30280380155
9.300280380210
9.1000280380290
10.30 280 380 160
10.100 280 380 180
10.1000 280 380 270
11.1000 296 396 480

* – the amount of memory consumed doesn't depend on the number of the Recognizer objects created by this method
** – memory consumption when processing_less_memory_consumption was set to true in the FacerecService.createRecognizer call for recognizer creation

ROC on internal dataset with the faces in the wild

In this test the set of mismatched pairs was increased and LFW errors were fixed in order to get accurate measurements at low FAR.

FAR9.300 TAR (%)10.30 TAR (%)10.100 TAR (%)11.1000 TAR (%)
1e-4 98.3 95.3 97.3 99.7
1e-5 97.2 91.4 95.0 99.6
1e-6 94.8 86.3 91.7 99.3

Performance Test

Modes:

Detection

In this mode the program detects faces in images with the id in the range of [begin_image_id, end_image_id). Each image should contain only one person. The images containing more than one person detected will be discarded.

Launch parameters:

  • mode – program mode (detection)
  • dll_path – path to the libfacerec.so or facerec.dll library file
  • sdk_config_dir – path to the conf/facerec directory
  • dataset_config – config file of the image dataset (see Convert a Configuration File)
  • capturer_config – capturer config file name
  • dataset_root_dir – path to the dataset directory
  • detection_result_file – file for storing the detection results
  • [begin_image_id] – index of the image, from which the detection begins (the default setting is 0)
  • [end_image_id] – index of the image, to which detection is performed (by default, the processing is performed to the end of the file)
  • [use_cpu_cores_count] – number of cores used for detection (the default setting is 1)

Example of launch from the bin directory:

./test_sdk \
--mode detection \
--dll_path ../lib/libfacerec.so \
--sdk_config_dir ../conf/facerec \
--capturer_config common_capturer4_lbf.xml \
--dataset_config dataset_config.txt \
--dataset_root_dir /path/to/data \
--detection_result_file detection_result.txt \

The detection result is a text file with the lines in the following format: <image_id> <points_count> <points>

Processing

In this mode the program creates templates from the faces detected in the images with the id in the range of [begin_image_id, end_image_id).

Launch parameters:

  • mode – program mode (processing)
  • dll_path – path to the libfacerec.so or facerec.dll library file
  • sdk_config_dir – path to the conf/facerec directory
  • dataset_config – config file of the image dataset (see Convert a Configuration File)
  • dataset_root_dir – path to the dataset directory
  • recognizer_config – recognizer config file name
  • processing_result_file – file for storing the resulting templates
  • [begin_image_id] – index of the image, from which processing starts (the default setting is 0)
  • [end_image_id] – index of the image, to which processing is performed (by default, the processing is performed at the end of the file)
  • [use_cpu_cores_count] – number of cores used for processing (the default setting is 1)
  • FILES – file(s) storing the detection results

Example of launch from the bin directory:

./test_sdk \
--mode processing \
--dll_path ../lib/libfacerec.so \
--sdk_config_dir ../conf/facerec \
--dataset_config dataset_config.txt \
--dataset_root_dir /path/to/data \
--recognizer_config method6v7_recognizer.xml \
--processing_result_file ./templates_6v7.bin \
detection_result.txt

The processing result is a binary file, which contains one record per each generated template. Each record is a 64-bit unsigned integer (image_id) followed by a serialized template.

1:1 Recognition Test

In this mode the program performs the 1:1 recognition test using the templates generated from the images with the id in the range of [begin_image_id, end_image_id).

Launch parameters:

  • mode – program mode (recognition_test_11)
  • dll_path – path to the libfacerec.so or facerec.dll library file
  • sdk_config_dir – path to the conf/facerec directory
  • dataset_config – config file of the image dataset (see Convert a Configuration File)
  • recognizer_config – recognizer config file name
  • result_roc_file – file to save the ROC curve
  • result_closest_mismatches_file – result file with the closest mismatches
  • [begin_image_id] – index of the first image used in the test (the default setting is 0)
  • [end_image_id] – index of the first image after begin_image_id not used in the test (by default use all from begin_image_id to the end of the file)
  • [use_cpu_cores_count] – number of cores used for matching (the default setting is 1)
  • FILES – file(s) storing the processing results

Example of launch from the bin directory:

./test_sdk \
--mode recognition_test_11 \
--dll_path ../lib/libfacerec.so \
--sdk_config_dir ../conf/facerec \
--dataset_config dataset_config.txt \
--recognizer_config method6v7_recognizer.xml \
--result_roc_file ./roc11_6v7.txt \
--result_closest_mismatches_file ./closest_mismatches_file.txt \
templates_6v7.bin

1:1 Recognition of test results:

  • A text file, which contains a ROC curve; the file line describes the curve point in the following format: <far> <tar> <distance>.
  • A text file with the lines in the following format: <distance> <image_id1> <image_id2> <path_to_image1> <path_to_image2>. This file contains pairs of images marked as belonging to different people, but having a minimum distance between the templates. We recommend you to generate this file using the best method and view the images from the top of it to check the errors of the dataset annotation.

1:N Recognition Test

In this mode the program performs the 1:N recognition test using the templates generated from the images with the id in the range of [begin_image_id, end_image_id).

Launch parameters:

  • mode – program mode (recognition_test_1N)
  • dll_path – path to the libfacerec.so or facerec.dll library file
  • sdk_config_dir – path to the conf/facerec directory
  • dataset_config – config file of the image dataset (see Convert a Configuration File)
  • recognizer_config – recognizer config file name
  • result_roc_file – file to save the ROC curve.
  • [begin_image_id] – index of the first image used in the test (the default setting is 0)
  • [end_image_id] – index of the first image after begin_image_id not used in the test (by default use all from begin_image_id to the end of the file)
  • [use_cpu_cores_count] – number of cores used for searching (the default setting is 1)
  • [acceleration] – search acceleration type (the default setting is 0)
  • 0 – search with pbio::Recognizer::search with the pbio::Recognizer::SearchAccelerationType::NO_SEARCH_ACCELERATION acceleration
  • 1 – search with pbio::Recognizer::search with the pbio::Recognizer::SearchAccelerationType::SEARCH_ACCELERATION_1 acceleration -1 – search with pbio::Recognizer::verifyMatch in a single thread (independent of search_threads_count)
  • FILES – file(s) storing the processing results

Example of launch from the bin directory:

./test_sdk \
--mode recognition_test_1N \
--dll_path ../lib/libfacerec.so \
--sdk_config_dir ../conf/facerec \
--dataset_config dataset_config.txt \
--recognizer_config method6v7_recognizer.xml \
--result_roc_file ./roc1N_6v7.txt \
--acceleration 1 \
templates_6v7.bin

The result of the 1:N recognition test is a text file, which contains a ROC curve. The file line describes the curve point in the following format: <far> <tar> <distance>.

Search Speed Test

In this mode the program performs the search speed test using the templates generated in processing mode or using the utility (see Template Generator).

Launch parameters:

  • mode – program mode (search_speed_test).
  • dll_path – path to the libfacerec.so or facerec.dll library file
  • sdk_config_dir – path to the conf/facerec directory
  • recognizer_config – recognizer config file name
  • [templates_count] – number of templates used (by default, processing is performed until the end of the file)
  • [queries_count] – number of queries (the default setting is 1)
  • [query_k_nearest] – number of the nearest templates for searching (the default setting is 1)
  • [search_threads_count] – number of threads used for searching (the default setting is 1)
  • [acceleration] – search acceleration type (the default setting is 0)
  • 0 – search with pbio::Recognizer::search with the pbio::Recognizer::SearchAccelerationType::NO_SEARCH_ACCELERATION acceleration
  • 1 – search with pbio::Recognizer::search with the pbio::Recognizer::SearchAccelerationType::SEARCH_ACCELERATION_1 acceleration
  • -1 – search with pbio::Recognizer::verifyMatch in a single thread (independent of search_threads_count)
  • FILES – file(s) obtained from the processing mode or by using the utility

Example of launch from the bin directory:

./test_sdk \
--mode search_speed_test \
--dll_path ../lib/libfacerec.so \
--sdk_config_dir ../conf/facerec \
--recognizer_config method6v7_recognizer.xml \
templates.bin

The result of the search speed test is a message with test results.

Convert a Configuration File

In this mode the program converts the config file from format1 to format2 (used in other modes):

  • format1 – a text file with the lines in the following format: <path/to/person/dir/image_file>. Images with the same path/to/person/dir belong to the same person. Images for one person must be in a row.
Example:
person1_dir/image1
person1_dir/image2
person2_dir/image1
...
  • format2 – a text file with 3 lines per image (<person_id> <image_id> <path_to_image>).
Example:
person0_id
image0_id
path_to_image0
person0_id
image1_id
path_to_image1
...

Launch parameters:

  • mode – program mode (convert_config_format)
  • result_dataset_config – config file of the image dataset
  • FILE – one file of format1

Example of launch:

./test_sdk \
--mode convert_config_format \
--result_dataset_config dataset_config.txt \
lfw_simple_format.txt

The conversion result is a config file of the image dataset.

Create a Configuration File

Example of creating a config file of format1:

find -type f | sort > ../lfw_simple_format.txt

The paths in the configuration files must be relative to the directory passed through the dataset_root_dir parameter.

Utilities

Template Generator

A utility for creating random templates.

Launch parameters:

  • recognizer_version – recognizer version (select one of [11v1000, 10v30, 10v100, 10v1000, 9v30, 9v300, 9v1000, 8v7, 8v6, 7v7, 7v6, 7v3, 7v2, 7, 6v7, 6v6, 6v5, 6v4, 6v3, 6v2, 6])
  • templates_count – number of generated templates
  • result_file – a result binary file, which contains the generated random templates

Example of launch:

./template_generator \
6v7 \
100000 \
random_templates.bin

The template generator result is a binary file, which contains the generated random templates of the same format as in the processing mode.

Source code: examples/cpp/test_sdk

Source code: examples/cpp/test_sdk