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.
Service | Role | Description |
---|---|---|
RabbitMQ | Message Queue | Message Queue that is responsible for intra-service communication. |
Microsoft SQL Server | SQL database | Supported on Windows and Linux |
PostgreSQL | SQL database | Supported only on Linux |
MinIO | BLOB Storage | Images, 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.
Service | Scalable | Description |
---|---|---|
Base | No | Basic service providing several general features, such as zeroMQ notifications, database cleanup, or generally any functionality that does not need its own service. |
API | Yes | Service providing the REST API |
GrahpQL | Yes | Service providing the GraphQL API |
Camera | Yes | Provides camera processing, including in-process detection. Each camera has its own service. |
Detector | Yes | Detections faces on incoming images (CPU or GPU version) |
Extractor | Yes | Generate biometric templates and extract age, gender, and whether faces are covered by face masks (CPU or GPU version) |
Liveness | Yes | Provides the liveness/spoofcheck action (CPU or GPU version) |
Watchlist Matcher | Yes | Match extracted templates against watchlist members |
Face Matcher | Yes | Match extracted templates against non-registered faces from across the whole history |
Pedestrian Detector | Yes | Detects pedestrians on incoming images (CPU or GPU version) |
Pedestrian Extractor | Yes | Extracts information from detected pedestrians, including attribute analysis (CPU or GPU version) |
Object Detector | Yes | Used to detect and extract objects from incoming images (CPU or GPU version) |
Grouping | No | Service providing individual grouping features. |
Stream Data DB Worker | Yes | Service streaming SmartFace objects, such as face tracklets, object tracklets, and pedestrian tracklets into a database |
Video Reader | Yes | Preprocesses videos for Rapid Video Investigation and generates images sent for detection and extraction |
Video Collector | Yes | Manage processing the images during the Rapid Video Investigation |
Video Aggregator | Yes | Aggregate the video processing results and convert them to standard SmartFace objects such as tracklets |
Edge Stream Processor | No | A service that communicates with the SmartFace Edge Stream Processor on Smart Devices. Generally, one service can cover all Edge Stream Cameras |
Edge Streams State Synchronizer | No | A 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 sites. 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 Site. 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 Site
Two or more SmartFace Site are deployed on geographically separated locations. One Site is choosen as the leader and rest of the Sites are followers. All Watchlist changes are executed on leader and seamlesly distributed to all followers.
Read more information about Deployment