Two Ofx Addons and Twitter Bot
For my ofx addon project, I created @ThisThingIs. @ThisThingIs is a twitter bot which can be tweeted an image and then respond to that tweet with the results of that image being run through a “Convolutional Neural Network” which attempts to guess what is in the image. This produces results like these
40.53% wig, 12.47% feather boa, 6.02% hair spray, 4.45% microphone, 2.63% stage, pic.twitter.com/nmMLnCq64d
— Classify Me (@ThisThingIs) January 29, 2016
14.62% sunglass, 7.95% sunglasses, dark glasses, 3.71% spiny lobster, rock lobster, sea crawfish pic.twitter.com/oawfOvR3eA
— Classify Me (@ThisThingIs) January 29, 2016
24.00% quill, quill pen, 7.92% letter opener, paper knife, paperknife, 3.31% ballpoint, pic.twitter.com/l4XtLGrYlZ
— Classify Me (@ThisThingIs) January 28, 2016
The Addons I used were ofxArgsParser by SatoruHiga and ofxCcv by kylemcdonald.
ofxArgsParser allows openframeworks to receive input via the command line. This is used to receive the image location.
ofxCcv is a wrapper for libccv in openframeworks. This is where the brunt of the work is done and the “CNN” is implemented. We simply pump the image into ofxCcv and the output is pumped to the console.
Our python script does all of the front end work by receiving all the images, caching their URLs and receiving the command line input from ofx.