Metrics

Metrics are the individual qualities related to the image or subject being analyzed by PreFace. Most Metrics are evaluated on demand when requested specifically through the PreFace API or when evaluating Compliance with a Profile.

Metric scores returned by PreFace are always greater than or equal to their Minimum and less than or equal to their Maximum allowable values. In addition to a Minimum and Maximum value, some Metrics have a Correctable Minimum and Correctable Maximum value. When specified in a Profile, the Correctable Minimum and Maximum determine the range of values that are allowed to be corrected during the Construction process.

Metrics are organized by category when used in a Profile. The Metric categories are :

  • Face Characteristics
  • Eye Characteristics
  • Image Characteristics
  • Anomalies
  • Image Geometry
  • Demographics
  • Image Storage

Face Characteristics

These metrics provide information related to facial characteristics of an image. These metrics are not modified by scaling and/or cropping the image in Knomi Face Analyzer.

Pose Angle - Yaw

The measurement of the subject’s head’s yaw angle in degrees. Negative value indicates the head is turned to the right. Positive value indicates the head is turned to the left. Typical values range between -20 and +20 degrees.

Metric Name Units Min Max
pose_angle_yaw DEGREES -90 90

Pose Angle - Pitch

The measurement of the subject’s head’s pitch angle in degrees. Negative values indicate the head is tilted up. Positive values indicate the head is tilted down. Typical values range between -5 and +5 degrees.

Metric Name Units Min Max
pose_angle_pitch DEGREES -90 90

Facial Dynamic Range

The number of bits in the dynamic range of the facial region in the input image.

There are 256 possible gray levels in typical images. Black is 0, white is 255 and all other graylevels are in between. Ideally, a face image will have graylevels that range from black (0) to white (255). In other words, you want a facial region to take full advantage of the graylevel range - it should have a full distribution of gray levels. For example, an image that is taken under low light levels will have a very small range of graylevels, e.g. black (0) up to some number well below 255. On the other hand. an image that is taken under very bright conditions will also have a very small range of graylevels, but the darkest pixel might be significantly higher than 0 and many pixels might be saturated white (255). This distribution of gray levels is the dynamic range - the optimal dynamic range is 256 (the total number of graylevels possible) in the facial region. For technical/historical reasons, this number is converted to a logarithm to the base 2, so 256 = 2**8 (2 to the exponent 8 is equal to 256) and the optimal range is 8.0. If the total number of graylevels is less than 256, say only 128, this number is 7.0 since 2**7 = 128. A facial dynamic range that has a range of graylevels that is greater than 128 but less than 256 becomes some number between 7 and 8. The unit for dynamic range using this formula is bits.

The ISO standard specifies that the minimum facial dynamic range should be 7 bits, or 128 graylevels. Knomi Face Analyzer software outputs the dynamic range only in the facial region, as some number of bits, using the formula described above.

Correctable values can be specified for this metric. When used in a profile they instruct the software to automatically attempt image enhancement if the dynamic range is in a certain range. Typically that range should be just below the acceptable range (e.g. 6.8 to 7.0), since you don’t want enhancement to be applied if the image is very bad to begin with.

Metric Name Units Min Max cMin cMax
facial_dynamic_range BITS 0 8 0 8

Average Facial Brightness

The average luminance measured from the facial region. Good values are generally in the range from 25 to 75, however, this is also dependent on the Facial Dynamic Range. Low values indicate that the facial region may be too dark, while high values indicate the facial region may be too light. The correctable values can be specified in a profile. If this the correctable range is specified, auto-enhancement is attempted only if the facial brightness range is within the specified limits.

Metric Name Units Min Max cMin cMax
percent_facial_brightness PERCENT 0 100 0 100

Brightness Score

The measure of how well the dynamic range is centered in the facial brightness distribution. Typical scores are in the range from 20 to 100. Optimal scores should be greater than or equal to 60. Scores less than 60 indicate that the facial region may be too dark. A score of 0 indicates that the facial region has too much saturated black. If a correctable range is specified, auto-enhancement is attempted only if the brightness score range is within the specified limits.

Metric Name Units Min Max cMin cMax
brightness_score PERCENT 0 100 0 100

Facial Saturation

The likelihood of a saturated coloring present in the subject’s facial region. A score of 0 indicates that a saturated color was not detected. A score of 100 indicates that a saturated color was detected.

Metric Name Units Min Max
percent_facial_saturation PERCENT 0 100

Smile

The likelihood that the subject is smiling or has their mouth open. A score of 0 indicates that a smile has not been detected. A score of 100 indicates that a smile has been detected.

Metric Name Units Min Max
smile_likelihood PERCENT 0 100

Eye Characteristics

These metrics provide information related to eye characteristics of an image. These metrics are not modified by scaling and/or cropping the image in Knomi Face Analyzer.

Eye Contrast

A measurement of how well the dynamic range is spread in eye regions of the subject. Scores of 60 or higher are adequate with higher scores being better. Scores of 40 or lower are considered to be inadequate. This value is often (though not necessarily) correlated with facial dynamic range. If a correctable range is specified in a Profile, auto-enhancement will be attempted during construction if the eye contrast range is within the specified limits.

Metric Name Units Min Max cMin cMax
eye_contrast PERCENT 0 100 0 100

Right Eye Obstructed by Glasses

The likelihood that the subject’s right eye is obstructed by their glasses. If the subject was not detected wearing glasses or if the right eye was not detected as valid then this score will return as 0. Otherwise, a score of 0 indicates the that no obstruction was detected. A score of 100 indicates that an obstruction was detected.

Metric Name Units Min Max
frame_covered_right_eye_likelihood PERCENT 0 100

Right Eye Obstructed by Hair

The likelihood that the subject’s right eye is obstructed by their hair. If the subject’s right eye was not detected as valid then this will return a score of 0. Otherwise, a score of 0 indicates that no obstruction was detected. A score of 100 indicates that an obstruction was detected.

Metric Name Units Min Max
hair_covered_right_eye_likelihood PERCENT 0 100

Right Eye Closed

The likelihood that the subject’s right eye is closed. If the subject’s right eye was not detected as valid then this will return a score of 0. Otherwise, a score of 0 indicates that the subject’s right eye was detected as open. A score of 100 indicates that the subject’s right eye was detected as closed.

Metric Name Units Min Max
right_eye_closed_likelihood PERCENT 0 100

Right Eye Valid

The likelihood that the subject’s right eye is visible. A score of 0 indicates the subject’s right eye was not detected as visible. A score of 100 indicates the subject’s right eye was detected as visible. The score returned by this metric affects the values of the Right Eye Obstructed by Glasses, Right Eye Obstructed by Hair, Right Eye Closed Metrics, and Off-Angle Gaze.

Metric Name Units Min Max
right_eye_valid_likelihood PERCENT 0 100

Left Eye Obstructed by Glasses

The likelihood that the subject’s left eye is obstructed by their glasses. If the subject was not detected wearing glasses or if the left eye was not detected as valid then this score will return as 0. Otherwise, a score of 0 indicates that no obstruction was detected. A score of 100 indicates that an obstruction was detected.

Metric Name Units Min Max
frame_covered_left_eye_likelihood PERCENT 0 100

Left Eye Obstructed by Hair

The likelihood that the subject’s left eye is obstructed by their hair. If the subject’s left eye was not detected as valid then this will return a score of 0. Otherwise, a score of 0 indicates that no obstructioned was detected. A score of 100 indicates that an obstruction was detected.

Metric Name Units Min Max
hair_covered_left_eye_likelihood PERCENT 0 100

Left Eye Closed

The likelihood that the subject’s left eye is closed. If the subject’s left eye was not detected as valid then this will return a score of 0. Otherwise, a score of 0 indicates the subject’s left eye was detected as open. A score of 100 indicates that the subject’s left eye was detected as closed.

Metric Name Units Min Max
left_eye_closed_likelihood PERCENT 0 100

Left Eye Valid

The likelihood that the subject’s left eye is visbile. A score of 0 indicates the subject’s left eye was not detected as visibile. A score of 100 indicates the subject’s left eye was detected as visibile. The score returned by this metric affects the values of the Left Eye Obstructed by Glasses, Left Eye Obstructed by Hair, Left Eye Closed Metrics, and Off-Angle Gaze.

Metric Name Units Min Max
left_eye_valid_likelihood PERCENT 0 100

Off-Angle Gaze

The likelihood of the subject’s eyes not directly looking at the camera. If either of the subject’s eyes are not visible or obstructed then a score of 0 will be returned. Otherwise, a score of 0 indicates the subject’s gaze was detected as being directed at the camera. A score of 100 indicates the subject’s gaze was detected as not being directed at the camera.

Metric Name Units Min Max
off_angle_gaze_likelihood PERCENT 0 100

Red-Eye

The likelihood that a subject was detected as having a Red-Eye effect in the image. A score of 0 indicates that the subject was not detected having a Red-Eye effect. A score of 100 indicates that the subject was detected as having a Red-Eye effect.

Metric Name Units Min Max
redeye_likelihood PERCENT 0 100

Image Characteristics

These metrics provide information related to global information about the image, as well as the background of the image outside the head region. These metrics may be modified by scaling and/or cropping the image in Knomi Face Analyzer, or by specific profiles used in Knomi Face Analyzer.

Number of Color Channels in Image

The number of color channels in the image. Valid values are 1 for Grayscale and 3 for RGB.

Metric Name Units Min Max
number_channels   1 3

Background Gray Levels

The level of gray detected in the background. Lower scores indicate lighter levels of gray detected. Higher scores indicate dark levels of gray detected. Lower scores are preferred over higher scores provided there is sufficient contrast between the background and the facial area. The optimal value is 18.

Metric Name Units Min Max
percent_background_gray PERCENT 0 100

Background Color Uniformity

The degree of color uniformity detected in the background of the image. A score of 0 indicates a non-uniform background was detected. A score of 100 indicates a uniform (single color) background was detected.

Metric Name Units Min Max
percent_background_uniformity PERCENT 0 100

Background Clutter

The likelihood that the background is cluttered. A score of 0 indicates no background clutter detected. A score of 100 indicates a cluttered background was detected.

Metric Name Units Min Max
degree_of_clutter PERCENT 0 100

Background Type

The type of background detected. A score of 1 indicates a simple background was detected. A score of 2 indicates a complex background was detected.

Metric Name Units Min Max
background_type   1 2

Background Color Balance

A measurement of the RGB Color Balancing in the background. A balanced color is one with the same Red, Green, and Blue color channel values. Lower scores indicate less color balance has been detected. Higher scores indicate that more color balance has been detected.

Metric Name Units Min Max
percent_color_balanced PERCENT 0 100

Background Pad Type

Specify the type of background padding used when performing Construction. Valid Values are:

1 - Pad using pixels of the average background color.

2 - Pad using the pixels in the edge row or column

3 - Do not pad at all.

4 - Pad using black pixels.

Metric Name Units Min Max
background_pad_type   1 4

Conditional Padding

Define the maximum amount of padding for Construction to use when extending the image as a multiple of the head’s width. I.E. A maximum of 2.0 will pad up to two times the subject’s head width in pixels.

Metric Name Units Min Max
conditional_padding   0 2

Anomalies

These metrics provide information related to external factors that may negatively affect facial recognition. These metrics are not modified by scaling and/or cropping an image in Knomi Face Analyzer.

Illumination Asymmetry

The extent to which the illumination of the image is not symmetrical. A score of 0 indicates symmetric illumination. A score of 100 indicates a high degree of asymmetry in illumination. Values less than or equal to 60 indicate the illumination is suitable and acceptable. Values greater than or equal to 80 indicate possible needs to re-capture images.

Metric Name Units Min Max
degree_of_illumination_asymmetry PERCENT 0 100

Facial Shadows

The likelihood that there are shadows present on the subject’s facial region. A score of 0 indicates that shadows have not been detected in the subject’s facial region. A score of 100 indicates shadows have been detected in the subject’s facial region.

Metric Name Units Min Max
shadows_likelihood PERCENT 0 100

Focus

The likelihood that the subject’s face is in focus in the image. A score of 0 indicates that the subject’s face was not detected as in focus. A score of 100 indicates a that the subject’s face was detected as in focus.

Metric Name Units Min Max
focus_likelihood PERCENT 0 100

Sharpness

The measurement of how well high-frequency details appear on the subject’s face. A score of 0 indicates a low level of high-frequency details detected. A score of 100 indicates a high level of high-frequency details detected.

Metric Name Units Min Max
sharpness_likelihood PERCENT 0 100

Unnatural Skin Color

The likelihood of the presence of unnatural color in the subject’s facial region. A score of 0 indicates a natural skin coloration was detected. A score of 100 indicates an unnatural skin color has been detected in the subject’s facial region.

Metric Name Units Min Max
unnatural_color_likelihood PERCENT 0 100

Glasses

The likelihood of glasses present on the subject’s face. A score of 0 indicates that glasses were not detected. A score of 100 indicates that glasses were detected.

Metric Name Units Min Max
glasses_likelihood PERCENT 0 100

Glasses with Dark Lenses

The likelihood of tinted or dark lensed glasses present on the subjects face. If the subject was not detected wearing glasses, this score will return as 0. Otherwise, a score of 0 indicates that glasses with tinted or dark lenses were not detected. A score of 100 indicates that glasses with tinted or dark lenses were detected.

Metric Name Units Min Max
dark_glasses_likelihood PERCENT 0 100

Glasses Glare

The likelihood that a glare was present on the subject’s glasses. If the subject was not detected wearing glasses, this score will return as 0. Otherwise, a score of 0 indicates that no glare was detected on the subject’s glasses. A score of 100 indicates that glare was detected on the subject’s glasses.

Metric Name Units Min Max
glare_likelihood PERCENT 0 100

Glasses with Heavy Frames

The likelihood that the subject is wearing glasses with a heavy frame. If the subject was not detected wearing glasses, this score will return as 0. Otherwise, a score of 0 indicates that glasses with heavy frames were not detected. A score of 100 indicates that glasses with heavy frames were detected.

Metric Name Units Min Max
heavy_frames_likelihood PERCENT 0 100

Forehead Obstruction

The likelihood that the subject’s forehead was detected as being obstructed by a hat or other covering. A score of 0 indicates that an obstruction or head covering was not detected. A score of 100 indicates that an obstruction or head covering was detected.

Metric Name Units Min Max
forehead_covering_likelihood PERCENT 0 100

Mask Detection

The likelihood that the subject is wearing a mask. A score of 0 indicates that the subject was not detected wearing a mask. A score of 100 indicates the subject was detected wearing a mask.

Metric Name Units Min Max
mask_likelihood PERCENT 0 100

Blur Detection

The strength of signal that the image is blurry. A score of 0 indicates that there is no blur. A score of 100 indicates that blur has been detected. Scores less than 60 are considered acceptable for filtering blurry images.

Metric Name Units Min Max
blur   0 100

Insufficient Lighting

The likelihood that a subject’s face isn’t in sufficient lighting. A score of 0 indicates there is sufficient light on the subject’s face. A score of 100 indicates that the subject is in insufficient lighting. Scores less than 60 are considered acceptable for filtering images that are too dark.

Metric Name Units Min Max
insufficient_lighting   0 100

Too Much Light - Left

The likelihood that there is excessive lighting on the left side of the image. A score of 0 indicates that there isn’t an overly strong source of light on the left. A score of 100 indicates that there is an overly strong light source present on the left side of the image. Scores less than 60 are considered acceptable for filtering images that are too bright.

Metric Name Units Min Max
too_much_light_left   0 100

Too Much Light - Right

The likelihood that there is excessive lighting on the right side of the image. A score of 0 indicates that there isn’t an overly strong source of light on the right. A score of 100 indicates that there is an overly strong light source present on the right side of the image. Scores less than 60 are considered acceptable for filtering images that are too bright.

Metric Name Units Min Max
too_much_light_right   0 100

Too Much Light - Above

The likelihood that there is excessive lighting on towards the top of the image. A score of 0 indicates that there isn’t an overly strong source of light towards the top of the image. A score of 100 indicates that there is an overly strong light source present towards the top of the image. Scores less than 60 are considered acceptable for filtering images that are too bright.

Metric Name Units Min Max
too_much_light_above   0 100

Too Much Light - Background

The likelihood that there is excessive lighting in the background of the image. A score of 0 indicates that there isn’t an overly strong source of light in the background. A score of 100 indicates that there is an overly strong light source present in the background of the image. Scores less than 60 are considered acceptable for filtering images that are too bright.

Metric Name Units Min Max
too_much_light_background   0 100

Face Obstruction

The likelihood that there is an object in front of the subject’s face between the eyebrows and chin. Glasses are not considered an obstruction, however, tinted glasses and sunglasses will be detected as an obstruction. A score of 100 indicates that there is an obstruction in front of the face. A score of 0 indicates that there is nothing in front of the face. For detecting if there is an obstruction above the eyebrows, please see how to use the Forehead Obstruction metric. This metric will fail to calculate a score and report an error on faces with yaw or pitch greater than 25 degrees.

Metric Name Units Min Max
face_obstruction   0 100

Image Geometry

These metrics provide information related to the geometry of the head region and the image. They can be modified by scaling and/or cropping the image in Knomi Face Analyzer. These metrics can be specified and/or constrained in a profile to either check image compliance or to enable construction of a compliant (cropped and/or scaled) version of the image to meet profile requirements.

Image Width

The width of the image measured in Pixels.

Metric Name Units Min Max
image_width PIXELS 1 100000

Image Height

The height of the image measured in Pixels.

Metric Name Units Min Max
image_height PIXELS 1 100000

Eye Separation

The distance between the left and right eye centers measured in Pixels.

Metric Name Units Min Max
eye_separation PIXELS 1 10000

Eye Axis Location Ratio

The location of the eye axis as a fraction of the image height up from the bottom. This is BB:B in the ISO standard.

Metric Name Units Min Max
eye_axis_location_ratio   0 1

Centerline Location Ratio

The location of the vertical centerline as a fraction of the image width measured from the left side of the image. This is AA:A in the ISO standard.

Metric Name Units Min Max
centerline_location_ratio   0 1

Image Height to Width Ratio

The ratio of image height to image width. This is B:A in the ISO standard.

Metric Name Units Min Max
height_to_width_ratio   0 100

Image Width to Head Width Ratio

The ratio of the image’s width to the head’s width. This is A:CC in the ISO standard.

Metric Name Units Min Max
image_width_to_head_width_ratio   0 100

Head Height/Image Height Ratio

The ratio of the head’s height to the image’s height. This is DD:B in the ISO standard.

Metric Name Units Min Max
head_height_to_image_height_ratio   0 100

Pose Angle - Roll

The measurement of the subject’s head’s roll angle in degrees. A negative value indicates the head is rotated counter-clockwise. A positive value indicates the head is rotated clockwise. By default, faces are always corrected for roll when constructing an image. Specifying a correctable range will overrides this default behavior, so that users can prevent rotation correction by limiting the correctable range to e.g cMin=0 cMax=0.

Metric Name Units Min Max cMin cMax
eye_axis_angle DEGREES -90 90 -90 90

Demographics

These metrics provide information related to demographics of the subject in an image.

Estimated Age

The subject’s estimated age based on facial analysis.

Metric Name Units Min Max
estimated_age YEARS 0 200

Age - Child

The confidence that the subject is a child. A score of 0 indicates no confidence in the subject being a child. A score of 100 indicates a high confidence in the subject being a child.

Metric Name Units Min Max
age_child_confidence PERCENT 0 100

Age - Youth

The confidence that the subject is a youth. A score of 0 indicates no confidence in the subject being a youth. A score of 100 indicates a high confidence in the subject being a youth.

Metric Name Units Min Max
age_youth_confidence PERCENT 0 100

Age - Adult

The confidence that the subject is an adult. A score of 0 indicates no confidence in the subject being an adult. A score of 100 indicates a high confidence in the subject being an adult.

Metric Name Units Min Max
age_adult_confidence PERCENT 0 100

Age - Senior

The confidence that the subject is a senior. A score of 0 indicates no confidence in the subject being a senior. A score of 100 indicates a high confidence in the subject being a senior.

Metric Name Units Min Max
age_senior_confidence PERCENT 0 100

Sex - Female

The confidence that the subject is a female. A score of 0 indicates no confidence in the subject being a female. A score of 100 indicates a high confidence in the subject being a female.

Metric Name Units Min Max
female_confidence PERCENT 0 100

Sex - Male

The confidence that the subject is a male. A score of 0 indicates no confidence in the subject being a male. A score of 100 indicates a high confidence in the subject being a male.

Metric Name Units Min Max
male_confidence PERCENT 0 100

Image Storage

These metrics provide information related to the storage of an image. The value for these metrics in a profile can control the format in which the image is stored. It is not possible to determine the JPEG Quality level of an input image. All other metrics listed in this category may be determined for an input image.

JPEG Quality Level

Define the JPEG Quality Level used for JPEG compression during Construction. This is only applicable when using the JPEG Image Format.

Metric Name Units Min Max
jpeg_quality_level   1 100

File Size

Define the minimum and maximum limits of the file size for a JPEG 2000 image created during Construction. This is only applicable when using the JPEG 2000 Image Format.

Metric Name Units Min Max
file_size BYTES 1 100000000

JPEG 2000 Compression Ratio

Define the compression ratio for a JPEG 2000 image created during Construction. This is only applicable when using the JPEG 2000 Image Format.

Metric Name Units Min Max
j2k_compression_ratio   1 10000

Within ROI JPEG 2000 Compression Ratio

Define the compression ratio within the facial region when using ROI based JPEG 2000 compression in Construction. This is only applicable when using the JPEG 200 ROI Image Format

Metric Name Units Min Max
j2k_roi_foreground_compression_ratio   1 10000

Outside ROI JPEG 2000 Compression Ratio

Define the compression ratio for the background region (outside of the ROI) when using ROI based JPEG 2000 compression in Construction. This is only applicable when using the JPEG 2000 ROI Image Format.

Metric Name Units Min Max
j2k_roi_background_compression_ratio   1 10000

Image Format

Define the acceptable format(s) for the image. The preferred value in a Profile defines the format of the image created during Construction. Supported Values are:

1 - tif

2 - bmp

3 - pnm

4 - jpeg

5 - jpeg 2000

6 - jpeg 2000 ROI

11 - 24 bit Raw

12 - PPM

13 - PGM

14 - PNG

Metric Name Units Min Max
image_format   1 14