ai

VQGAN + CLIP + Unreal Engine + Surrealism

I enjoyed Rusty's explanation of the VQGAN + CLIP Unreal Engine trick in Today in Tabs yesterday (subscribers only, sorry). The gist is that people have found a way to improve images created with machine learning by including the phrase "unreal engine" (yes, the Mandalorian-powering video game technology) with their prompt when they ask a GAN to generate an image of that prompt.

Rusty included a link to a colab notebook that could run this particular GAN—VQGAN+CLIP—so I started playing around with it. I know next to nothing about AI or Machine Learning, but I can run code! I tried out the unreal engine trick and the results reminded me of Yves Tanguy paintings.

My next thought was, "why not feed it some lines from surrealist poetry"? (Or their English translations anyway.) So here are a few of those:

VQGAN+CLIP generated image using a surrealist poem phrase, vague castle in a blurry landscape "a meaningless castle rolled along the surface of the earth."
– André Breton, Soluble Fish

VQGAN+CLIP generated image using a surrealist poem phrase, vague night scene with various lights "it is the star struck under my heel in the night."
– Robert Desnos, The Landscape

"The river I have under my tongue"
– Paul Eluard, The River

VQGAN+CLIP generated image using a surrealist poem phrase, a vague flower and vague clock; some fire "where we live the flowers of the clocks catch fire"
– Tristan Tzara, The Great Lament of my Obscurity Three

The other day I linked to Nick Cave saying that AI lacks the nerve to create great music. How about visual art? Seeing machines struggle to make what humans make is interesting, but I don't think the results are inspired. Again, I have no idea how to tune these tools to get more interesting results and maybe further tuning or more attempts would create better images. Right now I think we haven't progressed beyond Hayao Miyazaki's thoughts on art by artificial intelligence. (spoiler alert: "I strongly feel that this is an insult to life itself.")
spectator.co.uk
"A sense of awe is almost exclusively predicated on our limitations as human beings. It is entirely to do with our audacity as humans to reach beyond our potential."
AI lacks nerve is a fantastic way to put it. [via om]

Tom Swarfties

"I trained a neural network to write Tom Swifties," Tom said artificially. But seriously, after "success" with Oregon Placenames I wanted to try something more complex. The short, repeating format of Tom Swifties seemed like something it could tackle. I found a good compilation and set to work training. (Start with the compilation if you haven't seen Tom Swifties before. You'll get the idea after a handful.)

I have a feeling I need to look into the whole GPU thing for processing because I've been training the AI nonstop on AWS for a few days now and while it has come a long way, it's still not speaking English. But the Swifty form is there and I think it has some interesting things to share. Here are a few:
  • "Allye! Peen!" said Tom guiltorively.
  • "I had a modight", said Tom inderitively.
  • "I've not beat'd will we I sfong that take ban hisse", said Tom bardingly.
  • "Let's go! wrong wo", said Tom posthalicteitingly.
  • "Looks oke run shats", Tom repocked.
  • "I more for owlanimors!" said Tom jauntly.
  • "I haven to reperent", said Tom barch-oned.
  • "I'm going to have sow manartioutive", said Tom pridely.
  • "I like that a get a tround of chairs?" asked Tom consically.
  • "You're faloamintica", Tom canied consentingly.
  • "I don't play due the stragumed glan to the botheric", said Tom rasmitally.
  • "It's tere takes my pief?" asked Tom centatically.
I notice that it's putting asked with the questions. I wonder if the adverb will eventually match the subject in the quote. I'll keep training, but it seems to get slower as it gets more complex. "I wonder if I could tap into more processing power," pb said cloudily.

Fake Oregon Placenames

Dan Hon recently trained an A.I. to generate British placenames. I followed his recipe and did the same for Oregon placenames.

I found a list of real Oregon placenames at the US Board on Geographic Names. I did a round of A.I. training with the raw data and found the output too noisy. So I did a little data massaging and gave it another shot, this time with cleaner results.

I set the whole thing up on a free AWS instance with the torch-rnn docker image. It was a snap. A slow snap. It would be faster with more processing power.

Without further setup, plan your next camping trip and imagine the vistas you'll see in such artificially imagined Oregon places as:
  • Thkewood Meadows
  • Cookstop Lake
  • Thedrel Springs Cemetery
  • Water Reservoir
  • Rogah Butte
  • Newar Creek
  • Willaning Creek
  • Dazian
  • Booper Summit
  • Pister Creek Ranch Spring
  • Josspor Ridge
  • Bickmass Log Pond
  • Trout Bucktuby
  • Monnnit Hellant Plant Creek
  • Pitter Cip Number One
  • Seven Creek
  • Giam Creek
  • Hemil M Creek
  • Hug Waterhole
  • Dukapin Meadows
  • Bensbush Creek
  • Malow Creek
  • Lattle Lake Recreation Meadows
  • Mule Park
  • Road Ranch
  • Bruck Creek
  • Gregley Park Recreation Site
  • Forent Well
  • Kench Bed Reservoir
  • Indian Slide
  • Sinkhawk Trail
  • Tondyle Canyon
  • Spilling Pond
  • Syn Reservoir
  • Pieson Reservoir
  • Thirn Mountain
  • Fence and Swalich
  • Lower Spring Cemetery
  • Bolard Creek
  • Coney Butte Park
  • Skihino Peak
  • Laix Spring
  • Clenmill Creek
  • Oshers Forest
  • Fork Slow Spring
This is a random linear sampling from potentially infinite output. It might be funnier to go through with an editorial eye and find the most amusing, but it's getting late and I have a trip to Fence and Swalich to plan.