Giter VIP home page Giter VIP logo

android-hpe's Introduction

android-hpe

Android native application to perform head pose estimation using images coming from the front camera.

Example of the final result

Demo gif

How to use

You need to compile your JNI libraries, they have to be copied to [this_project_root]/dlib/src/main/jniLibs (create the folder if it doesn't exist, careful about the upper case L).

Make sure to take a look at android-hpe-library before doing anything else in this project, it will help to understand how this app works.

Additional info

This algorithm can handle roughly up to the half-profile pose of the head, then it looses track.

I tried to expand the app's capacity to see full profile faces, with no luck. Basically I tried to learn a new classifier for the face detection and for the landmark detection, face detection worked but facial landmark detection didn't. I've decided to keep it as is was.

Please see here for a collection of my rants about not getting a working algorithm, Davis has been very supportive though, I guess it's a bit of a pain to handle such volume of requests and questions.

In an effort to assess the precision of the estimation of the YAW (left/right displacement of the face from the front), I have got good precision (max. +/-6°) for the near-frontal views with a slow degrading towards the extreme poses (however no more than +/-15°). As for PITCH (up/down displacement of the face from the front) I dind't have enough time to evaluate (probably something similar).

For additional resources and to understand how this works, check out dlib, the core of the algorithms involved is from there.

Credits

This app was developed as part of my MSc thesis in Computer Engineering at the University of Padua, Italy. Huge thanks to the Centro di Sonologia Computazionale (CSC) of the University of Padua http://smc.dei.unipd.it/.

This app, as well as its C++ counterpart, replicates the great job done in dlib-android-app, please refer to this project for some additional info.

Credits also go to gazr, make sure to check it out as well.

Remember to show some love as well to Davis King at dlib, whose work is great.

Plase leave a STAR to each of these projects, as well as this one.

android-hpe's People

Contributors

beraldofilippo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

android-hpe's Issues

Please help to get it running...

Hi!
This app looks really cool and I want to get it running and use it. However, even after many hours I don't get it working :-(
Sorry I am a beginner in android programming, so please excuse silly questions.

Here is what I did so far:

  • I am using Android Studio 4.1.2 on a windows 10 Intel x86 64 bit laptop
  • Testing on Samsung Galaxy S10e (SM-G970F/DS) using Andoid 11
  • I donwloaded your "android-hpe-master" files
  • I downloaded OpenCV 4.1.2.
  • I opened your project "android-hpe-master" in Android Studio.
  • I imported OpenCV using File > New> Import Module, selected the "sdk" folder in the openCV downloaded folder and named it ":opencv"
  • modified "compileSdkVersion" and "targetSdkVersion" in the openCV gradle script from 26 to 29 (as is in the app gradle script)
  • Set dependencies: "app" depends on "dlib"; "dlib" depends on "opencv"; "opencv" has no dependencies
  • Copied folder "\android-hpe-master\opencv\native\libs" to "\android-hpe-master\dlib\src\main" and renamed it as "jniLibs"
  • Built project successfully with 3 warnings
  • When I run the app I get error: "More than one file was found with OS independent path 'lib/x86_64/libopencv_java4.so'. "
  • Now I tried the following: Deleted folder "libs" in "\android-hpe-master\opencv\native". When I run the app I don't get the error above! The app starts. I can see the MainActivity Screen. I click on "LAUNCH". Very shortly, I can see the next Activity, but then the app crashes. Error: "No implementation found for int com.beraldo.hpe.dlib.HeadPoseDetector.jniInit".
  • Now I have tried a hundred things but nothing helps.

Can you tell me how to proceed? Any help highly appreciated.
Zwischenablage04
Errorlog.txt

nice app

I tried successful, had you ios edition?

Front camera face detection problem

Most of the time it failed to detect face and so pose estimation was not worked. I fed manual image by capturing a photo using other apps than it works fine. I have tested with HTC.

How to capture image.

how to capture image in oNGetImageListener when matches any particular gaze angle.
please let me know as soon as possible.

about training..

hi beraldo,
awesome project! so after looking at your conversation here, you are one of the few people that has tried retraining the landmark detection data.

I'm trying to attempt it for the very first time - can you talk about whether you were successful or not (and the reason) ? in the thread you were talking about different models - did not understand the reason.

Portrait orientation possible?

Hi,
I really appreciate the work being shared in this project!
One question I am struggeling with:

Is ist possible to extend the software in order to get it running in portrait orientation also? So far I get detections in landscape orientation. But as soon as I change to portrait, the overlay disappears and no more head detection or head pose estimation is displayed.

Please, if someone could help. I am quite lost (and I am a beginner...)
Thanx.

how to compile this project?

hello, i have compile OpenCV Library and made 2 type of headpose.so file, also i moved it to dlib folder in jniLibs

but i don`t know how can i make app-debug.apk file or run this project,
i have tried run it by android-studio and makefile, but there are so many error about gradle,
even i have changed my gradle many times, but it still can be not solved.

so, i want to know how to compile this promgram on your envirenment.
android studio or makefile by gradlew ?
or whats version of gradle you comfile

Issues with glog

I'm getting some issues while trying to build this. Adding glog files to the requesting places didn't fix it. Can you help me out here.

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.