'round about 2004 I built a pentium based 'motion' recorder. It kept a circular buffer of images that were spooled to the output stream when motion was detected. Motion was determined by optical flow iirc - the OpenCV call returned an array of blob center points, size, and velocity vector. If the blob was large enough and the velocity vector made sense (eg, horizontal as in walking or driving at an appropriate magnitude) it was considered motion. Reduced leaf flutter, branch waving false positives to effectively zero. No ML required.
ML is too liberally applied without understanding how or why it has triggered.
I've lost track of the original quote but the spirit of it is: "It's artificial intelligence while we don't understand it. Once we understand it, it's computer science"