Saturday, April 9, 2011

My journey with face recognition

Hello friends,

Today i actually wasted around 2 hours of time in the morning for a small bug in some of the images of yale data set. And I don't want any other person to waste time on the same thing so i taught of writing this post.

Before actually going into the details of that, let me tell about my journey with face recognition.

As early as in my 4th semester, I approached one of the professor in my college to help me do any project. He was actually pursuing his phd in the field of image processing. His interests were on face recognition. Every meeting i had with him, he actually tried to create some interest on that field in me. That was finally indeed very helpful to me in doing my final sem project. Thanks to our Prof.GTS

Face recognition is actually very interesting field of study and its one of the most interesting topic in the field of computer science research and development.If you want to know more on this topic, please visit the renowned official website of face recognition community.

Usually many people in this field use java or matlab for coding purposes and some others use shell scripting such as Image Magiks and some others use c or c++ or cv (computer vision modules).

Like every other person even i started off with matlab as said by experts in the domain, I actually have no issues with matlab it's cool and user friendly, its actually the most easiest tool which any one can find on this planet for doing coding of face recognition algorithms.

But one of my good friend told me use python language for coding. During the initial stages i actually totally ignored him saying matlab is very good and i have done all the hard work learning matlab. But he was not convinced with me, he actually said that learning python just for sake of atleast doing project for final semester is worth then being a expert in matlab, we even had heated discussions many times regarding matlab or python.

But at last i taught alright, let me see whats there in python and i started using python for face recognition, its one of the easiest programming language any one can learn on the planet, It's actually one of the best programming language i have ever seen. After seeing python i actually felt why did i wasted all my time learning matlab and i literally felt that i should have listened to my friend long time back, it was not very late "Better late then never". Thanks a lot to my dear friend KG.

In brief, in face recognition what happens is some set of images is trained and mapped into what ever the way algorithms wants to. When it comes to training a test image image is mapped onto the mapped trained image space and euclidian distance between the test images and all the trained images are taken, the image corresponding to the minimum euclidian distance is the recognized image.

I would just like to tell one advantage using python over matlab, there are many advantages tough.

(1) Python is open source and it actually takes around 10 MB of your disk space. It doesn't demand for high end machines, on the other side matlab itself is some 2 GB of size and it actually demands for very high end machine.
(2) Using python writing generic code, writing one small piece of code for all the databases is very easy and in matlab we actually have to write separate matlab-files for individual databases.

Python has a very good support for image processing. Please check out python packages - scipy,numpy,PIL,Image for details of the support of python in image processing.

Let me come back to why actually did i waste the time today even tough it wasnt my mistake.

Yesterday i downloaded yale dataset ( one of the standard dataset for experimental purposes ) in the .pgm format from here .

When i started to test this dataset i was actually getting some strange error, look at the following screen shot, some knowledge in python will actually makes you understand what that it say.



It actually says, i cannot load some image blah blah etc.., Thats was indeed a very strange thing i encountered because i had loaded other images from the same database successfully. After doing some experimentation i was able to find that some images in yale database which i downloaded from here were the faulty images. Yes i realized that this was the reason why two similar databases were stored in that same server. You can actually find the proper database here with the folder named yalefaces(copy) , I actually dint wanted any other person to waste time on the same issue so i taught of sharing this experience.

If in case you are stuck up with the same problem, i think this should be of some help to you. I actually got the above error when i tried to load the following images of yale database.

1. subject11.normal.pgm
2. subject09.rightlight.pgm
3. subject06.sad.pgm
4. subject13.rightlight.pgm
5. subject10.noglasses.pgm
6. subject15.rightlight.pgm
7. subject06.happy.pgm
8. subject13.leftlight.pgm
9. subject08.rightlight.pgm
10.subject03.rightlight.pgm
11.subject10.sad.pgm
12.subject04.rightlight.pgm
13.subject10.wink.pgm
14.subject14.leftlight.pgm

But the same images works well when i downloaded from the yalefaces(copy)

In case if you want any help regarding implementation of face recognition algorithms in python please feel free to contact me, i will give my best shot in helping you out.

Finally one thing i wanted to say is Python rocks \m/

Thanks a lot dear reader :)

Friday, April 8, 2011

Deepotsavam in Yelahanka

Hi all, its been very busy schedule so i was not able to blogosphere frequently, today my sister remained me of blogosphere. So i taught let me share the event deepotsavam, which happened in yelahanka.

It was the event where many people witnessed and enjoyed and had a great fun with their friends and families.

The event was conducted on the occasion of the birth day of the "Sri Chowdeshwari Mother".

Luckily my friend had a camera, so how can we miss the fun ;-) This is a small attempt for those who all missed the event.

After the poojas in temple from morning till evening " Mother Chowdeshwari came out for a ride which call it as devara meravanige in kannada language. Now let me describe those amazing scenes.

As usual lets go in the order. We all know that if some spiritual event happens in India, as a symbol of happiness all musical and cultural instruments come together.

Here are few cultural people to showcase the culture of India.



Oh my GOD look at this artist who stood on that drum and she danced around and played a very big drum




How can the male artist stand back quietly if women are doing so good ;-) , Men too are very good in showcasing The Great Indian Culture



Now look at this I dont know, where did he come from,he scared every one around him ;-) , The one which you see towards right is called pulivesam in telugu



How can a orchestra miss out on a spiritual event, we had a bunch of very good singers.



Then came the "Deepalu" ( "divine light") of the Goddess.



After Deepalu, next Divine Mother came in her spectacular chariot.



All the people on the way, were offering poojas to the Divine Mother




So lets move on to some thing which interests all fun lovers, when such kind of event happens usually many businessmen coming around and make their make shaft shops. People here will be waiting to buy things in those make shaft shops than in regular fancy stores, because people when they buy some things during those special/occasional days they keep it as a sense of remembrance.

There were lots of shops, i took only few snaps which actually interests any Indian girl ;-)

These are beautiful and colorful bangles



These are some fancy chains of women.



Business men are actually having the great time :-)



Hey boys would have looted all the money and all goodies offered at this game.
Put the ring and take anything :-)

Look at this people are very seriously involved in their part of looting the game, no one even noticed that a smart fellow is taking a snap at them ;-)



Now look this i think every one understands why are people so serious ;-)



We really witnessed great scenes there, more over my dear friends were hanging around with me so did really had a very great time.

I really have to thank my dear friend Sagar for his camera, if that was not there this post would be colorful.

So thats it for this time, i will try to spend time towards this blogosphere very frequently from now onwards.

Thanks a lot dear reader for visiting my blog.