Giter Site home page Giter Site logo

pryce-jones-systems / bird-watcher Goto Github PK

View Code? Open in Web Editor NEW
3.0 1.0 0.0 20.42 MB

Lightweight CCTV system for watching birds in a feeder/nesting box. Uses machine learning to recognise birds. Written in Go. Intended for Raspberry Pi 4 and above.

Home Page: https://pryce-jones-systems.com

License: GNU General Public License v3.0

Go 98.21% Shell 1.79%
raspberry-pi golang machine-learning birdwatching artificial-intelligence computer-vision cctv microservices

bird-watcher's Introduction

bird-watcher

Essentially it's a CCTV system, but it's meant specifically for watching birds at a feeder or in a nest box. It's designed to run on a Raspberry Pi 4, and as such does not feature GPU acceleration. However, it does make efficient use of all CPU cores available to it.

1 STRUCTURE

The system is divided into several microservices, each of which is a seperate GoLand project. This structure allows one or more services to go offline without bringing down the entire system, and for different services to be optionally offloaded onto different physical machines for better performance. It also allows the system to be easily configured to incorporate multiple IP cameras.

All of the microservices are controlled with systemctl and they each have a config JSON file in /etc/bird-watcher-$VERSION.

1.1 WEBCAM CONTROLLER SERVICE (WCS)

This one's pretty simple (it's only about 400 lines!) This microservice's job is to read raw data from a video device, convert it to JPEG, and stream it over HTTP. If you already have an IP camera, then you don't need to use this microservice because all it does is turn a USB webcam into an IP camera.

The BlackJack library (github.com/blackjack/webcam) is used to interact with the Video4Linux susbsystem. This microservice is super-lightweight, so it can run on even a really underpowered device.

1.2 ACTIVITY DETECTOR SERVICE (ADS)

This microservice's job is to monitor an MJPEG image stream over HTTP (the stream can be local or remote) and decide whether any activity that is worth recording is happening. If such activity is taking place, a video is recorded and placed in a directory where it is accessible to the ABS.

There are a number of ways to detect activity - the simplest of course is just to detect movement - but the best way (at least for bird watching) is to use a machine learning technique to determine what is going on. This microservice has several methods of detecting activity (including machine learning). The method used and relevant thresholds are set in the config file.

1.3 APPLICATION BACKEND SERVICE (ABS)

blah

1.4 APPLICATION FRONTEND SERVICE (AFS)

blah

2 INSTALLATION

To build and install the project, run install.sh with root privileges.

Config files are located at /etc/bird-watcher$VERSION Binaries are located at /bin/bird-watcher$VERSION

Any of the services can be executed from any directory, but placing the binaries in /bin gives every user access. If you want to play around with different configurations, launch a service from any directory and make sure there is a file called config.json in that directory. This config file will override the one in /etc/bird-watcher-$VERSION

bird-watcher's People

Contributors

pryce-jones-systems avatar

Stargazers

 avatar  avatar  avatar

Watchers

 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.