Skip to content

axinc-ai/ailia-models-rust

Repository files navigation

ailia MODELS Rust

This repository is an example of using the ailia SDK from rust.

Requirements

  • opencv 4.7.0 or later
  • rust 1.78.0 or later
  • ailia SDK 1.3.0 or later

Usage

Install ailia SDK

git submodule init
git submodule update

Download license file

Download the ailia SDK license file with the following command. The license file is valid for one month.

cd ailia
python3 download_license.py

Alternatively, the license file can be obtained by requesting the evaluation version of the ailia SDK.

Request trial version

Path configuration

for linux user

export AILIA_INC_DIR=../../ailia/library/include
export AILIA_BIN_DIR=../../ailia/library/linux
export LD_LIBRARY_PATH=../../ailia/library/linux:LD_LIBRARY_PATH

for mac user

export AILIA_INC_DIR=../../ailia/library/include
export AILIA_BIN_DIR=../../ailia/library/mac
export DYLD_LIBRARY_PATH=../../ailia/library/mac:DYLD_LIBRARY_PATH

download model

python3 download_onnx.py --url_dir yolox --model yolox_s.opt
python3 download_onnx.py --url_dir resnet18 --model resnet18
python3 download_onnx.py --url_dir lightweight-human-pose-estimation --model lightweight-human-pose-estimation

build

cd [MODEL_NAME]
cargo update
cargo clean
cargo build

run

for mac user

cd [MODEL_NAME]
cp ../ailia/library/mac/libailia.dylib ./target/debug/
cp ../ailia/library/mac/libailia_blas.dylib ./target/debug/
cp ../ailia/library/mac/libailia_pose_estimate.dylib ./target/debug/
cargo run

Models

Model Reference Exported From Supported Ailia Version Blog
lightweight-human-pose-estimation Fast and accurate human pose estimation in PyTorch.
Contains implementation of
"Real-time 2D Multi-Person Pose Estimation on CPU: Lightweight OpenPose" paper.
Pytorch 1.2.1 and later EN JP
resnet18 ResNet18 Pytorch 1.2.8 and later
yolox YOLOX Pytorch 1.2.6 and later EN JP

Examples

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published