Android - Facial Expression detection from Image using ML Kit Library - android

Currently I'm working on an app for Android. We want to detect features of a face expression. This feature should be detect the face and facial expression from image.
Accuracy should be fine but don’t need it’s perfect. We need expression detection feature work speedy and smooth.
I have tried ML kit Library for Detect Face and It’s Working fine, but this library provide only Single expression “Smile”, We need result in different different expression like “Sad”, “Surprise”, “Angry”, “Neutral” and “Happiness”.
I googled a lot and I found many interesting things. There is also a face detection in the Android API. But the returned only single Face Expression (https://github.com/googlecodelabs/mlkit-android/tree/master/vision/final) only contains the position of the eyes. And face landmarks So friends have you any reference or suggestion? For what library there are good documentations, tutorials?

Related

How should I build a project in native Android which has a feature like Lenskart?

I want to just put glass over eyes.
I can use the CameraX Library for taking picture.
and take some coordinates for eyes.
Any best way to approch this problem
Have you tried ML Kit's Face Detection API? It can detect facial "landmarks", including eyes.

Is there any Android API to detect face inside an image?

Is there any Android API to detect face inside an image? For exemple on iOS there is such API to detect face, and I‘m curious if there is a similar API in Android.
The Android framework has the FaceDetector API, although is only suitable for bitmaps (not real-time), and returns only the boundaries (rectangle) location.
For more advanced features, such as real-time detection or face features contour, there is the ML Kit library offered by Google. Although this library can also be used for very simple use cases, such as also getting the face location in a bitmap.
More about ML Kit in the next link:
https://developers.google.com/ml-kit/guides

Compare photos with Perceptual_hashing using huawei-mlkit to find photos that show the same person?

Is it possible to use huawei's mlkit to calculate
perceptual hashes of human faces and are there examples how to implemnt this?
mlkit is capable of finding eys/nose/mouth/ears of a face in images so it should be possible to calculate some "perceptual_hash" of it.
Update:
Please kindly refer to ML Kit Face Vertification. It recognizes and extracts key features of the face in the template, compares the features with those of the face in the input image, and then determines whether the two faces belong to the same person based on their similarity.
ML Kit face detection service can detect the face contour, recognize facial features, and determine facial expressions for a person. But it cannot recognize faces, so it cannot compare photos to find whether they are of the same person.
According to HUAWEI HiAI Engine documentation, the capability of Facial Comparison can identify and extract facial features, perform comparison on faces, and provide scores to determine whether the objects are the same person.

How many devices in percent doesn't support face detection feature?

In my application, I use OpenCV for face detection throw ImageReader and jni.
It works ok, but performance of that solution isn't so good as I wanted, also I want to reduce size of my app.
I read some information about face detection in camera 2 API, and I have some questions about it.
1) Why the function below can return STATISTICS_FACE_DETECT_MODE_OFF?
Not all devices support face detection feature? What type of devices doesn't support it and why? Do you know any examples of unsupported devices? In my project, I use only front facing camera, does it matter to me?
characteristics.get(CameraCharacteristics.STATISTICS_INFO_AVAILABLE_FACE_DETECT_MODES);
2) What about performance? Is there any performance difference between STATISTICS_FACE_DETECT_MODE_FULL and STATISTICS_FACE_DETECT_MODE_SIMPLE?

how can i set the camera function that anti-shake(image Stabilizer) at android

I've made a Camera App.
I want to add the functionality of anti-shake.
But I could not find the setting for anti-shake(image Stabilizer).
Plz Help me!!
Usually Image Stabilizer is a built-in camera feature, while OIS (Optical-Image-Stabilization) is a built-in hardware feature; by now really few devices support them.
If device hasn't a built-in feature, i think you cannot do anything.
Android doesn't provide a direct API to manage image stabilization, but you may try:
if android.hardware.Camera.getParameters().getSupportedSceneModes(); contains steadyphoto keyword (see here), your device supports a kind of stabilization (usually it shots when accelerometer data indicates a "stable" situation)
check android.hardware.Camera.getParameters().flatten(); for a "OIS" or "image-stabilizer" keyword/values or similar to use in Parameters.set(key, value);. For the Samsung Galaxy Camera you should use parameters.set("image-stabilizer", "ois");//can be "ois" or "off"
if you are really boring you may try reading the accelerometer data and decide to shot when the device looks steady.
Good luck.
If you want to develop software image stabilizer, OpenCV is helpful library for you. Following is the one of the way to stabilize the image using Feature.
At first, you should extract feature from image using feature extractor like SIFT, SURF algorithm. In my case, FAST+ORB algorithm is best. If you want more information, See this paper
After you get the features in images, you should find matching features with images.there are several matcher but Bruteforce matcher is not bad. If Bruteforce is slow in your system, you should use a algorithm like KD-Tree.
Last, you should get geometric transformation matrix which is minimize error of transformed points. You can use RANSAC algorithm in this process.
You can develop all this process using OpenCV and I already developed it in mobile devices. See this repository

Categories

Resources