Configuring the Face detector VL

Creating system variables for the Axxon One server in Linux OS

Creating system variables for the Axxon One server in the failover mode in Linux OS

The VL Face Recognition Pack add-on (see Installing DetectorPack add-ons) includes a utility that allows you to create GPU neural network caches without using Axxon One. The presence of the cache speeds up the initialization, optimizes video memory consumption, and ensures the start and correct operation of the Face detector VL on the GPU.

You must recreate the cache when:

  • updating the VL face recognition pack add-on (see Installing DetectorPack add-ons),
  • changing the resolution of the video stream for which the cache is created,
  • changing the Nvidia GPU model,
  • updating Nvidia GPU drivers.

To optimize the operation of the Face detector VL on GPU, do the following:

  1. Stop the server (see Starting and stopping the Axxon One Server in Linux OS).

    If the system uses the software that is running on the GPU, you must stop its operation. 

  2. Login as ngp superuser:

    1. In the command prompt, run the command:

      sudo su ngp
    2. Enter the password for the superuser.

  3. Create a folder with a custom name to store the cache. For example:

    mkdir /opt/AxxonSoft/AxxonOne/gpucache
  4. Change folder permissions:

    chmod -R 777 /opt/AxxonSoft/AxxonOne/gpucache
  5. Go to the /opt/AxxonSoft/AxxonOne folder:

    cd /opt/AxxonSoft/AxxonOne
  6. Open the server configuration file for editing:

    nano instance.conf

    When you use the server in the failover mode, you must:

    1. Open the /etc/AxxonSoft folder:
      cd /etc/AxxonSoft
    2. Open the server configuration file for editing:
      nano axxon-one.conf

      Before you make changes to the axxon-one.conf file, we recommend reading the instructions on the page Creating system variables for the Axxon One server in the failover mode in Linux OS.

    3. Add the GPU_CACHE_DIR system variable in the configuration file, where the value will specify the path to the cache location folder. For example:
      export GPU_CACHE_DIR="/opt/AxxonSoft/AxxonOne/gpucache"
    4. Save the changes in the file.
    5. Add the GPU_CACHE_DIR system variable in the /etc/profile file.
      export GPU_CACHE_DIR="/opt/AxxonSoft/AxxonOne/gpucache"
    6. Run the command:
      source /etc/profile
  7. Add the GPU_CACHE_DIR system variable, where the value will specify the path to the cache location folder. For example:

    export GPU_CACHE_DIR="/opt/AxxonSoft/AxxonOne/gpucache"
  8. Save the server configuration file using the Ctrl+O keyboard shortcut.

  9. Exit the file editing mode using the Ctrl+X keyboard shortcut.

    When you change the server configuration (see Changing the configuration of the Axxon One Server in Linux OS) or update to the new Axxon One version, the system variables previously added to the instance.conf configuration file will be deleted (see Creating system variables for the Axxon One server in Linux OS).

  10. In the terminal, run the command that was used to add the system variable with the path to the cache location folder. For example:
    export GPU_CACHE_DIR="/opt/AxxonSoft/AxxonOne/gpucache"
  11. Go to the /opt/AxxonSoft/DetectorPack/ folder:

    cd /opt/AxxonSoft/DetectorPack
  12. Run the following command:

    ./VlFaceGpuCacheGenerator
  13. Press Enter.

  14. Specify the ID of the required GPU (see Selecting Nvidia GPU when configuring detectors).

  15. Press Enter.

  16. If you want to change the resolution of the video stream:

    1. Enter y. If you don't want to change the resolution of the video stream, enter n

    2. Specify the required resolution. For example, 3840x2160 2688x1520. The GPU uses the default 1920x1080 video stream resolution. If you change the resolution of the video stream from 1920x1080 and higher, it increases the percentage of face detection 

  17. Press Enter. As a result, the process of creating the cache starts. If you get the 0 value, it means that the cache is created successfully.

Optimizing the operation of the Face detector VL on the GPU is complete.