3 ms·
I'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
by eternityforest 4y ago
I'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...