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:
Dependencies: Android NDK 21.3, CMake 3.10.2.
git clone --recurse-submodules https://github.com/nrl-ai/daisykit-android.git
git clone https://github.com/nrl-ai/daisykit-android.git cd daisykit-android git submodule update --init
- Download ncnn-YYYYMMDD-android-vulkan.zip or build ncnn for android yourself
- Extract ncnn-YYYYMMDD-android-vulkan.zip into app/src/main/jni and change the ncnn_DIR path to yours in app/src/main/jni/CMakeLists.txt
- Download opencv-mobile-XYZ-android.zip
- Extract opencv-mobile-XYZ-android.zip into app/src/main/jni and change the OpenCV_DIR path to yours in app/src/main/jni/CMakeLists.txt
- Download all assets here (opens in a new tab) and put into
- Open this project with Android Studio, build it and enjoy!
- 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.
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.
Check if you have downloaded and extracted all assets. See into assets folder at
app/src/main/assets. There should be 3 subfolders here: