Facebook Face Extractor


A few days ago I was messing around with some face detection libraries when an idea hit me, what better place to look for faces than Facebook! After a few hours and a copious amounts of coffee, I started piling one idea after other until I ended with a rather interesting combination of technologies and data sources.

Before I explain any further, please step back for a second and appreciate the insanity of information stored along with pictures uploaded to Facebook. Not only are the images stored on Facebook's servers, but they are also tagged with who ever is in the image, including their name and the xy coordinates of that person's face on the image.

To make things more interesting, the Facebook API allows very easy access to this crazy database, including the images. For example, Photos.Get can be used to get a list of all the images that are tagged with a certain person, then for each image, you can use Photos.GetTags to get the X and Y coordinates to locate where their face is (FBQL would also work). With this information, you can crop and build a collection of smaller images that only include their face. A simple face detection library such as fdlib can be used to verify that the smaller cropped face images are indeed faces since some people tag incorrect locations.

Now you have a collection of smaller images with just the face. Other than the creepy factor, what other uses can this have? There are face recognition algorithms out there that can build a detailed facial characteristics model for a person provided several images of their face, which in turn can be used in automated face recognition systems to identify people. You see where I am going with this...?


Let me give an example of how scary or interesting an implementation of this can be (depending on who you are). Imagine if someone runs these steps for everyone at an University, they would end up a database of facial models for every person that had an image tagged (and they don't even need to be a member of Facebook since people tag everyone anyways). Now for example, build an iPhone app which can take a picture of anyone in that University, and the system would compare the picture to the facial model database and return who that person is. Or a camera system that identify everyone who walks past it (Remember: Minority Report subway scene with targeted ads). Other uses can be to tag even more images automatically, even on other image databases such as Flickr or Picasa.

Implementations of this technology combination is limitless, yet scary and very disturbing, not to mention the privacy concerns. What's even more interesting is how simple this whole thing is, my implementation was less than 200 lines of php/c/cgi including the facebook API stuff and did everything including verification with fdlib but not the facial recognition (and no I will not post the source for obvious reasons).

I am torn between considering if this is a good or a horrible use of technology: I can see some very interesting and cool uses, but at the same time it can be used in some very unfavorable ways. Just be careful of what information you put online, specially when they are large databases like Facebook and tagging pictures...


Hurricane Ike


This hurricane is unlike anything I have experienced before, just look at what this one is bringing to shore...



Random and Fascinating stuff


After having my mind blown away reading the Stuff you can't believe you just figured out thread on SA, I decided to share a few that I found really fascinating...

The word Car is a short form of the word Carriage.

The tune of Pachelbel's Canon is present in so many songs I had no idea about before, including many Greenday, Aerosmith, Beatles, Bush, Bob Marley, U2, Dragonforce, Bowling for Soup... and the list goes on. A funny video rant about this with examples.

The word Teen is intended for ages that end with -teen such as thirteen, fourteen up until nineteen. How did I not catch that for this long...

Every wrist watch advertisement out there shows the same time, 10:10.

Few of the ones I read up made me feel really dumb, like the teen thing, for not realizing them for this long, on the bright side now I know... There is a lot more but not really feeling like typing more, hopefully will start posting stuff more regularly.



CG Too Real


The demo from Image Metrics is so real, it's borderline creepy knowing that she is not real. Take a look at the Video. Computer Graphics have come quite a long way, feels like what I did 4 years back in CG almost ancient compared to this.

Realistic Picture of a CG Generated woman

Watch the Video to believe.


Farewell Cisco


I guess all good things must come to an end... after 3 summer months, I just concluded my internship at Cisco for the second time, which I thought went extremely well. My project was to port the ASE (Automatic Signature Extraction) system from a plain linux platform to the Cisco AXP which was quite an interesting experience. Porting ASE was the easy part, it was porting libc, apache, postgres, mysql, php and a boat load of tools and dependent libraries the more interesting part.

Other than work which felt more like a fun project, I really enjoy the people I got to work with, very laid back and chill group. On top of all that, there was always something to do with the rest of the Interns, so many interesting folks to meet. The social mailer list was extremely active and quite hilarious, and I think the Intern forum I had set up at internmix.com was quite sucessful.

The area... the number of parks and natural getaways around California is crazy. While I was in Cali, went camping in the Big Basin Redwoods and it was quite a relaxing getaway from the busy life down at Silicon valley. On top of that, there were many hikes and picnics up the closer parks which I really enjoyed. Several times I just jumped in the car with just a gps in hand and drove to the mountains east of San Jose with no destination other than looking for windy roads... and in one such journey I accidentally came across the Lick Observatory. When I got there, it was totally empty and I even got a full private 1-on-1 tour of the place. The mountain where the observatory is located is surreal, it's calm, relaxing and completely free of civilization, only the windy roads. It was so windy that on my way down, I had to stop for about 30 minutes because it was making me dizzy (imagine a 1 hour roller coaster ride) Map.

And to end this all, I drove a epic drive from California to Texas in two days. 1900 miles, 14 hours per day for 2 days. I have driven this path before several times, but for the first time it was green along I-10 in Arizona and New Mexico! I think the mild weather along with the nice scenery is what made the drive bearable. It's been a whole day since I got back, but my body is still recovering from sitting still for so long.

In my opinion, this summer went way too fast. All these together makes for a kick ass summer experience. New people, new experiences, the work was fun, so many things to do... just perfect. You never know, I just might wind up in San Jose again....


Gallery2 and Facebook App


So a few weeks back, I was really frustrated realizing that there were two places I needed to upload my pictures online, once to my personal Gallery2 album and then again to Facebook. Uploading identical sets of images twice was unacceptable for me, so I decided to write a Facebook app that would integrate the two. After fumbling around the Facebook API and Gallery2's db, results were good.

In simple, the Facebook app pulls the album list from my Gallery2 db and publishes them as thumbnails to my Facebook profile. The hardest thing was finding my way around Gallery2's SQL Database, what a mess.

Now my problem is solved, and on top of that it was pretty cool learning how the Facebook API works, quite an interesting mechanism.

Update Dec 4, 2009: I took the onsite Gallery installation down after security concerns.


Reconstruction 3


So I have decided to re-write my website from ground up after so many attacks on my previous Wordpress installation (to be fare it's been on-line for 4 years, countless security patches, upgrades, and various hacks of my own).

My implementation will be functionally the same as Wordpress, except much more lean in comparison, but at the same time customized for my needs, such a tight integration with facebook, gallery2, twitter, my asterisk voip system, and a few other things.

One thing I will be keeping from Wordpress is the URL format since changing that would break all the links from the outside world. I am also not developing any support for themes/templates other than simply through the css stylesheet, just to keep things simpler.

I also have plans to experiment with a new caching system idea that was brewing in my head, but that's for later.

Wish me luck on this project.



Newer Posts

Older Posts

Navigate

Archives