You are viewing a plain text version of this content. The canonical link for it is here.
Posted to photark-dev@incubator.apache.org by Subash Chaturanga <su...@gmail.com> on 2011/02/05 16:13:00 UTC

How face recognition can be used to make PhotArk gallery rich in details, as well as in functionality.

Hi all,

I looked in to the idea which Luciano raised on PhotArk road map, adding
face recognition functionality to PhotArk.
In face.com, face recognition can be done in two main steps.

1. Train the face.com index with known users.
2. Recognize users in the index for a given set of photos.

So here we can take the use case of Facebook where PhotArk also willing to
add Facebook albums to its remote album category.

*Step 1 :** *
It is required that we should train the face.com index. Which means  face
recognition requires an index of known faces before recognition performed.
(This should be done by adding face tags of known users and then those
photos can be processed to create the index. So more saved tags per user
increases the accuracy of recognition.)

Generally face recognition required the following sequence of API calls to
train the index.

*faces.detect*
*tags.save*
*faces.train.*

In our use case of Facebook, what we have to do is call* face.train* on one
or more user IDs and face.com will automatically fetch recent tagging data
from Facebook and save those tags for a given Facebook credential.

*Step  2 :*
Once we trained some users to the index, we can call
*faces.recognize*method for passed photos. As
face.com supports special user lists, we can recognize FaceBook friends of
the currently logged in user (friends@facebook.com).

*Note : The face recognition can also be done for private user namespaces
and Twitter, by the above mentioned API call sequence. *
*
*
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

Following three things are examples of how we can make this functionality
useful to PhotArk, *by directly using face.com with PhotArk GalleryService* (
we can start this with local albums first and later think of how remote
albums take in to action).

*1.The user himself can be recognized among the gallery albums.*
 We can make a default album named, say "MySelf". So if I am the user I can
go to the album "MySelf" and see all images I appear.

*2. From this we can make PhotArk gallery rich in details *
For instance we can add new handy attributes for an album such as

I. How many of your Facebook friends are there inside this album (without
going in to the album)
II. Names of those friends. and etc

*3. We can give some handy functionality to search.*
Gallery albums or images can be searched with a given friend's name (who is
already in our training set).
*
*
In addition to that, the face detection method returns tags for detected
faces in set of given photos. In these tags, there are some interesting
attributes  such as  gender, glasses and smiling  which can be used further
in photark.

Does PhoArk planning to add this functionality to the trunk or to the rest
branch ?
Any thoughts for these ideas ?

Thanks
/subash

Re: How face recognition can be used to make PhotArk gallery rich in details, as well as in functionality.

Posted by Subash Chaturanga <su...@gmail.com>.
Hi ,
*I contacted the author of the face.com java client* (saying the situation,
that I am a student who likes to use the client for an open source project)
and requested him to add an example code to the trunk so that new commers
can easily understand the client. Now he has added a sample code. Seems like
this is doable with the java client.

But I still don't know to which PhoArk wanna add this functionality.* Is it
to trunk or to rest branch ? *
If it is good to have in REST, though I looked in to the java client, I can
start looking in to the face.com REST API :-)

WDYT ?


Regards
-- 
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog - http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89

Re: How face recognition can be used to make PhotArk gallery rich in details, as well as in functionality.

Posted by Subash Chaturanga <su...@gmail.com>.
Hi, I went through the face.com developer documentation in bit more detail.
And I also looked in to the java client library for face.com API.
But  I couldn't find any documentation yet on using that java client. But in
some discussion forums I saw some have already used the java client
successfully.

So I downloaded the client and its dependencies and tried to use it after
occupying a face.com API key and an API secret. It was awesome. I did a
sample code to detect (not recognizing) faces and it worked. When I have a
crowded image with more than 15, 20 people it exactly identifies the people
count and I could even get attributes such as who wears glasses and who
smiles and etc. I am looking on how we can use facebook friends list (or
even a private name space) and train the face.com index to recognize a given
picture domain by using the java client. ( which I feel, is the basic
functionality expected by the idea, adding face recognition to photark, on
photark road map.)


-- 
Regards
Subash Chaturanga
Department of Computer Science & Engineering
University of Moratuwa
Sri Lanka

Blog - http://subashsdm.blogspot.com/
Twitter - http://twitter.com/subash89