AiDB binding to Lua Demo.
- Lua 5.3/5.4
- MacOS/Colab
- Clone AiDB
git clone https://github.com/TalkUHulk/ai.deploy.box
- Compile AiDB library(custom backend)
cd ai.deploy.box
mkdir build && cd build
cmake -DBUILD_LUA=ON -DC_API=ON -DENGINE_ORT=ON -DENGINE_MNN=ON -DENGINE_NCNN=ON -DENGINE_TNN=OFF -DENGINE_OPV=OFF -DENGINE_PPLite=OFF -DENGINE_NCNN_WASM=OFF -DBUILD_SAMPLE=OFF ../
make -j8
generate libAiDBLua.so in ai.deploy.box/build/lua/
- prepare files demo need.
download models and unzip in aidb_lua_demo rename models, and put ai.deploy.box/extra、ai.deploy.box/config in aidb_lua_demo/extra、 aidb_lua_demo/config
folder structure
aidb_lua_demo/
├── json.lua
├── base64.lua
├── config
├── mnn_config.yaml
├── ncnn_config.yaml
.
.
.
└── onnx_config.yaml
├── models
├── onnx
├── ncnn
├── mnn
├── tnn
├── paddle
└── openvino
.
.
.
└── extra
├── ppocr_keys_v1.txt
.
.
└── imagenet-1k-id.txt
- modify sample
replace package.cpath and image_path with your custom path, and init 'init_table' you wanted.
- Run
lua sample.lua