Skip to content
/ edward Public

Edward Scissorhands is a Slackbot that utilizes machinelearning to remove the background of images share with Edward 🤖✂️

License

Notifications You must be signed in to change notification settings

Tmw/edward

Repository files navigation



Build Status

Edward Scissorhands is a slackbot that utilizes machinelearning to remove the background of any uploaded image. Edward works best with images containing people.

Demo

Edward's brain 🧠

Edward depends on a pre-trained Tensorflow model as explained in this blogpost. The fully pre-trained model can be found over their Gitlab Repository.

Note; the model in this repository is merely a mirror. In both cases; pull using git lfs.

Running from Docker

By far the easiest way to run Edward is by using Docker. Pull the image directly from Dockerhub, give Edward a SLACK_TOKEN and we're off to the races!

Example:

docker run -it --rm \
  -e "SLACK_TOKEN=<your_slack_token>" \
  tiemenwaterreus/edward

Where <your_slack_token> is replaced with your bot's Slack Token

Obtaining a slack_token

Getting a slack (bot) token is easy; just browse to create bot integration page on Slack, give your bot an username (eg: edward) and hit the green button. Hooray! You just made a Slack (bot) integration!

On the next page you can customize your integration some more by providing an icon and a short description. The most important piece is the API Token near the top. Its a pretty long string which starts with xoxb-. Copy this token and pass it in the env-variables of edward.

Run from Source

git clone https://github.com/tmw/edward.git && cd edward

Running Tests

scripts/edward test

Running Edward locally

Make sure you fill in the missing pieces in your .env file and simply run:

scripts/edward run

if you don't have an .env file, create one by looking at the example (.example.env)

Build & push

scripts/edward build
scripts/edward push

Environment Variables

For additional tweaks, edward is taking the following environment variables into account when booting up:

Variable Type Meaning
SLACK_TOKEN String Your slack token
THREADS Int How many threads do we reserve

About

Edward Scissorhands is a Slackbot that utilizes machinelearning to remove the background of images share with Edward 🤖✂️

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published