Go to file
slashtechno 00f777950c
(Attempt to) switch to Rye
2024-03-08 20:36:17 -06:00
.devcontainer Add devcontainer config 2023-12-02 21:32:53 -06:00
.github/workflows Attempted to fix error with action permissions 2024-03-03 18:13:06 -06:00
.old (Attempt to) switch to Rye 2024-03-08 20:36:17 -06:00
.vscode Multiple sources can now be used 2024-02-16 12:34:39 -06:00
faces Create Deepface Jupyter Notebook 2023-10-13 20:51:16 -05:00
rye Convert to a semi-standard pyproject.toml 2024-03-08 18:56:10 -06:00
wyzely_detect Set version to 0.2 2024-03-03 18:03:25 -06:00
.deepsource.toml Update max line length (Deepsource) 2024-02-16 13:11:01 -06:00
.dockerignore Fixed Docker support and updated README.md 2023-10-14 22:31:48 -05:00
.gitignore Fix representations_<model>.pkl not being created 2023-10-22 16:20:57 -05:00
.pyproject.toml.old (Attempt to) switch to Rye 2024-03-08 20:36:17 -06:00
.python-version Confirmed working on Linux 2024-03-02 21:20:51 -06:00
Dockerfile Docker is working again 2024-03-08 16:15:58 -06:00
LICENSE Update LICENSE (GPLv3 -> AGPLv3) 2024-02-02 17:42:52 -06:00
README.md Docker is working again 2024-03-08 16:15:58 -06:00
deepface-test.ipynb Fixed unknown face causing error 2023-11-02 19:54:55 -05:00
docker-compose.yml Docker is working again 2024-03-08 16:15:58 -06:00
poetry.lock Docker is working again 2024-03-08 16:15:58 -06:00
pyproject.toml (Attempt to) switch to Rye 2024-03-08 20:36:17 -06:00
requirements-dev.lock (Attempt to) switch to Rye 2024-03-08 20:36:17 -06:00
requirements.lock (Attempt to) switch to Rye 2024-03-08 20:36:17 -06:00

README.md

Wyzely Detect

Recognize faces/objects in a video stream (from a webcam or a security camera) and send notifications to your devices

Features

  • Recognize objects
  • Recognize faces
  • Send notifications to your phone (or other devices) using ntfy
  • Optionally, run headless with Docker
  • Either use a webcam or an RTSP feed

Prerequisites

Python

  • Camera, either a webcam or a Wyze Cam
    • All RTSP feeds should work, however.
    • WSL, by default, does not support USB devices. It is recommended to natively run this, but it is possible to use it on WSL with streams or some workarounds.
  • Python 3.10 or 3.11
  • Poetry (optional)
  • Windows or Linux
    • I've tested this on MacOS - it works on my 2014 MacBook Air but not a 2011 MacBook Pro
    • Both were upgraded with OpenCore, with the MacBook Air running Monterey and the MacBook Pro running a newer version of MacOS, which may have been the problem

Docker

  • A Wyze Cam
    • Any other RTSP feed should work, as mentioned above
  • Docker
  • Docker Compose

What's not required

  • A Wyze subscription

Usage

Installation

Cloning the repository is not required when installing from PyPi but is required when installing from source

  1. Clone this repo with git clone https://github.com/slashtechno/wyzely-detect
  2. cd into the cloned repository
  3. Then, either install with Poetry or run with Docker

This assumes you have Python 3.10 or 3.11 installed

  1. pip install wyzely-detect
    a. You may need to use pip3 instead of pip
  2. wyzely-detect

Poetry (best for GPU support)

  1. poetry install
    a. For GPU support, use poetry install -E cuda --with gpu
  2. poetry run -- wyzely-detect

Docker

Running with Docker has the benefit of having easier configuration, the ability to run headlessly, and easy setup of Ntfy and mrlt8/docker-wyze-bridge. However, for now, CPU-only is supported. Contributions are welcome to add GPU support. In addition, Docker is tested a less-tested method of running this program.

  1. Modify to docker-compose.yml to achieve desired configuration
  2. Run in the background with docker compose up -d

Configuration

The following are some basic CLI options. Most flags have environment variable equivalents which can be helpful when using Docker.

  • For face recognition, put images of faces in subdirectories ./faces (this can be changed with --faces-directory)
    • Keep in mind, on the first run, face rec
  • By default, notifications are sent for all objects. This can be changed with one or more occurrences of --detect-object to specify which objects to detect
    • Currently, all classes in the COCO dataset can be detected
  • To specify where notifications are sent, specify a ntfy URL with --ntfy-url
  • To configure the program when using Docker, edit docker-compose.yml and/or set environment variables.
  • For further information, use --help

How to uninstall

  • If you used Docker, run docker-compose down --rmi all in the cloned repository
  • If you used Poetry, just delete the virtual environment and then the cloned repository