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.

 

squirelgun

 

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?

 

espbook

 

Comments




or email your comment to: comments@i-programmer.info

 

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.

Banner


Go At Highest Rank Ever in TIOBE Index
20/11/2024

Go is currently in 7th place in the TIOBE Index for November 2024. Not only is this is the highest position it has ever had, it's percentage rating is almost equal to its all-time-high. Will Go contin [ ... ]



C23 ISO Standard Is Here But You Probably Won't Read It
06/11/2024

At last ISO C23 has been published, but at $250 you probably aren't going to read it. Can we really tolerate this sort of profiteering on the work of others? This is worse than academic publishing!


More News

Last Updated ( Thursday, 22 March 2012 )