Coder Social home page Coder Social logo

tjf / visionalert Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 0.0 261 KB

Monitor your security cameras for the presence of various objects (people, animals, etc) using Tensorflow

License: GNU Affero General Public License v3.0

Python 95.59% Dockerfile 4.41%
security-cameras tensorflow rtsp

visionalert's Introduction

visionalert

Visionalert is a python application that monitors RTSP streams for objects and sends a push notification to your Android device when something is detected. Upon detecting a configured object, a notification is scheduled to be sent after 5 seconds containing the image containing the image with the highest confidence score detected since the alert was triggered.

Requirements

  • Tensorflow Lite SSD MobileNet model and label file from here
  • Gotify instance and Android application for push notifications
  • MinIO for image hosting (This should work with Amazon S3 as well)

Installation

The easiest way to get this running is by using Docker.

Download the TensorFlow model from the link above, unzip it into a directory and create a configuration file named config.yml like the following:

  1. Download the Tensorflow model and unzip it into your current directory. This also supports the Google Coral EdgeTPU Accelerator but you need to use a compatible SSD model with it. Note: Only configure the model, use the labelmap from the above link. This is due to a different format for the labelmap that comes with the SSD MobileNet for the EdgeTPU.
$ wget -q https://storage.googleapis.com/download.tensorflow.org/models/tflite/coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
    
$ unzip coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip 
Archive:  coco_ssd_mobilenet_v1_1.0_quant_2018_06_29.zip
  inflating: detect.tflite           
  inflating: labelmap.txt            
  1. Create a configuration file named config.yml in your current directory. There is a sample configuration file located here

  2. Start the visionalert service by executing the following command. Note, this will launch the container into the background.

docker run -d -v ${PWD}:/conf --name visionalert tylerfrederick/visionalert:latest
  1. You can monitor the behavior of the application or view the logs by running docker logs visionalert

Roadmap

  • Object area boundaries. Suppress alerts if a detected object is too large or small to help prevent false alerts.
  • Other notification strategies. Considering MQTT so I can use it to trigger Node-Red flows.

Contributing

Pull requests are welcome!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.