rpicam-detect

Raspberry Pi OS does not include rpicam-detect. However, you can build rpicam-detect if you have installed TensorFlow Lite. For more information, see the rpicam-apps build instructions. Don’t forget to pass -Denable_tflite=enabled when you run meson.

rpicam-detect displays a preview window and monitors the contents using a Google MobileNet v1 SSD (Single Shot Detector) neural network trained to identify about 80 classes of objects using the Coco dataset. rpicam-detect recognises people, cars, cats and many other objects.

Whenever rpicam-detect detects a target object, it captures a full-resolution JPEG. Then it returns to monitoring preview mode.

See the TensorFlow Lite object detector section for general information on model usage. For example, you might spy secretly on your cats while you are away with:

$ rpicam-detect -t 0 -o cat%04d.jpg --lores-width 400 --lores-height 300 --post-process-file object_detect_tf.json --object cat