Installation of Nx Witness integration on separate machines

To install and configure SmartFace integration with Nx Witness on separate machines, you should complete the following three steps:


Install and configure SmartFace Platform

  1. Install SmartFace Platform v4.1 or later. For information on how to install SmartFace Platform, see Installation on Windows using installer.

    Please keep in mind that the installation requires an activation of the SmartFace Platform license. You can find all information in the above link.

  2. After a successful SmartFace Platform installation, ensure that MS SQL Server and RabbitMQ are reachable from the machine on which Nx Witness is hosted:

    1. Create the new RabbitMQ user for remote connection

      1. Create a new user (The default guest user is available only locally).

      2. Add the created user to the required virtual host nam ed /.

    2. Enable remote MS SQL connection
      For more information, see How to configure remote access and connect to a remote SQL Server instance with ApexSQL tools.

Install and configure Nx Witness VMS

Install Nx Witness VMS v4.X o r late r. You will need both Server and Client, as the Client will be used in configuration.

  1. Install Microsoft Visual C++ 2015-2019 Redistributable (x64) (VCredist)
    You may install VCRedist by the SmartFace Prerequisites installer or manually on the machine which hosts Nx Witness. If you choose to install VCRedist through the Prerequisities installer, mark only the option "Microsoft Visual C++ 2015-2019 Redistributable". You can find detailed instructions in the chapter Prerequisites installer.

  2. Activate the SmartFace Platform license
    To activate the SmartFace Platform license on the machine which hosts Nx Witness, follow the instructions described in Activate the SmartFace Platform license.

Install and configure the integration components

Perform these steps on the machine that hosts Nx Witness.

To install the SmartFace analytics plugin

  1. Stop the Nx Witness VMS.

  2. Download the SmartFace analytics plugin from our CRM portal and unzip the .dll file to {NxInstallPath}\plugins\. For example, for Nx Witness on Windows to C:\Program Files\Network Optix\Nx Witness\MediaServer\plugins.

  3. (optional) In case you would like to brand the plugin with your own labels, specify the plugin white labeling:

    1. Create sf_plugin_branding.json file in the installation path of Nx Witness server (Default windows path is C:\Program Files\Network Optix\Nx Witness\MediaServer\ ).

    2. Use formatting of a json file below:

      sf_plugin_branding.json
      {
      "product_name": "SmartFace Platform",
      "plugin_name": "SmartFace analytics plugin",
      "vendor_name": "Innovatrics"
      }
    3. Change labels for your desired branding

      Branding file

      It is important to create the branding file with branding changes prior to the first start of Nx Witness server with SmartFace analytics plugin. Otherwise you won't be able to change the branding of the plugin anymore. When plugin is loaded for the first time Nx Witness caches a plugin information about the branding into the database which can not be modified later on without an uninstallation of Nx Witness!

  4. Start the Nx Witness VMS.

  5. In the left panel, right-click the camera you want to process with SmartFace and select Camera Settings. In the Plugins tab, enable the SmartFace analytics plugin images/download/thumbnails/102038751/image2020-7-20_17-11-51.png . Repeat the step for each camera that you want to process with SmartFace.

    images/download/attachments/102038751/image2020-9-28_14-41-30.png

  6. In the Camera Settings of the analytics plugin, set a unique port for each camera that should be processed by SmartFace. We recommend to start from port 4000 . This is a TCP port which is used for a communication between the Nx Witness p lugin and SmartFace C amera services.

    To display all input fields in Camera settings, it is necessary to enable recording and after setting the required parameters, click the apply button to confirm.

  7. Download and unzip SmartFaceBinariesPackage.zip from our CRM portal.

  8. Configure the SmartFace Camera service with the MS SQL Server connection string and RabbitMQ address and credentials. This is performed by modifying the SmartFace.appsettings.json file:

    1. Configure the MS SQL connection string under the key ConnectionStrings.CoreDbContext to the value you have set during the SmartFace installation.

    2. Configure the RabbitMQ under the keys RabbitMQ.Username, RabbitMQ.Password, RabbitMQ.VirtualHost, RabbitMQ.Hostname and RabbitMQ.Port to the values you have set during the SmartFace installation.

  9. To start the SmartFace Camera service for each Nx Witness c amera that you want to process with SmartFace:

    1. Run the Service_Installer.bat script as an administrator.

    2. When prompted to enter service you would like to install, insert camera.

    3. For the service name of the SmartFace Camera Service on Nx Witness server, enter the Nx ID (UUID) of the N x Witness camera that you want to process.
      To obtain the Nx ID: G o to Camera Setting (right-click on a particular camera) and under the General tab, select More info. Then, copy the Nx ID from the Camera ID field.

      images/download/thumbnails/102038751/image2020-7-22_13-46-52.png

  10. Create a camera using the SmartFace API, hosted on the server where SmartFace Platform is installed

    1. SmartFace Platform is managed through the API. By default, the API is hosted on port 8098 and Swagger UI is available on localhost:8098/index.html.

    2. The endpoint to create the camera is POST /api/v1/Cameras. To find it in Swagger UI, go to the Camera section, open the POST call and click Try it out. Delete the prefilled request body and then fill it according to the following Example request body:

      Example request body
      {
      "serviceName": "338ef68-e0e6-c775-9459b244c102",
      "name": "My camera",
      "source": "sfcam://localhost:4000",
      "enabled": true,
      "faceDetectorResourceId": "cpu_remote",
      }
    3. Set the serviceName property to the Nx camera ID. The instructions on how to obtain the Nx ID are described above. Th is step binds the SmartFace Camera service with the camera created on the API.

    4. Set the name property as an arbitrary string used to identify the camera.

    5. Set the source property to the custom string in the format sfcam://<host>:<port>. For example, sfcam://localhost:4000 where:

      1. <host> is the address (IPv4 or hostname) of the machine where Nx Witness is hosted. As the Nx Witness an d Camera services should be hosted on the same machine, localhost should suffice.

      2. <port> is the TCP communication port which you have set up in the Nx Witness camera plugin settings.

    6. Preferably, set the remote detection for the SmartFace Camera service as follows: s et the FaceDetectorResourceId to either cpu_remote or gpu_remote, depending on whether you want to use GPU.

    7. (Optional) Configure other camera parameters depending on your requirements.

    8. To send the request, click Execute.
      When the SmartFace camera is enabled, then the video processing should be running and face objects should be available in Nx Witness.

      images/download/attachments/102038751/image2020-9-14_10-27-56.png