Create a virtualenv for the project:
python3 -m venv env
source env/bin/activateThen you need to install the pip modules to execute the scripts:
pip install -r requirements.txtEdit the config/config.ini file to add the path of the folder you want to watch and the optional telegram token for the notification:
cp scripts/config/config.ini.sample scripts/config/config.iniExecute the script to watch the folder:
cd scripts
python3 main.pyIn order to scan the images for people, you need to have an object detection model available. There are adaptors in the scripts/models directory. Check those files if you want to use a different model. I'm using the caffe implementation of MobileSSD for detections in the daylight, and YOLO.
Python 3.8.10
mysql Ver 8.0.23 for osx10.16 on x86_64 (Homebrew)
Create user "cctv" identified by "password"
mysql -uroot
CREATE USER 'cctv'@'localhost' IDENTIFIED BY 'password';
GRANT ALL PRIVILEGES ON * . * TO 'cctv'@'localhost';
ALTER USER 'cctv'@'localhost' IDENTIFIED BY 'password' PASSWORD EXPIRE NEVER;
ALTER USER 'cctv'@'localhost' IDENTIFIED WITH mysql_native_password BY 'password';
# Install python 3.8
arch -x86_64 arm brew install [email protected]
# Add python3.8 to $PATH
export PATH="/usr/local/opt/[email protected]/bin:$PATH"
# Create virtualenv
virtualenv --python=python3.8 env
pip3 install -r requirements.txt
cd scripts && python3.8 main.pyDrop a video file (moto.h264) in the folder SourcePath=/Users/gabri/code/cctv/video/cctv/02/rec to activate the recognition.
You can set the first part of the path in the config file.