No description
Find a file
2026-02-25 15:46:48 +08:00
assets Upload first version 2026-01-06 10:29:54 +08:00
cmake feat: Add Yocto build support for 32-bit and 64-bit architectures to examples, including new build scripts, CMake logic, and documentation. 2026-02-25 15:46:48 +08:00
common Upload first version 2026-01-06 10:29:54 +08:00
dependency refactor: Update NNSDK and OpenCV dependency paths, remove bundled libraries, and add a unified Android build script. 2026-02-24 16:34:17 +08:00
docs remove useless doc 2026-01-27 15:43:54 +08:00
examples feat: Add Yocto build support for 32-bit and 64-bit architectures to examples, including new build scripts, CMake logic, and documentation. 2026-02-25 15:46:48 +08:00
resource add some new python demos 2026-01-14 16:59:57 +08:00
LICENSE Initial commit 2026-01-06 10:26:01 +08:00
poster.jpeg Upload first version 2026-01-06 10:29:54 +08:00
poster1.jpg modify poseter.jpg 2026-01-08 20:05:51 +08:00
README.md feat: Add Yocto build support for 32-bit and 64-bit architectures to examples, including new build scripts, CMake logic, and documentation. 2026-02-25 15:46:48 +08:00

Amlogic Tech Banner

amlnn-model-playground

Introduction

amlnn-model-playground Has been developed using the amlnn toolkit, by completing the model conversion and deployment steps, we have created a ready to go model zoo for commonly used models. The demo package provides complete model conversion scripts, as well as a complete workflow for Python API, OpenAI API, and C API to run the converted model.

Objective: To help users get started and deploy models on the Amlogic NPU platform. The rich algorithm library in the model zoo can help guide developers through test, benchmarking, proof of concept and deployment of edge AI products.

Dependencies

Support List

Category Model_name Dtype Platform
Classification mobilenet_v2 INT8 A311D2/S905X5
Classification resnet50-v2 INT8 A311D2/S905X5
Object Detection yolov8 INT8 A311D2/S905X5
Object Detection yolov11 INT8 A311D2/S905X5
Object Detection yoloworld INT8 A311D2/S905X5
Object Detection yoloe INT8 A311D2/S905X5
Object Detection yolox INT8 A311D2/S905X5
Face Key Points retinaface INT8 A311D2/S905X5
Text Detection ppocr-det INT8 A311D2/S905X5
Pose Estimation blazepose_detect INT8 A311D2/S905X5
Pose Estimation blazepose_landmark INT8 A311D2/S905X5
Voiceprint recognition ECAPA-TDNN Hybrid A311D2/S905X5
Speech Recognition whisper Hybrid A311D2/S905X5
Image-Text Matching clip Hybrid A311D2/S905X5
Chat LLM deepseek Hybrid A311D2/S905X5

pre-build models: huggingface

Benchmark List(FPS)

Examples Model_name input_shapes Dtype S905X5 A311D2
mobilenet mobilenet_v2 [1, 3, 224, 224] INT8 1047.54 798.94
resnet resnet50-v2 [1, 3, 224, 224] INT8 106.78 128.91
yolov8 yolov8n [1, 3, 640, 640] INT8 101.72 95.14
yolov8s [1, 3, 640, 640] INT8 42.33 42.77
yolov8m [1, 3, 640, 640] INT8 19.67 19.82
yolov8l [1, 3, 640, 640] INT8 10.53 10.12
yolov11 yolov11n [1, 3, 640, 640] INT8 41.14 41.48
yoloworld yoloworld [1, 3, 480, 640] INT8 19.38 19.04
yoloe yoloe [1, 3, 288, 512] INT8 53.9 37.8
yolox yolox_tiny [1, 3, 640, 640] INT8 42.9 35.89
yolox_s [1, 3, 640, 640] INT8 35.12 33.31
yolox_m [1, 3, 640, 640] INT8 18.55 17.98
retinaface retinaface [1, 3, 320, 320] INT8 341.99 305.89
ppocr-det paddleocrv4-det [1, 3, 640, 640] INT8 37.66 38.85
blazepose_detect blazepose_detection [1, 3, 224, 224] INT8 476.29 461.74
blazepose_landmark blazepose_landmark_full [1, 3, 256, 256] INT16 84.59 70.31
Whisper encoder_tiny_en [1, 80, 3000] Hybrid 0.71 0.58
decoder_tiny_en [1, 1500, 384]&[1, 48] Hybrid 10.35 9.22
Clip clip-vit-base-patch32 [1, 3, 224, 224] Hybrid 7.48 6.82
  • The performance data represents the runtime of the model on the NPU, as tested using the native case. Unless otherwise specified, it does not include the time spent on pre- and post-processing.
  • means currently supported.

Examples Compile

AMLNN SDK Setup

The C++ demos depend on the AMLNN runtime library. The build system automatically looks for amlnn-toolkit as a sibling directory:

modelzoo/
├── amlnn-model-playground/   ← this repo
└── amlnn-toolkit/            ← SDK placed here automatically found

Clone it with:

git clone https://github.com/Amlogic-NN/amlnn-toolkit.git ../amlnn-toolkit

Each example directory contains a build-android.sh and build-linux.sh script. For compilation steps, refer to Chapter 4 of the README.md file in the corresponding example directory.

Android Complication

Android compilation requires the NDK toolchain. The build scripts look for the NDK path via the following environment variables (in priority order):

Variable Description
ANDROID_NDK_PATH Preferred variable
ANDROID_NDK Fallback
ANDROID_NDK_HOME Fallback

Set one of them before building, for example:

export ANDROID_NDK_PATH=/path/to/android-ndk-r25c

Note: NDK r25c is recommended. Download: https://github.com/android/ndk/wiki/Unsupported-Downloads

To build all examples at once, use the top-level batch script:

cd examples
./build-android-all.sh          # auto-detects amlnn-toolkit
# or explicitly:
AMLNN_HOME=/path/to/amlnn-toolkit ./build-android-all.sh

The script automatically cleans the previous build, resolves the AMLNN SDK via the priority rules above, and prints a build summary at the end.

Yocto Compilation

Each example's build-linux.sh also supports Yocto mode via the -m yocto flag.

Dependency: A Yocto SDK (Poky). Set the path via environment variable or -s flag:

export YOCTO_SDK_ROOT=/path/to/poky/sdk

The toolchain file is shared across all demos at examples/cmake/yocto-toolchain.cmake.

Build a single demo:

cd examples/yolox/cpp

# 64-bit (default)
./build-linux.sh -m yocto -s /path/to/poky/sdk

# 32-bit
./build-linux.sh -m yocto -b 32 -s /path/to/poky/32bit-sdk

Build all demos at once:

cd examples

# 64-bit
./build-linux-all.sh -m yocto -s /path/to/poky/sdk

# 32-bit
./build-linux-all.sh -m yocto -b 32 -s /path/to/poky/32bit-sdk

# Clean yocto build artifacts
./clean-linux-all.sh -m yocto

Note: The LLMs demo is automatically excluded from the batch build scripts.

Release Notes

Version Description
1.0.0 First Version