Daisykit Android

Daisykit Android is built on top of Daisykit SDK. It contains wrapper code, examples to use Daisykit in Android mobile devices.


Very first Android demo:

I. Build and Run

Dependencies: Android NDK 21.3, CMake 3.10.2.

Step 1: Clone the source code

git clone --recurse-submodules


git clone
cd daisykit-android
git submodule update --init

Step 2: Download NCNN

  • Download or build ncnn for android yourself

  • Extract into app/src/main/jni and change the ncnn_DIR path to yours in app/src/main/jni/CMakeLists.txt

Step 3: Download OpenCV

  • Download

  • Extract into app/src/main/jni and change the OpenCV_DIR path to yours in app/src/main/jni/CMakeLists.txt

Step 4: Download assets

  • Download all assets here and put into app/src/main/assets/ folder.

Step 5: Build

  • Open this project with Android Studio, build it and enjoy!

II. Some notes

  • Android ndk camera is used for best efficiency.

  • Crash may happen on very old devices for lacking HAL3 camera interface.

  • All models are manually modified to accept dynamic input shape.

  • Most small models run slower on GPU than on CPU, this is common.

  • FPS may be lower in dark environment because of longer camera exposure time.

III. Errors and Fixes

1. Errors because of build tool version

No toolchains found in the NDK toolchains folder for ABI with prefix: arm-linux-androideabi
clang ++: error: unknown argument: '-static-openmp'

How to fix? Install NDK 21.3, CMake 3.10.2.

2. Crashing app

Check if you have downloaded and extracted all assets. See into assets folder at app/src/main/assets. There should be 3 subfolders here: models, configs, and images.

Read the Docs v: latest
On Read the Docs
Project Home

Free document hosting provided by Read the Docs.