External Detectors

It is possible to integrate FindFace Multi with the external detectors that can source frames for object recognition, e.g., Access Control terminals. In this case, once FindFace Multi receives a frame from an external detector, it will initiate the extraction of the object’s feature vector and event creation. You can work with these events by analogy with the events from CCTV cameras.

Important

To use an external detector for object recognition, liveness detection must be enabled. If you have not enabled it during installation, you can do it now, using information from the Enable Face Liveness Detection section.

The liveness model liveness.web.v0 comes in the default configuration and is used for authentication by face. If your use case implies connection to an external detector for object recognition, replace the liveness.web.v0 model with the liveness.pacs.v2 model in the findface-extraction-api.yaml configuration file. Since both models employ the same normalizer facenorm.multicrop_full_crop2x_size400.cpu.fnk there is no need to change it.

Replace the liveness model in the /opt/findface-multi/configs/findface-extraction-api/findface-extraction-api.yaml configuration file:

GPU

sudo vi /opt/findface-multi/configs/findface-extraction-api/findface-extraction-api.yaml

extractors:
  ...
  models:
    face_liveness: faceattr/liveness.pacs.v2.gpu.fnk
    ...

CPU

sudo vi /opt/findface-multi/configs/findface-extraction-api/findface-extraction-api.yaml

extractors:
  ...
  models:
    face_liveness: faceattr/liveness.pacs.v2.cpu.fnk
    ...

Restart the findface-multi-findface-extraction-api-1 container.

sudo docker container restart findface-multi-findface-extraction-api-1

The external detector integration is done through HTTP API. After the primary configuration, FindFace Multi will issue a token. Specify this token in every API request sent by the external detector to FindFace Multi to authorize the device.

To integrate an external detector with FindFace Multi, do the following:

  1. Navigate to the Video Sources -> External Detectors.

  2. Click + Add or Add external detectors if you don’t have any detectors yet.

    add_ext_detector_en

  3. In the opened tab, specify the external detector name and description. Add the external detector to a camera group, so it will be more convenient to filter events from this device later.

    ext_det_window_en

    Tip

    You can allot a separate camera group specifically to external detectors.

  4. On the Add and configure tab, enable liveness. On the same tab you will see a token.

    ex_detect_config_en

  5. Specify this token in every API request that the external detector sends to FindFace Multi to create an event. As a result, frames passed in the requests will be associated with the external detector’s relevant camera and processed by analogy with the frames from CCTV cameras.

    detector_token_en

    Detailed interactive documentation on the FindFace Multi HTTP API is available after installation at http://<findface-ip:port>/api-docs. Learn and try it out.

    Tip

    You can also find it by navigating to Settings -> API Documentation in the web interface.