
Militarizing your backyard with Python, Arduino, and computer vision. - kscottz
http://pyvideo.org/video/674/militarizing-your-backyard-with-python-computer
======
jamesbowman
As the person who wrote the OpenCV Python bindings, this makes me inordinately
happy.

~~~
doctoboggan
Awesome, I have been using the your work a lot recently. I do have one
question though, is SIFT available in the python bindings? I have not been
able to find it.

Thanks for contributing your time, it has made my life much easier.

~~~
apu
For SIFT computation, I recommend VLFeat[1], which there are some python
bindings for[2] (although I haven't tried them myself).

[1] <http://www.vlfeat.org/>

[2] [http://www.janeriksolem.net/2011/06/another-python-
interface...](http://www.janeriksolem.net/2011/06/another-python-interface-
for-sift.html)

~~~
kscottz
Jan Erik is an outstanding guy. He has helped me through a couple of rough
spots. The OpenCV python bindings for SIFT don't seem to work (or exist). The
ones for ORB work really well. Here is an example:
[https://github.com/ingenuitas/SimpleCV/blob/master/SimpleCV/...](https://github.com/ingenuitas/SimpleCV/blob/master/SimpleCV/ImageClass.py#L3994)

------
rauljara
I think a fair number of homeowners would be willing to pay a lot of money for
a version of this system they didn't have to program themselves. And had more
firepower, of course.

~~~
nl
I think a fair number of nation-states would be willing to pay a lot of money
for a version of this system they didn't have to program themselves. And had
more firepower, of course.

~~~
Estragon
I think a number of terrorists are going to be willing to figure out how to
hook such a system up to a gun on a $300 RC quadrocopter. I hope it's a small
number. It's going to be interesting.

~~~
thesis
Are you serious? Do you honestly think a $300 RC quadrocopter can handle the
kick of a gun?

~~~
cbetz
opposing barrels fired simultaneously might work, though it would be a bit
wasteful.

~~~
pilgrim689
I don't think so... Where is all your extra energy going?

~~~
MiguelHudnandez
In roughly equal and opposite directions. You'd just need something between
the two weapons to withstand the compressive force.

~~~
pilgrim689
"In roughly equal and opposite directions" sounds like you think energy
cancels other energy like opposing forces do. The energy needs to go
somewhere; it can't bump into MORE energy and disappear. What would this
"something" that absorbs all of it be?

------
ams6110
A real python would probably take care of the squirrels even better.

------
vibrunazo
I'm impressed that he can get low false positives with such simple methods.
That's great to know.

If he tried using line detection, vectorize it, then train the algorithm with
the tagged shapes of squirrels. Would that be too slow to do in real time? Or
could it work to reduce false positives?

~~~
SammoJ
Adding complementary features such as edges (I'm guessing this is what you
mean by lines) tends to improve the accuracy. It would also be possible to do
this in real time.

I don't have time to watch the full video so I don't know what features he is
currently using, but in object detection nowadays most people are using some
variant of the SIFT descriptor. These are built not upon edges but on the
image gradient per-pixel. The current 'hot' feature in terms of frequency of
use is probably Histograms of Oriented Gradients (HOG) which do exactly what
they say on the tin: Take a region of the image and count how many times a
particular gradient direction occurs and the total magnitudes. Slightly more
difficult to run in real-time but libraries exist.

------
arandomJohn
I attended the talk. It was pretty cool, especially the OpenCV part. Frankly I
think he needs to upgrade the armaments. Hook that bad boy up to the hose with
a nozzle.

Frankly, if you wanted to, you could hook such a system up to an automated
sprinkler control system and just turn on the water for whatever area the
squirrels happen to be in at the moment. It would only have to be on for a few
moments. Soon they'd think your yard is some sort of special hell, where water
follows them wherever they go.

~~~
kayz
I was there too :) It was such a fun talk, especially the part where in the
end of the demo video, the squirrel stopped caring about the water cannon
anymore, and decided to steal food while getting sprayed on. I wonder if there
is a better way to deter them instead of bigger water cannons?

~~~
elviejo
Well the arms race can begin... more potent water pistol. Then nerf dart
gun... then golf balls gun... then gotcha gun... (at this point gets
dangerous)

------
prawn
Reminded me a bit of this old project from someone trying to stop non-cats or
their cat carrying a dead animal from entering a cat door:

[http://www.quantumpicture.com/Flo_Control/Flo_Control_1/flo_...](http://www.quantumpicture.com/Flo_Control/Flo_Control_1/flo_control_1.htm)

------
SudarshanP
One of the spectators in that video talks about
<http://info.ee.surrey.ac.uk/Personal/Z.Kalal/tld.html> which was discussed on
HN before and a nice demo of what computer vision can do...

------
trotsky
Awesome talk, but I can't resist: Leave it to a software engineer to find a
$250 solution to a $10 problem :)
(<http://www.wbcboulder.com/pole_mounted_baffles_sub.html>)

~~~
simcop2387
I can tell you right now that those don't work at all. We've got a few on our
feeders with NOTHING else around them and the squirrels still get on them.
They only work if you have a single feeder/pole within about 10 feet of each
other. Those little fsckers pull some ninja-esque moves jumping from metal
pole to metal pole to get around them. It's entertaining to watch but it can
get expensive since when they get up there they eat their fill which can
sometimes be 1/6th to 1/5th of the feeder at a time.

~~~
HeyLaughingBoy
_they eat their fill_

That's when you apply the $5 solution: a slingshot.

------
trebor
What about airsoft? You could mount a cheap, automatic, battery-powered unit
and seriously sting those squirrels! I thought of using a similar system to
protect the chickens I've got from the feral/neighborhood cats (I do have a
fence... but that doesn't feel "complete").

~~~
woodall
We have chickens too, around 25 free range + a pony + a few ducks, and had
issues with dogs and wild coyotes. I think harming the animal is a bit
inhumane but I totally understand where you are coming from. Remember you are
a guest in their space.

Here are some suggestions that have worked for our farm:

1\. Pee around the coop. Enough said.

2\. Get a puppy and train him. We have an aussie that does a great job, but
there are other breeds that make even better farm dogs.

3\. Train the chickens to go back into the barn when the sun goes down. This
isn't very hard and most of the time they will do it themselves.

4\. Motion sensor and/or electric fence on a timer.

5\. Be aware; this is by far the hardest thing.

Our first year we lost 10 chickens. If that's not motivation enough to do
something, I don't know what is but I would never hurt another animal for
doing what they do naturally.

~~~
trebor
Our chickens aren't exactly free-range, but they have a large fenced-in area.
The fence is electric, and the chickens do go in at night. But when a cat
walks by and scares them, they have a tendency to get outside the fence and
not know how. And outside the fence... some of the cats would be interested in
getting them. And since a big siamese-like cat comes around that will hunt
ground hogs, a chicken isn't such an intimidating target.

While I understand that cats are born predators, I can't afford to lose
chickens. I wouldn't kill them because they do keep pests down and may belong
to someone, but I do want to scare them away from the coop.

~~~
woodall
Oh yeah, I understand that. We all face different challenges when raising
animals. I was just spitballing at 'cha.

------
swordswinger12
15:50 for the cannon in action.

~~~
AngrySkillzz
Relevant XKCD: <http://xkcd.com/382/>

------
liquidcool
I wonder if something like the Blender Defender
(<http://www.plasma2002.com/blenderdefender>) would be more effective than the
water. A strobe light and/or a rattle to frighten it off. Ultrasonic would be
good as well if there was decent evidence it worked.

------
javajosh
Seems like you'd be better off cutting off the approaches to the feeder. But
the project is super cool. For more power, I'd use a power washer. :)

~~~
polyfractal
Squirrels are notoriously ingenious at raiding feeders. They are really good
at defeating feeders that are specifically designed to be "anti-squirrel" too.

------
Ecio78
My bro has a problem with a mole digging all the backyard, any idea for that
problem? maybe a flying drone that drops bombs on its head ? :)

------
8ig8
The presenter's personal site: <http://kurtgrandis.com/blog/>

------
mogui
neat and awesome talk

