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
ByteTrack: Multi-Object Tracking by Associating Every Detection Box

ByteTrack ByteTrack is a simple, fast and strong multi-object tracker. ByteTrack: Multi-Object Tracking by Associating Every Detection Box Yifu Zhang,

Yifu Zhang 2.9k Jan 04, 2023
RATCHET is a Medical Transformer for Chest X-ray Diagnosis and Reporting

RATCHET: RAdiological Text Captioning for Human Examined Thoraxes RATCHET is a Medical Transformer for Chest X-ray Diagnosis and Reporting. Based on t

26 Nov 14, 2022
PINN Burgers - 1D Burgers equation simulated by PINN

PINN(s): Physics-Informed Neural Network(s) for Burgers equation This is an impl

ShotaDEGUCHI 1 Feb 12, 2022
Yolo ros - YOLO-ROS for HUAWEI ATLAS200

YOLO-ROS YOLO-ROS for NVIDIA YOLO-ROS for HUAWEI ATLAS200, please checkout for b

ChrisLiu 5 Oct 18, 2022
Code release of paper Improving neural implicit surfaces geometry with patch warping

NeuralWarp: Improving neural implicit surfaces geometry with patch warping Project page | Paper Code release of paper Improving neural implicit surfac

François Darmon 167 Dec 30, 2022
PyTorch implementation of the cross-modality generative model that synthesizes dance from music.

Dancing to Music PyTorch implementation of the cross-modality generative model that synthesizes dance from music. Paper Hsin-Ying Lee, Xiaodong Yang,

NVIDIA Research Projects 485 Dec 26, 2022
ViDT: An Efficient and Effective Fully Transformer-based Object Detector

ViDT: An Efficient and Effective Fully Transformer-based Object Detector by Hwanjun Song1, Deqing Sun2, Sanghyuk Chun1, Varun Jampani2, Dongyoon Han1,

NAVER AI 262 Dec 27, 2022
Some methods for comparing network representations in deep learning and neuroscience.

Generalized Shape Metrics on Neural Representations In neuroscience and in deep learning, quantifying the (dis)similarity of neural representations ac

Alex Williams 45 Dec 27, 2022
No Code AI/ML platform

NoCodeAIML No Code AI/ML platform - Community Edition Video credits: Uday Kiran Typical No Code AI/ML Platform will have features like drag and drop,

Bhagvan Kommadi 5 Jan 28, 2022
arxiv-sanity, but very lite, simply providing the core value proposition of the ability to tag arxiv papers of interest and have the program recommend similar papers.

arxiv-sanity, but very lite, simply providing the core value proposition of the ability to tag arxiv papers of interest and have the program recommend similar papers.

Andrej 671 Dec 31, 2022
A highly modular PyTorch framework with a focus on Neural Architecture Search (NAS).

UniNAS A highly modular PyTorch framework with a focus on Neural Architecture Search (NAS). under development (which happens mostly on our internal Gi

Cognitive Systems Research Group 19 Nov 23, 2022
LLVM-based compiler for LightGBM gradient-boosted trees. Speeds up prediction by ≥10x.

LLVM-based compiler for LightGBM gradient-boosted trees. Speeds up prediction by ≥10x.

Simon Boehm 183 Jan 02, 2023
Official pytorch implementation of the paper: "SinGAN: Learning a Generative Model from a Single Natural Image"

SinGAN Project | Arxiv | CVF | Supplementary materials | Talk (ICCV`19) Official pytorch implementation of the paper: "SinGAN: Learning a Generative M

Tamar Rott Shaham 3.2k Dec 25, 2022
ML powered analytics engine for outlier detection and root cause analysis.

Website • Docs • Blog • LinkedIn • Community Slack ML powered analytics engine for outlier detection and root cause analysis ✨ What is Chaos Genius? C

Chaos Genius 523 Jan 04, 2023
A higher performance pytorch implementation of DeepLab V3 Plus(DeepLab v3+)

A Higher Performance Pytorch Implementation of DeepLab V3 Plus Introduction This repo is an (re-)implementation of Encoder-Decoder with Atrous Separab

linhua 326 Nov 22, 2022
A Machine Teaching Framework for Scalable Recognition

MEMORABLE This repository contains the source code accompanying our ICCV 2021 paper. A Machine Teaching Framework for Scalable Recognition Pei Wang, N

2 Dec 08, 2021
This is the pytorch implementation of the paper - Axiomatic Attribution for Deep Networks.

Integrated Gradients This is the pytorch implementation of "Axiomatic Attribution for Deep Networks". The original tensorflow version could be found h

Tianhong Dai 150 Dec 23, 2022
Concept drift monitoring for HA model servers.

{Fast, Correct, Simple} - pick three Easily compare training and production ML data & model distributions Goals Boxkite is an instrumentation library

98 Dec 15, 2022
Bayesian Optimization Library for Medical Image Segmentation.

bayesmedaug: Bayesian Optimization Library for Medical Image Segmentation. bayesmedaug optimizes your data augmentation hyperparameters for medical im

Şafak Bilici 7 Feb 10, 2022