Summary

In 2014, I participated in the Hack Kentucky Hackathon at the University of Louisville teamed-up with Lorinda Peoples, Tegjyot Sethi, and Anuteja Mallampati. We created software to drive a USB dart launcher and fire it at faces detected on a webcam… but only if they aren’t our faces. If one of us is recognized, it plays our Spotify playlist instead!

My contribution to the project focused on aiming the dart launcher and integrating the final modules together.

Story

As the Hackathon kicked off, one of the first things that caught our eyes in the available parts list was the USB missile launcher. We claimed one and then pondered how to control it.

We decided on a webcam approach with facial recognition.

Webcam and dart launcher

Work quickly split into dual python operations composed of making better targeting drivers for the launcher and implementing face detection and recognition for the webcam using OpenCV. Later we joined these two components together. We considered using a Raspberry Pi to allow mobility, but determined that the face recognition was too intense for the Pi’s small processor.

In the end, we made a system that detects users’ faces, greets and plays spotify music for users it recognizes, and aims and fires at the faces of those it does not (our “target” users).

First Component: Facial Detection and Recognition Features

Specifically, Spotify integration for recognized users, and dart barrage for strangers. The software was first trained to detect the faces of team members by capturing a series of photos at varying angles and distance. The algorithm used to detect faces was Haar Wavelet Classifier, and the algorithm for recognizing faces in the database was EigenFaces.

Face detection test

Second Component: Launcher Targeting System Features

Specifically, targeting by absolute angle, and interruptible actions. The launcher we used had no official drivers for Linux, but we were able to find a low-level library that someone else made. Unfortunately, it only allowed relative targeting; there is no way for the hardware to detect which way it is aiming. Part of our project was engineering a wrapper library to keep track of the launcher’s angles. The launcher rotates at a constant speed, so it was easy to calculate how far it moved as long as we always kept track of how long it was moving. This library may be potentially useful for anyone who wants to script a Dream Cheeky USB Missile Launcher.

Final setup

Setup and How to Use

For more information, see the project README on GitHub.