Architecture

From the higher perspective the SmartFace Platform consists from two parts:

SmartFace Prerequisites

The set of 3rd party services required for SmartFace are generally referenced as SmartFace Prerequisites and is sumarized in table bellow.

ServiceRoleDescription
RabbitMQMessage QueueMessage Queue that is responsible for intra-service communication.
Microsoft SQL ServerSQL databaseSupported on Windows and Linux
PostgreSQLSQL databaseSupported only on Linux
MinIOBLOB StorageImages, Videos and other BLOB storage. Implementation of AWS S3 interface. Can be changed to native AWS S3

SQL Database

Structured and relational data about watchlists, events, configuration together with biometric templates are stored in the SQL database. Images of detected faces and full frame images are stored in the NoSQL database. Supported SQL database is either Microsoft SQL service or PostgreSQL service

Only one SQL database is required in SmartFace Prerequisites. PostgreSQL is configured for Linux deployment by default. SmartFace Platform supports Microsoft SQL 2016 and higher and Postgre SQL v.13.2 and higher

BLOB Storage

SmartFace uses AWS S3 interface for BLOB Storage. The MinIO is a AWS S3 interface implementation and is shipped with SmartFace by default. However, can be re-configured to use native AWS S3.

Note Not all endpoints need to have both SQL and NoSQL databases up and running. In the case you do not need to invoke and store the images of detected faces and the full frames of watchlist members you can avoid using the MinIO database.

For some endpoints, such as liveness / spoof check, not even a SQL database is needed.

SmartFace Services

SmartFace Services is a set of running services where each service has its own responsibility. Table below sumarizes services; those marked as Scalable can (and in most cases also should) have multiple instances running in order to handle more load.

ServiceScalableDescription
BaseNoBasic service providing several general features, such as zeroMQ notifications, database cleanup, or generally any functionality that does not need its own service.
APIYesService providing the REST API
GrahpQLYesService providing the GraphQL API
CameraYesProvides camera processing, including in-process detection. Each camera has its own service.
DetectorYesDetections faces on incoming images (CPU or GPU version)
ExtractorYesGenerate biometric templates and extract age, gender, and whether faces are covered by face masks (CPU or GPU version)
LivenessYesProvides the liveness/spoofcheck action (CPU or GPU version)
Watchlist MatcherYesMatch extracted templates against watchlist members
Face MatcherYesMatch extracted templates against non-registered faces from across the whole history
Pedestrian DetectorYesDetects pedestrians on incoming images (CPU or GPU version)
Pedestrian ExtractorYesExtracts information from detected pedestrians, including attribute analysis (CPU or GPU version)
Object DetectorYesUsed to detect and extract objects from incoming images (CPU or GPU version)
GroupingNoService providing individual grouping features.
Stream Data DB WorkerYesService streaming SmartFace objects, such as face tracklets, object tracklets, and pedestrian tracklets into a database
Video ReaderYesPreprocesses videos for Rapid Video Investigation and generates images sent for detection and extraction
Video CollectorYesManage processing the images during the Rapid Video Investigation
Video AggregatorYesAggregate the video processing results and convert them to standard SmartFace objects such as tracklets
Body Parts DetectorYesExtract body part coordinates from detected pedestrians
Edge Stream ProcessorNoA service that communicates with the SmartFace Edge Stream Processor on Smart Devices. Generally, one service can cover all Edge Stream Cameras
Edge Streams State SynchronizerNoA service that provides Watchlist Synchronization for the SmartFace Edge Stream Processor on Smart Devices

Deployment and Scalability

SmartFace is very versatile in deployment and scalability, beginning with single server deployment up to geographically separated clusters. SmartFace can be scaled horizontally and vertically to meet almost any production requirements.

  • Scale SmartFace vertically using CPU with higher amount of cores with highest tact and performance possible
  • Also scale horizontally by adding more services to process the incoming tasks in parallel

Read more information about Scaling

Single Server

All SmartFace components are deployed on single machine. Vertically scalable setup depends on number of CPU cores, ideal as a cost-saving PoC or few cameras production setup.

Multi Server

SmartFace componens are deployed on multiple servers forming a single SmartFace Cluster. For example, SmartFace Prerequisites may be deployed on a standalone server with appropriate attached storage and SmartFace Services are deployed and scalled on the rest of the servers.

In case of high data load to storage, even SmartFace Prerequisites can be deployed separatelly, based on disk IO needs for instance.

Multi Cluster

Two or more SmartFace cluster are deployed on geographically separated sites. One Cluster is choosen as the leader and rest of the Clusters are followers. All Watchlist changes are executed on leader and seamlesly distributed to all followers.

Read more information about Deployment