Integration

In this section, you will find instructions on how to integrate the SFE Stream Processor with the SmartFace Platform or any 3rd party solution.

In case of any issues, please refer to Troubleshooting or contact sfembedded-integration@innovatrics.com.


SmartFace integration

Install SmartFace 5 on your PC/server

To install SmartFace Platform on your machine follow the instructions at SmartFace Platform installation

Install SmartFace Embedded on your edge device

To install SmartFace Stream Processor on your edge device follow the instructions at SFE Stream Procesor installation

Configure SmartFace and SFE Stream Processor

To receive the notifications from SmartFace Embedded Stream Processor in SmartFace Station you have to create an Edge stream in SmartFace Station and configure the SFE Stream Processor connection.

Create Edge stream in SmartFace Station

To create and configure an Edge stream in SmartFace Station follow the instructions at Create Edge stream

SFE Stream processor configuration

In each settings.yaml file that comes as input for sfe_stream_processor you need to:

  • set connection.broker_address - IP address of the PC/server where the SmartFace Platform is running
  • set connection.client_id - ID of the MQTT client. It is unique for each camera stream. It has to be the same as the client ID used for the registration of a new edge stream in the SmartFace Station
  • set connection.topic - MQTT topic should be set to edge-stream
  • MQTT messagges are then sent to <connection.topic>/<connection.client_id> topic, for example edge-stream/38-lilin

For more information about the SFE Stream Processor configuration, please see SFE Stream Procesor configuration


3rd party solution integration

You can integrate SFE STream Processor with your server solution or local application.

SFE Stream Processor

SFE Stream Processor processes the camera input, detects faces, detects landmarks, extracts a template, matches the extracted template against the database and sends an MQTT message to an MQTT broker.

The configuration of the SFE Stream Processor is loaded from settings.yaml file which comes as an input argument.

./sfe_stream_processor settings.yaml

Messaging

SFE Stream Procesor Messaging

Watchlist member management

SFE Stream Procesor Watchlist Management

SFE REST Client

SFE REST Client application is responsible for the translation of HTTP requests to MQTT messages and MQTT messages to HTTP responses.

It also converts the FrameData message from MQTT to a WebSocket protocol.

The MQTT connection information is read from settings.yaml file which comes as an input argument. You also have to specify the IP address and port where the REST server listens to the requests. Example:

./sfe_client_rest settings.yaml 10.11.80.38 4242

MQTT broker

If you are not using SmartFace Platform as a server application, you need to run an MQTT broker on your server to be able to receive MQTT messages from the edge device.

MQTT broker is necessary to run on the camera as an MQTT Client is running both in SFE Stream Processor and SFE REST Client. One MQTT Client publishes MQTT messages to a specific MQTT topic to which the other MQTT Client is subscribed.

SFE Setting server

Settings server

Nx Witness Integration VMS integration

This part of documentation describes the SFE Stream Processor integration with Nx Witness Integration VMS.

Follow the installation instruction to install Nx Witness Integration VMS with SmartFace Embedded Camera plugin.

SFE Stream Processor

SFE Stream Processor application/plugin is running on the smart cameras processing the camera input, detecting faces, extracting landmarks, extracting face templates, matching the extracted template against the database and sending MQTT messages to an MQTT broker.

SmartFace Platform

SmartFace Platform is used for the synchronization of the watchlists from the server to smart cameras.

Nx Witness Integration VMS plugin

NX plugin consumes the MQTT messages coming from the smart camera, synchronizes the metadata with frames coming from the RTSP stream and invokes events in the NX VMS.

Messaging

MQTT protocol is used for communication between the SFE Stream Processor on camera and Nx Witness Integration VMS server

SFE Stream Procesor Messaging

Watchlist member management

MQTT protocol is also used for watchlist synchronization between SmartFace Platform (server) and SFE Stream Processor (camera)

SFE Stream Procesor Watchlist Management

MQTT broker

If you are not using SmartFace Platform as a server application, you need to run an MQTT broker on your server to be able to receive MQTT messages from the smart cameras.

MQTT broker is necessary to run on the camera as an MQTT Client is running both in SFE Stream Processor and NX VMS plugin. One MQTT Client publishes MQTT messages to a specific MQTT topic to which the other MQTT Client is subscribed.


Troubleshooting

In case you are facing any issues with SmartFace Stream Processor please check the following guidelines.

SmartFace integration

I see no notifications from the edge camera in the SmartFace Station

  1. Check if the Edge stream is created and enabled in SmartFace Configuration.
  2. The Edge stream Client ID in SF Configuration has to be the same as the MQTT Client ID (client_id) set on the camera. The camera configuration (settings.yaml) is available also via the web interface running on port 8592 by default: <camera_IP_address>:8592.
  3. Check if the MQTT broker address (broker_address) in camera settings.yaml is set to the IP address of SmartFace Platform
  4. Check if the MQTT username and password in camera settings.yaml are set correctly.
  5. Check if the same username/password is configured in RabbitMQ running on port 15672 and the same IP address as SmartFace.
  6. Check the logs of SFEdgeStreamProcessor if there is any new MQTT client connected
  7. Check if the network between the camera and SmartFace works
  8. Check the logs in the sfe_settings_server UI available at <camera_IP_address>:8592.
  9. Use sfe_client_gui the process the MQTT messages. You can even turn on allow_empty_message and enable sending full frames in settings.yaml to analyze what information is coming from the camera.