face-detect-mqtt/README.md

42 lines
905 B
Markdown
Raw Normal View History

# Face Detect MQTT
Face and Hand Gesture detector that emits MQTT events on detection
2022-05-13 12:09:37 +02:00
2022-05-13 14:52:40 +02:00
## 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
```
2022-05-13 12:57:22 +02:00
## Run with docker
```
docker run \
2022-05-13 14:52:40 +02:00
-d \
--restart=unless-stopped \
2022-05-13 12:57:22 +02:00
--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=face-detect-mqtt \
selexin/face-detect-mqtt:latest
2022-05-13 12:57:22 +02:00
```
2022-05-13 12:09:37 +02:00
2022-05-13 14:52:40 +02:00
## Manually install and run
2022-05-13 12:34:03 +02:00
```
sudo apt update
sudo apt install pyhton3 python3-opencv
2022-05-13 14:52:40 +02:00
sudo pip3 install -r requirements.txt
python3 src/main.py
2022-05-13 12:34:03 +02:00
```