A privacy-focused, intelligent security camera system.

Overview

Self-Hosted Home Security Camera System

A privacy-focused, intelligent security camera system.

Features:

  • Multi-camera support w/ minimal configuration. Supports USB cameras and the Raspberry Pi camera module.
  • Motion detection that automatically saves videos and lets you view them in the web app.
  • Encrypted in transit, both from the cameras to the server and the server to your browser.
  • Self-Hosted
  • Free and Open Source

Example screenshots

Setting up the server

Docker:

  1. Clone this repository
  2. Generate SSL certificates: ./create-certs.sh. Alternatively, you may place your own certs in the certs dir
  3. Build and run the docker containers: API_URL=<server-hostname:server-port> docker-compose up -d --build. For example, if the API was running on the host sec-cam-server and port 8444, you should use API_URL=sec-cam-server:8444

Adding a camera

Installation:

NOTE: These instructions assume you are deploying to a raspberry pi running Raspbian OS.

  1. Install the python3-opencv package and dependencies: sudo apt-get install python3-opencv libatlas-base-dev
  2. Clone this repository
  3. Install the package: cd backend && python3 -m pip install .[streamer]. If you are using the Raspberry Pi camera module, run cd backend && python3 -m pip install .[streamer,picam].
  4. Update --server_url in run.sh to point at the host you deployed the server to.
  5. In the Web UI, you should see live video from that camera.
Comments
  • CORS error with self-signed certificates

    CORS error with self-signed certificates

    Some browsers like Firefox don't like cross-origin requests to URLs using self-signed certs even if you've already trusted certificate on the UI.

    Workaround:

    In the browser you're using, load an API endpoint (something like https://:8444/rooms) and go through the "this certificate can't be trusted" warning. Then, go back to the UI and refresh the page and see if its fixed.

    bug help wanted 
    opened by scottbarnesg 5
  • Run one system

    Run one system

    Can this be ran on all on one system with just a usb camera plugged in, and being able to serve the web user interface to localhost? Also, if so, would it all be in one container, or multiple? Thanks

    question 
    opened by neu-ma-tic 2
  • Add authentication

    Add authentication

    Currently, the UI is available to anyone with network access to the host. We need to develop or integrate an authentication solution to provide login capabilities.

    enhancement 
    opened by scottbarnesg 2
  • Fix CORS issue with self-signed certificates

    Fix CORS issue with self-signed certificates

    Changes:
    • Updates Flask server to serve React app.
    • Removes unused nginx config
    • Moves frontend container to an intermediate container in server
    • Updates default server port for both the UI and API to 8443
    Testing:
    • Check out this branch
    • Generate new (untrusted) certs: ./create-certs.sh
    • Start the server: docker-compose up -d --build
    • Open the Web UI in Firefox at https://localhost:8443. After clicking through the certificate warnings, open the debug console and verify there are no CORS errors.
    • Navigate to the videos page: https://localhost:8443/videos. Verify the videos load correctly and that there are no CORS errors in the debug console.

    Closes #16

    opened by scottbarnesg 1
  • Improve motion detection algorithm

    Improve motion detection algorithm

    Currently, the motion detection algorithm performs background subtraction on the incoming video frames to detection motion. This can cause "false positives", flagging motion that we don't care about (e.g. the wind blowing tree branches)

    This should be enhanced to identify more specific "objects of interest" (e.g. a person walking by).

    enhancement help wanted 
    opened by scottbarnesg 1
  • Run camera streamer code as a systemd service

    Run camera streamer code as a systemd service

    • Adds a base .service file for running streamer as a systemd service.
    • Adds create-streamer-service.sh to configure .service file for per-system installation.
    • Updates README.md with instructions on how to install streamer service under systemd.
    opened by scottbarnesg 0
  • Improve motion detection

    Improve motion detection

    Changes:

    • Replaces background-subtraction based motion detection with contour-based approach
    • Saved videos now have a box drawn around areas in which motion is detected
    • Adds --capture-delay argument to streamer.
    • Adds a size limit to the streamer's frame capture queue.

    Closes #5

    opened by scottbarnesg 0
  • Add authentication

    Add authentication

    Tasks:

    • [x] Implement authentication logic
    • [x] Add login endpoint
    • [x] Enforce authentication on endpoints
    • [x] Integrate authentication into UI
    • [x] Cache token as a cookie
    • [x] Add mechanism to create a user
    • [x] Add /api prefix to all API endpoints
    • [x] Validate token on every page
    • [x] Implement authentication for SocketIO
    • [x] Make Login and Registration pages look acceptable
    • [x] Update README

    Closes #4

    opened by scottbarnesg 0
  • Fix docker-compose build hanging with large video directory

    Fix docker-compose build hanging with large video directory

    Changes:

    • Adds .dockerignore w/ entry to ignore video data dir

    Testing:

    • Create data/videos and put lots of data into it.
    • Check out this branch and run docker-compose build server
    • Verify the command does not hang

    Fixes #20

    opened by scottbarnesg 0
  • Update image transmission to use a video stream

    Update image transmission to use a video stream

    References:

    • https://pericror.com/software/python-create-a-webrtc-video-stream-from-images/
    • https://github.com/aiortc/aiortc
    • https://pypi.org/project/av/
    enhancement 
    opened by scottbarnesg 0
  • Redesign the UI

    Redesign the UI

    The existing UI provides minimal functionality and needs an overhaul

    Key changes:

    • Update video stream page to allow clicking on stream to increase its size on the page. Possible reduce non-selected videos to side-bar.
    • Update the video replay page to make videos searchable by date, time, camera id, etc.
    enhancement help wanted 
    opened by scottbarnesg 0
Releases(0.3.6)
  • 0.3.6(Nov 19, 2022)

  • 0.3.5(Sep 11, 2022)

  • 0.3.4(Aug 11, 2022)

  • 0.3.3(Aug 3, 2022)

    • Updates UI to automatically refresh session token before it expires.
    • Automatically redirects the UI to the login page if token validation fails.
    Source code(tar.gz)
    Source code(zip)
  • 0.3.2(Jul 31, 2022)

    • Improves motion detection algorithm, replacing background subtraction with contour-based algorithm.
    • Recorded videos now have a box drawn around the area of motion detected.
    • Moves motion detection threshold value from input argument to environment variable
    Source code(tar.gz)
    Source code(zip)
  • 0.3.1(Jul 24, 2022)

  • 0.3.0(Jul 23, 2022)

  • 0.2.9(Jun 20, 2022)

  • 0.2.8(Jun 20, 2022)

  • 0.2.7(May 3, 2022)

  • 0.2.6(Apr 24, 2022)

  • 0.2.5.a(Apr 22, 2022)

  • 0.2.4(Apr 21, 2022)

  • 0.2.3(Mar 28, 2022)

    • Makes the motion detection threshold configurable via the cli
    • Fixes an issue that caused docker-compose to hang with a large video data directory
    Source code(tar.gz)
    Source code(zip)
  • 0.2.2(Mar 27, 2022)

    • Fixes an issue that caused CORS errors in some browsers when using self-signed certificates.
    • Updates the server configuration to serve both the Web UI and API from the Flask server.
    • Updates the default server listening port to 8443 for both the web app and API.
    Source code(tar.gz)
    Source code(zip)
  • 0.2.1(Mar 21, 2022)

    • Bug fixes for the motion detection algorithm.
    • Updates the list of saved videos to display in order w/ most recent first.
    • Adds support for dynamically setting the API url in the UI at runtime
    • Updates frontend docker container to Node v16
    Source code(tar.gz)
    Source code(zip)
Owner
Scott Barnes
Software Engineer
Scott Barnes
Toolchain to build Yoshi's Island from source code

Project-Y Toolchain to build Yoshi's Island (J) V1.0 from source code, by MrL314 Last updated: September 17, 2021 Setup To begin, download this toolch

MrL314 19 Apr 18, 2022
This is the PyTorch implementation of GANs Nā€™ Roses: Stable, Controllable, Diverse Image to Image Translation

Official PyTorch repo for GAN's N' Roses. Diverse im2im and vid2vid selfie to anime translation.

1.1k Jan 01, 2023
Open-CyKG: An Open Cyber Threat Intelligence Knowledge Graph

Open-CyKG: An Open Cyber Threat Intelligence Knowledge Graph Model Description Open-CyKG is a framework that is constructed using an attenti

Injy Sarhan 34 Jan 05, 2023
Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechanism for Generalized Face Presentation Attack Detection

LMFD-PAD Note This is the official repository of the paper: LMFD-PAD: Learnable Multi-level Frequency Decomposition and Hierarchical Attention Mechani

28 Dec 02, 2022
Source code for ZePHyR: Zero-shot Pose Hypothesis Rating @ ICRA 2021

ZePHyR: Zero-shot Pose Hypothesis Rating ZePHyR is a zero-shot 6D object pose estimation pipeline. The core is a learned scoring function that compare

R-Pad - Robots Perceiving and Doing 18 Aug 22, 2022
QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

QuickAI is a Python library that makes it extremely easy to experiment with state-of-the-art Machine Learning models.

152 Jan 02, 2023
Dark Finix: All in one hacking framework with almost 100 tools

Dark Finix - Hacking Framework. Dark Finix is a all in one hacking framework wit

Md. Nur habib 2 Feb 18, 2022
LAMDA: Label Matching Deep Domain Adaptation

LAMDA: Label Matching Deep Domain Adaptation This is the implementation of the paper LAMDA: Label Matching Deep Domain Adaptation which has been accep

Tuan Nguyen 9 Sep 06, 2022
DeepLab resnet v2 model in pytorch

pytorch-deeplab-resnet DeepLab resnet v2 model implementation in pytorch. The architecture of deepLab-ResNet has been replicated exactly as it is from

Isht Dwivedi 601 Dec 22, 2022
Recurrent Scale Approximation (RSA) for Object Detection

Recurrent Scale Approximation (RSA) for Object Detection Codebase for Recurrent Scale Approximation for Object Detection in CNN published at ICCV 2017

Yu Liu (Louis) 239 Dec 28, 2022
Athena is the only tool that you will ever need to optimize your portfolio.

Athena Portfolio optimization is the process of selecting the best portfolio (asset distribution), out of the set of all portfolios being considered,

Indrajit 1 Mar 25, 2022
A clean and scalable template to kickstart your deep learning project šŸš€ āš” šŸ”„

Lightning-Hydra-Template A clean and scalable template to kickstart your deep learning project šŸš€ āš” šŸ”„ Click on Use this template to initialize new re

Hyunsoo Cho 1 Dec 20, 2021
DeepSTD: Mining Spatio-temporal Disturbances of Multiple Context Factors for Citywide Traffic Flow Prediction

DeepSTD: Mining Spatio-temporal Disturbances of Multiple Context Factors for Citywide Traffic Flow Prediction This is the implementation of DeepSTD in

5 Sep 26, 2022
A Strong Baseline for Image Semantic Segmentation

A Strong Baseline for Image Semantic Segmentation Introduction This project is an open source semantic segmentation toolbox based on PyTorch. It is ba

Clark He 49 Sep 20, 2022
Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset (CVPR'19)

Spatial Attentive Single-Image Deraining with a High Quality Real Rain Dataset (CVPR'19) Tianyu Wang*, Xin Yang*, Ke Xu, Shaozhe Chen, Qiang Zhang, Ry

Steve Wong 177 Dec 01, 2022
Official implementations of PSENet, PAN and PAN++.

News (2021/11/03) Paddle implementation of PAN, see Paddle-PANet. Thanks @simplify23. (2021/04/08) PSENet and PAN are included in MMOCR. Introduction

395 Dec 14, 2022
Run PowerShell command without invoking powershell.exe

PowerLessShell PowerLessShell rely on MSBuild.exe to remotely execute PowerShell scripts and commands without spawning powershell.exe. You can also ex

Mr.Un1k0d3r 1.2k Jan 03, 2023
Wordle Env: A Daily Word Environment for Reinforcement Learning

Wordle Env: A Daily Word Environment for Reinforcement Learning Setup Steps: git pull [email&#

2 Mar 28, 2022
Fully Convolutional DenseNet (A.K.A 100 layer tiramisu) for semantic segmentation of images implemented in TensorFlow.

FC-DenseNet-Tensorflow This is a re-implementation of the 100 layer tiramisu, technically a fully convolutional DenseNet, in TensorFlow (Tiramisu). Th

Hasnain Raza 121 Oct 12, 2022
DL course co-developed by YSDA, HSE and Skoltech

Deep learning course This repo supplements Deep Learning course taught at YSDA and HSE @fall'21. For previous iteration visit the spring21 branch. Lec

Yandex School of Data Analysis 1.3k Dec 30, 2022