Skip to content

TalkUHulk/aidb_lua_demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

aidb-lua-demo

Open In Colab

AiDB binding to Lua Demo.

Tested Environment

  • Lua 5.3/5.4
  • MacOS/Colab

Usage

  • 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

Reference

https://github.com/rxi/json.lua

https://github.com/iskolbin/lbase64

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages