Skip to main content
Version: 3.24.0 (latest)

Creating, saving, loading, and comparing templates

The bin directory contains the executable file test_identify:

test_identify

The program demonstrates the creation, saving, loading and comparison of templates.

The program operates in three modes:

  • enrollment – face detection and template creation for a group of images and saving the resulting templates to a file
  • identifying – face detection on a single image, template creation and comparison of the resulting template with a group of templates created in enrollment mode
  • verify – face detection and template creation on a pair of images and comparison of the two resulting templates

Launch parameters in enrollment mode:

  • path to the library file libfacerec.so or facerec.dll
  • path to the directory conf/facerec
  • name of the recognizer configuration file
  • enroll
  • path to the directory with images (for example, the directory bin/set1)
  • path to the text file containing a list of image file names (for example, bin/set1/list.txt)
  • path to save templates to a file

Launch parameters in identifying mode:

  • path to the file libfacerec.so or facerec.dll libraries
  • path to the conf/facerec directory
  • name of the recognizer configuration file
  • identify
  • path to the image file
  • path to the template file created in the enrollment mode

Launch parameters in the verify mode:

  • path to the libfacerec.so or facerec.dll library file
  • path to the conf/facerec directory
  • name of the recognizer configuration file
  • verify
  • path to the first image file
  • path to the second image file

Example of launching from the bin directory in the identifying mode:

test_identify facerec.dll ../conf/facerec method9v300_recognizer.xml identify set1 set1/list.txt templates.bin

Processing status, comparison results and error messages (if any) are displayed in the console.

Source code: test_identify.cpp

No additional libraries are required for assembly.