Militarizing Your Backyard with Python and AI
Written by Harry Fairhead   
Thursday, 22 March 2012

Shooting squirrels with a water cannon might not seem to be a serious project, but it involves AI and a lot of hardware. 

If you compare what you can buy in terms of intelligent devices to what you could create with the latest technology, you have to notice that there is a big gap.

It is very similar to the early days of the home computer revolution. Back then there were pocket calculators or expensive minicomputers. Hobbyists brought the low cost machines that created a revolution to the market. First by building their own and later by selling their creations. We seem to be in a similar situation with AI and robotics at the moment and DIY projects seem to be the only way to get what you really want at a reasonable price.

Take the problem of a squirrel scarer. If you want to get rid of pesky squirrels, or any similar small creature, your only options are to get a gun or some low tech device that couples an IR sensor with a hose pipe and valve.

Kurt Grandis took some cutting edge and open source AI tools, Python, an Arduino and a SuperSoaker and built the perfect squirrel hosing machine.

To quote from his PyCon 2012 talk:

"Has your garden been ravaged by the marauding squirrel hordes? Has your bird feeder been pillaged? Tired of shaking your fist at the neighbor children? Learn how to use Python to tap into computer vision libraries and build an automated sentry water cannon capable of soaking intruders."

The project involved Open Computer Vision (OpenCV), an a SVM learning procedure that he trained to tell the difference between a squirrel and a non-squirrel. Some manual feature extraction was used in the initial processing. Squirelness seems to come down to "blob size", color and texture.

After "perfecting" the classifier the hardware came next - a SuperSoaker Mark I was used as the "water cannon". A pair of servos were used to aim the gun and a third to pull the trigger.




You can see the entire talk in the video below - but if you just want to see the squirrels get washed it happens at 16 minutes in.




The first version just didn't have the fire power. Squirrels seem to be so persistent that a SuperSoaker runs out of water all too quickly. The next version will be more sophisticated and have a much bigger water gun.


Related Articles

Predator better than Kinect?


blog comments powered by Disqus


To be informed about new articles on I Programmer, subscribe to the RSS feed, follow us on Google+, Twitter, Linkedin or Facebook or sign up for our weekly newsletter.


MSBuild Engine Now Open Source

 Microsoft has announced that MSBuild is being contributed to the .NET Foundation. It is now available on GitHub and is being ported to Linux and Mac.

No More New Chrome For Ice Cream Sandwich

Chrome 42 will be the final version of the browser to support Android 4.0. Users of ICS devices will still be able to use Chrome but won’t get further updates.

More News

Last Updated ( Thursday, 22 March 2012 )

RSS feed of news items only
I Programmer News
Copyright © 2015 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.