Skip to main content
Version: 3.8.0

Javascript Demo Program

The demo directory contains the source code for the Face SDK VideoEngine JS demo program that demonstrates such Face SDK features as face detection and tracking, and active liveness estimation. To run the demo program, follow the steps below. See the information on integrating and using the Face SDK VideoEngine JS plugin in the section Interface of the Demo Program.

Running the Demo Program#

  • Software requirements
    • Node >= 10
    • [Optional] Yarn >= 1.22

Follow the steps below to run the demo:

  1. Plug in a webcam to your computer.
  2. Clone 3DiVi/face-sdk.
  3. In the directory examples/javascript/demo, run npm install or yarn install in the console.
  4. After the project is initialized (you will see a message about successful initialization in the console), run the command npm start or yarn start. After that, the browser will automatically open a page with the demo program.
  5. In the browser pop-up window, select "Allow camera access".

Interface of the Demo Program#

This section provides information on available features of the Face SDK VideoEngine JS demo that demonstrates face detection and tracking, as well as active liveness estimation.

  • On the left side of the screen, the video stream from the webcam (Stream) is displayed.
  • To start the Active Liveness check, press the Start button. During the processing, a progress bar and the phrase "Wait, detection is in progress ..." are displayed above the window with the video stream. A face is considered to belong to a real person if at least one blink was made during processing and the head was turned at least once.
  • The best shot of the face is displayed to the right of the video stream. If the face is not positioned correctly, the browser will display hints during processing, for example, "Please turn your head up", "Please come closer to the camera", etc.
  • Press the Stop button to stop the Active Liveness check.
  • To clear the received data, press the Clear button.
Last updated on