Saturday, April 25, 2015

The Clusterflop Project

So I've been working on my honors thesis/University Scholar project since the start of the semester and results have been, well... inconclusive. I've been working with some machine learning algorithms such as artificial neural nets (ANNs) and support vector machines (SVMs) in order to detect facial expressions from EEG data for part of my thesis. The end goal is to make my own API that detects more events and/or more accurately than the original SDK for my Emotiv neuroheadset and to send this data in a JSON format in a client/server format using a TCP socket. There's a bit more to it than that such as using it to improve my previous Mind-Controlled UAV project with blended commands and path-planning, but that's the gist of it.

I've spent the majority of the semester studying up on ANNs and SVMs and just trying to get them to train on a dataset with only blinks without my computer overheating. At one point the CPU cores hit 101 C (yes, hotter than boiling point), 4 degrees away from automatically shutting off. While on spring break -- when I was doing what else but work -- I considered sticking my computer outside since it was running for literally hours to train a single neural net. (It was so cold it actually snowed that week.) 

After hours of waiting and repeatedly receiving poor if not inconclusive results (sometimes ANNs don't converge meaning they don't learn for bad input), I decided R was too slow of a language to use to train my ANN and to instead try some multithreaded Java, which is actually a lot easier than it sounds thanks to the Encog machine learning framework. The Neuroph Java framework I tried before that was not without issues...

Dev 1: "I want an icon for this exception, what should we use?"
Dev 2: "Why not a graphic cartoon of a guy whose brain exploded?"
Dev 1: "Freaking brilliant, Jim."

I only recently gained access to UConn's HORNET cluster after applying several weeks ago, giving me barely 2 weeks before finals to train several ANNs and SVMs. Not only did I have to learn how to actually compile and run Java programs through the terminal since I need to SSH into the cluster, but also how to actually use a cluster properly as in submitting jobs to a queue since this is a shared resource that many professors and grad students use to perform research.

As I type, I'm still waiting for the real neural net results (as in all expressions trained) to come back. I have but a single week until finals, only 9 pages of my thesis written, no results to show, over 2 hours' worth of training for the first neural net on the cluster, and of course, other unfinished coursework. Either I'm going to just barely get this third of the thesis done in time for finals or I'm going to melt down the HORNET cluster in the process.

Let the final countdown begin.

Saturday, April 11, 2015

April 11th Open House

Yet again another open house has come and gone at UConn. I was hoping it would go smoother than the last one back in October when the drone I use for my mind-control demos decided it didn't particularly like the carpet in C80 and thus wouldn't fly. I was right (well, sort of).

All seemed well as I arrived bright and early to ITE to set up with all my equipment. Finally getting the EPOC+ saturated and ready to go, I donned my nerd gear and tried getting it to connect to my MacBook with only a few minutes remaining before the tour groups would start arriving. Lo and behold... nothing. Panicking, I tried reconnecting, restarting the program, but nothing seemed to get all the sensors to go green. 

Fearing my new headset decided to crap out on the big day, I made a mad dash back to my dorm to grab my old trusty EPOC. Some visiting parents looked confused as they saw me sprint out of ITE like the building was on fire. Within record time, I got to my dorm, grabbed the headset, and ran back to ITE to quickly set up. However, in my panic I forgot the sensors of the EPOC were so worn out that the saline would only bead up and roll off, rendering the headset practically useless. In a last-ditch effort, I put the new headset back on and decided to try one last time.

Unfortunately by then the presentation had already started and I was scrambling to get everything configured. Sure enough, the finicky headset decided at the last minute to connect giving me only a short time to get ready. As soon as it was my cue to start the demo, I walked up to the front and center of the classroom and started my Java program. Despite my nerves, I was able to get the drone to fly with my mind and land -- all without crashing it into a wall or person. 

Many more tour groups came and went, all seemingly satisfied if not entertained by the demo. It's not everyday you see some crazy girl controlling a drone with her mind. However, the headset became unreliable more quickly than usual as it was thrown on my head in a rush so certain detections stopped working. Fortunately, this only impacted the very last tour group.

Overall, it was a rapid-fire open house, but it was generally a success. Hopefully I can improve on the demo for the upcoming Connecticut Invention Convention in May.