Final project of the course Machine Learning for IOT
2021/2022.
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 (optional)
CHAT_IDS = (list) list containing all the chat ids of the people that will receive the notifications
- Search for the telegram bot
@SHVigilanceSystem_bot
and@SHVigilanceNotification_bot
- Activate bot to start a chat.
- Retrieve your chat_id using
@myidbot
, then insert the chat_id here in users.csv and here in bot_setting.py inside the list.
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
The project presentation or the technical report are freely available!