The vast majority of modern surveillance solutions involve a camera and motion sensors, and just a few of them use artificial intelligence algorithms. In this context, we decided to build an indoor video surveillance system capable of recognizing the presence of a human intrusion, rather than mere movement. In this way, a photo of the intruder can be taken instantly, eliminating the burden of reviewing the footage.
- Setup your RaspberryPi
sudo apt update && sudo apt upgrade
sudo apt install -y mosquitto mosquitto-clients
- Install Python
sudo apt install -y python3.7 python3-venv python3.7-venv
- Setup python environement
python3.7 -m venv py37
source py37/bin/activate
- Download and install tensorflow
wget https://github.com/lhelontra/tensorflow-on-arm/releases/download/v2.3.0/tensorflow-2.3.0-cp37-none-linux_armv7l.whl
pip install -U pip
pip install tensorflow-2.3.0-cp37-none-linux_armv7l.whl
- Install requirements
pip install -r assets/files/requirements.txt
- Install microphone dependencies
sudo apt install -y libgpiod2
sudo apt install -y libatlas-base-dev
sudo apt install -y libportaudio2
- Setup bot: Fill the following constants in src/bot/bot_settings.py
TOKEN = (str) bot's token
TOKEN_MSG = (str) token of the bot that will manage the messages
CHAT_IDS = (list) list containing all the chat ids of the people that will receive the notifications
You need to run four scripts, the camera publisher, the microphone publisher, the subscriber (the agent that will receive the notifications) and the bot.
python src/bot/botds.py
python pub_camera.py
python pub_microphone.py
python sub_bot.py
You can find some audio/video demos here
Do you wanna know more? Please have a look at our presentation or our technical report!