FRTE/IREX Ongoing
API Specification for the FRTE 1:N and IREX Evaluations
Interface Class Referenceabstract

The interface to FRVT 1:N implementation. More...

#include <frvt1N.h>

Public Member Functions

virtual FRVT::ReturnStatus initializeTemplateCreation (const std::string &configDir, FRVT::TemplateRole role)=0
 Before images are sent to the template creation function, the test harness will call this initialization function. More...
 
virtual FRVT::ReturnStatus createFaceTemplate (const std::vector< FRVT::Image > &faces, FRVT::TemplateRole role, std::vector< uint8_t > &templ, std::vector< FRVT::EyePair > &eyeCoordinates)=0
 This function supports template generation from one or more face images of exactly one person. More...
 
virtual FRVT::ReturnStatus createFaceTemplate (const FRVT::Image &image, FRVT::TemplateRole role, std::vector< std::vector< uint8_t > > &templ, std::vector< FRVT::EyePair > &eyeCoordinates)=0
 This function supports face template generation of one or more people detected from a single image. More...
 
virtual FRVT::ReturnStatus createIrisTemplate (const std::vector< FRVT::Image > &irises, FRVT::TemplateRole role, std::vector< uint8_t > &templ, std::vector< FRVT::IrisAnnulus > &irisLocations)=0
 This function supports template generation from one or more iris images of exactly one person. More...
 
virtual FRVT::ReturnStatus createFaceAndIrisTemplate (const std::vector< FRVT::Image > &facesIrises, FRVT::TemplateRole role, std::vector< uint8_t > &templ)=0
 This function supports template generation from one or more face and/or iris images of exactly one person. More...
 
virtual FRVT::ReturnStatus finalizeEnrollment (const std::string &configDir, const std::string &enrollmentDir, const std::string &edbName, const std::string &edbManifestName, FRVT_1N::GalleryType galleryType)=0
 This function will be called after all enrollment templates have been created and freezes the enrollment data. More...
 
virtual FRVT::ReturnStatus initializeIdentification (const std::string &configDir, const std::string &enrollmentDir)=0
 This function will be called once prior to one or more calls to identifyTemplate(). More...
 
virtual FRVT::ReturnStatus identifyTemplate (const std::vector< uint8_t > &idTemplate, const uint32_t candidateListLength, std::vector< FRVT_1N::Candidate > &candidateList)=0
 This function searches an identification template against the enrollment set, and outputs a vector containing candidateListLength Candidates. More...
 

Static Public Member Functions

static std::shared_ptr< InterfacegetImplementation ()
 Factory method to return a managed pointer to the Interface object. More...
 

Detailed Description

The interface to FRVT 1:N implementation.

The submission software under test will implement this interface by sub-classing this class and implementing each method therein.

Definition at line 78 of file frvt1N.h.

Constructor & Destructor Documentation

◆ ~Interface()

virtual ~Interface ( )
inlinevirtual

Definition at line 80 of file frvt1N.h.

Member Function Documentation

◆ initializeTemplateCreation()

virtual FRVT::ReturnStatus initializeTemplateCreation ( const std::string &  configDir,
FRVT::TemplateRole  role 
)
pure virtual

Before images are sent to the template creation function, the test harness will call this initialization function.

This function will be called N=1 times by the NIST application, prior to parallelizing M >= 1 calls to createTemplate() via fork().

This function will be called from a single process/thread.

Parameters
[in]configDirA read-only directory containing any developer-supplied configuration parameters or run-time data files.
[in]roleA value from the TemplateRole enumeration that indicates the intended usage of the template to be generated. In this case, either a 1:N enrollment template used for gallery enrollment or 1:N identification template used for search.

◆ createFaceTemplate() [1/2]

virtual FRVT::ReturnStatus createFaceTemplate ( const std::vector< FRVT::Image > &  faces,
FRVT::TemplateRole  role,
std::vector< uint8_t > &  templ,
std::vector< FRVT::EyePair > &  eyeCoordinates 
)
pure virtual

This function supports template generation from one or more face images of exactly one person.

It takes as input a vector of images and outputs a template and associated eye coordinates

For enrollment templates: If the function executes correctly (i.e. returns a successful exit status), the template will be enrolled into a gallery. The NIST calling application may store the resulting template, concatenate many templates, and pass the result to the enrollment finalization function.

When the implementation fails to produce a template, it shall still return a blank template (which can be zero bytes in length). The template will be included in the enrollment database/manifest like all other enrollment templates, but is not expected to contain any feature information.
For identification templates: If the function returns a non-successful return status, the output template will be not be used in subsequent search operations.

In the rare event that more than one face is detected in an image, features should be extracted from the foreground face, that is, the largest face in the image.

Parameters
[in]facesA vector of input face images
[in]roleA value from the TemplateRole enumeration that indicates the intended usage of the template to be generated. In this case, either a 1:N enrollment template used for gallery enrollment or 1:N identification template used for search.
[out]templThe output template. The format is entirely unregulated. This will be an empty vector when passed into the function, and the implementation can resize and populate it with the appropriate data.
[out]eyeCoordinates(Optional) The function may choose to return the estimated eye centers for the input face images.

◆ createFaceTemplate() [2/2]

virtual FRVT::ReturnStatus createFaceTemplate ( const FRVT::Image &  image,
FRVT::TemplateRole  role,
std::vector< std::vector< uint8_t > > &  templ,
std::vector< FRVT::EyePair > &  eyeCoordinates 
)
pure virtual

This function supports face template generation of one or more people detected from a single image.

It takes a single input image and outputs one or more proprietary templates and associated eye coordinates based on the number of people detected.

For enrollment templates: If the function executes correctly (i.e. returns a successful exit status), the template(s) will be enrolled into a gallery. The NIST calling application may store the resulting template(s), concatenate many templates, and pass the result to the enrollment finalization function. The resulting template(s) may also be inserted immediately into a previously finalized gallery. When the implementation fails to produce a template, it shall still return a blank template (which can be zero bytes in length). The template will be included in the enrollment database/manifest like all other enrollment templates, but is not expected to contain any feature information.
For identification templates: If the function returns a non-successful return status, the output template(s) will be not be used in subsequent search operations.

param[in] image A single image that contains one or more people in the photo param[in] role Label describing the type/role of the template to be generated param[out] templs A vector of output template(s). The format of the template(s) is entirely unregulated. This will be an empty vector when passed into the function, and the implementation can resize and populate it with the appropriate data. param[out] eyeCoordinates For each person detected in the image, the function shall return the estimated eye centers. This will be an empty vector when passed into the function, and the implementation shall populate it with the appropriate number of entries. Values in eyeCoordinates[i] shall correspond to templs[i].

◆ createIrisTemplate()

virtual FRVT::ReturnStatus createIrisTemplate ( const std::vector< FRVT::Image > &  irises,
FRVT::TemplateRole  role,
std::vector< uint8_t > &  templ,
std::vector< FRVT::IrisAnnulus > &  irisLocations 
)
pure virtual

This function supports template generation from one or more iris images of exactly one person.

It takes as input a vector of images and outputs a template and optionally, the associated location of the iris in each image.

For enrollment templates: If the function executes correctly (i.e. returns a successful exit status), the template will be enrolled into a gallery. The NIST calling application may store the resulting template, concatenate many templates, and pass the result to the enrollment finalization function.

When the implementation fails to produce a template, it shall still return a blank template (which can be zero bytes in length). The template will be included in the enrollment database/manifest like all other enrollment templates, but is not expected to contain any feature information.
For identification templates: If the function returns a non-successful return status, the output template will be not be used in subsequent search operations.

Parameters
[in]irisesA vector of input iris images
[in]roleA value from the TemplateRole enumeration that indicates the intended usage of the template to be generated. In this case, either a 1:N enrollment template used for gallery enrollment or 1:N identification template used for search.
[out]templThe output template. The format is entirely unregulated. This will be an empty vector when passed into the function, and the implementation can resize and populate it with the appropriate data.
[out]irisLocations(Optional) The function may choose to return the estimated iris locations for the input iris images.

◆ createFaceAndIrisTemplate()

virtual FRVT::ReturnStatus createFaceAndIrisTemplate ( const std::vector< FRVT::Image > &  facesIrises,
FRVT::TemplateRole  role,
std::vector< uint8_t > &  templ 
)
pure virtual

This function supports template generation from one or more face and/or iris images of exactly one person.

It takes as input a vector of images and outputs a template. NOTE: The implementation must handle both multimodal and unimodal samples for enrollment and probe template generation where the input is 1) face and iris images or 2) face image(s) only or 3) iris image(s) only. For example, a gallery might be generated for which 80% of enrolled samples are face and iris, but 10% of samples are face-only, and 10% are iris-only. This reflects operational reality, but we anticipate exercising mostly multimodal enrollments and searches.

For enrollment templates: If the function executes correctly (i.e. returns a successful exit status), the template will be enrolled into a gallery. The NIST calling application may store the resulting template, concatenate many templates, and pass the result to the enrollment finalization function.

When the implementation fails to produce a template, it shall still return a blank template (which can be zero bytes in length). The template will be included in the enrollment database/manifest like all other enrollment templates, but is not expected to contain any feature information.
For identification templates: If the function returns a non-successful return status, the output template will be not be used in subsequent search operations.

Parameters
[in]facesIrisesA vector of input face and/or iris images
[in]roleA value from the TemplateRole enumeration that indicates the intended usage of the template to be generated. In this case, either a 1:N enrollment template used for gallery enrollment or 1:N identification template used for search.
[out]templThe output template. The format is entirely unregulated. This will be an empty vector when passed into the function, and the implementation can resize and populate it with the appropriate data.

◆ finalizeEnrollment()

virtual FRVT::ReturnStatus finalizeEnrollment ( const std::string &  configDir,
const std::string &  enrollmentDir,
const std::string &  edbName,
const std::string &  edbManifestName,
FRVT_1N::GalleryType  galleryType 
)
pure virtual

This function will be called after all enrollment templates have been created and freezes the enrollment data.

After this call, the enrollment dataset will be forever read-only.

This function allows the implementation to conduct, for example, statistical processing of the feature data, indexing and data re-organization. The function may create its own data structure. It may increase or decrease the size of the stored data. No output is expected from this function, except a return code. The function will generally be called in a separate process after all the enrollment processes are complete. NOTE: Implementations shall not move the input data. Implementations shall not point to the input data. Implementations should not assume the input data would be readable after the call. Implementations must, at a minimum, copy the input data or otherwise extract what is needed for search.

This function will be called from a single process/thread.

Parameters
[in]configDirA read-only directory containing any developer-supplied configuration parameters or run-time data files.
[in]enrollmentDirThe top-level directory in which enrollment data was placed. This variable allows an implementation to locate any private initialization data it elected to place in the directory.
[in]edbNameThe name of a single file containing concatenated templates, i.e. the EDB described in File structure for enrolled template collection. While the file will have read-write-delete permission, the implementation should only alter the file if it preserves the necessary content, in other files for example. The file may be opened directly. It is not necessary to prepend a directory name. This is a NIST-provided input - implementers shall not internally hard-code or assume any values.
[in]edbManifestNameThe name of a single file containing the EDB manifest described in File structure for enrolled template collection. The file may be opened directly. It is not necessary to prepend a directory name. This is a NIST-provided input - implementers shall not internally hard-code or assume any values.
[in]galleryTypeThe composition of the gallery as enumerated by GalleryType.

◆ initializeIdentification()

virtual FRVT::ReturnStatus initializeIdentification ( const std::string &  configDir,
const std::string &  enrollmentDir 
)
pure virtual

This function will be called once prior to one or more calls to identifyTemplate().

The function might set static internal variables and read the enrollment gallery into memory so that the enrollment database is available to the subsequent identification searches.

This function will be called from a single process/thread.

Parameters
[in]configDirA read-only directory containing any developer-supplied configuration parameters or run-time data files.
[in]enrollmentDirThe read-only top-level directory in which enrollment data was placed.

◆ identifyTemplate()

virtual FRVT::ReturnStatus identifyTemplate ( const std::vector< uint8_t > &  idTemplate,
const uint32_t  candidateListLength,
std::vector< FRVT_1N::Candidate > &  candidateList 
)
pure virtual

This function searches an identification template against the enrollment set, and outputs a vector containing candidateListLength Candidates.

Each candidate shall be populated by the implementation and added to candidateList. Note that candidateList will be an empty vector when passed into this function.

For face recognition: the candidates shall appear in descending order of similarity score - i.e. most similar entries appear first. For iris recognition: the candidates shall appear in ascending order of dissimilarity - i.e. the least dissimilar entries appear first. For multimodal face and iris, the candidates shall appear in descending order of similarity score - i.e. most similar entries appear first.

Parameters
[in]idTemplateA template from the implemented template creation function. If the value returned by that function was non-successful, the contents of idTemplate will not be used, and this function will not be called.
[in]candidateListLengthThe number of candidates the search should return.
[out]candidateListEach candidate shall be populated by the implementation. The candidates shall appear in descending order of similarity score - i.e. most similar entries appear first.

◆ getImplementation()

static std::shared_ptr< Interface > getImplementation ( )
static

Factory method to return a managed pointer to the Interface object.

This function is implemented by the submitted library and must return a managed pointer to the Interface object.

Note
A possible implementation might be: return (std::make_shared<Implementation>());

The documentation for this class was generated from the following file: