Getting Started
All models available from our hub come with an easy-to-use .cpp demo project.
Prerequities:
- cmake
 
- Visual Studio (on Windows)
 
- XCode with Clang (on Mac)
 
Steps
- Download the package for your desired OS & hardware combination from github.com/blace-ai/blace-ai/releases.
 
- Unpack the .zip file, you end up with a folder structure like 
package/
    - cmake
    - demo
    - include
    - lib / BlaceAI.app (on MacOS)
    - licenses
 
- From the hub download the Demo Project and Pytorch Payload .bin file.
 
- Unzip the demo project and put contained folder into the package folder. Additionally copy the downloaded .bin file into the ..._demo folder: 
package/
    - cmake
    - demo
    - <some_model_identifier>_demo/
        - <downloaded_model>.bin
        - CMakeLists.txt
        - ...
    - include
    - lib / BlaceAI.app (on MacOS)
    - licenses
 
- In a terminal navigate into the demo folder: 
cd package/<some_model_identifier>_demo. 
- Invoke cmake configuration command: 
 cmake -G "Visual Studio 17 2022" -A x64 -T v142 -S . -B build (Windows) 
 cmake -S . -B build (MacOS) 
 cmake -S . -B build (Linux) 
 This creates project files in the build folder. 
- Invoke build command: 
cmake --build build --config Release 
 This builds the demo executable and copies all needed libraries, the ai model file and an input image next to the executable. 
- Run the demo executable: 
 .\build\Release\demo.exe (Windows) 
 ./build/Release/demo (MacOS) 
 ./build/demo (Linux)