Giter Site home page Giter Site logo

saifrahmed / motion Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dcmartin/motion-ai

0.0 2.0 0.0 79.62 MB

AI assisted motion detection for Home Assistant

Home Page: http://horizon.dcmartin.com/

License: Apache License 2.0

Shell 37.58% Makefile 40.34% Python 12.53% HTML 9.54%

motion's Introduction

motion รƒ๐Ÿ‘

This repository is a demonstration and proof-of-concept for an AI assistants providing improved situational awareness from a collection of network accessible video cameras. Most consumer-grade Web cameras -- or similar devices -- send notifications when motion occurs.

Motion is often defined as a change in the video from one instance to the next; these changes are often influenced by light, wind, and many other environmental factors -- producing a large number of notifications. While limitations may be set on the amount of change, a better solution would detect and classify movement.

To accomplish that objective, a combination of open source components have been integrated to provide a means to detect motion and recognize selected entities, e.g. a person, a vehicle, or an animal. The resulting detection may then be processed for notifications as well as analysis.

All of this processing is performed on local devices; there are no cloud services utilized. This pattern is known as edge computing.

Status

Build Status Coverage Status

Components

1. Home Assistant

Home Assistant is an open source home automation software putting local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server. HomeAssistant includes add-on Docker containers from the HomeAssistant community. Please refer to the installation instructions for Home Assistant in HASSIO.md.

motion add-on

The Home Assistant add-on motion provides the capabilities of the Motion Project software in conjunction with a specified message broker to capture and process motion detection events. These events are published as MQTT topics for consumption by Home Assistant and the supporting Open Horizon yolo4motion service.

Please refer to MOTION.md for further information.

In addition, the following community add-ons should be configured appropriately:

  • MQTT - may be run privately on local device or shared on network
  • FTP - optional, only required for ftpd type cameras

2. Open Horizon services

Open Horizon is an open source edge fabric for microservices. The Open Horizon microservices are run as Docker containers on a distributed network across a wide range of computing devices; from Power9 servers to RaspberryPi Zero W micro-computers.

yolo4motion

Supports amd64 Architecture Docker Pulls

Supports arm Architecture Docker Pulls

Supports arm64 Architecture Docker Pulls

The Open Horizon service yolo4motion provides the capabilities of the YOLO software in conjunction with a specified MQTT message broker. This service subscribes to the topic {group}/{device}/{camera}/event/end and processes the JavaScript Object Notation (JSON) payload which includes a selected JPEG image (n.b. BASE64 encoded) from the motion event. This service may be used independently of the Open Horizon service as a stand-alone Docker container; see yolo4motion.sh

alpr4motion

Supports amd64 Architecture Docker Pulls

Supports arm Architecture Docker Pulls

Supports arm64 Architecture Docker Pulls

The Open Horizon service alpr4motion provides the capabilities of the OpenALPR software in conjunction with a specified MQTT message broker. This service subscribes to the topic {group}/{device}/{camera}/event/end and processes the JavaScript Object Notation (JSON) payload which includes a selected JPEG image (n.b. BASE64 encoded) from the motion event. This service may be used independently of the Open Horizon service as a stand-alone Docker container; see alpr4motion.sh

face4motion

Supports amd64 Architecture Docker Pulls

Supports arm Architecture Docker Pulls

Supports arm64 Architecture Docker Pulls

The Open Horizon service face4motion provides the capabilities of the OpenFACE software in conjunction with a specified MQTT message broker. This service subscribes to the topic {group}/{device}/{camera}/event/end and processes the JavaScript Object Notation (JSON) payload which includes a selected JPEG image (n.b. BASE64 encoded) from the motion event. This service may be used independently of the Open Horizon service as a stand-alone Docker container; see face4motion.sh

Example

When combined together and operating successfully, the system automatically detects person and provides both visual update of the Web user-interface for the most recent entity, as well as most recent detection of any entity, as well as provides notifications through the Web interface (n.b. mobile notifications require SSL and are pending).

Data may be saved locally and processed to produce historical graphs as well as exported for analysis using other tools, e.g. time-series database InfluxDB and analysis front-end Grafana. Data may also be processed using Jupyter notebooks.

example

What is edge computing?

The edge of the network is where connectivity is lost and privacy is challenged; extending the services developed for the cloud to these scenarios requires additional considerations for microservices development, notably graceful degradation when services are lost, as well as automated recovery and restart when appropriate. Available computing in edge scenarios may vary from a single device to multiple varying devices on a local-area-network (LAN), for example home automation. Example use-cases include detecting motion and classifying entities seen and monitoring Internet connectivity.

Further reading

Changelog & Releases

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

Authors & contributors

David C Martin ([email protected])

Stargazers

Stargazers over time

motion's People

Contributors

dcmartin avatar

Watchers

James Cloos avatar  avatar

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.