Neural Network Targets Cats With A Sprinkler System

It’s overkill, but it’s really cool. [Bob Bond] took an NVIDIA Jetson TX1 single-board computer and a webcam and wirelessly combined them with his lawn sprinklers. Now, when his neighbors’ cats come to poop in his yard, a carefully trained neural network detects them and gets them wet.

It is absolutely the case that this could have been done with a simple motion sensor, but if the neural network discriminates sufficiently well between cats and (for instance) his wife, this is an improved solution for sure. Because the single-board computer he’s chosen for the project has a ridiculous amount of horsepower, he can afford to do a lot of image processing, so there’s a chance that everyone on two legs will stay dry. And the code is up on GitHub for you to see, if you’re interested.

[Bob] promises more detail about the neural network in the future. We can’t wait. (And we’d love to see a sentry-turret style build in the future. Think of the water savings!)

Via the NVIDIA blog, and thanks [Jaqen] for the tip!

66 thoughts on “Neural Network Targets Cats With A Sprinkler System

    1. “Within just a few days of completing his project, Bond reports that the neighborhood cats began avoiding his yard — and the surprise that awaits — after being squirted one too many times by his home-brewed system.”

      1. My cat prefers to sleep on a hard rounded surface, especially the bathroom sink, totally ignoring the dripping tap.
        He likes a long bath, and playing in the rain. I doubt he would be impressed by a sprinkler.

      2. there are certain breeds that like water. turkish vans for example. i have a tux kitty who sits in the bathtub while i shower, she also drinks water straight from the tap and will actually give you shit if you dont turn it on for her.

    1. Or use one of the many simple cat deterrent options that have been used for centuries. Of go live in an area where pets are more than status symbols. The Cat is really the victim here, living in a neighborhood where the owners and teh neighbors both don’t know how to handle animals. Bad upbringing and neglect from one and unnatural and ambiguous communication from the other.

      1. Please don’t patronize. It’s not as if a roaming cat is doing any favours leaving waste behind. And while it might (eventually) be good for the garden, the wafting odor of cat feces rotting in mid-summer heat is anything but pleasant to those who wish to enjoy their homes and land. Additionally the problem of male cats coming around, spraying to mark their territory, compounds the problem. Cat urine carries its own musky stink which is difficult to cover and is worse when the humidity increases and they often choose walkways, doors, or automobiles as their target. Disgusting!

        In short, for those who own pets, please keep it (and its waste) on your property. This applies to dogs as well as cats.

        1. Don’t be a jerk.
          Your over-sensitivity are first world problems and these don’t change the fact that cats are like rain. You may not like it, but that is just tough shit. It is true that a lot of owners might want to review their cat-keeping policies, but this changes nothing about the fact that like on farm, in sub-urban areas cats are a mighty fine pest control.

          Just because you are so utterly out of touch with the human-animal symbiosis we depended on for millennia does not give you any rights to demand other should follow suit because of your feeble disposition.
          Now quit your pathetic whining and man the fuck up.

          1. No need to be so hostile. Go pet that kitty cat & chill. You are taking this way too personally.

            It’s interesting you should bring up symbiosis; do you know about Toxiplasmosis? A little bug that can change human and mouse behavior? It makes the host take more risks, for example. It also causes statistically significant effects on behavior and decreases in testosterone. Interesting stuff.

            Now, you do realize cats do more than control pests. In fact, they are destructive pests themselves. In addition to the antisocial waste issues I brought up which triggered your response, it is well documented that cats wipe out loads of wildlife when they move into an area. I’ve seen colonies of chipmunks that lived in my rural neighborhood for a decade killed off in a year when a proverbial crazy cat lady and her cache of (“outdoor”) felines moved in. Same result for some of the native birds including woodpeckers — gone in a season. Although I think an owl from the river made a snack of the kittens one year. Sweet revenge?

            If I owned a farm, a barn cat or two might be a good idea. They have a role, but it’s a tradeoff. I understand the benefit they have killing rodents which like to live around bedding hay and feed stock. Other than farm life, if one has rodents and other pests there are bigger problems at the source. The cat is a patch, not a fix. Like seeing snakes in a crawlspace — it indicates a mouse problem, which indicates an insect problem, which indicates (usually) a water infiltration problem.

            And by the way, have you ever heard the expression “good fences make good neighbors?” People respect one another’s rights in suburban and rural areas. In the rural places I’ve lived, no one would dare let their animals roam or intrude; that’s antisocial behavior. We tend to blame the owner, not the poor dumb animal.

            So here’s a recipe for success: Want a cat? Fine. Be a good neighbor. Keep it to yourself, on your land. You’ve no right to let it roam and toilet in neighbor’s property.

            If you love that cat you’d keep it indoors, lest it be eaten by coyotes, wander into a loaded possum trap or worse, eat a poisoned rat or mouse. This is unfortunately common when bait traps are set out for rodent control; hemorrhaging out + liver failure is a nasty way to go.

            Hope this is helpful.

    1. The Shield TV is basically the same thing but without some of the I/O options, which aren’t needed for that project anyways. At $150 on sale, you’d be hard pressed to find any system around that price (brand new) that can compete in terms of processing power. Even x86 systems in that price range fall behind.

  1. I must try that, I have about a years worth of frames at 1 second intervals for a training set. I guess I could use motion to filter them down to a set with some sort of movement, then classify that smaller set. We don’t have problems with cats here, but I’d like to be able to detect young men in white shirts wearing thin black ties, and carrying books, so I can have a recording of Tibetan monks chanting start up automatically. But can’t I get a similar result with a cheaper FPGA?

  2. What about dogs? They are poop offenders too, worse than cats. Dogs (if allowed to roam free) will ‘target’ specific places to deposit their crap, especially outside of their territory.

    1. Around here (UK) dog owners take their dogs for a walk and tend to clear up after them. Car owners just think the poop is someone else’s problem.

      My current solution is to leave some mouse traps placed where the cats prefer to crap. Seems to be working well so far.

      1. Cars don’t poop, at best they fart and that goes away with the wind.
        Regarding dogs: Most dog owners clear up. But the remaining poop on the sidewalk is more than enough to give a danger of stepping into it.

  3. Uh, I did this almost 10 years ago, although I trained my system to recognize dogs instead. I used a gumstix add on to my X10 controllers, and actually did the ANN in FORTH. I used four Phillips usb cameras as inputs and I concocted a video locator using trig functions to determine if the dog was actually within the boundaries of the yard. If so, it would trigger the sprinklers. The interesting thing is how easily an ANN can learn to generalize from one type of dog to another.

    I was planning to put cameras under the eaves of the house and train the system to start when people walked in the yard and to also trigger an audible alarm if people came near the windows. I sold the house in 2005 and haven’t messed with it since. All my tech for this is much older than what could be available today. I have lawyer friends who say I should have patented the system, but I really didn’t design or invent anything new.

      1. That is ridiculously over dressed for where I live, anyone dressed like that would not be welcome on my property. Just wearing a neck tie would be enough to eliminate you from the group of people I’d want on a white-list. So like I said at first, guys in white shirts wearing a tie.

        All the people who wear uniforms around here (who would be mostly welcome) do not wear a neck tie except in very formal circumstances. So “neck tie” = “I am living in the past”.

        Not all the religious people around here are that backward or that annoying, we recently had a friendly chat with a couple who just looked like (and probably were) a wealthy farmer and his wife. Still rather traditional and conservative, but not so much that you’d question their sanity, unlike the other guys with their ridged and impractical ways.

  4. Obviously the Author has “yet” to be infected by the cat-borne “Cryptosporidium” parasite (yeah, search the Web).

    As soon as that happens and his brain is infected, he will eventually succumb and STOP this anti-cat behavior. The result being an uncontrollable LOVE of cats.

    I’ve been thinking about a build like this, but with an automated Az/El pointed flame thrower to kill the cats. However there are pros and cons to this approach:

    1. Pros:

    * Cats can’t make me a “Cat Loving Zombie” (obvious).

    * Brainless (and likely Cryptosporidium infected) PETA girls show up topless to demonstrate (Yay! I post to YouTube).

    2. Cons:

    * Cat disposal/burial.

    * Law suits from infected cat owners, local/state Government… and PETA.

      1. Meanwhile, you can typically tell who the dog people are, because they’re the ones who can’t stop popping off about how awful cat owners are. Dog owners certainly are “special” in their own way.

  5. This is exactly what I was looking for. I’ve been working on my own system for a very similar problem. I’ve been having a bear come around the yard for a while now. I mounted an industrial alarm (read: very loud) on my garage and tied it into my home automation system. The bear is very skiddish and I just go outside and yell and he takes off, so the buzzer should definitely do the job. I’ve been working with OpenCV and training HAAR cascades with previous pictures of the bear, but I’m getting a LOT of false positives. Maybe a neural net is the answer.

    Maybe I can detect raccoons as well. Bonus.

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.