Forgot your password?
typodupeerror
AI Hardware Hacking Toys Build Hardware News

Militarizing Your Backyard With Python and AI 112

Posted by timothy
from the it-puts-the-squirrel-in-the-bucket dept.
mikejuk writes "Kurt Grandis took some cutting edge and open source AI tools, Python, an Arduino and a SuperSoaker and built the (almost) perfect squirrel hosing machine. 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. 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."
This discussion has been archived. No new comments can be posted.

Militarizing Your Backyard With Python and AI

Comments Filter:
  • by Biff Stu (654099) on Saturday March 24, 2012 @02:47PM (#39461755)

    ...but I'm sure it costs a bit more
    http://www.youtube.com/watch?v=v5YftEAbmMQ [youtube.com]

    By the way, we saw it first in Aliens:
    http://www.youtube.com/watch?v=HQDy-5IQvuU [youtube.com]

  • by Garth Smith (1720052) on Saturday March 24, 2012 @02:55PM (#39461789) Homepage
    Actual footage of the device in action starts at 16:00 if you want to skip the tech talk.
  • by Anonymous Coward on Saturday March 24, 2012 @02:56PM (#39461807)

    Squirrels are persistent.

    If you have something they want, they will find a way to get it. If it takes you 3 weeks to build a cage to keep them out, they will search for 3 days until they find or make a hole in the cage. If you put the desired item on top of a slippery pole, they will jump from surrounding objects hundreds of times until they finally get there. If you cut down all the trees around the item, they will try going up the pole until they rub all the slippery stuff off. If you put the item on the moon, they will invent the rocket.

    So I would advise against this escalation of the arms race against Rodentia. If we build electronic weapons to keep them away they will probably develop electronic countermeasures, and we don't want that.

    • by CaptBubba (696284) on Saturday March 24, 2012 @03:04PM (#39461873)

      I've had really good luck with a commercial "Squirrel Buster" tube bird feeder which has a spring-suspended cage around the entirety of the tube. They jump on and their fat ass pulls the cage down to where they cannot get the seed. They can see the seed, they can smell the seed, but they cannot eat the seed. They get so pissed off at that thing and it is wonderful.

      Grackles however are an entirely different matter and I'd love to have this water gun setup for them. I imagine a large black bird would be pretty easy to target too.

      • by FunkyELF (609131)

        My perch ring falls off from time to time from their fat asses jumping to it from a distance of falling down on it from the top.

    • by schwit1 (797399)

      Electrify the vertical part of the pole and keep the feeder away from branches.

    • by izomiac (815208)
      Persistent and with ridiculous spatial memory and processing.
      http://www.youtube.com/watch?v=nWU0bfo-bSY [youtube.com]
    • by couchslug (175151)

      Warfarin bait mixed with peanut butter works a treat on rats and mice....

      • by RussR42 (779993)
        ...that is until they crawl off and die in the wall... and I wouldn't use it outdoors due to collateral poisoning. And I don't really feel the need to do anything about the outdoor mice. Perhaps if you lived in a city or something you would.
    • by mikael (484)

      Sounds like squirrels are a cheaper alternative than postgrad students. The only problem is trying to express problems such as gene interactions and superconductor formula in terms of "find the shortest path to the nuts". Once that is solved, the nation has solved the problem of a shortage of STEM researchers.

  • Anybody remembers the airsoft P90 auto-turrent featured on slashdot a while back ? All I could find was this one done with paintballs...
    http://www.pain4glory.com/auto-targeting-turret-sentry-video-8-of-15/ [pain4glory.com]
  • by Anonymous Coward on Saturday March 24, 2012 @03:04PM (#39461863)

    Your web-
    site has
    a very
    nice
    Layout.
    Reading
    articles this
    way is
    really fun.
    Especially
    enjoyable
    are the
    20px wide
    embedded
    videos.

    Keep
    up
    the
    good
    work!

  • by jafo (11982) on Saturday March 24, 2012 @03:05PM (#39461881) Homepage

    I saw his presentation at PyCon a few weeks ago. During Q&A I asked: "My experience with OpenCV has been that it's nearly impossible to use, poor documentation, documentation of a different version of the API, build issues with the libraries. Was I just on the wrong track, or is this a common experience?"

    His answer was that it's true that it's very hard to get OpenCV working.

    Also note that after a while the squirrels stopped being annoyed by the water gun and would just sit there while getting sprayed.

    He did a very nice job of it though! I particularly like the part about using the bushy tail to tell a squirrel from a bird.

    • by Animats (122034) on Saturday March 24, 2012 @03:13PM (#39461923) Homepage

      His answer was that it's true that it's very hard to get OpenCV working.

      It used to be quite bad, but the Willow Robotics people have taken it over, and now it's supposedly better.

    • by jrobot (1239050)

      I haven't use the Python interface, but it's only an afternoon project to get the C examples building. Start off with something simple like creating a window loading and image (webcam/avi/jpg/etc). From there it's pretty minimal to run some operators Sobel, Laplace, Canny, etc.

    • I particularly like the part about using the bushy tail to tell a squirrel from a bird.

      And I started laughing loudly when a slide mentioned "avoiding false positives on neighbor kids".

    • by mysidia (191772)

      Also note that after a while the squirrels stopped being annoyed by the water gun and would just sit there while getting sprayed.

      I bet it would be a different story if he started loading his SuperSoaker with pepper spray.

  • ...for Everyon! :D

  • by garyebickford (222422) <gar37bic@@@gmail...com> on Saturday March 24, 2012 @03:18PM (#39461945)

    Add a little ammonia or cat pee, or methyl mercaptan to the water, or maybe some kind of stuff that gets sticky as it dries, to keep the squirrel occupied for a while. Also, since he's mainly interested in keeping them off the feeder, he could mount the gun next to the feeder and fire it remotely, hitting the squirrel at close range with significantly more force and wetness.

    I had a friend long ago who had trouble with dogs chasing his bicycle on his regular route to work. By adding a very small percentage of ammonia into a squirt gun, he found that if he squirted the dog right in the face, the dogs weren't hurt, but were stopped instantly in their tracks, and went off to occupy themselves with rubbing their noses and eyes with their front paws. It only took about three trials to stop any dog from bike and car chasing. Lemon juice might work as well. (Plain water did not work.)

    If I were more devilish I might suggest nitrogen tri-iodide in the water. I'm not sure that it would work unless in high concentrations, but it might be amusing once it dries on the squirrel - and/or on the roof of the feeder. The experimentalist in me wants to know - purely for the knowledge to be gained, of course!

    • There was an incident in the UK with a patchy-magenta squirrel that briefly became a local celebrity. No-one was ever able to prove the cause, but the most likely explanation is that it was searching in bins and had an encounted with a discarded laser printer cartridge.
    • Re: (Score:3, Insightful)

      by Anonymous Coward

      "Add a little ammonia or cat pee, or methyl mercaptan to the water, or maybe some kind of stuff that gets sticky as it dries, to keep the squirrel occupied for a while."

      Except that it would get all over the feeder and potentially discourage the birds.

    • by jd2112 (1535857)
      Perhaps adds some tobasco sauce to the water.
      • by belg4mit (152620) on Saturday March 24, 2012 @07:03PM (#39462989) Homepage

        To expand upon this, capsaicin is apparently the peppers defense against mammals
        eating the fruit, since they do not spread the seed as optimally for the plant. Birds do
        not sense it, so you could even douse the seed in it as a simpler solution.

        • by jc42 (318812) on Saturday March 24, 2012 @10:33PM (#39463913) Homepage Journal

          ...capsaicin is apparently the peppers defense against mammals eating the fruit, since they do not spread the seed as optimally for the plant. Birds do not sense it,...

          Actually, a lot of birds do taste capsaicin - and actively like it. We have a blue-crowned conure who likes peppers in general, especially the seeds, but tends to eat only a little of a sweet pepper. But give her a hot pepper of any sort, and she devours it, then goes looking for more. So at least for this species, hot peppers are a real delicacy.

          Conures are native to South America, which is also where hot peppers evolved, so this could explain the good match. Parrots from other continents might not be adapted to hot peppers, and might not taste the capsaicin so well. Thus, our cockatiels (native to Australia) also like peppers of any sort, but don't absolutely love the hot ones like the conure does. They'll usually eat one, and then go on to something else for variety.

          • Huh. According to Wikipedia...
            The seeds of Capsicum plants are predominantly dispersed by birds. The TRPV1 channel to which capsaicin binds does not respond to capsaicin and related chemicals in birds (avian vs mammalian TRPV1 show functional diversity and selective sensitivity). Chili pepper seeds consumed by birds pass through the digestive tract and can germinate later, but mammals have molar teeth, which destroy seeds and prevent them from germinating. Thus, natural selection may have led to increasing

    • I'd never heard of NI3 prior to your post, so I hit up Wikipedia, and found out this important fact: Nitrogen triiodide has no practical commercial value due to its extreme shock sensitivity, making it impossible to store, transport, and utilize for controlled explosions.

      Pressurizing it in a squirt gun seems like a bad idea.

      • by Anonymous Coward

        I'd never heard of NI3 prior to your post, so I hit up Wikipedia, and found out this important fact: Nitrogen triiodide has no practical commercial value due to its extreme shock sensitivity, making it impossible to store, transport, and utilize for controlled explosions.

        Pressurizing it in a squirt gun seems like a bad idea.

        Only as the dries and forms crystals - no problem while it's in solution...

        • Bummer of a failure mode there.

        • Ask many geeks about NI3, and they will have at least one story either first or third person about a prank involving NI3. Friction sets it off nicely. At my college someone painted NI3 on the seats in the cafeteria - in thin layers it's basically invisible. After it dried, as everyone sat down for the fancy Sunday dinner, they all got a spanking! :D

          In fact, as I note that the squirrels tended to jump to the top of the bird feeder, while birds tend to land on the feeder ledge, one could paint little dots

          • by Whorhay (1319089)
            My Father grew up in the 50's playing with real chemistry sets and such. He gave most of it up when one of his friends forgot to clean up properly one night. When he got around to cleaning up the beaker of NI3 exploded when he slid it accross the table surface. He ended up with a flipper for a hand because plastic surgery wasn't a viable option or even available or some such.
        • by Rich0 (548339)

          Only as the dries and forms crystals - no problem while it's in solution...

          Yeah, kind of like what happens as your reservoir in the super soaker gets depleted and forms a film on the inside...

    • howdy y'all,

      in addition to the chemicals mentioned above, _really_ cheap perfume works quite well. i use it to chase the danged feather rats [aka - pigeons] away from my bedroom window. my neighbor uses it to zap dogs and cats when he finds them mucking around with his plants. doesn't take much usually 4 units of water to one of el cheapo perfume. those pump action swimming pool guns work nicely.

      take care,
      lee

      • I like it. Although it might reduce the enjoyability of the garden - somehow I'm getting images of confusing my garden with a sleazy bar at 2 AM. "Hey honey, who you goin' home with? You got a car? I can make ya feel real good."

    • If I were more devilish I might suggest nitrogen tri-iodide in the water. I'm not sure that it would work unless in high concentrations, but it might be amusing once it dries on the squirrel - and/or on the roof of the feeder. The experimentalist in me wants to know - purely for the knowledge to be gained, of course!

      hmmm. have to agree. Nothing like the shocked look on some meathead jock's face when he opened a locker door painted with NI3 in solution [youtube.com]. I saw NI3 demonstrated at a science fair when I was in junior high (during the Nixon administration -- get off my lawn.) Stuff is fucking simple to make, and as long as you keep it in solution, it won't blow up on you. It makes a very loud snapping sound when it detonates, along with a cloud of purplish smoke. We'd paint it on locker doors in the gym and tool chests in the auto shop. Any kind of impact after it dried would detonate it. It was invisible if applied while still in solution, and it took less than 5 seconds after detonation for the residual iodine to sublimate and the residual ammonium iodide to dissolve in our always humid air, so it was practically untraceable. Revenge of the nerds, and better living through chemistry, indeed... :)

      • by Rich0 (548339)

        as long as you keep it in solution, it won't blow up on you.

        Yeah, but keeping something 100% in solution isn't as easy as it sounds. All it takes is a little residue in the threads of a cap to dry out...

  • by shippers (1100005) on Saturday March 24, 2012 @03:20PM (#39461953)
    "I see you", "there you are", and "no hard feelings" in a soft robotic voice.
  • If he can get it to NOT hose chipmunks, he could sell it to the Army.
  • by Nkwe (604125) on Saturday March 24, 2012 @04:05PM (#39462199)
    Why not just use the reptilian version of python and skip the AI?
  • by gadget junkie (618542) <gbponz@libero.it> on Saturday March 24, 2012 @04:20PM (#39462259) Journal
    I am sorry, a guy from Aperture science called, and claimed they were already distributing promotional videos [youtube.com].
  • by cffrost (885375) on Saturday March 24, 2012 @04:46PM (#39462417) Homepage

    With the quickening pace that American municipal law enforcement agencies are militarizing our collective backyards with (but not excluded to) drones, active denial systems, H&K MP5s, chemical warfare, infrared and x-ray fishing expeditions, roadside electrocutions, armored vehicles, 100 mile wide Constitution-free zones, battering rams, DNA and fingerprint databases of innocents, and propaganda/psychological warfare to turn us against one another (e.g., "see something, say something")... whew... I propose we forget about the fucking rodents, and concentrate on the swine, sharks, donkeys, and elephants.

    Am I joking? It depends on if you laughed. To paraphrase Lincoln, if I don't laugh, I'll cry.

  • regardless of a watercannon of that caliber being mostly harmless and regardless of the fact the PETA is a bunch of annoying morons, this might actually qualify as illegal cruelty to animals under your local jurisdiction.
    • Don't worry, I have another gun here for PETA in case they complain, just so they don't feel like I ignored them. Oh, quite the opposite!

  • Not so different from a May 2010 pioece in IEEE Spectrum where they built a laser targeting system for backyard mosquitos.

    What we really need is the marriage of both products -- a laser canon that automatically tracks and vaporizes squirrels. And starlings. And grackles. And cowbirds...

  • A bit of engineering would be required to re-arm a squirrel slingshot [youtube.com] but it might be more effective than water. This squirrel gets modded up for style while in flight.
  • I actually like to have squirrels around. I guess it is an american thing to woo them away

Air is water with holes in it.

Working...