Enable Face Liveness Detection

The FindFace Server face liveness detector tells apart live faces from face representations, such as face images, videos, or masks. The liveness detector estimates face liveness with a certain level of confidence and returns the confidence score along with a binary result real/fake, depending on the pre-defined liveness threshold.

Following the instructions below to enable face liveness detector.

Note

The face liveness detector functions on both GPU- and CPU-acceleration. However, it is much slower on CPU.

In this section:

Enable Face Liveness Detector

To enable the face liveness detector, do the following:

  1. Open the /opt/ffserver/configs/video-worker.yaml configuration file. In the liveness section, specify the neural network models as shown in the example:

    GPU

    sudo vi /opt/ffserver/configs/video-worker.yaml
    
    liveness:
      fnk: /usr/share/findface-data/models/faceattr/liveness.pacs.v2.gpu.fnk
      norm: /usr/share/findface-data/models/facenorm/facenorm.multicrop_full_crop2x_size400.gpu.fnk
    ...
    

    CPU

    sudo vi /opt/ffserver/configs/video-worker.yaml
    
    liveness:
      fnk: /usr/share/findface-data/models/faceattr/liveness.pacs.v2.cpu.fnk
      norm: /usr/share/findface-data/models/facenorm/facenorm.multicrop_full_crop2x_size400.cpu.fnk
    ...