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.

28 thoughts on “Visible Kitteh Project Keeps Mice Out Of The House

      1. The similarity to The Flo Control Project is by no means a coincidence. It is not only the inspiration but the reason why I was so firmly convinced it could be done without quite the difficulty my friends thought it would take.

        In fact the name Visible Kitteh Project really started as me being unable to remember Flo Control’s name. So when I started mine I just kept it.

  1. 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.

    1. 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.

      1. 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.)

    2. 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.

  2. 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?

    1. 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 :)

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

      Discovered by Hack a Day about a month ago.

      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.

  3. 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.

    1. 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.

      1. 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”.

        1. That discussion came up on a forum I’m a member of, 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.

      2. 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.

      3. 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.

  4. 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!

    1. 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.

  5. 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.

  6. I’ve been trying to get my husband to make one of these cat doors. Our cats have lost their door privileges because they’ve been bringing in live critters and letting them loose in the house. Not too bad when it’s bunnies, frogs, and lizards that we have to rescue, but they’ve brought in live snakes and, wouldn’t you know it, my husband’s not at home every time. Imagine what it’s like to walk down a hallway you’re so familiar with that you don’t turn on the light, only to step on something that’s cool to the touch, wiggles and is mad? I hope you include dangling snake-like objects in your algorithms. I am ready for this door!

  7. I need this ASAP. Bunny innards all over. 5 mice a day. That’s what happens when you invite a feral into your house, tame it to an extent, and then let it use a pet door.

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.