A collection of Python scripts that from a RTSP-stream, using a YOLOv5 model trained on in-house synthetic data, alerts members with Slack notifications if there are misplaced tools on the workbench.
-
Clone the repo
-
Create a python virtual environment
python3 -m venv .bvenv
- Source the environment
source .bvenv/bin/activate
- Install the required pip packages
pip3 install -r requirements.txt
Create a file named vars.py at the root containing the slack tokens:
SLACK_BOT_TOKEN = "xoxb-{some string}
SLACK_APP_TOKEN = "xapp-{some string}
Set approperiate weights and update the camera connection in big-brother.py
weight_path = "weights/best.pt"
camera_url = "rtsp://big-brother:8554/ueye"
Then you should be able to run
python3 big-brother.py
This is the driver script. Weights and camera connection is set at the bottom of this file.
Image manipulation, formatting and detection
Intereaction with the Slack API
The tool list and implementation specific constants
A collection of different messages
