Original article was published by Kirsten Menger-Anderson on Artificial Intelligence on Medium
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 each poem, all by itself.
The love poem 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. For this project, I chose to generate an image based on 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:
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.