EmotiEffCppLib
Cpp implementation of Emotion Efficient Library
Loading...
Searching...
No Matches
cpp Directory Reference
Directory dependency graph for cpp:
tutorials/cpp

Detailed Description

EmotiEffLib C++ examples

Here you can find examples of using EmotiEffLib in C++.

Here is a list of examples:

Building and running examples

To run the examples locally you need to do the following:

  1. Install python dependencies:
    pip install -r requirements.txt
  2. Build EmotiEffCppLib with Libtorch and ONNXRuntime. It is important to build EmotiEffCppLib with flag: -DBUILD_TESTS=ON because we need to reuse one library which builds for tests. Also, it is required to build EmotiEffCppLib with flag: -DBUILD_SHARED_LIBS=ON because xeus-cling works only with shared libraries.
  3. Install xeus-cling. Instruction how to build xeus-cling can be found here.

    After installing xeus-cling, you should be able to check available kernels and see xcpp17 kernel:

    $ jupyter kernelspec list
    Available kernels:
    python3 /opt/anaconda3/envs/emotiefflib/share/jupyter/kernels/python3
    xcpp11 /opt/anaconda3/envs/emotiefflib/share/jupyter/kernels/xcpp11
    xcpp14 /opt/anaconda3/envs/emotiefflib/share/jupyter/kernels/xcpp14
    xcpp17 /opt/anaconda3/envs/emotiefflib/share/jupyter/kernels/xcpp17
  4. Prepare models for cpp runtime:
    python3 <EmotiEffLib_root>/models/prepare_models_for_emotieffcpplib.py
  5. Download and unpack test data:
    cd <EmotiEffLib_root>/tests
    ./download_test_data.sh
    tar -xzf data.tar.gz
  6. Run jupyter notebook and select C++ kernel.