How to change a giraffe into a bird
3 min read

How to change a giraffe into a bird

How to change a giraffe into a bird

When people study the ways that AI generates and detects images, they have to use something as a test problem. Delightfully, a recent paper decided to train an AI to transform pictures of giraffes into pictures of birds.

Why? Apparently, just to see if they could do it. And it’s a worthy challenge - they’re different sizes, completely different shapes, and giraffes are almost never seen diving for fish off the coast of Antarctica.

What they did was give the AI a set of 2,546 giraffe pictures and another independent set of 9,414 bird pictures, each with the giraffe and bird outlined. The AI was divided into two dueling parts, one of which was supposed to transform giraffes into birds, and the other of which was supposed to decide whether the picture it was looking at was a real bird or a fake giraffe-bird. It could check its work against some pictures that it knew in advance were giraffes or birds, and adjust itself so its answers were generally more correct.

At the end of three weeks of training, it could do this:

Left: two giraffes with a dry mountainscape in the background and sagebrush in the foreground

Right: two birds in approximately the same position that the giraffes were in. Most of the sagebrush is still there, but the background is blurred.

This is as impressive as it is hilarious. The AI learned to make landscapes blurry at the top so they look like macro shots (even it it isn’t always graceful about where it makes its transition.) One giraffe’s shoulder is still there, but the AI cleverly makes it into a rock and hopes you don’t notice.

Left: a giraffe standing in front of a rock with some trees in the background

Right: a pretty blue and yellow bird facing the same way the giraffe did. The background and most of the rock is all blurry, and the rest of the rock is transformed into a twig.

In this one the AI uses its blurry-background trick to great effect, but then has to figure out what to do with the foreground. It spots a log, which it uses as a perch for the bird, accentuating a rock crack into a twig, does something vague with bird feet in the vicinity, and the whole effect is pretty convincing. As before, the giraffe’s belly and legs are still around, but it turns them green and hopes you think it’s a leaf in the foreground or something.

Sometimes the AI’s tricks fail it.

There is a 20-foot bird with two giraffe feet crossing the road

Flummoxed by a probably-unusual background, the AI did not successfully change the apparent scale of the image. It’s also obvious here that the AI’s general strategy with giraffe removal is to paste over the giraffe’s head, neck, and shoulders with the bird’s body, and then try its best to hide the giraffe’s legs. If you look at the second photo in this post with that in mind, you immediately spot the giraffe, still there but recolored.

Many of the AI’s failures involve failures to hide those pesky giraffe legs.

Left: two birds standing near trees. the birds are giraffe-sized.

Center: bird has four giraffe legs and also the faint outline of a giraffe body superimposed over it

Right: Bird (or possibly two birds) with lots of legs

And a few more:

One bird is huge with long legs and sort of floating behind a zebra. Another definitely has ghostly white giraffe legs. Another is huge and blobby and black. Another looks more like a blob of transparent ectoplasm has engulfed a giraffe.

Become an AI Weirdness supporter to get some AI-generated course cases (check out last week’s blog post for even more). Or become a free subscriber to get new AI Weirdness posts in your inbox!

Subscribe now

My book on AI is out, and, you can now get it any of these several ways! Amazon - Barnes & Noble - Indiebound - Tattered Cover - Powell’s - Boulder Bookstore (has signed copies!)