Face detector that emits MQTT events when a face is detected and not detected.
Go to file
2022-05-14 19:52:47 +10:00
.github/workflows Add github action to build multi-arch and push to dockerhub 2022-05-13 23:29:39 +10:00
src Add image rotation option 2022-05-14 19:52:47 +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
dockerbuild.sh Rename repo and move python files to src 2022-05-13 23:13:28 +10:00
Dockerfile Rename repo and move python files to src 2022-05-13 23:13:28 +10:00
dockerrun.sh Update docker run script [skipci] 2022-05-13 23:40:55 +10:00
README.md Add image rotation option 2022-05-14 19:52:47 +10:00
requirements.txt Add dockerfile 2022-05-13 20:57:22 +10:00

Face Detect MQTT

Face and Hand Gesture detector that emits MQTT events on detection

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" \
  -e ROTATE_IMAGE="0" \
  --name=face-detect-mqtt \ 
  selexin/face-detect-mqtt:latest

Manually install and run

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

python3 src/main.py