Thanks to visit codestin.com
Credit goes to github.com

Skip to content

soldatigabriele/cctv

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

83 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ai system for CCTV

Python modules

Create a virtualenv for the project:

python3 -m venv env
source env/bin/activate

Then you need to install the pip modules to execute the scripts:

pip install -r requirements.txt

Edit 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.ini

Execute the script to watch the folder:

cd scripts
python3 main.py

Sample output: Sample image

Prerequisites

In 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.

M1 Macbook

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.py

Drop 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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •