Edward Scissorhands is a slackbot that utilizes machinelearning to remove the background of any uploaded image. Edward works best with images containing people.
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.
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/edwardWhere <your_slack_token> is replaced with your bot's 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.
git clone https://github.com/tmw/edward.git && cd edwardscripts/edward testMake sure you fill in the missing pieces in your .env file and simply run:
scripts/edward runif you don't have an .env file, create one by looking at the example (
.example.env)
scripts/edward build
scripts/edward pushFor 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 |