Skip to content

EdvardSire/big-brother

Repository files navigation

Detecting misplaced tools

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.

Intalling

  1. Clone the repo

  2. Create a python virtual environment

python3 -m venv .bvenv
  1. Source the environment
source .bvenv/bin/activate
  1. Install the required pip packages
pip3 install -r requirements.txt

Usage

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

Structure

big-brother.py

This is the driver script. Weights and camera connection is set at the bottom of this file.

big-brother-utils.py

Image manipulation, formatting and detection

slackapi.py

Intereaction with the Slack API

constants.py

The tool list and implementation specific constants

random_messages.py

A collection of different messages

About

Detecting misplaced tools

Resources

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages