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:
- Connect to the SmartFace GraphQL endpoint
- Listen for NoMatch notifications
- Evaluate unmatched faces against the defined criteria
- 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 serviceSource__GraphQL__Port: Port number for the GraphQL serviceSource__OAuth__Url: OAuth token endpoint URLSource__OAuth__ClientId: OAuth client ID for authenticationSource__OAuth__ClientSecret: OAuth client secret for authenticationSource__OAuth__Audience: OAuth audience identifier
Target Configuration
Target__Host: Hostname of the target API serviceTarget__Port: Port number for the target API service
General Configuration
Config__MaxParallelActionBlocks: Maximum number of parallel action blocks to processConfig__DuplicateSearchThreshold: Threshold for duplicate face detection (0-100)Config__EnrollStrategy: Strategy for enrollment (e.g., FirstPassingCriteria)Config__HardAbsoluteExpirationMs: Hard expiration time for tracklets in millisecondsConfig__TrackletTimeoutMs: Timeout for tracklets in milliseconds
General Conditions
Config__Conditions__FaceQuality__Min: Minimum face quality score and the default value is: 4500Config__Conditions__FaceSize__Min: Minimum face size in pixels and the default value is: 70Config__Conditions__FaceSize__Max: Maximum face size in pixels and the default value is: 450Config__Conditions__FaceArea__Min: Minimum face area ratio and the default value is: 0.01Config__Conditions__FaceArea__Max: Maximum face area ratio and the default value is: 1.50Config__Conditions__FaceOrder__Max: Maximum face order in the frame and the default value is: 1Config__Conditions__FacesOnFrameCount__Max: Maximum number of faces allowed in a single frame and the default value is: 2Config__Conditions__TemplateQuality__Min: Minimum template quality score and the default value is: 80Config__Conditions__Brightness__Min: Minimum brightness threshold and the default value is: 0.001Config__Conditions__Brightness__Max: Maximum brightness threshold and the default value is: 1000Config__Conditions__Sharpness__Min: Minimum sharpness threshold and the default value is: 0.001Config__Conditions__Sharpness__Max: Maximum sharpness threshold and the default value is: 1000Config__Conditions__YawAngle__Min: Minimum yaw angle in degrees and the default value is: -7Config__Conditions__YawAngle__Max: Maximum yaw angle in degrees and the default value is: 7Config__Conditions__PitchAngle__Min: Minimum pitch angle in degrees and the default value is: -25Config__Conditions__PitchAngle__Max: Maximum pitch angle in degrees and the default value is: 25Config__Conditions__RollAngle__Min: Minimum roll angle in degrees and the default value is: -15Config__Conditions__RollAngle__Max: Maximum roll angle in degrees and the default value is: 15Config__Conditions__FramePaddingAbsolute: Absolute padding around the face in pixels and the default value is: 50Config__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 streamWatchlistIds: Array of watchlist IDs to enroll faces intoFaceQuality__Min: Minimum face quality score (0-10000)FaceSize__Min: Minimum face size in pixelsFaceSize__Max: Maximum face size in pixelsFaceArea__Min: Minimum face area ratio (0-1)FaceArea__Max: Maximum face area ratio (0-1)FaceOrder__Max: Maximum face order in the frameFacesOnFrameCount__Max: Maximum number of faces allowed in a single frameTemplateQuality__Min: Minimum template quality score (0-100)Brightness__Min: Minimum brightness thresholdBrightness__Max: Maximum brightness thresholdSharpness__Min: Minimum sharpness thresholdSharpness__Max: Maximum sharpness thresholdYawAngle__Min: Minimum yaw angle in degreesYawAngle__Max: Maximum yaw angle in degreesPitchAngle__Min: Minimum pitch angle in degreesPitchAngle__Max: Maximum pitch angle in degreesRollAngle__Min: Minimum roll angle in degreesRollAngle__Max: Maximum roll angle in degreesFramePaddingAbsolute: Absolute padding around the face in pixelsFramePaddingRelative: Relative padding around the face (0-1)