Skip to content

An implementation of a twitter bot that transforms animal images via k-means clustering

Notifications You must be signed in to change notification settings

r-tran/safari-park-twitter-bot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Safari Park Twitter Bot

This repository hosts code for the implementation of the Twitter bot @SafariParkBot.

The bot will collect animal images via the Flickr API, and then transform a randomly selected picture using the K-means clustering segmentation algorithms provided through scikit-image.

The bot posts at a user-defined interval. You can also tweet an image at the bot and it will process the image for you.

Getting Started

After installing the required packages, clone the GitHub Repository and obtain the 1) Twitter API Authentication credentials and a 2) Flickr API Key.

Installation

We use the awesome tweepy API to access Twitter. You will also need to install scikit-image and the requests libraries.

pip install scikit-image
pip install tweepy
pip install requests

Running the bot

Simply get the bot up and running with:

python safaribot.py

Examples

Below are some of my favorite posts from the bot:

Lion Original Lion Transformed

Penguin Original Penguin Transformed

Giraffe Original Giraffe Transformed

About

An implementation of a twitter bot that transforms animal images via k-means clustering

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages