Giter Club home page Giter Club logo

dlib-android's Introduction

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.

  • You can refer to dlib-android-app which demonstrates dlib-android features

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

  • [Optional] You can download a specific Android-OpenCV from http://opencv.org/downloads.html. Download the version and copy the folders in native SDK to dlib-android/third_party/opencv. (Currently, itis 3.1)

  • [Optional] You can use NDK Download script to specify the version of NDK to download

Build and Run

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

  • Curretnly, it will build executable files like svm_ex, Selective search example, and JNI shared library

  • Push the executable files to Android devices and run all test daemons on your devices. Remember to connect to Android device

$ cd [dlib-android]

$ python build_push.py --test

If you want to use it for Android Java application and copy the shared lib to your Android project, please execute it $ python build_push.py --android_project dlib-android-app/dlib/src/main/jniLibs/

  • Alternative way to build:

$ cd [dlib-android]

$ ndk-build -j 2

Write JNI and build shared library for Android Java application

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 task

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.