ROC SDK  2.4.0
Scalable Face Recognition Software
Macros | Typedefs | Functions
Similarity

Measurement of resemblance between two templates. More...

Macros

#define ROC_MAX_SIMILARITY   (1.f)
 Maximum roc_similarity. More...
 
#define ROC_MIN_SIMILARITY   (0.f)
 Minimum roc_similarity. More...
 
#define ROC_INVALID_SIMILARITY   (-1.f)
 An invalid roc_similarity. More...
 
#define ROC_DEFAULT_SEARCH_THRESHOLD   (0.65f)
 Default search roc_similarity threshold. More...
 
#define ROC_DEFAULT_VERIFICATION_THRESHOLD   (0.55f)
 Default verification roc_similarity threshold. More...
 
#define ROC_CONVENIENT_SPOOF_THRESHOLD   (0.45f)
 Default spoof threshold. More...
 
#define ROC_SECURE_SPOOF_THRESHOLD   (0.3f)
 Spoof threshold for high security deployments. More...
 

Typedefs

typedef float roc_similarity
 A measurement between two faces quantifying the pseudo-probability that they are the same person. More...
 

Functions

roc_error roc_fuse (roc_similarity *raw, size_t n, roc_similarity *fused)
 Score-level fusion by computing a max. More...
 

Detailed Description

Measurement of resemblance between two templates.

See roc_similarity for details.

Macro Definition Documentation

◆ ROC_MAX_SIMILARITY

#define ROC_MAX_SIMILARITY   (1.f)

Maximum roc_similarity.

This is the highest valid similarity score and indicates the two templates have identical feature vectors.

◆ ROC_MIN_SIMILARITY

#define ROC_MIN_SIMILARITY   (0.f)

Minimum roc_similarity.

This is the lowest valid similarity score and indicates a strong non-match.

◆ ROC_INVALID_SIMILARITY

#define ROC_INVALID_SIMILARITY   (-1.f)

An invalid roc_similarity.

This value indicates that at least one of the two templates involved in the comparison does not have a feature vector.

◆ ROC_DEFAULT_SEARCH_THRESHOLD

#define ROC_DEFAULT_SEARCH_THRESHOLD   (0.65f)

Default search roc_similarity threshold.

See also
Default Versus Suggested Parameters

◆ ROC_DEFAULT_VERIFICATION_THRESHOLD

#define ROC_DEFAULT_VERIFICATION_THRESHOLD   (0.55f)

Default verification roc_similarity threshold.

See also
Default Versus Suggested Parameters

◆ ROC_CONVENIENT_SPOOF_THRESHOLD

#define ROC_CONVENIENT_SPOOF_THRESHOLD   (0.45f)

Default spoof threshold.

Approximately equal error rate between false accepts and false rejects.

See also
Default Versus Suggested Parameters ROC_SECURE_SPOOF_THRESHOLD

◆ ROC_SECURE_SPOOF_THRESHOLD

#define ROC_SECURE_SPOOF_THRESHOLD   (0.3f)

Spoof threshold for high security deployments.

Fewer false accepts but more false rejects.

See also
ROC_CONVENIENT_SPOOF_THRESHOLD

Typedef Documentation

◆ roc_similarity

typedef float roc_similarity

A measurement between two faces quantifying the pseudo-probability that they are the same person.

A larger value indicates a greater similarity. Similarity is measured between the Feature Vector component of two templates without consideration of any other potential sources of information. Similarity scores range from 0.0 to 1.0 where 0.0 represents a strong non-match and 1.0 represents identical templates.

We recommend using ROC_DEFAULT_SEARCH_THRESHOLD or ROC_DEFAULT_VERIFICATION_THRESHOLD and adjusting higher or lower depending on the tolerance for false matches versus false non-matches.

Estimating Error Rates

The following tables list empirically measured error rates for common scenarios. The true error rates for a given similarity threshold vary significantly across datasets. Customers are strongly encouraged to pick a similarity threshold based on an accuracy evaluation of their production data.

Frontal Constrained-Capture

Examples: driver's licenses, passports, mugshots and visas.

ROC_STANDARD_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-2 0.352 0.0001
1e-3 0.470 0.0004
1e-4 0.576 0.001
1e-5 0.668 0.002
1e-6 0.760 0.005
ROC_DEEP_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-2 0.322 < 0.0001
1e-3 0.426 0.0001
1e-4 0.523 0.0002
1e-5 0.611 0.0005
1e-6 0.692 0.0013
ROC_FAST_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-2 0.358 0.005
1e-3 0.464 0.013
1e-4 0.562 0.027
1e-5 0.648 0.048
1e-6 0.729 0.078

Unconstrained-Capture

Examples: selfies, ID document scans, social media, photo journalism and webcams.

ROC_STANDARD_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-2 0.126 0.0004
1e-3 0.232 0.0009
1e-4 0.336 0.002
1e-5 0.447 0.005
1e-6 0.540 0.01
ROC_DEEP_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-2 0.115 0.0001
1e-3 0.208 0.0004
1e-4 0.304 0.0006
1e-5 0.401 0.0013
1e-6 0.489 0.0022
ROC_FAST_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-2 0.140 0.005
1e-3 0.256 0.014
1e-4 0.361 0.04
1e-5 0.459 0.07
1e-6 0.550 0.12

Tattoo

Examples: law enforcement booking image.

ROC_TATTOO_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-2 0.158 0.008
1e-3 0.272 0.024
1e-4 0.364 0.049
1e-5 0.450 0.092
1e-6 0.530 0.161

Object

Examples: Object tracking

ROC_OBJECT_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-1 0.335 0.313
1e-2 0.447 0.700
1e-3 0.529 0.906
1e-4 0.560 0.968

Rolled Tenprint Fingerprints

Examples: Fingerprint cards

ROC_FINGERPRINT_REPRESENTATION
False Match Rate Similarity Threshold False Non-Match Rate
1e-1 -0.038 0.0038
1e-2 0.399 0.0062
1e-3 1.415 0.0073
1e-4 1.835 0.0075
1e-5 2.243 0.0077
1e-6 3.203 0.0080

Flat Tenprint Fingerprints

False Match Rate Similarity Threshold False Non-Match Rate
1e-1 0.078 0.0045
1e-2 0.961 0.0053
1e-3 1.247 0.0056
1e-4 1.921 0.0066
1e-5 2.878 0.0084
1e-6 5.924 0.0447

Functions That Measure Similarity

The following functions all measure similarity in the same way, but offer interfaces tailored to different use cases.

Function Description
roc_compare_templates Measure the similarity between two templates.
roc_compare_galleries Measure the pairwise similarity between all templates in two galleries.
roc_search Ranked search for a probe template against a gallery of templates.
roc_knn Construct the k-nearest neighbors graph of a gallery.

Function Documentation

◆ roc_fuse()

roc_error roc_fuse ( roc_similarity raw,
size_t  n,
roc_similarity fused 
)

Score-level fusion by computing a max.

Use this function when you've made multiple comparisons involving the same identity and wish to derive a single consolidated similarity score.

Parameters
[in]rawSimilarity scores with which to perform score-level fusion.
[in]nLength of raw.
[out]fusedCombined similarity score.
Remarks
This function is thread-safe.