Training The Squirrel Terminator

Depending on which hemisphere of the Earth you’re currently reading this from, summer is finally starting to fight its way to the surface. For the more “green” of our readers, that can mean it’s time to start making plans for summer gardening. But as anyone who’s ever planted something edible can tell you, garden pests such as squirrels are fantastically effective at turning all your hard work into a wasteland. Finding ways to keep them away from your crops can be a full-time job, but luckily it’s a job nobody will mind if automation steals from humans.

Kitty gets a pass

[Peter Quinn] writes in to tell us about the elaborate lengths he is going to keep bushy-tailed marauders away from his tomatoes this year. Long term he plans on setting up a non-lethal sentry gun to scare them away, but before he can get to that point he needs to perfect the science of automatically targeting his prey. At the same time, he wants to train the system well enough that it won’t fire on humans or other animals such as cats and birds which might visit his garden.

A Raspberry Pi 3 with a cheap webcam is used to surveil the garden and detect motion. When frames containing motion are detected, they are forwarded to a laptop which has enough horsepower to handle the squirrel detection through Darknet YOLO. [Peter] recognizes this isn’t an ideal architecture for real-time targeting of a sentry turret, but it’s good enough for training the system.

Which incidentally is what [Peter] spends the most time explaining on the project’s page. From the saga of getting the software environment up and running to determining how many pictures of squirrels in his yard he should provide the software for training, it’s an excellent case study in rolling your own image recognition system. After approximately 18 hours of training, he now has a system which is able to pick squirrels out from the foliage. The next step is hooking up the turret.

We’ve covered other automated turrets here on Hackaday, and we’ve seen automated devices for terrifying squirrels before, but this is the first time we’ve seen the concepts mixed.

31 thoughts on “Training The Squirrel Terminator

  1. I wanna see it not shoot at a person wearing a T-shirt with a picture of a squirrel on it

    I don’t wanna be the person in the T-shirt.

    I don’t want to be this guy’s lawyer.

    1. I wouldn’t mind being the guys lawyer. I’d end up owning the guy’s house pretty soon.

      As a homeowner with a garden, I’m all for an anti-squirrel turret, but this kind of diy project is creepy, especially with small kids playing near my harden.

      1. If an unwanted salesperson slips on his front steps that can sue him for a fortune. If his automated turret makes a mistake and shoots someone with a plastic pellet, they can ruin him. This is not like shooting a trespasser.

        I don’t live in the US, but it does sound really insane to live in a place when you can shoot someone on your property and get away with it, but if they slip and fall on your property, you’re liable.

        1. If someone slips and falls on your property, it might actually make more sense to go ahead and put them out of their misery. And tuck a black jack into their hand or something.

          1. In some parts of the south and pacific northwest, YES we can !! (and no one will be the wiser). Have you been to some of the more rural parts of Tennessee or Mississippi ? People can go missing without a trace and you’ll never find them ever again… like the victims in the “Wrong Turn” movie franchise.

          2. of course you can. in texas you just need to mark your property properly so they have fair warning. utility workers are excluded in the law. every land owner should be able to shoot a trespasser. someone who would violate your wishes as to their presence on your property might also rape or kill. why should you wait until you give away all your tactical advantage due to some stupid ass notion of being civilized. you’ll just be one of these dumb slaves on the tv crying b/c you couldn’t even protect your own family or you thought some government thief with a gun would come do your dirty work for you.

    1. My thoughts exactly. Before I moved house I used to be plagued with other people’s shitting cats. (I ended up with the simpler solution of mousetraps buried just under the surface of the soil in their preferred spots.)

  2. Why only squirrels? Why specifically not cats? I’ve had cats dig up my carefully placed plants and replace them with their poop plenty of times. I wouldn’t want those in my garden either. Birds? They eat seeds. And people? Who other than you belongs in your garden? Are they trampling it?

    I’d replace the bbs with a sprinkler for liability reasons. Then I’d just let the thing shoot at everything that moves. Bonus! It helps water your plants! Make sure to include a remote shutoff so you can enter the garden yourself!

  3. SocRat wrote;”it does sound really insane to live in a place when you can shoot someone on your property and get away with it, but if they slip and fall on your property, you’re liable. “WRONG! If you enter someone’s property with intent to do harm or steal, you have the right to defend your property. This is as old as man walking on this earth. Chances are that the person that enters your property is armed with a weapon of some sort. Common sense dictate if the person is not armed, you simply hold him at gun point until the police arrives. This happened recently here in California but the victim was murdered while sleeping. I think you would have a difference of opinion if you were the victim. Problem is, England specially the insane mayor of London, working to outlaw knives! why you ask? Because many crimes are committed with knives! Let’s get real, no knives, maybe pipe or wooden knives! you can’t change human nature and the problem is “Man” not the weapon! think about it.

  4. Sometimes my mom will sit in the yard with a lawn chair, a book, and a nerf gun. It’s a much more discerning targeting system, though the aim isn’t terribly reliable.

  5. I realize we do not have all of the training photos, but there is a big problem with training the “AI” with the photos on the page. There was an article recently about training AI to differentiate between dogs and wolves. The AI was nearly perfect in the detection until it was realized that all of the wolf pictures had snow in the background. The AI could accurately classify pictures of “wolves” except it was really basing the classification on the background and not the image subject.

Leave a Reply

Please be kind and respectful to help make the comments section excellent. (Comment Policy)

This site uses Akismet to reduce spam. Learn how your comment data is processed.