Thursday, March 29, 2012

Squirrel detection with SVM

Below is an entertaining video explaining how to automatically squirt squirrels with a water gun. What's interesting about this is that the presenter used a Support Vector Machine (SVM) to classify the images from the camera as either a squirrel or not a squirrel. I haven't talked about SVM on this blog much, but they are very powerful, learning algorithms that often outperform neural networks in classification applications.

He starts talking about the details of squirrel detection about the 7:30 mark - before that he describes the image processing toolkit he used to segment the images from the camera into blobs, where each blob needed to be classified as either a squirrel or not a squirrel. I was particularly interested in how he used three different kinds of features as inputs to the SVM: size of the blob segmented from the image; the colour histogram of the blob; and the entropy of the blob, where entropy is used as a measure of the "fuzziness" of the blob - squirrels have fuzzy, furry tails, while birds do not. This shows that careful thought is always required when selecting the inputs to a classifier or a learning algorithm. You can't just throw everything in and hope to get something useful out!