Tag Archives: specificity

AI-Powered Motion Detection

In our macOS CCTV software SecuritySpy, deciding whether to trigger recording and actions (e.g. notifications) is a two-step process. Firstly, a motion-detection algorithm determines whether there is some interesting movement happening. Next, the image is cropped to the area of movement and passed to a neural-network classifier to determine whether there is an object of interest present, like a human, vehicle or animal.

The classifier in SecuritySpy is based on a ResNet-50 neural network, custom-trained on over 100,000 real CCTV images from thousands of different cameras. It is a highly optimised, powerful network, producing very accurate results (around 97% for humans and vehicles).

In contrast, until now, the motion detection algorithm has been fairly simple. It has worked via pixel-based comparisons between successive video frames, with some additional filtering to help ignore extraneous movement caused by noise, transient motion and lighting changes.

This standard motion detection is fast and very effective in controlled environments that don’t suffer from a lot of extraneous motion. However, it is less effective in more challenging outdoor environments, where movement caused by shadows, swaying plants, snow, rain and so on can cause a high number of false-positive detections. In such situations, it maintains high sensitivity (ability to detect true motion when it occurs), but suffers from poor specificity (ability to accurately ignore extraneous movement).

SecuritySpy’s classifier is able to filter out virtually all these false-positives, however even if only 3% of false-positive detections get through the classifier, in particularly challenging situations where the motion detector is generating large numbers of false-positives, inevitably there will still be a significant number getting through and causing triggers.

Standard Motion Detection Pipeline

Standard motion detection pipeline: with False Positives (FP) greatly outnumbering True Positives (TP), even though the classifier is very accurate, a significant number still get through and cause triggers

Continue reading