tzutalin / dlib-android

:dragon: Port dlib to Android
MIT License
867 stars 268 forks source link

dlib-android

Build Status

Purpose

Grab the source

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

Prerequisites

Build JNI code and shared library for Android application

    $ cd [dlib-android]
    $ python build.py

Alternative way to build native code and copy to the Android Studio's project manually:

    $ cd [dlib-android]
    $ ndk-build -j 2
    $ cp -r libs/* androidstudio-examples/dlib-android-app/dlib/src/main/jniLibs

Run Android application

Folder structure

├── data                    # Test data or the models for detection and landmarks
├── dlib                    # Source files of dlib. It is a submodule
├── jni                     # Source files of JNI codes and their make files
├── androidstudio-examples  # Android Studio's projects use the shared library built by this repo
├── tools                   # Tools and utilities
├── third_party             # Like OpenCV and [miniglog](https://github.com/tzutalin/miniglog)
├── CMakeLists.txt          # Use CMake to build instead of using Android.mk
├── LICENSE
└── README.md

Do you want to contribute

Future tasks