ryohey / dlib-android

:dragon: Port dlib to Android

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

dlib-android

Build Status

Purpose

  • Port dlib to Andriod platform

  • You can build it to dynamic or static library for Android. You can also build dlib's sample to Android executable file.

  • This demonstrates dlib-android features, building with JNI.

Grab the source

$ git clone --recursive https://github.com/tzutalin/dlib-android.git
$ cd dlib-android
$ ./envsetup

Prerequisites

  • Download Android-NDK from Android website.

    After downloading, go to the directory to which you downloaded the package to extract it

    Export ANDROID_NDK_HOME in ~/.bashrc $ vim ~/.bashrc

    export ANDROID_NDK_HOME=[NDK_PATH]/android-ndk-[version]

    export PATH=$PATH:$ANDROID_NDK_HOME

  • Install Android Debug Bride (ADB). You can download it via Android SDK Manager or $ sudo apt-get install android-tools-adb

  • Prepare an Android device for test

Build JNI code and shared library for Android application

  • You can change the compiler architecture in dlib-android/jni/Application.mk

  • Android Studio build JNI code and move to libs folder to use them, but if you don't compile the ndk run in command line to build and see warnings:

    $ cd [dlib-android]/app/src/main/jni
    $ ndk-build

Run Android application

  • Open Android Studio's project dlib-android to run face detection, face landmark, and so on

### Do you want to contribute
 * If you have any improvement or you've found any bug, send a pull request with the code.
 * Give me a star on this repository

### Future tasks
* Add more examples to [dlib-android-app](https://github.com/tzutalin/dlib-android-app)

About

:dragon: Port dlib to Android

License:Other


Languages

Language:C++ 97.2%Language:Java 0.6%Language:Python 0.6%Language:XSLT 0.5%Language:CMake 0.3%Language:C 0.2%Language:Cuda 0.2%Language:HTML 0.1%Language:Shell 0.1%Language:Makefile 0.1%Language:CSS 0.0%Language:JavaScript 0.0%Language:Batchfile 0.0%Language:Perl 0.0%Language:MATLAB 0.0%