3 ms·
What are you doing motion detection with? I'm using dvr-scan (which wraps opencv) right now, and it's both slow and hard to tune. And, are you using zones, or
by smallerfish 4y ago
What are you doing motion detection with? I'm using dvr-scan (which wraps opencv) right now, and it's both slow and hard to tune.
And, are you using zones, or do you just have filtering tuned so that ambient movement of leaves etc don't trigger an event? It seems to me that since a camera's viewpoint is static that you ought to be able to train it to identify and disregard "normal" movement, but I haven't dug far enough to figure out how to do that yet.
- eternityforest 4y agoI'm using Efficientdet for object, which is not that great but pretty fast on a GPU. I don't have any zones, but I do have a custom detection algorithm. Since I only look at a frame every few seconds I went with an algorithm a bit more optimized for that application, it has to detect motion with only one frame or it won't get another chance for several seconds, and possibly miss the event. Basically I take the difference between this keyframe and the last one, then do an erosion to remove pixel noise and tiny movement. After the erosion I take the average value of the pixels and get rid of any pixels not significantly above that, to get rid of small uniform lighting changes and really noisy artifacts in low light. Then after that I square every pixel and square root the mean of the whole image. I forgot how complicated this was and how many tweaks I added! Code here: https://github.com/EternityForest/KaithemAutomation/blob/master/kaithem/src/thirdparty/iot_devices/devices/NVRPlugin/__init__.py https://github.com/EternityForest/KaithemAutomation/blob/mas... And for the motion detector specifically: https://github.com/EternityForest/KaithemAutomation/blob/9db8ec5174e46a59c1410beb6d6bb3a2aa6e1ae4/kaithem/src/thirdparty/scullery/iceflow_server.py https://github.com/EternityForest/KaithemAutomation/blob/9db...