• Stars
    star
    675
  • Rank 66,418 (Top 2 %)
  • Language
    Java
  • License
    Apache License 2.0
  • Created almost 9 years ago
  • Updated over 5 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ‰ Android app to demo dlib-android(https://github.com/tzutalin/dlib-android). Use the prebuilt shared-lib built from dlib-android

dlib-android-app

Build Status Download

See http://dlib.net for the main project documentation.

See dlib-android for JNI lib. Refer to dlib-android/jni/jnilib_ex

Grap the source

$ git clone https://github.com/tzutalin/dlib-android-app.git

Features

  • Support HOG detector

  • HOG Face detection

  • Facial Landmark/Expression

Demo

Demo video

Build

Android app

  • Open Android studio to build

  • Use command line to build (Optional)

On Windows platforms, type this command:

$ gradlew.bat assembleDebug

On Mac OS and Linux platforms, type these commands:

$ ./gradlew assembleDebug

or

$ make ; make install

Update shared lib (Optional)

You can build shared library from dlib-android

Copy the shared library to ./dlib/src/main/jniLibs/

Try directly

Download and install the apk

$ adb install demo/app-debug.apk

Otherwise, import the library to your build.gradle

repositories {
    maven {
        url 'https://dl.bintray.com/tzutalin/maven'
    }
}

dependencies {
    implementation 'com.tzutalin.dlib-android-app:dlib:1.0.4'
}

Sample code

Facial landmark detection

FaceDet faceDet = new FaceDet(Constants.getFaceShapeModelPath());
Bitmap bitmap = BitmapFactory.decodeFile("Image Path");
List<VisionDetRet> results = faceDet.detect(bitmap);
for (final VisionDetRet ret : results) {
    String label = ret.getLabel();
    int rectLeft = ret.getLeft();
    int rectTop = ret.getTop();
    int rectRight = ret.getRight();
    int rectBottom = ret.getBottom();
    // Get 68 landmark points
    ArrayList<Point> landmarks = ret.getFaceLandmarks();
    for (Point point : landmarks) {
        int pointX = point.x;
        int pointY = point.y;
    }
}

Pedestrian detection

Pedestrian pedestrianDet = new PedestrianDet();
List<VisionDetRet> personList = pedestrianDet.detect(imgPath);

License

License

More Repositories

1

awesome-visual-slam

πŸ“š The list of vision-based SLAM / Visual Odometry open source, blogs, and papers
2,200
star
2

dlib-android

πŸ‰ Port dlib to Android
C++
862
star
3

ImageNet_Utils

⏬ Utils to help download images by id, crop bounding box, label images, etc.
Python
626
star
4

Android-Object-Detection

β˜• Fast-RCNN and Scene Recognition using Caffe
Java
304
star
5

OpenCV-RgbdOdometry

β›„ OpenCV RGBD-Odometry (Visual Odometry based RGB-D images)
C++
113
star
6

adb-event-record

adb-event-record is a tool to record sensor's events like touch event and so on using the ADB (Android Debug Bridge).
Python
97
star
7

build-opencv-for-android

An interactive script to download and build OpenCV and OpenCV contrib for Android
Shell
74
star
8

ros_caffe

β˜• Integrate Caffe model into ROS
C++
71
star
9

miniglog

Portable glog for cross-platforms: Windows, Linux, Android, and iOS
C++
44
star
10

Boost.Compute-Android

Boost.Compute library for Android. A C++ Computing Library for OpenCL https://github.com/boostorg/compute
C
23
star
11

caffe_test

β˜• Include Caffe to predict in C++
C++
17
star
12

example-grpc

Demonstrate the some of features of gRPC
Java
14
star
13

DriveRecorder

It's an Android application which is able to record the video when driving.
12
star
14

ros_sample_image_transport

ROS Receive and publish different topics about image
C++
11
star
15

minizip

Minizip for Unix/Linux and mobile devices
C
9
star
16

ReadPCMData

Read auido raw data from android phone
7
star
17

docker

Dockerfile's for building
Shell
6
star
18

Android-ConfigIO

A small and encapsulation library for creating, accessing, and modifying Key-Value configuration file in XML / JSON format
Java
4
star
19

android-ndk-downloader

[Drepeciated]⏬ A script to download android NDK
Python
4
star
20

task-scheduler

task-scheduler is an in-process scheduler to arrange and run the task periodically according to YAML config file
Python
3
star
21

tzutalin

1
star