Standardize program name and description
This commit is contained in:
parent
96247767fb
commit
d83315518a
|
@ -8,7 +8,7 @@
|
||||||
"name": "Python: Module",
|
"name": "Python: Module",
|
||||||
"type": "python",
|
"type": "python",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"module": "set_detect_notify",
|
"module": "wyzely_detect",
|
||||||
"justMyCode": true
|
"justMyCode": true
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
"files.eol": "\n"
|
||||||
|
}
|
14
README.md
14
README.md
|
@ -1,5 +1,5 @@
|
||||||
# Wyzely Detect
|
# Wyzely Detect
|
||||||
Recognize faces/objects in a video stream (from a webcam or a security camera) and send notifications to your phone (or other devices)
|
Recognize faces/objects in a video stream (from a webcam or a security camera) and send notifications to your devices
|
||||||
|
|
||||||
### Features
|
### Features
|
||||||
- Recognize objects
|
- Recognize objects
|
||||||
|
@ -14,21 +14,21 @@ Recognize faces/objects in a video stream (from a webcam or a security camera) a
|
||||||
### Poetry/Python
|
### Poetry/Python
|
||||||
- Camera, either a webcam or a Wyze Cam
|
- Camera, either a webcam or a Wyze Cam
|
||||||
- All RTSP feeds _should_ work, however.
|
- All RTSP feeds _should_ work, however.
|
||||||
- Python
|
- Python 3.10 or 3.11
|
||||||
- 3.10.5 is confirmed to work and problems have been encountered with 3.11
|
|
||||||
- Poetry
|
- Poetry
|
||||||
### Docker
|
### Docker
|
||||||
- A Wyze Cam
|
- A Wyze Cam
|
||||||
- Any other RTSP feed _should_ work, as mentioned above
|
- Any other RTSP feed _should_ work, as mentioned above
|
||||||
- Python
|
- Docker
|
||||||
- Poetry
|
- Docker Compose
|
||||||
|
|
||||||
|
|
||||||
## What's not required
|
## What's not required
|
||||||
- A Wyze subscription
|
- A Wyze subscription
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
### Installation
|
### Installation
|
||||||
1. Clone this repo with `git clone https://github.com/slashtechno/wyze-face-recognition.git`
|
1. Clone this repo with `git clone https://github.com/slashtechno/wyze-face-recognition.git` <!-- This URL should be changed once the repo is renamed -->
|
||||||
2. `cd` into the cloned repository
|
2. `cd` into the cloned repository
|
||||||
3. Then, either install with [Poetry](https://python-poetry.org/) or run with Docker
|
3. Then, either install with [Poetry](https://python-poetry.org/) or run with Docker
|
||||||
|
|
||||||
|
@ -38,7 +38,7 @@ Recognize faces/objects in a video stream (from a webcam or a security camera) a
|
||||||
|
|
||||||
#### Poetry
|
#### Poetry
|
||||||
1. `poetry install`
|
1. `poetry install`
|
||||||
2. `poetry run -- set-detect-notify`
|
2. `poetry run -- wyzely-detect`
|
||||||
### Configuration
|
### Configuration
|
||||||
The following are some basic CLI options. Most flags have environment variable equivalents which can be helpful when using Docker.
|
The following are some basic CLI options. Most flags have environment variable equivalents which can be helpful when using Docker.
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ networks:
|
||||||
all:
|
all:
|
||||||
services:
|
services:
|
||||||
bridge:
|
bridge:
|
||||||
container_name: bridge-wyze
|
container_name: bridge-wyzely-detect
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
image: mrlt8/wyze-bridge:latest
|
image: mrlt8/wyze-bridge:latest
|
||||||
# I think we can remove the ports, since we're using the network
|
# I think we can remove the ports, since we're using the network
|
||||||
|
@ -20,7 +20,7 @@ services:
|
||||||
all:
|
all:
|
||||||
ntfy:
|
ntfy:
|
||||||
image: binwiederhier/ntfy
|
image: binwiederhier/ntfy
|
||||||
container_name: ntfy-wyze
|
container_name: ntfy-wyzely-detect
|
||||||
command:
|
command:
|
||||||
- serve
|
- serve
|
||||||
environment:
|
environment:
|
||||||
|
@ -33,10 +33,10 @@ services:
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
networks:
|
networks:
|
||||||
all:
|
all:
|
||||||
facial_recognition:
|
wyzely-detect:
|
||||||
container_name: face-recognition-wyze
|
container_name: wyzely-detect
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
# image: ghcr.io/slashtechno/wyze_face_recognition:latest
|
# image: ghcr.io/slashtechno/wyzely-detect:latest
|
||||||
build:
|
build:
|
||||||
context: .
|
context: .
|
||||||
dockerfile: Dockerfile
|
dockerfile: Dockerfile
|
||||||
|
@ -47,7 +47,7 @@ services:
|
||||||
environment:
|
environment:
|
||||||
- URL=rtsp://bridge:8554/cv
|
- URL=rtsp://bridge:8554/cv
|
||||||
- NO_DISPLAY=true
|
- NO_DISPLAY=true
|
||||||
- NTFY_URL=http://ntfy:80/set-detect-notify
|
- NTFY_URL=http://ntfy:80/wyzely-detect
|
||||||
depends_on:
|
depends_on:
|
||||||
- bridge
|
- bridge
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
[tool.poetry]
|
[tool.poetry]
|
||||||
name = "wyzely-detect"
|
name = "wyzely-detect"
|
||||||
version = "0.1.0"
|
version = "0.1.8"
|
||||||
description = "Detect all the things"
|
description = "Recognize faces/objects in a video stream (from a webcam or a security camera) and send notifications to your devices"
|
||||||
authors = ["slashtechno <77907286+slashtechno@users.noreply.github.com>"]
|
authors = ["slashtechno <77907286+slashtechno@users.noreply.github.com>"]
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
@ -9,8 +9,7 @@ packages = [{include = "wyzely_detect"}]
|
||||||
|
|
||||||
[tool.poetry.dependencies]
|
[tool.poetry.dependencies]
|
||||||
|
|
||||||
# As of 10/21/23, Python 3.11 doesn't work (at least on Windows)
|
# Works on 3.10 and 3.11, at least in my testing
|
||||||
# Seems "^3.10" won't work because of TensorFlow or another library
|
|
||||||
python = ">=3.10, <3.12"
|
python = ">=3.10, <3.12"
|
||||||
|
|
||||||
python-dotenv = "^1.0.0"
|
python-dotenv = "^1.0.0"
|
||||||
|
@ -25,6 +24,7 @@ torch = ">=2.0.0, !=2.0.1, !=2.1.0"
|
||||||
|
|
||||||
# https://stackoverflow.com/a/76477590/18270659
|
# https://stackoverflow.com/a/76477590/18270659
|
||||||
# https://discuss.tensorflow.org/t/tensorflow-io-gcs-filesystem-with-windows/18849/4
|
# https://discuss.tensorflow.org/t/tensorflow-io-gcs-filesystem-with-windows/18849/4
|
||||||
|
# Might be able to remove this version constraint later
|
||||||
tensorflow-io-gcs-filesystem = "0.31.0"
|
tensorflow-io-gcs-filesystem = "0.31.0"
|
||||||
|
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ build-backend = "poetry.core.masonry.api"
|
||||||
# Where possible, `black` will attempt to format to 88 characters
|
# Where possible, `black` will attempt to format to 88 characters
|
||||||
# However, setting ruff to 135 will allow for longer lines that can't be auto-formatted
|
# However, setting ruff to 135 will allow for longer lines that can't be auto-formatted
|
||||||
line-length = 135
|
line-length = 135
|
||||||
|
extend-select= ["FIX002"]
|
||||||
|
|
||||||
[tool.poetry.scripts]
|
[tool.poetry.scripts]
|
||||||
wyzely-detect = "wyzely_detect.__main__:main"
|
wyzely-detect = "wyzely_detect.__main__:main"
|
|
@ -34,8 +34,8 @@ def main():
|
||||||
print("No .env file found")
|
print("No .env file found")
|
||||||
|
|
||||||
argparser = argparse.ArgumentParser(
|
argparser = argparse.ArgumentParser(
|
||||||
prog="Detect It",
|
prog="Wyzely Detect",
|
||||||
description="Detect it all!",
|
description="Recognize faces/objects in a video stream (from a webcam or a security camera) and send notifications to your devices", # noqa: E501
|
||||||
epilog=":)",
|
epilog=":)",
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -118,13 +118,13 @@ def main():
|
||||||
# Defaults for the stuff here and down are already set in notify.py.
|
# Defaults for the stuff here and down are already set in notify.py.
|
||||||
# Setting them here just means that argparse will display the default values as defualt
|
# Setting them here just means that argparse will display the default values as defualt
|
||||||
# TODO: Perhaps just remove the default parameter and just add to the help message that the default is set is x
|
# TODO: Perhaps just remove the default parameter and just add to the help message that the default is set is x
|
||||||
|
# TODO: Make ntfy optional in ntfy.py
|
||||||
notifcation_services = argparser.add_argument_group("Notification Services")
|
notifcation_services = argparser.add_argument_group("Notification Services")
|
||||||
notifcation_services.add_argument(
|
notifcation_services.add_argument(
|
||||||
"--ntfy-url",
|
"--ntfy-url",
|
||||||
default=os.environ["NTFY_URL"]
|
default=os.environ["NTFY_URL"]
|
||||||
if "NTFY_URL" in os.environ and os.environ["NTFY_URL"] != ""
|
if "NTFY_URL" in os.environ and os.environ["NTFY_URL"] != ""
|
||||||
else "https://ntfy.sh/set-detect-notify",
|
else "https://ntfy.sh/wyzely-detect",
|
||||||
type=str,
|
type=str,
|
||||||
help="The URL to send notifications to",
|
help="The URL to send notifications to",
|
||||||
)
|
)
|
||||||
|
|
|
@ -32,7 +32,7 @@ def thing_detected(
|
||||||
detection_window: int = 15,
|
detection_window: int = 15,
|
||||||
detection_duration: int = 2,
|
detection_duration: int = 2,
|
||||||
notification_window: int = 15,
|
notification_window: int = 15,
|
||||||
ntfy_url: str = "https://ntfy.sh/set-detect-notify",
|
ntfy_url: str = "https://ntfy.sh/wyzely-detect",
|
||||||
) -> dict:
|
) -> dict:
|
||||||
"""
|
"""
|
||||||
A function to make sure 2 seconds of detection is detected in 15 seconds, 15 seconds apart.
|
A function to make sure 2 seconds of detection is detected in 15 seconds, 15 seconds apart.
|
||||||
|
|
Loading…
Reference in New Issue