Neural networks are computer systems that are vaguely inspired by the construction of animal brains, and much like human brains, can be trained to obey the whims of the almighty domestic cat. [EdjeElectronics] has built just such a system, and his cat is better off for it.
The build uses a Raspberry Pi, fitted with the Pi Camera board, to image the area around the back door of the house. A Python script regularly captures images and passes them to a TensorFlow neural network for object recognition. The TensorFlow network returns object type and positions to the Python script. This information can be used to determine if there is a cat in the frame, and if it is inside or outside. If the cat remains in position for ten consecutive frames, a text message is sent via Twilio, indicating to the owner to let the cat in or out, as the case may be.
Thirty years ago, object classification was a pie-in-the-sky technology, but now you can run it on a $30 computer to figure out where your pets are. What a time we live in! A similar solution to this problem may be a cat door that unlocks via facial recognition. Video after the break.
[Thanks to Baldpower for the tip!]
38 thoughts on “Neural Network Knows When Cat Wants To Go Outside”
If I would let our cat out/in every time it “wants” to, I’d be opening the door 50 times a day. Minimum.
To make things worse it has it’s own neuronal net trained on being really annoying when it wants out.
Trick is to not let it in for half a day then itś so exhausted from screaming and scratching on the door, that it just comes in to take a nap.
Or maybe just get an RFID enabled cat door?
But I really think your cat mostly enjoys the nice breeze that your door produces when you swing it open/shut all day long :-*
Obviously written by somebody who doesn’t own a lap fungus :) Pro tip: when you open the door to let a cat in or out, a subroutine immediately executes in the cat to set a boolean tag “change mind” to a random value. I came to this post hoping that some wizard had trained a neural net to predict the outcome…
Does anyone know of additional functions to reliably distinguish two differently colored/patterned cats once the basic code has correctly detected a cat? I’ve tried some python/OpenCV color blob detection but have a hard time getting it reliable when lighting conditions change throughout the day.
Leave your cat in the house. Letting it roam free is irresponsible. It is bad for the cat’s health, and it annoys your neighbors and destroys their property.
id rather their property get destroyed than mine.
Then don’t have a cat. Or any animal.
My cat was already in the street before I took her in; what’s the problem with allowing her out?
If what you meant was “don’t breed new cats”, then I’m with you.
How about the cat killing all wild life?
@Jii How about the human killing all wildlife? You’re a bigger drain on the ecosystem than a cat is.
i dont think you understand the situation. you do not simply have a cat, cats simply have staff. think about it, they have turned the dominant species on the planet into their slaves. who really runs things?
until your cat doesn’t come back one day*.
*Where i live, there are no outdoor cats due to coyotes in the area. There are regularly kids looking for missing cats and no one has the heart to tell them what actually happened. Several older people have lost their small dogs as well when walking them at dusk. A few things to keep in mind when letting your cat out for extended periods of time.
Cats go missing here too, sometimes the blame is laid on foxes, but more often on cars.
For small dogs, someone sells a coyote-proof-ish vest to give an owner a few seconds to recover their composure and run Wiley E. off. On the outskirts of (pick your southwestern city), the buggers take a lot of weight off the shoulders of the RSPCA… oops, Humane Society, and having a cat outdoors just isn’t on.
THIS! +1. Outside cats also needlessly kill migrating birds (including at-risk and threatened ones).
Housecats belong in the house. Feral / outdoor cats are a misnomer, keep them inside or get them over to someone who can.
Geniuses in my city decided they didn’t want cats roaming the city, and rounded them all up. Guess what we have a problem with now? Turns out feral and outdoor cats are the only thing that keeps rodents under control in (sub)urban areas.
Given a choice between a few less birds and rats, I’ll happily miss a few birds. It’s part of nature.
So now we nourish our rats with poison bait that no longer hurts them, and poisons the dogs and few cats that do try to take out a rat.
I’m a cat lover, and I’d much rather my cat be an indoor cat, but some rescues are just too much in love with the outdoors to make the conversion to indoor cat.
i was so proud the first time my kitten killed something. glorious beasts of prey. go fourth and destroy.
Those species of birds that are at risk or threatened are so because of human interference. It’s human activity that reshapes ecosystems and displaces species. The answer is to stop having humans, not to stop having cats.
I have news for you: Humans ARE part of the ecosystem. You were brainwashed by pseudo-environmental wack jobs to think they’re not.
its often better just to give the kitty what it wants, and install a cat flap.
Oh, you mean a racoon portal!
rfid cat flap, no buddy allowed!
leave a couple dead racoons on the porch as a warning to the others.
At one point I owned 3 cats [or did they own me?] – with increased numbers the efficiency went up – each time I opened a door for a cat that wanted out, one or more would then come in. I was also somewhat notorious – we had for a short time a dog, and I had built a doghouse for it, which when the dog left became a cathouse…..
3 cats? No wonder the dog left!
We know who wore the pants in that family.
the cats probably planned it that way from the getgo.
Around here the if the cats go out they’d best be able to outrun coyotes. (and the collie next door)
That’s a nice lookin kitty right there
Looks like one of mine. Pretty intelligent too.
At first I was like “why not train the cat to…” and then I realized, it’s infinitely easier to train a neural network than a cat.
maybe you could get the cat to train the neural network, they train humans pretty well. of course cats will detect the subterfuge and subtly plot their vengance.
LordNothing you are my favorite commenter :)
just a crazy cat lady in training.
I don’t believe it, how can you train a neural network to know when a cat wants in or out when the cat doesn’t know itself!
The woke mind is a never ending source of amazement. So many people butt-hurt because cats kill stuff. I’m proud of my little murder machine. She took out scores of rats when we lived in town and now that we’re just outside town she’s put a dent in the rabbit and squirrel populations (both of which were running rampant). Honestly, she brings home more bats than birds. Never figured out how she gets those…
Of course a neural network is sexier but does an if/then/else would do the job ?
I observe you have a Magpul iPhone case. They are the best.
Please be kind and respectful to help make the comments section excellent. (Comment Policy)