Auto Enrollment Module

SmartFace provides face biometry for various purposes including the access control and attendance use cases. The Auto Enrollment module helps automate the process of enrolling unrecognized faces into watchlists based on specific criteria.

Auto Enrollment module connects to SmartFace GraphQL endpoint and listens for NoMatch notifications. When an unmatched face is detected, the module evaluates it against defined criteria and automatically enrolls it into one or multiple watchlists if the criteria are met.

Auto Enrollment module builds the database of identities automatically on the go which can be used particullary in KYC solutions or security surveillance.

How to use Auto Enrollment module

You can use the Auto Enrollment module either as ready-to-use docker image within the existing SmartFace docker deployment or as a custom build. The source code is available on our Github repository so you can fork and create a custom build to meet your requirements.

Add this container to your docker-compose.yml or other deployment

Docker

To integrate Auto Enrollment module to your existing SmartFace deployment add the following pattern to your existing docker compose file (docker-compose.yml):

services:
sf-station:
    image: ${REGISTRY}sf-station:${SFS_VERSION}
    container_name: SFStation
    restart: unless-stopped
    ports:
    - 8000:8000
    env_file: .env.sfstation

auto-enrollment:
    image: ${REGISTRY}integrations-auto-enroll
    container_name: SFAutoEnrollment
    restart: unless-stopped
    environment:
        - Config__WatchlistIds__0=00000000-0000-0000-0000-000000000000

networks:
default:
    external:
    name: sf-network

The Auto Enrollment module will now:

  1. Connect to the SmartFace GraphQL endpoint
  2. Listen for NoMatch notifications
  3. Evaluate unmatched faces against the defined criteria
  4. Automatically enroll faces that meet the criteria into the specified watchlists

Custom build

The source code is available on our Github repository. To run the application locally, follow these steps:

  • Clone the https://github.com/innovatrics/smartface-integrations/ Github repository using git commands or download the code using the “Download Zip” button
  • Open terminal
  • Navigate to /src/AutoEnrollment
  • Run dotnet run

Deployment

Following list contain all configuration options:

Source Configuration

  • Source__GraphQL__Host: Hostname of the GraphQL service
  • Source__GraphQL__Port: Port number for the GraphQL service
  • Source__OAuth__Url: OAuth token endpoint URL
  • Source__OAuth__ClientId: OAuth client ID for authentication
  • Source__OAuth__ClientSecret: OAuth client secret for authentication
  • Source__OAuth__Audience: OAuth audience identifier

Target Configuration

  • Target__Host: Hostname of the target API service
  • Target__Port: Port number for the target API service

General Configuration

  • Config__MaxParallelActionBlocks: Maximum number of parallel action blocks to process
  • Config__DuplicateSearchThreshold: Threshold for duplicate face detection (0-100)
  • Config__EnrollStrategy: Strategy for enrollment (e.g., FirstPassingCriteria)
  • Config__HardAbsoluteExpirationMs: Hard expiration time for tracklets in milliseconds
  • Config__TrackletTimeoutMs: Timeout for tracklets in milliseconds

General Conditions

  • Config__Conditions__FaceQuality__Min: Minimum face quality score and the default value is: 4500
  • Config__Conditions__FaceSize__Min: Minimum face size in pixels and the default value is: 70
  • Config__Conditions__FaceSize__Max: Maximum face size in pixels and the default value is: 450
  • Config__Conditions__FaceArea__Min: Minimum face area ratio and the default value is: 0.01
  • Config__Conditions__FaceArea__Max: Maximum face area ratio and the default value is: 1.50
  • Config__Conditions__FaceOrder__Max: Maximum face order in the frame and the default value is: 1
  • Config__Conditions__FacesOnFrameCount__Max: Maximum number of faces allowed in a single frame and the default value is: 2
  • Config__Conditions__TemplateQuality__Min: Minimum template quality score and the default value is: 80
  • Config__Conditions__Brightness__Min: Minimum brightness threshold and the default value is: 0.001
  • Config__Conditions__Brightness__Max: Maximum brightness threshold and the default value is: 1000
  • Config__Conditions__Sharpness__Min: Minimum sharpness threshold and the default value is: 0.001
  • Config__Conditions__Sharpness__Max: Maximum sharpness threshold and the default value is: 1000
  • Config__Conditions__YawAngle__Min: Minimum yaw angle in degrees and the default value is: -7
  • Config__Conditions__YawAngle__Max: Maximum yaw angle in degrees and the default value is: 7
  • Config__Conditions__PitchAngle__Min: Minimum pitch angle in degrees and the default value is: -25
  • Config__Conditions__PitchAngle__Max: Maximum pitch angle in degrees and the default value is: 25
  • Config__Conditions__RollAngle__Min: Minimum roll angle in degrees and the default value is: -15
  • Config__Conditions__RollAngle__Max: Maximum roll angle in degrees and the default value is: 15
  • Config__Conditions__FramePaddingAbsolute: Absolute padding around the face in pixels and the default value is: 50
  • Config__Conditions__FramePaddingRelative: Relative padding around the face and the default value is: 0.15

Stream Configuration

You can configure conditions individually per stream with following schema:

auto-enrollment:
    image: ${REGISTRY}integrations-auto-enroll
    container_name: SFAutoEnrollment
    restart: unless-stopped
    environment:
        ...
        # for the first stream
        - StreamConfigurations__0__StreamId=0=00000000-0000-0000-0000-000000000001
        - StreamConfigurations__0__FaceSize__Min=40

        # for the second stream
        - StreamConfigurations__1__StreamId=0=00000000-0000-0000-0000-000000000002
        - StreamConfigurations__1__FaceSize__Min=50

Each stream can have its own configuration with the following options:

  • StreamId: Unique identifier for the stream
  • WatchlistIds: Array of watchlist IDs to enroll faces into
  • FaceQuality__Min: Minimum face quality score (0-10000)
  • FaceSize__Min: Minimum face size in pixels
  • FaceSize__Max: Maximum face size in pixels
  • FaceArea__Min: Minimum face area ratio (0-1)
  • FaceArea__Max: Maximum face area ratio (0-1)
  • FaceOrder__Max: Maximum face order in the frame
  • FacesOnFrameCount__Max: Maximum number of faces allowed in a single frame
  • TemplateQuality__Min: Minimum template quality score (0-100)
  • Brightness__Min: Minimum brightness threshold
  • Brightness__Max: Maximum brightness threshold
  • Sharpness__Min: Minimum sharpness threshold
  • Sharpness__Max: Maximum sharpness threshold
  • YawAngle__Min: Minimum yaw angle in degrees
  • YawAngle__Max: Maximum yaw angle in degrees
  • PitchAngle__Min: Minimum pitch angle in degrees
  • PitchAngle__Max: Maximum pitch angle in degrees
  • RollAngle__Min: Minimum roll angle in degrees
  • RollAngle__Max: Maximum roll angle in degrees
  • FramePaddingAbsolute: Absolute padding around the face in pixels
  • FramePaddingRelative: Relative padding around the face (0-1)