Pareidoloop
August 5, 2012 7:36 AM   Subscribe

 
When you look into the RNG, the RNG looks back...
posted by Artw at 7:40 AM on August 5, 2012 [2 favorites]


That's cool but I wish the images were a bit bigger.
posted by laconic skeuomorph at 7:44 AM on August 5, 2012 [2 favorites]


I suspect the effect falls apart with larger images, but at thumbnail size that is surprisingly effective (I would have expected a lot less variety in the results as the polygons change to match the recognition algorithm's effectiveness.)
posted by ook at 7:53 AM on August 5, 2012


You can specify the size of the final image as one of the initial conditions.
posted by jscalzi at 7:55 AM on August 5, 2012 [2 favorites]


4. Modify code to detect [your favorite sacred religious figure]
5. Prophet!
posted by kokaku at 8:24 AM on August 5, 2012 [33 favorites]


Pareidolia
posted by crunchland at 8:31 AM on August 5, 2012


It's like looking in a mirror!
posted by mazola at 8:34 AM on August 5, 2012


The effect definitely works better at smaller sizes. Here's the best face I've generated at 300x300. Definitely facelike, but if you shrink it down to 100x100 it's more compelling.
posted by Nelson at 8:55 AM on August 5, 2012 [1 favorite]


See, "Genetic Algorithms: Evolving a Human Face" on YouTube for an earlier similar effort using pixels instead of polygons.
posted by 0rison at 8:59 AM on August 5, 2012


Ok, why are the faces all of males, and usually start out bearded males? Bias in the recognizer or in our neural wiring? Or is it just that a bearded male face is more minimalist than a beardless female one?
posted by jbotz at 9:54 AM on August 5, 2012


jbotz, do you mean in the third link? I think that might be your neural wiring, several of them read as women to me, and some of them didn't even read as human (there are a few Cats in there, I think).
posted by purplecrackers at 10:21 AM on August 5, 2012


Good question, jbotz. Here's the abstract from a PubMed paper which claims to demonstrate an own-gender bias in face recognition, and which asserts that a major part of facial recognition (in humans, not software) is hair recognition. The generated faces do all seem to have little or no definable hair, which may simply be down to the facial recognition software going more for eyes and noses and mouths and such. This would potentially create an inadvertent gender bias, but it's worth noting that facial recognition software isn't usually designed to differentiate between genders, just to recognize faces in general.

So it might be a combination of factors. The facial recognition software's willingness to accept hairless faces might train the algorithm to more "male-looking" faces since you're probably more likely to randomly generate a face with nothing recognizable around it than a face with recognizable "feminine" hair around it. Also your own neural circuitry, if you're a guy, might have a bias toward identifying borderline-recognizable faces as male. I would conjecture that there might be a cultural bias there too, since we live in a patriarchal culture where male is considered to be the "default" gender (even though this is of course biologically untrue). Also I suppose it's possible that the parameters defining range of actual polygons being generated might lend itself more to male faces (it seems possible but I've no reason to believe it is true) and that the facial recognition software might indeed be biased by error of design to be more likely to "hit" on a male face than a female one.

That's a really interesting question.
posted by Scientist at 10:26 AM on August 5, 2012 [5 favorites]


It's a little like Richard Dawkins's Blind Watchmaker program.
posted by Sleeper at 10:28 AM on August 5, 2012


These results show pretty clearly why Dazzle facepaint is an effective countermeasure. Or perhaps glitter eyeshadow. We all thought the makup in Blade Runner was just 80s kitch; it's also effective pentesting!
posted by pwnguin at 10:28 AM on August 5, 2012 [3 favorites]


Mine appears to be generating a Mickey Rourk/saint bernard hybrid.
posted by cmoj at 10:32 AM on August 5, 2012


That is a very good question. One possibile explanation strikes me: it's easy to represent a beard with just a polygon or two, but a chin is a complex beast.

Another possible explanation: the seed values, in the runs we've seen, ended up going for male faces, and other runs might do more females.

Yet another explanation, one that Scientist alludes to without quite directly saying: the fact that the faces look male may be due to your brain, not the computer algorithm, or any fundamental difference between male and female faces.

But, for what it's worth, they look male to me too, so it's at least two of us.
posted by Malor at 11:28 AM on August 5, 2012


Oh also it's worth pointing out that the whole "it's generating more male faces than female ones" is a sign of cultural bias in and of itself. Male and female human faces have much more in common than not, and there's a huge amount of overlap in the continuum of possible female faces vs. possible male faces. If you drew a Venn Diagram of the sets "things female faces can look like" and "things male faces can look like" then I have a hunch that they'd be like 90% overlapping, plus or minus facial hair -- although even women's faces can get hairy from time to time. So the judgement that a pseudo-face made up of randomly-generated polygons is "male" or "female" is itself dependent on a great deal of cultural conditioning.
posted by Scientist at 11:51 AM on August 5, 2012 [4 favorites]


Well, face recognition is a major, major function of our brains; we devote a huge number of neurons to doing that. That may not just be conditioning, it may be actual wetwiring of some kind.
posted by Malor at 11:56 AM on August 5, 2012


On another note, I wish that one could set it to render at a higher resolution. I know the final render can be whatever size you like, but it would be a lot more interesting to watch the program work if it wasn't just showing a 50x50 square.
posted by Scientist at 11:56 AM on August 5, 2012


Also I suppose it's possible that the parameters defining range of actual polygons being generated might lend itself more to male faces (it seems possible but I've no reason to believe it is true)

Possibly when we see the hard angles of polygons, we think male? Tweaking the software to produce ellipses rather than polygons might produce more feminine faces.

the facial recognition software might indeed be biased by error of design to be more likely to "hit" on a male face than a female one.

I wonder if anyone's fed opencv a few million male/female (and other breakdowns - age, race, etc) faces just to see if it has a bias. I'm guessing it's not sensitive enough to discriminate on gender, but skin colour, maybe...
posted by Leon at 11:57 AM on August 5, 2012 [1 favorite]


Man, they look like the paintings that accompany "Scary Stories to Tell in the Dark".

Great, now Imma have nightmares tonight.
posted by notsnot at 12:00 PM on August 5, 2012 [1 favorite]


I'd say that the random polygon faces would resemble real faces more if the face recognition algorithm mimicked our own ability better. This is basically a test of how good the algorithm is. It could actually be used as a sort of Turing test: you have a good algorithm if this method produces a convincing face.

Based on this I'd say there is a bias towards male faces if you folks see the polygons as male faces, because it would mean that the recognition algorithm is more conditioned to recognize them.
posted by Laotic at 1:43 PM on August 5, 2012


ZALGO

HE COMES
posted by Sebmojo at 1:45 PM on August 5, 2012 [1 favorite]


Laotic, it's possible that you'd get much more facey-looking faces if it were possible to increase the target fitness past 35. (35 what, anyway?) I have a hunch that it'd probably take exponentially longer to reach the target the higher it was set, though. I think that currently it's settling for results that even the face-recognition algorithm thinks look only kinda-sorta like actual faces.
posted by Scientist at 1:59 PM on August 5, 2012


You might think that the example images would initiate from me some rumination similar to Scientist's (though, no doubt, of lesser quality). However, what it actually initiated was "Cool! A source for new mix album covers!"
posted by Ivan Fyodorovich at 2:45 PM on August 5, 2012


Now someone needs to plug a whole bunch of generated faces into a facial averaging algorithm.

Or have volunteers sort the faces into different categories like male, female, cat, neutral and feed those sets into the average.

These will be the faces of our future synthetically intelligent overlords.
posted by porpoise at 3:17 PM on August 5, 2012


Oh hai, I made this. Thanks for the interest. It's just a toy that I hacked together one weekend, really - the amount of attention it has received is quite surprising. To address a couple of points from this thread:

As mentioned, if you make the images much bigger, they stop looking much like faces (although the face-detection algorithm is still fooled). I did try a few things like softening the edges of the polygons etc., but I'm kind of fond of the current quasi-cubist style that dissolves when you get up close to it. Also, you can certainly have it render the intermediate steps at larger sizes, but this slows things down a lot, because you're feeding a lot more input data into the CV algorithm.

Regarding the perceived gender of the faces, as I understand it CV algorithms like the one I'm using need to be 'trained' with a corpus of many thousands of images - the CV stuff itself is generic, and you teach it to recognise human faces, or cats or whatever. So if there is any gender bias, it may stem from the training data that Liu Liu used. I think it might also be down to the fact that the images don't really have hair, and perhaps our brains read that as baldness and hence maleness.

Finally, the fitness setting is just a magic 'confidence' value that comes out of that particular CV algorithm. I don't know what it is, but it starts a bit below zero, and I've never seen it make it above 35.

Let me know if you have any other questions, or feature requests or whatever.
posted by phl at 3:30 PM on August 5, 2012 [12 favorites]


porpoise, someone has done something a bit like that with a fork of pareidoloop, here. Although I think over a long run you'd just end up with something looking like a blurry gray mask - I don't think you'll get consistently defined features out of it, as the facial detection algorithm just doesn't provide enough feedback to help the random evolution part to grope its way towards fine details.
posted by phl at 3:36 PM on August 5, 2012


phl: Just out of curiosity, why do you use the terminology "generation" and "fitness"? A quick glance at the code suggests it's doing simulated annealing, not any kind of evolutionary algorithm. Or do I misunderstand?
posted by stebulus at 5:20 PM on August 5, 2012


stebulus: It's a hill-climbing algorithm with random mutation, which I think just about falls within a loose definition of evolutionary computation (population of two, parent and child - fittest will survive). That said, it was thrown together pretty quickly, so it's not like I gave a great deal of thought to terminology. Mentally substitute "step" for "generation" and "score" for "fitness" if you prefer.

The initial version didn't have the annealing part, which was contributed by someone else on github - that's just an optimisation, really.
posted by phl at 2:28 AM on August 6, 2012


(population of two, parent and child - fittest will survive).

Heh. Yes, nice point.
posted by stebulus at 7:31 AM on August 6, 2012


Good question, jbotz. Here's the abstract from a PubMed paper which claims to demonstrate an own-gender bias in face recognition, and which asserts that a major part of facial recognition (in humans, not software) is hair recognition.

That's fascinating - I remember in discussions about 'face blindness,' many people reported that they identify people primarily by their hairstyle or facial hair.
posted by muddgirl at 7:48 AM on August 6, 2012


Just wanted to chime in and say that this is exactly the Best of the Web stuff that I like to see here.

I wish I could play with this in a portraiture setting, or with a corpus of images based on a specific person (mostly as an art project), but I'm not sure how the logistics would have to work to make that happen.
posted by klangklangston at 4:50 PM on August 6, 2012


« Older Two Sides To Every Story   |   "the better Autocorrect gets, the more we will... Newer »


This thread has been archived and is closed to new comments