rebecca's WIP

Archive
reading + writing electronic text

An example from Visually Similar Image Processing, which I made in Fall 2014

My final project in Reading and Writing Electronic Text is part of a larger exploration of image recognition, image-text translation and the poetic possibilities in machine vision. I started this exploration back in the fall with my Intro to Computational Media final project. I was interested in the ways that Google Search By Image provides a glimpse into the way computers “think” about visual similarity, and how digital images exist in a space of sameness and repetition; how things can be “visually similar” on the level of pixels, brightness, composition but entirely disparate in content, context and the suggestion of meaning. For my ICM project, I wrote an image processing program that algorithmically combines batches of “visually similar images” at the scale of their pixels. The result is a strange ghost or shadow of the original images, or a kind of pixel map that becomes more abstract the more images you add to the group.

For my final in Reading and Writing Electronic Text, I wanted to continue to develop some of these ideas in this and see if I could somehow translate (or at the very least, apply) them to the realm of language. How do machines see? What happens when you translate an image to text? Might it be possible to use these textual translations to create some kind of linguistic “average” of that image? Can we find room for beauty in the failures between image and language? These are some of the questions that I was interested in and thinking about as I embarked on my final. Luckily, there are a number of tools and APIs available to do image recognition and tagging such as Clarifai and ImageNet.

I eventually decided to use the Toronto Deep Learning Demo tool as the engine to generate my image-to-text translations, since it returns full sentence descriptions rather than just single word tags. I had some trouble scraping the site’s HTML using BeautifulSoup alone, but luckily I was able to find a Python module that somebody else had written  to scrape the site based on image input.

The basic steps in my program are as follows:

Read More

For my fourth assignment on functions and modules, I rewrote my midterm code into a Python module. Written this way, the same output can be generated from just a few lines of code.

My module and main Python script are below.

Read More

Screen Shot 2015-05-02 at 6.10.09 PM copy

It’s a bird, it’s a plane…it’s images of drones, as described by a computer.

I recently made my very first Twitter bot based on the notes from Allison’s “How to Make a Twitter Bot” workshop. Now I can’t stop thinking of ideas for bots.

The name of my inaugural bot is @dronesweetie. @dronesweetie is a Twitter bot that tweets computer-generated descriptions of images of drones. The bot is powered by the Toronto deep Learning image-to-text engine. I wrote a Python script to programmatically input the results of an image search for “drones” into  the Toronto Deep learning machine vision tool, and then scrape the results to form the corpus for the Twitter bot.

Read More

blogimage_rect

This is a very belated blog post for our third homework assignment, to appropriate a source text from the network using an API. I’d never worked with APIs before, so a lot of my time was initially spent figuring out how to navigate the documentation and actually implement it in my own code.

I decided to use the Wordnik API for my assignment. In particular, I was drawn to its ability to retrieve examples for words in use (like there are in a regular dictionary). When you input any word, the API can give you a list of examples that use the word and allows you to specify the amount of results.

In the initial version of my program, I took a source text from standard input, used the first word of every line (with the exception of stop words) and looked up the top example for each word to create a new, collage-y text. My results were nonsensical and sometimes amusing, but I felt that the whole thing lacked structure so I moved on.

The program I ultimately wrote is very simple but I’m really happy with the results. It takes a word from the command line using sys.argv, and then finds a random number of examples (between 2 and 25) from the Wordnik API. The program then takes a slice of each example and prints the text beginning only with the input word on. Right now I’m using sys.argv but I think it could be interesting to do this by picking a random word from a source text, or making it into a Chrome plugin or something that lives on the network.

There were two technical problems I encountered. The first was with constructing URLs — there’s a note about that in my code. When I tried to construct my URL using a dictionary and URLencode, I kept getting errors so I finally did it the simple and incorrect way. The other problem I had was when I tried to save my output as a text file from the command line. I got an error about UTF-8 conversion, so I just copy-pasted my outputs manually.

Have a look at my code and some example outputs below!

Read More
shapeshift_prints_blog_01

Source text: Collateral Murder Transcript (from July 2007 Baghdad airstrike)

My midterm project for Reading and Writing Electronic Text is a poetic form that I like to call Shapeshift. Alluding to the idea of shapeshifting, a magical ability to physically transform into another being or form, the name makes me imagine the words of a text migrating into different shapes and arrangements. Computationally, that’s what I’ve tried to recreate.

This idea came to me back in February when I saw a Carl Andre exhibition at Dia:Beacon. In addition to his minimalist sculptural forms, I saw a series of his text-based poetic works that I’d never seen before, in which words become building for textual sculptures. (You can see some of them below in my visual reference section). Using Andre as a jumping off point, I explored related poetic forms such as calligrams and concrete poetry. I knew though that I wanted to attempt to create something that was content-agnostic, almost like I was to set up a physical container or structure into which I could rearrange words and make something new.

Through my poetic form, I’ve begun to explore some things I’m interested in and would like to explore more deeply in my work, such as the notion of text as image (and vice versa), and the relationship between the visual and auditory form of the text. I’m in the process of making large-scale poster prints of some of my poems, and I hope to continue to develop the algorithm (and introduce a greater degree of computational sophistication) going forward.

shapeshift_prints_blog_04

Source text: For Love by Robert Creeley

shapeshift_prints_blog_02

Source Text: “How to Cook Meat” from Practical Suggestions for Mother and Housewife by Marion Mills Miller

shapeshift_prints_blog_03

Source Text: Dream Psychology by Sigmund Freud

 

Read More

guncam

For my Week 2 homework on cut-ups, I knew I wanted to do some kind of computational juxtaposition of two texts. My first attempt used a selection from Practical Suggestions for Mother and Housewife about appearance and manners combined with selections from my list of 10 million usernames and passwords. I initially was trying to replace all instances of the word woman, girl, mother etc. with different usernames / avatars that contained the phrase “girl” but I wasn’t crazy about the output. So instead, I tried a second time.

In the end, I wrote a simple program to mash up words from two different source texts: a different selection from the Suggestions for Mother and Housewife book  about cooking meat and the transcript of Collateral Murder drone strike from Wikileaks. My favorite output plus different versions of my code (along with questions and some issues I came up against as I was working) are below.

Meatspace V1 Output 1

uh, MEAT outlined to
to We’re and 03:19 15:20
to this
missile. in extractives
over. This
12:14 is
here. off
the

local This engage. All
of is
with Over. on speed to
flavor they’re
Fuck. RPG Bushmaster
no Two-Six, 07:26
AK47s. he’s
picking

the in only
I’m Yeah, K.
when of ah, “extracted”
with Crazyhorse
or
yeah, be
to five Bushmaster fault though
Bushmaster

else
this Uh more.
Roger.
Thank is the
within palatable
to days muscular
of you permission Hotel suggests
going

meat corner? One-Eight, in as
Two-Six,
one
of a 02:40 38:07 16:04
and 37:18 ahead shoot you
described roger.
membrane, 17:48 can’t
15:20 one mobile. greatly

Read More

A couple weeks ago, I did some practice with lists by following along with the class notes (essentially rewriting and running all of the examples, and commenting the code thoroughly to make sure I understand what’s happening in each line). I used Robert Creeley’s For Love (one of my favorite poems) as my source text. The results are computationally pretty simple but some are really striking.

For Love (Five Random Words)
mind
this
now.
only
bed.

 

For Love / Sea Rose (Half + Half)
marred and with isolation and
drip such tomorrow, not
hardened in not this one.
sparse prevention, what
in the wants to
you are caught that sense above
meagre with skirt, or
that drives turn away.
Can love yesterday
sparse of its own

 

For Love (Randomized – Selection)
But that image
speak of it, that sense above
some time beyond place, or
from what it teaches me.
place beyond time, no
only made it with my mind.

Read More

Create a Python program that behaves like a UNIX text processing program (such as cat, grep, tr, etc.). Your program should take text as input (any text, or a particular text of your choosing) and output a version of the text that has been filtered and/or munged. Be creative, insightful, or intentionally banal.

Just as I was about to start this week’s homework, I saw an email over the ITP list with a link to a list of 10 million usernames and passwords. I downloaded the text file and began to play around with it.

I was interested in making something that might feel somewhere between creative and banal (or both): essentially a sorted list of words, in the vain of this project by Daniel Temkin. There is something interesting to me about the language of the username, and particularly the password, as this object that somehow reflects the depths of our minds (even when it is silly, playful, and nonsensical). I’d be interested to explore this material throughout the semester, and think about juxtaposing it with other texts.

So I wrote a simple grep-like program in python that finds all the instances of the word “girl” and prints out those lines. (There are some problems with it — see below for my code and more info, along with the full text).

agdollgirl princess
ageffre mygirl
aggiegirl2396 skillet1996
aggiegirl246 85E8DRit
agirl friend
agirl ineed
agirl123 calvin12
agirl69 sexy69
agirlboy re2236
agirlcalledemily Goldil0cks
agirlcanthelpit mrpeanut
agirlforgood roxana7
agirlie1 myhoney
agirlnamedmegan drinkbeer2
agirlnamednikki sammy
agirlnamedstewart jakejake
agirlnotaboy dar9zia
agirls agirls21
agirlthing_48 nicole
agirltrucker 19551955tg
agirlwantit carter

Read More

Screen Shot 2015-02-14 at 3.10.43 PM

Read More

This past weekend, I saw a series of sculptural poems by Carl Andre at Dia:Beacon that really caught my eye. I’d eventually like to make something in the class that involves visual poetry and computation, so I’m holding onto these as a reference for now.

371.1999

Read More