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


Advent Of Code 2024 Now Underway
01/12/2024

December 1st is much anticipated among those who like programming puzzles. It is time to start solving small but tricky puzzles on the Advent of Code website with the goal of amassing 50 stars by Chri [ ... ]



Windows 11 Adoption Takes A Downturn
11/12/2024

With Windows 10 End of Life only ten months away, Microsoft is stepping up its campaign to get Windows users to upgrade to Windows 11. But while Windows 11 had been gaining users at a steady rate at t [ ... ]


More News

Last Updated ( Thursday, 22 March 2012 )