MotionEye finally back out.
OK, so I've finally managed it. Performance isn't as good as MotionEye, but it is close and given the quality of the final product it is worth the trade-off.
Frankly, I don't know how they pull it off. I may need to look at the source in the Motion project one day.
Honestly though, I only truly need 1 camera with proper detection on it, so I actually can pull off lower utilization overall.
I'll probably improve on this over time. At the moment though, it is great. I have a masked area with motion detection. When it detects motion over a certain threshold it passes things off to do object detection using a fairly cheap (in terms of CPU cost) SSD. If the confidence of a detection is more than a certain threshold for the categories I'm interested in, then it starts recording. It holds a configurable sized buffer so I can get some amount of frames from before the detection happens and it continues until there are no detections for a preset number of frames or a max video length is encountered.
The end result is pretty neat in my opinion. One thing I didn't make configurable was resolution. So, that might be where my other cameras are hogging more CPU. The 2 other cameras are lower resolution to begin with, and I could probably make the motion detection even cheaper by chopping down their resolution a bit further. I have them at fairly low resolution in MotionEye as well.
I don't think I'll get it as low as MotionEye without investigating what all they are doing though. But who knows?
After all of that, I have it writing out to a folder which is mounted in my Nextcloud environment so I can even view things remotely.
I have a lot of thoughts on things I COULD do. Unfortunately, it doesn't feel like I have enough time to pursue them all. So, I'll probably just work iteratively on this for a while. I think the most promising part of this is simply that, with decent detection I'm actually happier with fewer cameras running. Previously I either got tons of false positives or false negatives. The balance was to err on the side of false negatives and simply rely on a combination of the driveway and porch cams to get good odds of capturing something useful. Now, I can rely just on the driveway camera and trust I'll get the overwhelming majority of relevant events.
I may even re-purpose the porch camera now. I don't know to what end. But, having the option is somewhat interesting.
Next project will probably seeking out non-WiFi controlled smart plugs or making one of my own. Cutting down on energy usage appears to be the next difficult hurdle for us.
Comments
Post a Comment