Friday, September 16, 2005

Sexer Program

No, that's not what you think it is. Apparently that's a program that Danny Yang has developed which given a picture, tries to determine whether the person in that is a male or a female.

Well, if we can do that, so should the programs be able to do that, right. Now how do you think such a program would work? Any ideas?

Danny's program does it with 85% accuracy BTW. The following Perl does it with 50% accuracy (on a sample with equal number of photos of males and females) ;)

perl -e 'print "Male\n";'


Sid said...

The simplest thing I can think of is to differentiate based on the amount of facial hair. I wonder how much accuracy we'd get with just that!

Jagadeesh C said...

85% accuracy would tell you that it was able to get thru males neatly shaved. I wonder they sure have more things to worry about, but facial hair sure makes sense. I also think we can cheat such algorithms, not much effort :-).

raster said...

Nice bit of Perl... I wonder if it could be implemented in Python, Ruby, and maybe even PHP. ;)

rajaram said...

perl -e 'print "male"'

will not give 50 % accuracy.
It will give 50% accuracy only if u make sure that ur test data contains equal number of male and female photographs.

I think u atleast try to make use random number generator to decide.

rajaram said...

genral was of classification is by machine learning, train a machine using a good sample data and you will get good enuf accuracy.

I know on text these methods work fine.

Some research also suggest that it works good for images too.

Sid said...

Yup, why not! :-)

You're right, I did make an assumption about the input sample. But given a sample containing equal number of pictures of men and women, the program is sure to be able to do the classification with 50% accuracy. With a random number based one, you can't be sure about the accuracy.

Anyways, that was just meant to point out the fact that it is trivial to write a "sexer" program having 50% accuracy because you have just two possible answers. The assumption being the same as the one stated above :-)

>genral was of classification is
>by machine learning, train a
>machine using a good sample data
>and you will get good enuf

Dude, point me to a paper that you liked on this. This is quite an interesting topic!