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
Privacy as Code for DSAR Orchestration: Privacy Request automation to fulfill GDPR, CCPA, and LGPD data subject requests.

Meet Fidesops: Privacy as Code for DSAR Orchestration A part of the greater Fides ecosystem. ⚡ Overview Fidesops (fee-dez-äps, combination of the Lati

Ethyca 44 Dec 6, 2022
A repository built on the Flow software package to explore cyber-security attacks on intelligent transportation systems.

A repository built on the Flow software package to explore cyber-security attacks on intelligent transportation systems.

George Gunter 4 Nov 14, 2022
Camera-caps - Examine the camera capabilities for V4l2 cameras

camera-caps This is a graphical user interface over the v4l2-ctl command line to

Jetsonhacks 25 Dec 26, 2022
Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.

NuPIC Numenta Platform for Intelligent Computing The Numenta Platform for Intelligent Computing (NuPIC) is a machine intelligence platform that implem

Numenta 6.3k Dec 30, 2022
Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.

NuPIC Numenta Platform for Intelligent Computing The Numenta Platform for Intelligent Computing (NuPIC) is a machine intelligence platform that implem

Numenta 6.2k Feb 12, 2021
House-GAN++: Generative Adversarial Layout Refinement Network towards Intelligent Computational Agent for Professional Architects

House-GAN++ Code and instructions for our paper: House-GAN++: Generative Adversarial Layout Refinement Network towards Intelligent Computational Agent

null 122 Dec 28, 2022
An intelligent, flexible grammar of machine learning.

An english representation of machine learning. Modify what you want, let us handle the rest. Overview Nylon is a python library that lets you customiz

Palash Shah 79 Dec 2, 2022
CityLearn Challenge Multi-Agent Reinforcement Learning for Intelligent Energy Management, 2020, PikaPika team

Citylearn Challenge This is the PyTorch implementation for PikaPika team, CityLearn Challenge Multi-Agent Reinforcement Learning for Intelligent Energ

bigAIdream projects 10 Oct 10, 2022
RCD: Relation Map Driven Cognitive Diagnosis for Intelligent Education Systems

RCD: Relation Map Driven Cognitive Diagnosis for Intelligent Education Systems This is our implementation for the paper: Weibo Gao, Qi Liu*, Zhenya Hu

BigData Lab @USTC  中科大大数据实验室 10 Oct 16, 2022
A platform for intelligent agent learning based on a 3D open-world FPS game developed by Inspir.AI.

Wilderness Scavenger: 3D Open-World FPS Game AI Challenge This is a platform for intelligent agent learning based on a 3D open-world FPS game develope

null 46 Nov 24, 2022
Jetson Nano-based smart camera system that measures crowd face mask usage in real-time.

MaskCam MaskCam is a prototype reference design for a Jetson Nano-based smart camera system that measures crowd face mask usage in real-time, with all

BDTI 212 Dec 29, 2022
Face Recognize System on camera AI OAK1

FRS on OAK1 Face Recognize System on camera OAK1 This project contains our work that deploy on camera OAK1 Features Anti-Spoofing Face detection Face

Tran Anh Tuan 6 Aug 8, 2022
Implementation of self-attention mechanisms for general purpose. Focused on computer vision modules. Ongoing repository.

Self-attention building blocks for computer vision applications in PyTorch Implementation of self attention mechanisms for computer vision in PyTorch

AI Summer 962 Dec 23, 2022
tsai is an open-source deep learning package built on top of Pytorch & fastai focused on state-of-the-art techniques for time series classification, regression and forecasting.

Time series Timeseries Deep Learning Pytorch fastai - State-of-the-art Deep Learning with Time Series and Sequences in Pytorch / fastai

timeseriesAI 2.8k Jan 8, 2023
The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.

The Medical Detection Toolkit contains 2D + 3D implementations of prevalent object detectors such as Mask R-CNN, Retina Net, Retina U-Net, as well as a training and inference framework focused on dealing with medical images.

MIC-DKFZ 1.2k Jan 4, 2023
Code for ACL 21: Generating Query Focused Summaries from Query-Free Resources

marge This repository releases the code for Generating Query Focused Summaries from Query-Free Resources. Please cite the following paper [bib] if you

Yumo Xu 28 Nov 10, 2022
TensorFlow Similarity is a python package focused on making similarity learning quick and easy.

TensorFlow Similarity is a python package focused on making similarity learning quick and easy.

null 912 Jan 8, 2023
Automatic tool focused on deriving metallicities of open clusters

metalcode Automatic tool focused on deriving metallicities of open clusters. Based on the method described in Pöhnl & Paunzen (2010, https://ui.adsabs

null 2 Dec 13, 2021
A general-purpose programming language, focused on simplicity, safety and stability.

The Rivet programming language A general-purpose programming language, focused on simplicity, safety and stability. Rivet's goal is to be a very power

The Rivet programming language 17 Dec 29, 2022