Skip to main content
Version: 3.16.0 (latest)

Processing Block Sample

At this page, you'll learn how to run the Processing Block Demo Sample on Windows and Linux.

The processing_block_demo sample demonstrates the usage of Processing Block API and compatible components.

note

To run the processing_block_demo sample you need to install Face SDK 3.15 or higher with Windows or Linux platform files (according to your operating system).

  • If Face SDK is not installed, follow the installation instructions Getting Started. Select platform in the "Selection Components" section.

  • If Face SDK is installed without Windows or Linux platform files, use the utility maintenancetool and install platform by selecting it in the "Selection Components" section.

How to launch#

Startup arguments:

  • --input_image - required, path to the input image file
  • --unit_type - optional, type of used processing block, default value is "objects", see the list of available types below
  • --sdk_path - optional, path to the Face SDK directory, default value is ".." to launch from the default location {Face SDK}/bin
  • --use_cuda - optional, acceleration of compatible blocks on GPU (CUDA), see Requirements

The basic format of console command to launch processing_block_demo from the bin directory:

  • Linux:
./processing_block_demo [--input_image <path_to_image>] [--unit_type <type_of_processing_block>] [--sdk_path <path_to_sdk_directory>] [--use_cuda]
  • Windows:
.\processing_block_demo.exe [--input_image <path_to_image>] [--unit_type <type_of_processing_block>] [--sdk_path <path_to_sdk_directory>] [--use_cuda]

List of available processing blocks (unit types)#

Launch example#

Console commands to launch the sample from the bin directory with the "body" processing block (unit type):

  • Linux:
./processing_block_demo --input_image group/01.jpg --unit_type body
  • Windows:
.\processing_block_demo.exe --input_image group\01.jpg --unit_type body

The results of processing will be displayed in the window.

Result of body detection

Error messages, if any, are also printed in the console.

Troubleshooting
  • Error Assertion failed (ERROR: not found libonnxruntime.so), error code: 0x032ad038:

    • Check existence of the file lib/libonnxruntime.so in the Face SDK's root directory
    • Add the path to the directory that contains the file libonnxruntime.so to environment variable LD_LIBRARY_PATH
  • Error Assertion failed (ERROR: not found onnxruntime.dll), error code: 0x032ad038:

    • Check existence of the file bin\onnxruntime.dll in the Face SDK's root directory

note

Source code of the processing_block_demo sample available at the link. Also, the source code and instructions of building (file README.txt) are available in the examples/cpp/ directory of the Face SDK distributive.

Last updated on