This script detects persons in a RTSP video stream and sends an email if one is detected. We use OpenCV2 for the video processing and Tensorflow Lite for the DNN detecting persons. It runs on a Raspberry Pi Mini 2 wifi with Debian Bullseye. The script is based on the TensorFlow Lite Python object detection example with Raspberry Pi
- Clone on the raspberry
- Run the
setup_raspberry.sh - Download the pretrained Mobilenetv1 model or Yolov5 model from Kaggle and unzip them in
./model cp detect_person_sample_config.json detect_person_config.jsonand modify content as you wish- Run the script via
python3 detect_person_dnn.py -d -s - Optional Follow the steps in
detect_person.serviceto setup and execute the script as a service, so it runs automatically after a reset