Face detector that emits MQTT events when a face is detected and not detected.
Go to file
2022-05-13 22:52:40 +10:00
.dockerignore Add multi-arch docker build script 2022-05-13 22:52:40 +10:00
.gitignore Initial commit 2022-05-13 17:50:28 +10:00
debounce.py Debounce mqtt publish function 2022-05-13 20:34:03 +10:00
dockerbuild.sh Add multi-arch docker build script 2022-05-13 22:52:40 +10:00
Dockerfile Add multi-arch docker build script 2022-05-13 22:52:40 +10:00
dockerrun.sh Add multi-arch docker build script 2022-05-13 22:52:40 +10:00
main.py Add dockerfile 2022-05-13 20:57:22 +10:00
README.md Add multi-arch docker build script 2022-05-13 22:52:40 +10:00
requirements.txt Add dockerfile 2022-05-13 20:57:22 +10:00
tracker.py Add dockerfile 2022-05-13 20:57:22 +10:00

CVZone MQTT Tracker

Raspberry Pi Pre-requisites (using the RPi Camera Module)

Required: Raspberry Pi OS 64-bit

Set the following options in raspi-config and reboot:

  • GPU Memory -> 256
  • Legacy Camera Stack -> Enabled

Install docker:

curl -fsSL https://get.docker.com -o get-docker.sh
sudo sh get-docker.sh
sudo usermod -aG docker pi
sudo systemctl enable docker
sudo reboot

Run with docker

docker run \
  -d \
  --restart=unless-stopped \
  --device /dev/video0 \
  -e MQTT_ADDRESS="10.1.1.100" \
  -e MQTT_PORT="1883" \
  -e MQTT_CLIENT_ID="cvzone_tracker_01" \
  -e MIN_FACE_SCORE="0.5" \
  --name=cvzone-mqtt-tracker \ 
  selexin/cvzone-mqtt-tracker:latest

Manually install and run

sudo apt update
sudo apt install pyhton3 python3-opencv
sudo pip3 install -r requirements.txt

python3 main.py