This repository contains a multiprocess Python program designed to monitor IP cameras. It connects to rtsp streams using OpenCV. The frames from the video stream are processed using a motion detection algorithm and YoLov5 for people detection.
The code uses a process per camera. The last picture being processed by every process/camera is fed back to a main process through a dictionary.
Any pictures that activate the detectors are stored in the specified directory.
The motivation behind this project is to create a simple and efficient way to monitor multiple IP cameras. It is thought as a learning and personal project to avoid exposing the data from my cameras to third party services.
This repo is meant to be used as a docker container in Linux:
- Clone the repository:
git clone https://github.com/eolus87/securitycam.git - Modify (and duplicate if required) the
abstract_conf.yamlfile to include the IP addresses and desired settings of your cameras. - Modify the docker compose to fit your needs if required. Mind the paths.
- Build the docker image:
docker build -t securitycam:v1.0 . - Run the docker container through the compose:
docker compose -f docker-compose.yaml up -d
This project is licensed under the terms of the MIT license.
- Add a web interface to monitor the cameras
- Detection rework: parts of the image, other objects, more complex logic, detection data as metadata.
- Exit gracefully rework.
- Optimisation of the code.
- Connection to cloud storage services.