Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
Face SDK 9.15.3
Light Logo Dark Logo
Face SDK 9.15.3
  • Introduction
  • Requirements
  • Quick start
  • Licensing
  • Distribution
  • Troubleshooting

Usage

  • Overview
  • License handling
  • Image handling
  • Error Handling
  • AI Models
  • Face analysis
  • Face background removal
  • Face comparison
  • Face comparison on card
  • Face detection
  • Face encoding
  • Face tracking
  • Face search
  • Presentation attack detection
  • Portrait processing

Reference

  • Face API
    • BackgroundUniformity
      • colorUniformity
      • structureUniformity
    • ColorBasedPadResult
      • confidence
      • score
    • DetectedFace
      • bounds
      • clone
      • create
      • detectionScore
      • fromBuffer
      • fromFile
      • getDistanceToCamera
      • getExpandedBounds
      • getInterocularDistance
      • getPortraitBounds
      • id
      • landmarks
      • rescale
      • rotate
      • toBuffer
      • toFile
      • translate
    • DetectedFaceAttackSupport
      • attackSupport
      • score
    • DetectedFaceList
      • add
      • clear
      • clone
      • count
      • findDetectedFace
      • get
      • getCount
      • getIdList
      • getLargestFace
      • removeAt
      • rescaleAll
      • resize
      • set
    • EyeGaze
      • leftEyeXGaze
      • leftEyeYGaze
      • rightEyeXGaze
      • rightEyeYGaze
    • FaceAnalyser
      • applyAlphaMask
      • applyMask
      • checkColorizedImage
      • computeAge
      • computeAttributes
      • computeBackgroundUniformity
      • computeExpression
      • computeEyeGaze
      • computeEyeOpenness
      • computeEyeRedness
      • computeGeometricAttributes
      • computeGlassesAttributes
      • computeLandmarks
      • computeNoise
      • computePhotographicAttributes
      • computePose
      • computePoseWithLandmarks
      • detectFaceMask
      • detectOcclusions
      • expressionSensibility
      • overExposureSensibility
      • removeCompressionArtifacts
      • segmentBackground
      • segmentFace
      • threadCount
      • underExposureSensibility
    • FaceAttackSupport
    • FaceAttributes
      • glasses
      • hat
      • makeUp
      • male
      • mouthOpen
      • smile
    • FaceCandidate
      • clone
      • id
      • score
    • FaceCandidateList
      • add
      • clear
      • clone
      • count
      • get
      • getCount
      • removeAt
      • resize
      • set
    • FaceDetector
      • confidenceThreshold
      • detectFaces
      • model
      • nmsIouThreshold
      • processingUnit
      • threadCount
      • trackFaces
      • warmUp
    • FaceEncoder
      • computeQuality
      • createTemplate
      • minimalIod
      • model
      • processingUnit
      • threadCount
      • warmUp
    • FaceError
    • FaceException
    • FaceExpression
    • FaceIndexer
      • addTemplate
      • create
      • deleteTemplate
      • format
      • fromFile
      • getTemplate
      • maximumTemplateCount
      • resize
      • searchTemplate
      • templateCount
      • toFile
    • FaceLibrary
      • getModelFileName
      • getVersion
      • getVersionEx
      • loadModel
      • loadModelBuffer
      • unloadModel
    • FaceLicense
      • activate
      • activateActivationKey
      • activateActivationKeyBuffer
      • activateBuffer
      • activateSerialKey
      • activateSerialKeyBuffer
      • checkLicense
      • checkLicenseBuffer
      • checkLicenseBufferWithCard
      • checkLicenseWithCard
      • checkModule
      • finalizeCheckLicenseWithCard
      • getExpiryDate
      • getExternalDriveHardwareCode
      • getHostHardwareCode
      • getLicenseFileHardwareCode
      • getLicenseFileSerial
      • getLicenseName
      • getLicenseOwner
      • getLicensePath
      • getLicenseType
      • getModuleCount
      • getModuleName
      • getModuleValue
      • getProductReference
      • getRemainingDays
      • reactivate
      • reactivateBuffer
    • FaceMatcher
      • compareTemplateLists
      • compareTemplates
      • searchTemplate
    • FaceMatcherThreshold
    • FaceModel
    • FaceOcclusionScores
      • leftEyeOcclusionScore
      • mouthOcclusionScore
      • noseOcclusionScore
      • rightEyeOcclusionScore
    • FacePad
      • attackSupportDetectorConfidenceThreshold
      • computeBlurrinessScore
      • computeColorBasedScore
      • computeDepthBasedScore
      • detectAttackSupport
    • FacePose
      • pitch
      • roll
      • yaw
    • FaceSegmentationLabel
    • FaceTemplate
      • clone
      • format
      • fromBuffer
      • fromFile
      • quality
      • toBdt
      • toBit
      • toBuffer
      • toFile
      • update
    • FaceTemplateDict
      • add
      • clear
      • clone
      • containsKey
      • count
      • get
      • getCount
      • keys
      • remove
      • set
    • FaceTemplateFormat
    • FaceTemplateList
      • add
      • clear
      • clone
      • count
      • get
      • getCount
      • removeAt
      • resize
      • set
    • FaceTracker
      • confidenceThreshold
      • detectFaces
      • detectionModel
      • encodingModel
      • matchThreshold
      • maximumTrackedFaceAge
      • minimumTrackedFaceAge
      • nmsIouThreshold
      • threadCount
      • trackFaces
      • warmUp
    • GeometricAttributes
      • headImageHeightRatio
      • headImageWidthRatio
      • horizontalPosition
      • resolution
      • verticalPosition
    • GlassesAttributes
      • frameOnEye
      • heavyFrame
      • tintedGlasses
    • Image
      • clone
      • compare
      • correctGamma
      • crop
      • data
      • downscale
      • downscaleTo
      • extractRoi
      • extractRoiWithColor
      • flip
      • flipTo
      • fromBuffer
      • fromFile
      • fromNumpy
      • fromRawBuffer
      • fromYuvPlanes
      • getPixels
      • height
      • pad
      • pixelDepth
      • pixelFormat
      • reallocate
      • resize
      • resizeTo
      • rotate
      • rotateTo
      • set
      • stride
      • toBuffer
      • toBufferObject
      • toFile
      • toNumpy
      • toRawBuffer
      • transpose
      • width
    • ImageBuffer
      • clone
      • getData
      • getPixels
    • ImageDict
      • add
      • clear
      • clone
      • containsKey
      • count
      • get
      • getCount
      • keys
      • remove
      • set
    • ImageError
    • ImageFormat
    • ImageList
      • add
      • clear
      • clone
      • count
      • get
      • getCount
      • removeAt
      • resize
      • set
    • LibVersion
      • major
      • minor
    • LicenseError
    • LicenseHardwareCodeType
    • LicenseType
    • PadStatus
    • PhotographicAttributes
      • equalBrightness
      • faceDynamicRange
      • flashReflection
      • naturalSkinColor
      • overExposure
      • pixelation
      • sharpness
      • underExposure
    • PixelFormat
    • Point
      • x
      • y
    • PointList
      • add
      • clear
      • clone
      • count
      • get
      • getCount
      • removeAt
      • resize
      • set
    • PoolingMethod
    • Portrait
      • age
      • backgroundUniformity
      • clear
      • clone
      • expression
      • eyeGaze
      • faceId
      • faceMask
      • faceTemplate
      • fromBuffer
      • genderMale
      • geometricAttributes
      • glasses
      • hat
      • image
      • imageCenter
      • imageScale
      • imageTranslation
      • instruction
      • landmarks
      • leftEyeOpening
      • leftEyeVisibility
      • lookStraightScore
      • makeup
      • mouthOpening
      • mouthVisibility
      • noseVisibility
      • padScore
      • padStatus
      • photographicAttributes
      • pose
      • qualityCheckpoints
      • qualityScore
      • rightEyeOpening
      • rightEyeVisibility
      • smile
      • status
      • subjectPosition
      • toBuffer
      • trackedFace
    • PortraitInstruction
    • PortraitProcessor
      • backgroundColorUniformityThreshold
      • backgroundStructureUniformityThreshold
      • createPortrait
      • cropAspectRatio
      • cropEyePositionRatio
      • cropIcaoPortrait
      • cropIodRatio
      • cropMargin
      • cropPortrait
      • detectOcclusions
      • detectPresentationAttack
      • dynamicRangeThreshold
      • equalBrightnessThreshold
      • estimateAge
      • estimateBackgroundUniformity
      • estimateExpression
      • estimateFaceAttributes
      • estimateGeometryQuality
      • estimatePhotographicQuality
      • expressionSensibility
      • eyeOcclusionThreshold
      • eyeOpeningThreshold
      • faceDetectionImageSize
      • faceDetectionModel
      • faceDetectionThreshold
      • faceEncodingModel
      • faceMaskThreshold
      • glassesThreshold
      • hatThreshold
      • makeupThreshold
      • maleThreshold
      • maximumEyeGazeX
      • maximumEyeGazeY
      • maximumHeadHeightRatio
      • maximumHeadWidthRatio
      • maximumHorizontalPosition
      • maximumIod
      • maximumPitchAngle
      • maximumRollAngle
      • maximumVerticalPosition
      • maximumYawAngle
      • minimumHeadHeightRatio
      • minimumHeadWidthRatio
      • minimumHorizontalPosition
      • minimumIod
      • minimumVerticalPosition
      • mouthOcclusionThreshold
      • mouthOpenThreshold
      • naturalSkinColorThreshold
      • noFlashReflectionThreshold
      • noiseThreshold
      • noseOcclusionThreshold
      • overExposureThreshold
      • padThreshold
      • pixelationThreshold
      • redEyeThreshold
      • removeBackground
      • reset
      • resolutionThreshold
      • sharpnessThreshold
      • smileThreshold
      • threadCount
      • tintedGlassThreshold
      • trackerMatchingThreshold
      • trackerMaximumFaceAge
      • trackerMinimumFaceAge
      • trackerNmsIouThreshold
      • underExposureThreshold
      • updatePortrait
    • PortraitQualityCheckpoints
      • backgroundUniform
      • brightnessBalanced
      • dynamicRange
      • expressionNeutral
      • eyesOpen
      • headHeightCorrect
      • headHorizontalPositionCorrect
      • headVerticalPositionCorrect
      • headWidthCorrect
      • imageColoured
      • imageResolutionCorrect
      • imageSharp
      • leftEyeVisible
      • lookStraight
      • mouthClosed
      • mouthVisible
      • noFlashReflection
      • noGlasses
      • noHat
      • noNoise
      • noOverExposure
      • noPixelation
      • noRedEye
      • noSmile
      • noUnderExposure
      • noseVisible
      • poseFrontal
      • rightEyeVisible
      • skinColorNatural
    • PortraitStatus
    • ProcessingUnit
    • Rectangle
      • bottomLeft
      • bottomRight
      • topLeft
      • topRight
    • StringList
      • add
      • clear
      • count
      • get
      • getCount
      • removeAt
      • resize
      • set
    • SubjectPosition
    • TrackedFace
      • bounds
      • clone
      • create
      • detectionScore
      • faceTemplate
      • fromBuffer
      • fromFile
      • getAsDetectedFace
      • getDistanceToCamera
      • getExpandedBounds
      • getInterocularDistance
      • getPortraitBounds
      • id
      • landmarks
      • predictedBounds
      • rescale
      • rotate
      • toBuffer
      • toFile
      • trackingStatus
      • translate
    • TrackedFaceList
      • add
      • clear
      • clone
      • count
      • findTrackedFace
      • get
      • getCount
      • getIdList
      • getLargestFace
      • removeAt
      • rescaleAll
      • resize
      • set
    • TrackingStatus

ABOUT

  • Release notes
  • License agreement
  • Third-Party Libraries
  • Terms and Definitions
  • Frequently Asked Questions
Back to top

Face search¶

Face search is the process in which a probe template is searched against the reference templates of more than one subject. It returns a candidate list.

The FaceMatcher module provides a search method that performs a one-to-many search of a biometric probe against a previously initialized dictionary of biometric references. This method is generally used when the database size is relatively small (up to 1000 templates).

For large databases (over 1000 templates), the FaceIndexer module offers a more efficient way of performing a one-to-many search. From an index file created from a list of face templates, it uses modern indexing techniques for fast, lossless searching.

Constructing a face index¶

The example below demonstrates how to construct a face index:

# Maximum user number to size the indexer
count = 100

# create indexer
indexer  = FaceIndexer.create(count, FaceTemplateFormat.V9A)

for user_index in range(10):
    
    # load or create a FaceTemplate for the user 
    record = FaceTemplate.from_file(
        "data/{}.bin".format(user_index)
        )
    
    # Add record to indexer with a chosen user identifier
    indexer.add_template(record, "user_{}".format(user_index))

# save the index to a file
indexer.to_file("data/face_index.db")

Searching in the index¶

The example below demonstrates how to search for a face using the index:

# load database
indexer  = FaceIndexer.from_file("data/face_index.db")

# load or create a FaceTemplate for the user 
probe = FaceTemplate.from_file(
    "data/user5.bin"
    )
    
# Search user in indexer
candidate_list = indexer.search_template(probe, 1)

if candidate_list:
    print("Found match with : " + candidate_list[0].id)
    

See also¶

  • FaceEncoder Class

  • FaceIndexer Class

  • FaceMatcher Class

Next
Presentation attack detection
Previous
Face tracking
Copyright © 2025, id3 Technologies
Made with Furo
On this page
  • Face search
    • Constructing a face index
    • Searching in the index
    • See also