My Frankenstein Lab


Last night I was discussing Self-Assembly with a friend of mine, who is working on Magnetic Logic Processor these days. He was busy writing n optimizing a Genetic Algorithm for self wiring in MRAM’s using magnetoresistance.

Inspired by nature we often tend to model the building blocks of any sophisticated technology. One can compare a wheel with a new leg, machine with a more efficient hand, a proposed theory of Neural Nets trying to simulate a human brain. A robotic vision somewat is trying to cope up with recognising objects. What more is left to explore ? Scientists never say die, the passion, the search is on. One of my friend, a researcher is dealing with organisation of nanoparticles to find ways to assemble in specific shapes, sizes or orientations. Earlier it was dealt in terms relating to viruses and proteins, polymers, molecules, semiconductors n metals. These days researchers are looking out for efficient ways to make microscopic machines, and faster n efficient electronics(say MRAM) which is based on Self-Assembly in hopes of putting things together with natural ease.

Introducing nanotechnology to future chip manufacturing, organizing key issues n putting them in context effieciently explains how the technologies copulate. The idea itself excites me. The future is gonna be great. What do u think ???

Today’s computer is shunted on three things.
1. Processors – manipulate computations
2. RAM – which retrieves info in quickly in realtime while pc is turned on.
3. Magnetic Disks – which store info when compu is shut

To facilitate the solution to problems created by volatile RAM chips, researchers are working on something they call MRAM (Magnetic Random Access Memory).

MRAM is based on magneto resistance n started back in 1950s but was overtaken by silicon chips due to performance, compactness n cost-effectiveness. Now researchers have found a way for single MRAM element to act as any of the four logic gates – AND, OR, NAND, NOR. Computer processors manipulate information by sending signals through logic gates. Future magnetic logic processors will contain many programmable magnetoresistive elements unlike today’s processor which has hardwired circuits that are dedicated to one type of logic operation. Today’s processor is optimised for different tasks – running a car brake system or running a personal computer by arranging these logic gates in certain order. Jus think the ease of getting it programmed on the fly can do so many wonders.

MRAM (Magnetic Random Access Memory) is fast compared to RAM chips, n is also non volatile, which means that it retains info even when computer is turned off. Researchers from Germany say that it is also possible to use MRAM for computational stuff. Since the memory is configurable, computing circuits formed from it can be adjusted in realtime to optimise processing for a particular application. This reprogrammability n non volatility feature is expected to increase the computational efficiency for all kinda processors relating to the work done on them. Your computer will learn bout what applications you use often, n the optimize for running of that particular process in real time ie. straight what HP states in its commercial. Your computer is personal again. MRAM is expected to hit the market next year. I ll try n get my hands on a copy when that happens.

Fooh … Past few days I was in a big soup, beating deadlines. Finally everything is set n sent. After I finished those projects, as usual I was somehow pulled back to my long drawn interests in coding a game AI, programming a game engine. Jus a few days back while surfing I caught hold of a few engines which can be worked upon. Its always better to work n improve an existing piece of software than reinventing the wheel. Still, sometimes I do stick to the idea of coding one from scratch. Anyway I found Irrlicht, a 3D engine which is really good one to start with. It is opensource n comes with no cost, not even if u commericially use it. Best of all, it is cross platform the code doesn’t break when switch os. Impressive is all I can say to describe that.

It can come up miraculous if integrated with any available Physics engine like ODE , Physx, Tokamak or Newton. I plan to build on Newton’s Physics Engine.

Ogre, Object Oriented Graphics Rendering Engine is another 3D engine cruising n competing with Irrlicht. I tried both. Compared to Irrlicht, Ogre is a bit bulky but has lot other features which Irrlicht has still to build on.

A good match of any of these 3D engine and Physics Engine will work out as a good game engine for starters. I ll test in all of them before going any further, as of right now am not sure of what is going to be my pick, what am sure of is that, its gonna be fun whatever it is.

Past one week I was working on a HandWriting Recognition Project … n I had promised to myself that I ll come up with a working app by the end of the week. I am happy that I was able to get it going … I used Multi layer Perceptron with Feed Forward Neural Network. I used PNG library for Image related stuff. It can recognize mouse gestures n has an acceptable rate of recognition error. Yet a lotta things have to be worked upon .. like it cant recognise cursive hand written words. First of all we a few corrections needs to be done before the input is fed to Neural Network. To recognise cursive hand written words, skew correction n slant correction needs to be done after which segmentation of alphabets has to be done in order to recognise correctly … Hopefully, by another week I ll be able to finish it off. I hope so .. I mean its in agenda atleast. Lets see how much time I can devote n how successful I am …

For days n months i have been pondering over n over for what kinda a fps game should we build. By now what we are sure of is .. that we will use OpenGl library. Well, usually, in most of fps games you kill enemy soldiers (Hidden and Dangerous, Swat), aliens (Alien vs predator), robots, giants(Dino 3D), or the zombies(Wolfenstein 3D). You either play single or as a team, a team against computer or a team against a team. The underlying motto remains the same – killing violently. Also games like "Grand Theft Auto" which relates to winning by crime than winning over crime, where armed carjacking, prostitution, assasination n realistic violence become a subject of criticism from parents, n many organisations.

Am usually asked why all this hand wringing to win over, by shooting your way out .Isnt it a waste of time ??? Well i cant explain why … If you are gamer n you have tasted it, you know it why. Tis addictive, I had been a slave to it for a while n gaming was the thing which pulled into computers, n computing and these days i do play games to refresh n restock my energy. It helps a lot to get me started.

One of the games which appeals me the most is "Hidden and Dangerous." Its a fine match of a team play to get the heck out of an enemy but only through a well devised strategy. Hidden and Dangerous is based on LS3D engine. Lately, i also tried Sniper Elite, taking time out of my busy schedule for recreation, n i dont regret it at all. It has Great Graphics. A few weeks ago i peeped in FarCry, another soldier based game, Stunning graphics it had, but the platform it demanded was extreme. Also it took around 4Gb of space. Too much isnt it. Though i was tempted to play it but i didnt want to jerk out my laptop's hardware n somehow managed to escape it.

When it comes to Strategy based games, Commandos is the best one i have played. If you have to win u gotta get everything right, be it strategy plan, timing, precision. In games like Swat (awarded tactical game award) gamers arent competing to kill enemy army but trying to save each n every person's life. You get a better score when u handcuff a terrorist than when you compromise him. Yep, all critics say – key element is to understand that every life is equally important. Thats what Swat follows.

A couple of months ago i saw a game from some japanese gaming company, where they used horror n emotions to push the limits of gaming. Where even a heart-throb counts. Intresting isnt it.Hehehe … a heart-throb counts everywhere, be it life, love or games. Well Thats gaming is all bout – Interesting encounters. In a game we never know where we gonna land up, the uncertainty plays an ace factor winning over all tensions we have to get us engrossed n ready for work.

Simple Face Recognition for Frontal Profile Faces

So we are nearing the end of it … the most important part of it – Face Recognition. Well by now the face is detected in a photograph but what bout recognising those faces in a series of images in the Visual Databasae. Half our work is already done What remains needs to involve Artificial Intelligence.
We apply many edge masks to all faces to get an Eigen Face.
Edge Mask is some what like this

1 1 1     1 1 0     1 0 1     0 1 1
0 0 0     0 0 0     0 0 0     0 0 0
0 0 0     0 0 0     0 0 0     0 0 0

1 0 0     1 0 0     1 0 0     0 0 0
1 0 0     1 0 0     0 0 0     1 0 0
1 0 0     0 0 0     1 0 0     1 0 0

and so on …

After applying these edge masks the resulting image is an Eigen Face.

This Eigen Face is then fed to the input units of an Back propagation Neural Network which is already trained with a database for determining a face from another face, n will come up with the name of the person the face is tagged with.

Thats all for today guys … Hopefully soon i ll come up with a working algo for all this. Until Then .. Good Bye !!!

Simple Face Detection

So far so good. So, Skin Recognition is done .. however there might be objects in the image which have the same skin color but arent faces.. what bout those .. so our detection isnt complete, we need to detect faces in those skin areas of the new image I.

To cope up with this we need to the image I on various scales at various points in order to locate a face in the whole image. Scanning is done in all directions – left to right, top to bottom, starting a width n height of the image n reducing it to the minimum size unit. Now this can be a lengthy process n is very processor hungry… it is suggested to scan only at center of all locations in the image I which has a non zero Sij.

Now how do we determine whether an area is a face or not. This is done by subtracting a face template F from the region of the raw image A. The face template is calculated by averaging the pixel values over a number of face example images. After doing this in all directions the resulting image is called an Eigen Face.

Eij = |Aij – Fij|

This Eigen Face is then fed to the input units of an Error Back propagation Neural Network which is already trained with a database for determining a face from a non-face.Yea things have suddenly started getting over us .. isnt it .. Well if you are still with me then onto to the next part of it … Yes the last n final and the most important part of it … Recognising Faces …
Determining whether it is you, me or someone else .. Riya's Face recognition does this on the fly when u manually tag some of the faces n click on to Automatic Recognition Feature … So lets get started as to how is that done n get our hands dirty, punching it out.

Skin Detection Algorithm

An image is scanned n stored in 80×80 pixel array, A (say).

This array is then passed through a RGB threshold function to get three intensity images in Red , Green n Blue.

Rij = Arij – Tr

Gij = Agij – Tg

Bij = Abij – Tb

Here Rij, Gij and Bij are the red, green and blue pixel intensity values at image co-ordinates (i,j)
Arij, Agij and Abij are the red green and blue pixel intensities of the raw image

Tr, Tg and Tb are threshold values for Red Blue n Green respectively.

If the resulting values of Rij, Gij or Bij are less than zero then they are set to zero.

Now a new image S is calculated from the three images calculated.

Sij = 2Rij – (Gij + Bij)

Here Sij represents the likelihood of a skin tone colour at coordinates (i,j).

Now a new image I is calculated based upon the skin tone likelihood and the original raw image. If the algo finds a skin tone then it copies the raw image pixel intensity
value to the new image.
If  ( Sij>0  and Prij + Pgij + Pbij < Tw ){

Iij = (Prij + Pgij + Pbij)  /  3

}
Here Tw is a threshold value used to eliminate bright white colours(gamma) from the image.
So now we have an image I in which on Skin recognised parts are visible … Not bad start at all .. Let go further … 

Ever thought of how face recognition works ??? Riya’s face recognition might have surprised many but needs lil more tweaking … neway tis a good start … Have you ever wondered how face recognition works … The benefit of devising AI based sytem which is able to accurately recognise and locate objects / faces can really make a mark in computer vision technology.
All this needs lots of memory for all neccesary computations in order to process visual data out of the constraints of special light conditions n heavy costly gadgets for high resolution pictures.

Face / Object recognition is comparitively easier for special treated images where no other objects occlude, overlap or interfere with faces / objects in images… or that the background is not cluttered … however in realistic circumstances such things are quite obvious n cant be escaped for a robust algo.

Considering Riya’s Face recognition engine which considers all real time environments like objects, scenes n backgrounds, the best way, according to me, to track down a face in the whole image would be Skin Recognition.This is what their uploader does before uploading all images from your hard drives.l wouldnt have get onto how all this is done but since i got a few mails demanding the same i thought why not give it a try.. Believe me tis really simple …

So finally today i got sometime n i started playing with Riya's face n text reacognition. i started tagging faces with names n lil details like gender, email, and age. Everything seems to work fine except that Riya can only identify faces which have somewat frontal orientation. Riya allows both manual n automatic recognition. Ajax kungfu rules the interface … You can drag n drop using mouse or you can use ur tab key on the keyboard whichever suits your taste .. COOL .. yet one shortcoming that i found in Riya's interface was that they have assumed all users will have their desktop customised for 1024×768 or more. Seems their designers have overlooked the possibility.

You can keep on tagging images or use ur auto recognition feature .. watever u do the Riya's recognition engine keeps on working in the background … learning. Yet there is a stage in AI where more learning can also detoriate the recognition.Riya guys need to build better and better algorithms for recognising the trillions of faces which are getting pumped into it as fast as the available bandwidth will allow.

Riya's Uploader can be lil annoying at times coz it takes a lotta time uploading however it also has the advantage of providing the user a liberty to loaf around n in the meantime it uploads the snaps for them.

Now Riya or Flickr ??… Well am not telling that it's over between me and Flickr – I still think that Flickr is a very beautiful application and it's got many orders of magnitude in interface n functionality than Riya. Flickr is more userfriendly n artistic. If they somehow connect their visual database it ll make our life lot easier. After all both are tools that's fun to use.

I havent checked the community of Riya but i can expect that it has grown very fast.Am just waiting for the day when these Visual Database communities or public forums like Keyhole community where all users can upload such photos, recognize them n be able to track people all round the globe as to where they are right now .. Exciting isnt it …

i hv started building my app to achieve something like taht … yep my app was able to recognise faces using eigen faces in frontal profile however it still needs to track down faces in images of any size using Stero face detection..Yep all this needs lil time which am running short of these days .. neways .. lets hope for the best …

Next Page »