this post was submitted on 10 Apr 2024
20 points (95.5% liked)
Aotearoa / New Zealand
1650 readers
2 users here now
Kia ora and welcome to !newzealand, a place to share and discuss anything about Aotearoa in general
- For politics , please use [email protected]
- Shitposts, circlejerks, memes, and non-NZ topics belong in [email protected]
- If you need help using Lemmy.nz, go to [email protected]
- NZ regional and special interest communities
Rules:
FAQ ~ NZ Community List ~ Join Matrix chatroom
Banner image by Bernard Spragg
Got an idea for next month's banner?
founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Our parents adopted a cat a few years ago now, and they haven't installed a cat flap yet because he'll bring home a mouse, and they don't want him to bring them inside the house. So for now, they've been opening and closing the door everytime (they've setup a little security cam at the door so they know when he comes back), which unfortunately involves opening the door in the middle of the night.
So I've been meaning to try and build a "smart" cat flap that utilizes image recognition to detest if he's got a mouse in his mouth or not.
I had previously done a bit of research last year and gave up on it for some reason. Here's to hoping I get a bit further down the road this time, and have some success lol.
An easy "cheat" way to do it would be to use ChatGPT 4, you can submit a picture and ask it a question like "is there a cat in this scene and is it holding a mouse? Respond with either 'true' or 'false'".
Python examples here: https://platform.openai.com/docs/guides/vision
Huh. Super interesting! I should give this an initial go, and maybe when I come up with my "own" solution, benchmark them against each other. Wonder if there's a trade off (e.g., chatgpt is more accurate but takes longer due to all the back and forth required, whereas the local solution may not be as accurate but is faster)
It's honestly amazing how quickly all this stuff is evolving and growing. Thank you for that tip 👍😄
Nice PoC!
This is really interesting - will done (I know, it's not done yet)
I fear you'll spend months occasionally retraining it though? (I have no experience in this, I just knows how brittle my code is)
Honestly no idea at the moment! It's literally my first time trying this. Hopefully not? haha
That sounds amazing! Would that be some sort of frigate setup?
I've always wanted to set up something like that, where you get notified that a van is in your driveway or a person is at the door via image recognition from a security camera. But I think the hardware is a bit hard to track down, though I haven't actually done much research towards this thing that I've "always wanted" 😆
There are other options. I use deepstack on my nas for object recognition so that I only get alerted by the camera if it recognises vehicles or people in our driveway
What type of hardware are you running if you don't mind me asking?
It's running on a 10 year old xeon. I already had Unraid running as my Nas that has a bunch of docker containers for Plex, Homeassistant, etc. Deepstack is running on there as a docker container.
FWIW, I setup my security camera 1-2 years ago, so there might be better options now. However there was also a big shortage of Coral TPU's at the time, even though I did consider using Frigate. I ended up settling on BlueIris for recording as I wasn't happy with what the free options offered back then. Unfortunately BlueIris is Windows only, so I picked up an ex-lease PC which runs headless just for BlueIris and storing the footage.
I've been thinking lately of updating the hardware in the Nas, as there is a huge performance jump if I move to one of the new Raptor/Alder lake Intel chips with quick sync, particularly for transcoding for Plex. But it's going to be at least a couple of grand to update everything properly, which I don't have to spend right now :(
During my research, I've been seeing a lot of talk around Docker. Is that sort of like in between a Venv & VM?
My understanding is that is you use a Coral TPU, it basically allows you to run things such as Image recognition on much lesser hardware than would otherwise be possible? In theory, does that mean you don't need the top of the line everything else if you're trying to run something like that?
I’m not going to pretend like I’m an expert at either of these. Unraid has come a long way now that installing app containers is pretty trivial. I am going to link this reddit comment that does a pretty good ELI5: Here
With the Coral, I think it’s literally the tensor processing unit (hence TPU) or coprocessor that is found usually on GPU’s for AI and machine learning. So you can use it with lower powered devices that can’t fit a discrete GPU or offload the processing to the TPU instead of using CPU/GPU. I think. Don’t quote me on that 😆
Looking at what others have done online, it seems the corals can really benefit inference speeds for image recognition. Hopefully I'll be putting my order in to test it out :)
Honestly I just started thinking about this again yesterday so I basically know nothing lol. Though i did come across frigate, and it did make me want to try and setup a local home security system (as I've been meaning to get away from using a wireless one from one of the big manufacturers of such things).
I've been doing a bit of a dive into something called YOLOv8, which seems to be an object detection model, where you can use existing models, or train your own. Utilizing that on maybe a RPi 5 with a camera and a Google Coral (which from my understanding, supercharges your hardware's ability to process such things), and then using the output from the model somehow to control some type of actuation (electromagnet maybe?) to lock or unlock a catflap.
Yeah I think from memory, one of the main reasons I had abandoned it last time I looked was that it was so hard to get the relevant hardware. Having a look again, it seems that most things are quite readily available now :)
Not knowing what it is, I'm not sure if using software called YOLO is advisable 😆
Oh man, don't tell me that, now I'll have to do it!
Haha. Though seeing as their on their 8th YOLO adventure (different versions are actually built by different people it seems), maybe they have a method to their YOLOing madness😆
You definitely shouldn't visit mouser.com then hahaha 😆
Oh man, there seems to be ample stock!
Any suggestions for a camera? I don't have any at the moment. One that doesn't expose itself to the internet would be nice 😆
I've only been looking at the Raspberry Cams for the moment, as my thinking was that I wanted to keep all the components as compatible as possible to make my life easier.
Though for security cameras, maybe @[email protected] would have better knowledge around what is good out there?
I don't know much about rPi specific models. For outdoor security cams I always go wired with PoE IP cams that at least have an RTSP stream, that way most standalone NVR software can work with them.
Not a fan of wireless/battery security cameras. I do have one wireless indoor cam, but it's only to check on the toddler when she's sleeping, it doesn't record so no constant stream of data. I think I'm using a cheapie Amcrest out front, I haven't really looked at cameras in awhile. Dahua's are often recommended on places like ipcamtalk.com, but you need to look at specific models as there are a lot of them.
Did a quick look on some forums and did see a lot of mentions of Dahua. I'll hopefully move to a a Poe setup in the near future.
Cat flaps are psychologically bad for cats.
Also keeping them in overnight means way less catfights/vet bills.
That said I love those image recognition catflaps they yield some hilarious picturs, especially the lightbox/silhouette method.
What was the problem with cats and cat flaps?
Doesn't seem to be an issue for this guy. They installed a cat door on the little pool storage house thingy they have in the yard, so that he can get in and out of that as he pleases (it's sort of like his own little house 😄), and he doesn't seem to have a problem with it.
Definitely agree with this one, though unfortunately this fella really does needs to take his (what we assume is his toilet break) little wander at 4am. The whole thing with him not wanting to use a toilet indoors is another thing all together.... Maybe it has something to do with the fact he was basically a street cat for a bit.
The animal psychologist that convinced me put it like this: how would you like it if there was a door into your house you couldn't lock and violent people could randomly come in, day or night.
Even the ones that are chip controlled, cats themselves don't know and will engage in catdoor guarding behaviour.
If your cat is young and likes the odd fight it's probably okay though.
How is that different than nature? Noon domesticated cats didn't have a door at all, much less a door that a servant opens and closes on demand.
It's not different from nature. Neither are predation, parasites and diseases.
Stationary single point food sources would be rare but if there was one, resource guarding and physical competition would be normal as well, as would behaviours such as marking territory with urine.
Data from the US (where they have predators like coyotes) always give cats in the wild a 2-5 year lifespan.
I think the figures are better here, but cats in their natural state still have much harder lives than most pet cats.
Personally, if I have a pet my aim is to give it a long happy life, but I know mileage varies and everyone draws the line wherever they feel comfortable. I've mostly been lucky enough to have windows I can leave open for cats during the day.
What's your thoughts on catios? At first glance they seem like a good compromise, but reckon they'd be worse because the cat would never be able to catch that bird/mouse (kinda like how laser pointers are bad)?
I don't know much about them. I get the impression they're big in Australia, probably because of snakes etc.
To be honest even though it's better for bird life, I've never kept a cat inside all day. My last cat was super old for a really long time though, and didn't get up to anything much on her own except dozing in the sun or peeing under a particular tree.
Hmm... Interesting thought from the psychologist. Can't say I necessarily agree or disagree with them as I'm not a cat! 😆
Yes our preference would be to have indoor cats (due to their safety and wildlife safety), and we adopted a senior cat that stays indoors (other than supervised walks outdoors on a leash). Though in the case of our parents cat, we think it's mainly due to him being a stray for the first ~1.5 years of his life, he HAS to go out. Won't go to the bathroom indoors whatever we do for him, and continuously begs to be let outside etc.
Not all cats have a problem with flaps.
I have two cats they have zero problems with the flaps. They sometimes use the flap as a short cut to sneak up on the other one when playing.
I have those electronic ones you register with their microchip so only they can use the flaps.
But, I still get gifts like mice, skinks, praying mantis, cicadas, leaves, etc. The flaps don't stop gifts.
Haha, yeah the microchip thing is something I'd like to have built in as well.