Skip to main content
Version: 3.12.0 (latest)

Performance Parameters

List of used 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.

Capturers Characteristics#

Capturers Configuration Files#

Click here to see the list of the capturers 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. Please 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).

Capturers 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)46 52 47 54 56 63
common_capturer_uld_fda.xml (min_size=50)195 202 193 200 204 211
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

* – 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 with the use of 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.
  • To achieve this speed, the templates in the index must be located in the order of creation (by using the Recognizer.processing or Recognizer.loadTemplate method).
  • To achieve higher speed, you can 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

* – the amount of memory consumed does not 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 Extended LFW Test#

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

FAR8.7 TAR (%)6.7 TAR (%)7.7 TAR (%)9.30 TAR (%)9.300 TAR (%)9.1000 TAR (%)10.30 TAR (%)10.100 TAR (%)10.1000 TAR (%)
1e-4 97.3 99.0 99.3 97.3 99.5 99.6 98.0 99.3 99.7
1e-5 93.8 97.5 98.5 94.7 99.0 99.0 98.0 99.1 99.7
1e-6 88.9 94.8 96.9 90.8 98.0 98.5 95.7 98.3 99.5
Click to expand the table with all FAR and TAR values for different identification methods
FAR8.7 TAR (%)6.7 TAR (%)7.7 TAR (%)9.30 TAR (%)9.300 TAR (%)9.1000 TAR (%)10.30 TAR (%)10.100 TAR (%)10.1000 TAR (%)
1e-2 99.6 99.7 99.8 99.5 99.7 99.8 99.7 99.8 99.8
9e-3 99.6 99.7 99.7 99.5 99.7 99.8 99.7 99.8 99.8
8e-3 99.6 99.7 99.7 99.4 99.7 99.8 99.7 99.8 99.8
7e-3 99.5 99.7 99.7 99.4 99.7 99.8 99.7 99.8 99.8
6e-3 99.5 99.7 99.7 99.4 99.7 99.8 99.7 99.8 99.8
5e-3 99.5 99.7 99.7 99.3 99.7 99.7 99.7 99.8 99.8
4e-3 99.4 99.7 99.7 99.3 99.7 99.7 99.7 99.7 99.8
3e-3 99.3 99.6 99.7 99.2 99.7 99.7 99.6 99.7 99.8
2e-3 99.2 99.6 99.6 99.1 99.7 99.7 99.5 99.7 99.8
1e-3 98.8 99.5 99.6 98.7 99.7 99.7 99.5 99.7 99.8
9e-4 98.7 99.4 99.6 98.6 99.7 99.7 99.4 99.7 99.8
8e-4 98.7 99.4 99.5 98.6 99.7 99.7 99.4 99.6 99.8
7e-4 98.7 99.4 99.5 98.5 99.7 99.6 99.3 99.6 99.8
6e-4 98.6 99.4 99.5 98.5 99.7 99.6 99.3 99.6 99.8
5e-4 98.5 99.4 99.5 98.5 99.7 99.6 99.2 99.6 99.8
4e-4 98.4 99.4 99.5 98.3 99.7 99.6 99.2 99.6 99.8
3e-4 98.2 99.2 99.5 98.1 99.6 99.6 99.2 99.5 99.7
2e-4 98.0 99.2 99.4 97.7 99.6 99.6 99.1 99.4 99.7
1e-4 97.3 99.0 99.3 97.3 99.5 99.6 99.0 99.4 99.7
9e-5 97.3 99.0 99.2 97.3 99.5 99.6 99.0 99.4 99.7
8e-5 97.2 99.0 99.2 97.2 99.5 99.6 99.0 99.4 99.7
7e-5 97.1 98.9 99.2 97.1 99.5 99.6 99.0 99.4 99.7
6e-5 96.9 98.8 99.1 96.9 99.5 99.6 98.9 99.3 99.7
5e-5 96.6 98.7 99.0 96.6 99.4 99.5 98.8 99.3 99.7
4e-5 96.3 98.5 99.0 96.5 99.3 99.5 98.8 99.3 99.7
3e-5 95.8 98.5 98.9 96.3 99.3 99.3 98.6 99.3 99.7
2e-5 95.0 98.1 98.8 95.8 99.2 99.2 98.5 99.2 99.7
1e-5 93.8 97.5 98.5 94.7 99.0 99.0 98.0 99.1 99.7
9e-6 93.7 97.4 98.5 94.6 99.0 99.0 98.0 99.1 99.6
8e-6 93.4 97.3 98.4 94.4 98.9 99.0 97.8 99.1 99.6
7e-6 93.2 97.2 98.4 94.2 98.9 99.0 97.7 99.0 99.6
6e-6 93.0 97.0 98.2 93.9 98.9 99.0 97.6 99.0 99.6
5e-6 92.7 96.8 98.2 93.7 98.9 98.9 97.3 99.0 99.6
4e-6 91.9 96.7 98.0 93.1 98.9 98.9 96.9 98.9 99.5
3e-6 91.1 96.4 97.8 92.8 98.7 98.8 96.7 98.8 99.5
2e-6 90.0 96.0 97.3 92.1 98.4 98.8 96.2 98.6 99.5
1e-6 88.9 94.8 96.9 90.8 98.0 98.5 95.7 98.3 99.4
9e-7 88.6 94.3 96.7 90.6 98.0 98.5 95.4 98.2 99.4
8e-7 87.7 94.1 96.3 90.4 97.9 98.4 95.2 98.2 99.4
7e-7 87.6 93.8 96.1 89.7 97.8 98.3 94.7 97.9 99.4
6e-7 87.1 93.7 96.0 89.3 97.6 98.2 94.4 97.8 99.4
5e-7 86.4 93.4 95.7 89.1 97.4 98.1 94.0 97.0 99.4
4e-7 86.0 93.1 95.6 88.1 97.3 98.0 93.3 96.7 99.3
3e-7 84.7 92.3 95.5 87.8 95.6 97.9 93.2 96.3 99.2
2e-7 83.2 91.4 92.4 86.9 94.7 97.7 90.2 94.8 99.0
1e-7 81.5 88.9 90.6 85.6 89.6 97.3 87.4 91.2 95.4

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 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 begins (the default setting is 0)
  • [end_image_id] – index of the image to which processing is performed (by default, the processing is performed to 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 containing 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 test results:

  • A text file containing 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 searches (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 (doesn’t depend on 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 containing 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 search (the default setting is 1)
  • [search_threads_count] – number of threads used for search (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 (doesn’t depend on 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 [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 containing the generated random templates

Example of launch:

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

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

Source code: examples/cpp/test_sdk

Last updated on