Visible Kitteh project keeps mice out of the house

[Aaron] and his wife have a wonderful cat that likes to contribute to the household by bringing field mice, shrews, and voles into the house as a ‘present.’ Obviously, this leads blood, fur, and viscera staining the carpet, and chasing around mortally wounded rodents isn’t [Aaron]’s idea of fun. To stop the cat from bringing small mammals into the house, [Aaron] is now preventing the cat from entering the house when it has an animal in its mouth.

[Aaron]’s project is inspired by this facial recognition cat door that refuses entry of all cats holding a small rodent in their mouth. To get his system working, [Aaron] started researching object recognition and built an Android app using the OpenCV libraries. To detect if his cat has a rodent in his mouth, [Aaron] is using Harr cascades – a proven object detection system that will detect and differentiate between a cat and a cat plus mouse.

Right now, the project is only about half done. [Aaron] is currently training his object recognition system, a process that can take days. Still, anything that keeps mouse guts out of the carpet is an awesome project in our books.

Comments

  1. andres ortiz says:
  2. Galane says:

    Cats have a perverse attraction to carpet. If food is on something on carpet, they will pick up the food, carry it to the edge of whatever is covering the carpet then drop the food on the carpet before eating it.

    I once tried covering a 4×4 foot section with newspaper with a dish of dry cat food in the center. The cats would scoop up a mouthfull, walk to the edge of the paper and drop the food on the carpet. Remove the paper and the cats would just steamshovel the food out of the dish onto the carpet. Scoop, drop, eat. Apparently most cats don’t like to eat their food where they “kill” it, it *must* be moved elsewhere, even if it’s only two inches out of the dish onto the carpet.

    A friend of mine has a toy poodle that will only eat off of newspaper or out of a dish placed on newspaper. Put the dish and the paper in different locations and the dog will scoop up a mouthful, carry it to the paper, drop it then eat. Put down two separate pieces of paper and she’ll alternate between the pieces of paper.

    • andar_b says:

      It seems to be a common feature among certain animals, though my cats usually eat their kibble from the bowl just fine, my mother’s pug and chihuahua both like to grab a few kibbles and walk away from the dish to eat them. Rinse and repeat. Drives her boyfriend crazy.

      • Aaron says:

        We have two. Timothy(the project inspiration) will eat out of the bowl just fine when he isn’t dragging something living in and finishing it off under my wife’s desk.

        The other takes the food out of the bowl and drops it on the floor before eating it. All told I’d rather have that problem than pry squirrel liver from the wall(yes, I’ve done this.)

    • Jay says:

      My cat likes to eat her crunchies one at time by flinging it out of her bowl several feet and then ‘killing it’.

      I’d like to let her out on the porch, but even though it’s on the second floor she finds a way down. I’ve been thinking something likes this project, maybe only using motion sensors, to spray her with water if she ventures past one of two exit points.

    • Eirinn says:

      I have two persians, they’re far too lazy to move and eat their food. But because of their flat noses it’s easier for them to scoop out a few treats and eat them off the floor.

  3. echodelta says:

    My turtle likes to poop on the rubber bath mat. Well it’s easier to clean than the carpet.

  4. Cricri says:

    Some neighbour’s cat likes digging my veggies and pooping in them. Can someone design a facial/assial recognition device that aims a pellet gun and pulls the trigger?

    • Miroslav says:

      You need two web cams for triangulation. When something of appropriate size (number of changed pixels) moves in visual field, calculate its position based on webcam data, and you are halfway done.

      You can use water: cats hate to get wet 🙂

      • notmyfault2000 says:

        Plus you’re a lot less likely to have the neighbors call the cops if something goes wrong.

      • draeath says:

        Not all cats hate water. I had a cat you had to physically restrain if water was around. He’d sleep in the sink too.

    • Aaron says:

      See “Militarizing Your Backyard with Python: Computer Vision and the Squirrel Hordes”

      Discovered by Hack a Day about a month ago.
      http://hackaday.com/2012/03/20/birdwatching-meets-a-computer-controlled-water-cannon-awesomeness-ensues/

      This guy knows WAY more about computer vision than I do. Plus his problem space is FAR harder. Just watch the part where he discusses trying to pick out the squirrels against trees waving in the wind.

      On the other hand I’ll bet the squirt gun would be more effective against the cats than it turned out to be against the squirrels.

  5. fdawg4l says:

    I’d worry about false positives. What if the kitteh is innocent and is still denied entry. Or the false negative- only allowed entry when poor kitteh has a certain sized critter in his mouth.

    • Aaron says:

      He’s tough, he can handle a night out in the cold. ^_^

      Actually we’re in Southern California so it doesn’t get REALLY cold.

      But both are very valid concerns. Once I collect enough sample images to re-train the object detection library (haar cascade file) I will be running it in a dry run mode where I will be logging when he would have been let in vs when he would have been denied and using that data to fine tune the software and the haar files.

      In fact I suspect false negatives might be the word of the day once I re-train. Certain features like say ears are pretty prominent and won’t be objscured by prey. I don’t have any code in place to focus in on his chin yet. I want to try it first without it and see what the results are. If I get too many false negatives I will add an additional stage to find his chin and do the recognition on that.

      • fdawg4l says:

        Very clever! I wonder if you could adapt your algorithm to also check for another set of inputs. Perhaps his weight leaving versus returning. If the weight has not gone up appreciably, it’s safe to say “the glove don’t fit, you must acquit”. You could potentially then use that event as a learning cycle for “not guilty”.

        • Aaron says:

          That discussion came up on a forum I’m a member of, letsmakerobots.com. It’s a good idea but I don’t think it will work. Aside from the difficulty of weighing a moving cat. I’d need to be able to get all 4 feet on the scale and his movement would still throw things off. I think it still leaves too much room for false positives and negatives. Some of the critters he captures are birds which don’t weigh a whole lot more than he might pick up if he got really really wet(which he does some times.) More to the point if he were to actually eat an entire critter the scale would block him. I only want to prevent the critters from entering the house whole or mostly whole. A few years ago this probably would have warranted a closer inspection but I think, and plan to prove, that the state of computer vision has advanced to the point where it is powerful enough to not need the help.

          It’s far from perfect but CV has come a very long way.

      • draeath says:

        Is it possible to have a couple cameras, from different sides? You can train them all separately, and use the consensus to determine what action to take.

        You could also include for example an RFID collar, so that the system only bothers to activate when your cat is at the door, and not whenever something is in proximity.

      • Aaron says:

        Dreath, yeah that’s an idea I’m super excited about. I doubt I’ll need it for this project but I expect to be building more and more complex devices. Probably robots of various types.

        Every type of sensor you use (Laser range finders, Sonic, Computer vision) has it’s own inherent flaws. I plan on trying to make more reliable decisions by using multiple sensor types and correlating the data.

        It sounds challenging and fun.

  6. cknopp says:

    My buddies cat used to do this, but he solved it by simply putting an old plate by his back door, and when the cat started bringing more gifts, he would immediately move them to the plate.

    Now his cat just leaves there offerings on the plate before entering the house.

    He sill has to clean the plate, but at last they are left on the out side, and he doesn’t step on them in the middle of the night!

    • fdawg4l says:

      That’s awesome. Way to think outside the box!

    • Aaron says:

      Haha, I’ve stepped on a few lizards myself.

      I think it’s important to remember that often there is a simple solution to the problem. I obviously went the other way.

      Obviously that was somewhat intentional. Also I don’t think that solution would quite work for me since he’s not bringing us gifts. He just really likes to eat them under my wife’s desk. He usually doesn’t just leave them there he actually consumes them. We’ve had cats bring in dead things before but never splatter them all over the carpet like this.

  7. Sean says:

    I applaud the intention to use advanced algorithmic computation to solve a mundane problem but there is a simpler solution that deals directly with the cats instincts and psychology:

    When cats bring home treats for their people, they are in essence trying to contribute to the “prides” well-being and showing their utility at the same time.
    Most people’s initial reactions are to scold the cat and then fling the dead or near-dead offering out into the yard. What you are saying to the cat here is: “this offering is not good enough go get more/bigger offerings to please me”.

    The correct and simple response is to praise the cat lavishly, heavy petting/scratching/rubbing or whatever else physical contact your cat enjoys (you should know what this is if you spend time with your feline) and/or offering it suitable edible treats as well as the petting and cooing.

    This will tell the cat that you accept and appreciate its offering and it will stop bringing them home.

    This may take several iterations to completely stop the behaviour.

Speak Your Mind

*

Related Hacks in video hacks

  • Automatic airplane tracking; what radar-systems engineers do for kicks
  • Watch a shop tour through the screen of an oscilloscope
  • RCA Capacitive Electronic Disk
  • MIT Students take Tetris to a grand scale
  • Stop Motion Animation Creation