I Asked My Computer to Illustrate Love Poems
Here’s What Happened…
In July of 2020 I noticed a significant gender imbalance in the carousels Google returned with my poetry search queries — not even 10% of the work included was authored by women. I began to think about how technology could be used to curate poetry, ideally in more interesting and equitable ways, and I started to build my own carousels.
For my first love poem carousel, I asked my computer to match each love poem to an image from the Metropolitan Museum of Art. For version 2.0, I asked my computer to illustrate an image from each poem, all by itself.
These images were created with a text-to-image generator called AttnGAN, and I used Spacy, a natural language processing tool to help choose which part of the poem to use — in this case, the longest “noun chunk” in each poem. I hoped the long noun chunk would capture a well-described object, and sometimes, it did. For Edgar Lee Masters’s My Light with Yours, the noun chunk my computer identified was “the desert sand.”
More often, the noun chunks were less concrete. For Frances Ellen Watkins Harper’s poem Advice to Girls the noun chunk was “a friendly word.” For Rita Dove’s American Smooth, “swift and serene magnificence.” For Edna St. Vincent Millay’s I think I should have loved you presently, “all my pretty follies.”
I came across a number of text-to-image generators ( text2scene, SG2IM, stackGAN, objGAN, HDGan), all of which I hope to try out eventually. I chose AttnGAN for this project because I discovered a hosted version on RunwayML, which is dedicated to bringing machine learning to creators via an “intuitive and simple visual interface.” The model was indeed easy to use.
Here are a few of my favorite results:
I couldn’t reproduce the love poem carousel that showcase all the images here, but I made two. You can see them here and here.
Further reading
Xu, Tao, Pengchuan Zhang, Qiuyuan Huang, Han Zhang, Zhe Gan, Xiaolei Huang, and Xiaodong He. “AttnGAN: Fine-Grained Text to Image Generation with Attentional Generative Adversarial Networks” In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 1316–1324. 2018.
Originally published at https://www.kirstenmengeranderson.com.