1
0
Fork
You've already forked predalert
0
No description
  • Python 79.1%
  • JavaScript 8.1%
  • HTML 6.8%
  • CSS 4.5%
  • Dockerfile 1.5%
2025年10月26日 23:40:36 +01:00
.gitlab/issue_templates Update file general_template.md 2023年05月21日 09:29:40 +00:00
assets add prediction image 2025年10月26日 23:40:36 +01:00
config Containerization 2024年05月24日 11:18:53 +00:00
media Containerization 2024年05月24日 11:18:53 +00:00
predalert Status at the time of thesis submission 2024年05月28日 00:23:48 +02:00
utils Status at the time of thesis submission 2024年05月28日 00:23:48 +02:00
.dockerignore Containerization 2024年05月24日 11:18:53 +00:00
.gitattributes include example videos. Store videos and model checkpoints in LFS. show multiple sources in grid using OpenCV. 2023年05月21日 00:32:11 +02:00
.gitignore update .gitignore 2024年03月30日 10:54:02 +01:00
compose.yaml Containerization 2024年05月24日 11:18:53 +00:00
Containerfile Containerization 2024年05月24日 11:18:53 +00:00
cyclone-dx.json Status at the time of thesis submission 2024年05月28日 00:23:48 +02:00
LICENCE rename LICENCE, initial commit for README.md 2023年05月20日 01:01:27 +02:00
PRIVACY.md add privacy statement, add elements to roadmap, improve introduction 2023年07月19日 01:14:41 +02:00
pyproject.toml Initial implementation of containerization 2024年05月23日 18:15:13 +02:00
README.md add prediction image 2025年10月26日 23:40:36 +01:00

Predator-Detect-and-Notify

Introduction

This software uses the state-of-the-art YOLOv8 object detection and classification neural net to detect predators in a video stream.

It accomplishes this using model weights (soon-to-be) fine-tuned on a range of farm animals and predators. This software is licenced under AGPL-v3-or-later.

This project is meant for personal (or business) use, within a single network. This is not a saas platform, and making it one is not currently on the roadmap.

"Crop of Predalert detecting a Lynx"

Installation

*This software is Linux-native, and has yet to be tested on Windows. Your mileage on Windows may vary.

  1. $ git clone https://gitlab.com/papiris/predator-detect-and-notify && cd predator-detect-and-notify

You need python --version >3.8 & <=3.11.

  1. $ python3 -m venv .env

  2. $ source .env/bin/activate

  3. python3 -m pip install .

The installation of packages may take a while, having a cup of coffee while you wait is advised.

Your virtual environment is now prepared.

How to use

  1. Find the ip address and path to RTSP stream for your given IP camera(s). Look for your camera make and model here or find the stream URL manually by following this guide.
  2. [optional] set the IP address of your camera to static in your network router.
  3. Change values in config/config.toml and security.toml to suit your environment (important!)
  4. Make sure your virtual environment is activated. If not, repeat step 3 of the install process.
  5. Run python -m predalert

The required computer resources (ram, processing, graphics) scales linearly with the number of sources and their resolution.

Roadmap

  • fine-tune model weights -- [ ] on sheep, humans, dogs and lynx -- [ ] on other classes
  • remove hardcodings, migrate to config file
  • use multiprocessing to increase performance with many sources
  • graceful handling of errors, not let one bad videostream hold back others
  • add motion and proximity logic to determine threat level of predator
  • filter out humans from any data processing for privacy reasons
  • add option to record and store clips of predators
  • add local notification system
  • add webpush notification system
  • add web-based UI for making changes to config file
  • add web-based UI for setting areas of interest (polygons)
  • enable ML offloading (to Coral Accelerator, Codeproject.ai, Deepstack)
  • add privacy statement -- [ ] Improve privacy statement
  • comply with AGPL-v3 (source available to all users, even when the program is served over network)
  • make deployable in docker or other package format
  • Add integrations with / bridges for various drones for ranged (and autonomous) grazing area surveillance
  • Add integrations with / bridges for various wildlife cameras

Contributions

This project accepts contributions of many kinds. Due to my employment status (on welfare), monetary contributions are most welcome. I'll get a donation link up soon. There are many ways to contribute apart from monetarily;

  1. code (merge requests)
  2. bug reports
  3. training material (images/videos)
  4. spread the word! I love to hear about users' stories, as well as media recognition. It helps make my case to get more support for the project.

External libraries

  • YOLOv8 (GNU affero General Public License (AGPL-v3))
  • matplotlib (Python Software Foundation License (PSF))
  • openCV (Apache Software License (Apache 2.0))
  • numpy (BSD-3-Clause)
  • deffcode (Apache Software License (Apache 2.0))
  • RT-DETR (Apache Software License (Apache 2.0))
  • vidgear (Apache Software License (Apache 2.0))