Android Face recognition & get similar faces from the database - android

In my application I'm going to implement an image search like Google image search. Only difference is here I'm searching only for human faces. Here's how it goes..
user take a picture of a person using the camera.
my app should identify the face of that person and get details from the image regarding the face (eg: colors).
Using those details app will do a search in the image database for similar faces.
Finally it'll display results to the user.
So I want to recognize faces using Android face recognition class and select that recognized area and save the details of that face into an array or a database.
I got few questions on above scenario.
what are the things I need from that image to do a proper image search?
Can I do it only using colors?
Do you have any idea on getting pixel details from that recognized face? I know how to do it on bitmap images. But i'm not sure that method still works with the face recognition class.
Can anyone explain those thing to me please?

Use OpenCV's Recognition API.
I wrote a bit about how to set it up in another question.

I recommend you too to use OpenCV functions, they are well optimized for face detection and recognition .
for recognition, you don't need to colour processing.
Since you develop your application on Android, you can use OpenCV4Android
Here there some helpful links, that let you have a good idea to start:
Face Recognition on Android
Here you find a useful tutorial for face detection and recognition
http://www.shervinemami.info/faceRecognition.html
I also recommend you to apply the detection api that already implemented in android stuff:
http://pi-virtualworld.blogspot.com.br/2013/04/android-opencv-face-detection.html
In order to prepare a clean and a proper face database, which in turn enhance the goodness of recognition results, don' forget to align faces
http://bytefish.de/blog/aligning_face_images/
Try and test already benchmark face database, to evaluate your implementation:
http://vis-www.cs.umass.edu/lfw/#deepfunnel-anchor
http://www.cl.cam.ac.uk/research/dtg/attarchive/facedatabase.html

Related

Android: Face Recognition even with mask using OpenCV or some other library?

I am looking for a solution to develop an attendance system. The problem is I cannot find a good library to work in (or maybe I don't even know). I want to implement Face Recognition based on the previously saved faces when a user signs up. I also want to recognize a person even with a face mask on. Can you help me by providing a path to use?
I have a sample Application https://play.google.com/store/apps/details?id=com.ttv.facedemo
This is implemented using FaceOnLive SDK which is paid, I want to implement the same feature using OpenCV.

How to Compare an Image Clicked by the camera of an android phone and an image stored in firebase Database?

I want to create an android Application which compares two images or more specifically two faces. The idea of the app is:
It uses ML Kit to recognize face and then stores that image in firebase database and afterwards when the app encounters the same face it shows a match.
I have accomplished the detecting part just need help in the later part which is matching the images. Please help if possible.
Firebase ML Kit's built-in models only performs face detection. It does not recognize faces. So you won't be able to use a built-in model for this.
If you want to recognize the face, and be able to compare it to the previously found face, you'll have to train and use your own custom model for this.

Android Image recognition

I have a particular problem about image recognition on Android.
I am looking for some library able to recognize several objects from a photo. For instance, given a photo snapped by the user how can I count how many red circles and yellow triangles there are? Those shapes are just an example, since I want to recognize images which are pretty simple.
I have seen that there exists a good framework called Vuforia, which is designed for augmented reality. Do you think it is right for me? I am not an expert, so I ask you to help me.
check OpenCV for that, open source and works great on android
or
OpenCv

How to use google find my face

I am trying to make a photo organization app in android in which i was planning on using facial recognition. Since Google+ already has a facial recognition mechanism in place i was wondering how can I integrate it with my app. Basically my app will pull photos from the users G+ account and display them in a customized and better organized layout. Is their anyway to extract the facial recognition output, as in the x-y coordinates of the face or anything else, using a query in the G+ API ? I have been scouring the net but was not able to find anything concrete on this.
Thanks
Ayush
P.S : This is my first question and I hope I was able to make myself clear enough :)
I don't believe that is part of the G+ API. If you really want to detect the outline of the face, look into some other API's that do such.
Here's a list of several face detection API's
http://blog.mashape.com/post/53379410412/list-of-40-face-detection-recognition-apis
If you're dead set on using G+ the photo's would probably have to already have the face tagged. Then you'd have to rely on some sort of scrapping method to get that javascript code and decode/parse it.
You'd be better off using a face detection API.

Object Detection for android with tesseract or OpenCV

I have successfully integrated tesseract into my android app and it reads whatever the image that I capture but with very less accuracy. But most of the time I do not get the correct text after capturing because some text around the region of interest is also getting captured.
All I want to read is all text from a rectangular area, accurately, without capturing the edges of the rectangle. I have done some research and posted on stackoverflow about this two times, but still did not get a happy result!
Following are the 2 posts that I made:
https://stackoverflow.com/questions/16663504/extract-text-from-a-captured-image?noredirect=1#comment23973954_16663504
Extracting information from captured image in android
I am not sure whether to go ahead with tesseract or use openCV
Including the many links and answers from others, I think it's good to take a step back and note that there are actually two fundamental steps to optical character recognition (OCR):
Text Detection: This is the title and focus of your question, and it is concerned with localizing regions in an image that contain text.
Text Recognition: This is where the actual recognition happens, where the localized image regions from detection get segmented character-by-character and classified. This is also where tools like Tesseract come into play.
Now, there are also two general settings in which OCR is applied:
Controlled: These are images taken from a scanner or similar in-nature where the target is a document and things like perspective, scale, font, orientation, background consistency, etc are pretty docile.
Uncontrolled/Scene: These are the more natural and in-the-wild photos, e.g. those taken from a camera, where you are trying to recognize a street sign, shop name, etc.
Tesseract as-is is most applicable to the "controlled" setting. And in general, but for scene OCR especially, "re-training" Tesseract will not directly improve detection, but may improve recognition.
If you are looking to improve scene text detection, see this work; and if you are looking at improving scene text recognition, see this work. Since you asked about detection, the detection reference uses maximally stable extremal regions (MSER), which has a plethora of implementation resources, e.g. see here.
There's also a text detection project here specifically for Android too:
https://github.com/dreamdragon/text-detection
As many have noted, keep in mind that recognition is still an open research challenge.
The solution to improving the OCR output is to
either use more training data to train it better
filter it's input using some Linear Filter (grayscaling, high-contrasting, blurring)
In the chat we posted a number of links describing filtering techniques used in OCRing, but sample code wasn't posted.
Some of the links posted were
Improving input for OCR
How to train Tesseract
Text enhancement using asymmetric filters <-- this paper is easily found on google, and should be read fully as it quite clearly illustrates and demonstrates necessary steps before OCR-processing the image.
OCR Classification

Categories

Resources