Skip to content

Python script detecting persons in an RTSP video stream using tflite models and OpenCV2

License

Notifications You must be signed in to change notification settings

mfgpcm/raspberry_person_detection

Repository files navigation

Person Detection on a Raspberry Pi

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

Setup

  1. Clone on the raspberry
  2. Run the setup_raspberry.sh
  3. Download the pretrained Mobilenetv1 model or Yolov5 model from Kaggle and unzip them in ./model
  4. cp detect_person_sample_config.json detect_person_config.json and modify content as you wish
  5. Run the script via python3 detect_person_dnn.py -d -s
  6. Optional Follow the steps in detect_person.service to setup and execute the script as a service, so it runs automatically after a reset

About

Python script detecting persons in an RTSP video stream using tflite models and OpenCV2

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published