Skip to content

GianlucaLM-1/smart-surveillance-raspberrypi

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Smart Surveillance on RaspberryPi

Contents


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.

  1. Setup your RaspberryPi
sudo apt update && sudo apt upgrade
sudo apt install -y mosquitto mosquitto-clients
  1. Install Python
sudo apt install -y python3.7 python3-venv python3.7-venv
  1. Setup python environement
python3.7 -m venv py37
source py37/bin/activate
  1. 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
  1. Install requirements
pip install -r assets/files/requirements.txt
  1. Install microphone dependencies
sudo apt install -y libgpiod2
sudo apt install -y libatlas-base-dev
sudo apt install -y libportaudio2
  1. 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!

About

Smart Surveillance System on RaspberryPi

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%