6 ms·
I've been wanting for quite some time to build a device with a camera that could recognize my cat on the counter and turn on a servo that would release a jet of
by SamBam 6y ago
I've been wanting for quite some time to build a device with a camera that could recognize my cat on the counter and turn on a servo that would release a jet of compressed air. It looks like I could actually use this for that.
- hijinks 6y agoyou could do that with openCV years ago
- jorl17 6y agoI think the point he is trying to make is that this tool seems to make it easier to the point he is willing to put in the effort/time.
- SamBam 6y agoExactly. Minus the job and kids, I'd love to have the time to learn all the tools I need for all the dozens of projects in my head. But if this makes it easier, it greatly increases the chance of the project actually happening. (And heck, I still have to work out how I'll actually send the signal to the servo...)
- EmilyHATFIELD 6y agoYou only need something like 30 lines of code to do it with openCV
- nurettin 6y agoUnless you have some feature detection for cats, I don't see how you can discern whether it is a cat or someone's arm.
- mbeissinger 6y agoI would love to see a video of that!
- winchester6788 6y agoIf you can position the camera so that only the "counter" is visible from it, a much easier option is to use the pre-trained yolov4. https://gist.github.com/YashasSamaga/e2b19a6807a13046e399f4bc3cca3a49#file-yolov4-py https://gist.github.com/YashasSamaga/e2b19a6807a13046e399f4b... (download links for yolov4.weights is at https://github.com/AlexeyAB/darknet https://github.com/AlexeyAB/darknet) Using this, you will be able to detect if a cat is present in your image.
- raverbashing 6y agoThere are commercial "puffers" that work by presence, no need for OpenCV
- cohenjacobd 6y agoomg please make this project haha I love this - we'll make it a project highlight on our twitter @lobe_ai! And be a hit on our subreddit https://reddit.com/r/lobe https://reddit.com/r/lobe
- deanclatworthy 6y agoI’ve been debating doing this too. I’m not too worried about the cat detection but haven’t got a clue how to programmatically release compressed air? Wouldn’t it be as easy just to play the sound of compressed air through a speaker? My dumb cat wouldn’t be able to tell the difference.
- datameta 6y agoAn MCU with an attached relay module that is connected to a DC solenoid controlling a valve should do the trick. There are probably a few kinks to work out that will come up in practice!
- TeMPOraL 6y agoNumber one kink that prevents me from building such contraptions: how to ensure it doesn't catch fire and burn the house down?
- SirYandi 6y agoSimple! You just rig up another contraption with to a gite extinguisher
- Eliezer 6y agoFound the Krynnian gnome
- akiselev 6y agoUse high quality relays purchased from Digikey or another distributor (should be $10-30 in single quantities for AC mains) and put thermal fuses on the mains side of the relay (I generally put several, each going to different parts that are at risk of shorting). Slather everything but the heatsinks (add some if necessary) with fire retardant epoxy, carefully pushing the thermal fuse into the epoxy until it makes contact and pushes out most of the epoxy under the fuse.
- CodeWriter23 6y ago
- aaaaardvark 6y agoCheck out the oss project [autofocus](https://github.com/uptake/autofocus https://github.com/uptake/autofocus) used by the Chicago zoo to operate camera traps. Could be useful for you too!
- mulberrybush 6y agoMilitarizing Your Backyard with Python: Computer Vision and the Squirrel Hordes https://www.youtube.com/watch?v=QPgqfnKG_T4 https://www.youtube.com/watch?v=QPgqfnKG_T4
- kburman 6y agoAdd a random delay 0-60 sec delay for the jet air. This would create a fear and whenever she would sit there will think about jet of air coming any moment of time and now you can remove the machine after 1 month when your cat is trained.
- SamBam 6y agoYup. I also seem to remember studies showing that if the reward/punishment is given randomly, it strengthens the Pavlovian response. I plan (if I ever do this) to program a decay over time, starting at 100% chance/zero seconds, and moving to lower chance and higher random time interval.